addressed new compiler warnings/errors

This commit is contained in:
Stefan Reitshamer 2017-11-13 06:47:17 -05:00
parent 611c007d50
commit f45caa607d

View file

@ -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{
#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 && sqlite3Isdigit(*z) && s<((LARGEST_INT64-9)/10) ){
s = s*10 + (*z - '0');
z+=incr, nDigits++;
z+=incr;
nDigits++;
}
/* skip non-significant significand digits
** (increase exponent by d to shift decimal left) */
while( z<zEnd && sqlite3Isdigit(*z) ) z+=incr, nDigits++, d++;
while( z<zEnd && sqlite3Isdigit(*z) ) {
z+=incr; nDigits++; d++;
}
if( 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);
}