From f45caa607de7bc2e83d435ca9f8c4680ba4ee7d0 Mon Sep 17 00:00:00 2001 From: Stefan Reitshamer Date: Mon, 13 Nov 2017 06:47:17 -0500 Subject: [PATCH] addressed new compiler warnings/errors --- sqlite3.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/sqlite3.c b/sqlite3.c index db9e4de..6cdbd4c 100644 --- a/sqlite3.c +++ b/sqlite3.c @@ -11379,12 +11379,12 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*); /* ** Macros to compute minimum and maximum of two numbers. */ -#ifndef MIN -# define MIN(A,B) ((A)<(B)?(A):(B)) -#endif -#ifndef MAX -# define MAX(A,B) ((A)>(B)?(A):(B)) -#endif +//#ifndef MIN +//# define MIN(A,B) ((A)<(B)?(A):(B)) +//#endif +//#ifndef MAX +//# define MAX(A,B) ((A)>(B)?(A):(B)) +//#endif /* ** Swap two objects of type TYPE. @@ -20295,8 +20295,10 @@ static int sqlite3MemInit(void *NotUsed){ malloc_zone_t* newzone = malloc_create_zone(4096, 0); malloc_set_zone_name(newzone, "Sqlite_Heap"); do{ - success = OSAtomicCompareAndSwapPtrBarrier(NULL, newzone, +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + success = OSAtomicCompareAndSwapPtrBarrier(NULL, newzone, (void * volatile *)&_sqliteZone_); +#pragma GCC diagnostic warning "-Wdeprecated-declarations" }while(!_sqliteZone_); if( !success ){ /* somebody registered a zone first */ @@ -27367,12 +27369,15 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en /* copy max significant digits to significand */ while( z=zEnd ) goto do_atof_calc; /* if decimal point is present */ @@ -27385,7 +27390,8 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en s = s*10 + (*z - '0'); d--; } - z+=incr, nDigits++; + z+=incr; + nDigits++; } } if( z>=zEnd ) goto do_atof_calc; @@ -93417,7 +93423,7 @@ static void renameParentFunc( } } - zResult = sqlite3MPrintf(db, "%s%s", (zOutput?zOutput:""), zInput), + zResult = sqlite3MPrintf(db, "%s%s", (zOutput?zOutput:""), zInput); sqlite3_result_text(context, zResult, -1, SQLITE_DYNAMIC); sqlite3DbFree(db, zOutput); }