Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix win.x64 warnings

  • Loading branch information...
commit 317dee73c48ca1d3532ec8831db1211c6ebead8c 1 parent eb63cf6
@makestuff authored
Showing with 8 additions and 8 deletions.
  1. +5 −5 svf2csvf.c
  2. +1 −1  util.c
  3. +2 −2 xsvf2csvf.c
View
10 svf2csvf.c
@@ -85,7 +85,7 @@ FLStatus readBytes(
struct Buffer *buffer, const char *hexDigits, const char **error)
{
FLStatus returnCode = FL_SUCCESS;
- uint32 length = strlen(hexDigits);
+ uint32 length = (uint32)strlen(hexDigits);
uint8 *p = buffer->data;
BufferStatus bStatus;
if ( length & 1 ) {
@@ -755,7 +755,7 @@ static FLStatus postProcess(struct Buffer *buf, const char **error) {
} else {
// There have only been non-shift commands (XSDRSIZE,XTDOMASK) since last time,
// so we can do some deduplication.
- bStatus = bufWriteLongBE(buf, runTestOffset + 1, readLongBE(src), error);
+ bStatus = bufWriteLongBE(buf, (uint32)runTestOffset + 1, readLongBE(src), error);
CHECK_STATUS(bStatus, "postProcess()", FL_BUF_APPEND_ERR);
src += 4;
}
@@ -800,10 +800,10 @@ static FLStatus postProcess(struct Buffer *buf, const char **error) {
}
if ( pass == 0 && !seenShiftCommands ) {
buf->data[runTestOffset] = XCOMPLETE;
- buf->length = runTestOffset + 1;
+ buf->length = (uint32)runTestOffset + 1;
} else {
*dst++ = XCOMPLETE;
- buf->length = dst - buf->data;
+ buf->length = (uint32)(dst - buf->data);
}
}
cleanup:
@@ -871,7 +871,7 @@ DLLEXPORT(FLStatus) flLoadSvfAndConvertToCsvf(
p--;
} while ( *p == ' ' || *p == '\t' || *p == '\r' );
p++; // go back to first space char
- bStatus = bufAppendBlock(&lineBuf, line, p-line, error);
+ bStatus = bufAppendBlock(&lineBuf, line, (uint32)(p - line), error);
CHECK_STATUS(bStatus, "flLoadSvfAndConvertToCsvf()", FL_BUF_APPEND_ERR);
while ( p < end && *p != '\n' ) {
p++;
View
2  util.c
@@ -66,7 +66,7 @@ DLLEXPORT(uint8*) flLoadFile(const char *name, uint32 *length) {
if ( fileLen & 1 ) {
fileLen++;
}
- *length = fileLen;
+ *length = (uint32)fileLen;
}
fclose(file);
return buffer;
View
4 xsvf2csvf.c
@@ -329,12 +329,12 @@ static FLStatus compress(const struct Buffer *inBuf, struct Buffer *outBuf, cons
}
// Get the length of this run
- runLen = runEnd - runStart;
+ runLen = (uint32)(runEnd - runStart);
// If this run is more than four zeros, break the chunk
if ( runLen > 8 || runEnd == bufEnd ) {
chunkEnd = runStart;
- chunkLen = chunkEnd - chunkStart;
+ chunkLen = (uint32)(chunkEnd - chunkStart);
// There is now a chunk starting at chunkStart and ending at chunkEnd (length chunkLen),
// Followed by a run of zeros starting at runStart and ending at runEnd (length runLen).
Please sign in to comment.
Something went wrong with that request. Please try again.