From 7817da63526f35d10d6d4f6b3d9c02280719e023 Mon Sep 17 00:00:00 2001 From: Mike Turvey Date: Mon, 15 Jan 2018 21:50:10 -0700 Subject: Fix compiler warnings --- redist/json_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'redist') diff --git a/redist/json_helpers.c b/redist/json_helpers.c index af7ddda..8da841b 100644 --- a/redist/json_helpers.c +++ b/redist/json_helpers.c @@ -121,7 +121,7 @@ char* load_file_to_mem(const char* path) { fseek( f, 0, SEEK_SET ); char * JSON_STRING = malloc( len + 1); memset(JSON_STRING,0,len+1); - int i = fread( JSON_STRING, len, 1, f ); i = i; //Ignore return value. + size_t i = fread( JSON_STRING, len, 1, f ); i = i; //Ignore return value. fclose( f ); return JSON_STRING; } -- cgit v1.2.3 From b2eb7569a8963917116c4520e15b17f0578a2509 Mon Sep 17 00:00:00 2001 From: Mike Turvey Date: Mon, 15 Jan 2018 22:40:14 -0700 Subject: Fix a few warnings --- redist/CNFGWinDriver.c | 5 ++--- redist/json_helpers.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'redist') diff --git a/redist/CNFGWinDriver.c b/redist/CNFGWinDriver.c index b1c1eb0..9d1be6a 100644 --- a/redist/CNFGWinDriver.c +++ b/redist/CNFGWinDriver.c @@ -54,8 +54,8 @@ void CNFGGetDimensions( short * x, short * y ) lasty = buffery; InternalHandleResize(); } - *x = bufferx; - *y = buffery; + *x = (short)bufferx; + *y = (short)buffery; } @@ -212,7 +212,6 @@ void CNFGSetup( const char * name_of_window, int width, int height ) void CNFGHandleInput() { - int ldown = 0; MSG msg; while( PeekMessage( &msg, lsHWND, 0, 0xFFFF, 1 ) ) diff --git a/redist/json_helpers.c b/redist/json_helpers.c index 8da841b..109708a 100644 --- a/redist/json_helpers.c +++ b/redist/json_helpers.c @@ -193,7 +193,7 @@ void json_load_file(const char* path) { } else if (value_t->type == JSMN_OBJECT) { printf("Begin Object\n"); if (json_begin_object != NULL) json_begin_object(tag); - children = value_t->size +1; //+1 to account for this loop where we are not yed parsing children + children = (int16_t)(value_t->size +1); //+1 to account for this loop where we are not yed parsing children // i += decode_jsmn_object(JSON_STRING, tokens+i+2,value_t->size); } else { -- cgit v1.2.3