From f65a5935dd5798db39f3e382f8ac9c5da410b913 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Fri, 18 Jan 2019 15:28:28 -0800 Subject: [PATCH] Fixed compiler warnings --- microscript/ILibDuktape_Polyfills.c | 2 +- microstack/ILibSimpleDataStore.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/microscript/ILibDuktape_Polyfills.c b/microscript/ILibDuktape_Polyfills.c index b8abe27..a150db5 100644 --- a/microscript/ILibDuktape_Polyfills.c +++ b/microscript/ILibDuktape_Polyfills.c @@ -1955,7 +1955,7 @@ void ILibDuktape_dataGenerator_onResume(struct ILibDuktape_readableStream *sende SHA256_Init(&shctx); SHA256_Update(&shctx, buffer + UTIL_SHA256_HASHSIZE, bufferLen - UTIL_SHA256_HASHSIZE); SHA256_Final((unsigned char*)buffer, &shctx); - ILibDuktape_readableStream_WriteData(sender, buffer, bufferLen); + ILibDuktape_readableStream_WriteData(sender, buffer, (int)bufferLen); } } duk_ret_t ILibDuktape_dataGenerator_const(duk_context *ctx) diff --git a/microstack/ILibSimpleDataStore.c b/microstack/ILibSimpleDataStore.c index 662d95d..ef5b11f 100644 --- a/microstack/ILibSimpleDataStore.c +++ b/microstack/ILibSimpleDataStore.c @@ -36,7 +36,7 @@ limitations under the License. #define ILibSimpleDataStore_SeekPosition(filePtr, position, seekMode) _fseeki64(filePtr, position, seekMode) #else #define ILibSimpleDataStore_GetPosition(filePtr) ftell(filePtr) - #define ILibSimpleDataStore_SeekPosition(filePtr, position, seekMode) fseek(filePtr, position, seekMode) + #define ILibSimpleDataStore_SeekPosition(filePtr, position, seekMode) fseek(filePtr, (long)position, seekMode) #endif typedef struct ILibSimpleDataStore_Root @@ -158,7 +158,7 @@ ILibSimpleDataStore_RecordHeader_NG* ILibSimpleDataStore_ReadNextRecord(ILibSimp } i = (int)fread((void*)node, 1, nodeSize, root->dataFile); - if (i < nodeSize) return NULL; + if (i < (int)nodeSize) return NULL; // Correct the struct, valueHash stays the same