Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix win.x64 warnings

  • Loading branch information...
commit 317dee73c48ca1d3532ec8831db1211c6ebead8c 1 parent eb63cf6
Chris McClelland authored

Showing 3 changed files with 8 additions and 8 deletions. Show diff stats Hide diff stats

  1. +5 5 svf2csvf.c
  2. +1 1  util.c
  3. +2 2 xsvf2csvf.c
10 svf2csvf.c
@@ -85,7 +85,7 @@ FLStatus readBytes(
85 85 struct Buffer *buffer, const char *hexDigits, const char **error)
86 86 {
87 87 FLStatus returnCode = FL_SUCCESS;
88   - uint32 length = strlen(hexDigits);
  88 + uint32 length = (uint32)strlen(hexDigits);
89 89 uint8 *p = buffer->data;
90 90 BufferStatus bStatus;
91 91 if ( length & 1 ) {
@@ -755,7 +755,7 @@ static FLStatus postProcess(struct Buffer *buf, const char **error) {
755 755 } else {
756 756 // There have only been non-shift commands (XSDRSIZE,XTDOMASK) since last time,
757 757 // so we can do some deduplication.
758   - bStatus = bufWriteLongBE(buf, runTestOffset + 1, readLongBE(src), error);
  758 + bStatus = bufWriteLongBE(buf, (uint32)runTestOffset + 1, readLongBE(src), error);
759 759 CHECK_STATUS(bStatus, "postProcess()", FL_BUF_APPEND_ERR);
760 760 src += 4;
761 761 }
@@ -800,10 +800,10 @@ static FLStatus postProcess(struct Buffer *buf, const char **error) {
800 800 }
801 801 if ( pass == 0 && !seenShiftCommands ) {
802 802 buf->data[runTestOffset] = XCOMPLETE;
803   - buf->length = runTestOffset + 1;
  803 + buf->length = (uint32)runTestOffset + 1;
804 804 } else {
805 805 *dst++ = XCOMPLETE;
806   - buf->length = dst - buf->data;
  806 + buf->length = (uint32)(dst - buf->data);
807 807 }
808 808 }
809 809 cleanup:
@@ -871,7 +871,7 @@ DLLEXPORT(FLStatus) flLoadSvfAndConvertToCsvf(
871 871 p--;
872 872 } while ( *p == ' ' || *p == '\t' || *p == '\r' );
873 873 p++; // go back to first space char
874   - bStatus = bufAppendBlock(&lineBuf, line, p-line, error);
  874 + bStatus = bufAppendBlock(&lineBuf, line, (uint32)(p - line), error);
875 875 CHECK_STATUS(bStatus, "flLoadSvfAndConvertToCsvf()", FL_BUF_APPEND_ERR);
876 876 while ( p < end && *p != '\n' ) {
877 877 p++;
2  util.c
@@ -66,7 +66,7 @@ DLLEXPORT(uint8*) flLoadFile(const char *name, uint32 *length) {
66 66 if ( fileLen & 1 ) {
67 67 fileLen++;
68 68 }
69   - *length = fileLen;
  69 + *length = (uint32)fileLen;
70 70 }
71 71 fclose(file);
72 72 return buffer;
4 xsvf2csvf.c
@@ -329,12 +329,12 @@ static FLStatus compress(const struct Buffer *inBuf, struct Buffer *outBuf, cons
329 329 }
330 330
331 331 // Get the length of this run
332   - runLen = runEnd - runStart;
  332 + runLen = (uint32)(runEnd - runStart);
333 333
334 334 // If this run is more than four zeros, break the chunk
335 335 if ( runLen > 8 || runEnd == bufEnd ) {
336 336 chunkEnd = runStart;
337   - chunkLen = chunkEnd - chunkStart;
  337 + chunkLen = (uint32)(chunkEnd - chunkStart);
338 338
339 339 // There is now a chunk starting at chunkStart and ending at chunkEnd (length chunkLen),
340 340 // Followed by a run of zeros starting at runStart and ending at runEnd (length runLen).

0 comments on commit 317dee7

Please sign in to comment.
Something went wrong with that request. Please try again.