]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Alternate compiler warning fix for sqlite3StatusHighwater.
authormistachkin <mistachkin@noemail.net>
Thu, 22 Oct 2015 18:06:40 +0000 (18:06 +0000)
committermistachkin <mistachkin@noemail.net>
Thu, 22 Oct 2015 18:06:40 +0000 (18:06 +0000)
FossilOrigin-Name: 4315d20200d578c9252dcb26e60739063a8eff1d

manifest
manifest.uuid
src/status.c

index 253f2f95059514ff7e096fd5ecf20682be2123bb..9f8c896ecdd0c88e85f1bfae3e02f0a32e233ff8 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sharmless\scompiler\swarnings\sin\sFTS5.
-D 2015-10-21T22:08:36.772
+C Alternate\scompiler\swarning\sfix\sfor\ssqlite3StatusHighwater.
+D 2015-10-22T18:06:40.381
 F Makefile.in 2ea961bc09e441874eb3d1bf7398e04feb24f3ee
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc 702d3e98f3afc6587a78481257f3c4c900efc3a4
@@ -345,7 +345,7 @@ F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad
 F src/sqlite3ext.h 4b66e3e3435da4b4c8c83696d0349f0c503b3924
 F src/sqliteInt.h 1ad779ee62efee60494af0a75d8d45592f9f53c3
 F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46
-F src/status.c 286f6398a4d2cd1e8ff0771e3d30f8dddb4768ea
+F src/status.c 70912d7be68e9e2dbc4010c93d344af61d4c59ba
 F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e
 F src/tclsqlite.c d9439b6a910985b7fff43ba6756bcef00de22649
 F src/test1.c 8fff9c5aa63d6490f516d018b70c12a9cb9a4d8a
@@ -1391,7 +1391,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P e31aa97a9298e49507256036cfb8fa7517a48461
-R 606f7dfef62137a51a41fcb520dc155f
+P aa4e01ea1af327d1f8398ebea1c5bacc46698c3d
+R a22db3919509c137f252ea9c4c395816
 U mistachkin
-Z be7e8557e6be3b3a5f61a53f0769e842
+Z cd96591ebe18ee957344d1fc4f75aaa9
index 0399ec5e0bbff1327780ac4aa32e889cc2c9a00c..48569933f6262893bf273b1de110f140ec67ae24 100644 (file)
@@ -1 +1 @@
-aa4e01ea1af327d1f8398ebea1c5bacc46698c3d
\ No newline at end of file
+4315d20200d578c9252dcb26e60739063a8eff1d
\ No newline at end of file
index a7fddf060f1c421728fb79d7343d4abb2144f9f5..69f92ff7c624ddb50e395d4459e8b6ca48c4310e 100644 (file)
 /*
 ** Variables in which to record status information.
 */
-typedef struct sqlite3StatType sqlite3StatType;
-static SQLITE_WSD struct sqlite3StatType {
 #if SQLITE_PTRSIZE>4
-  sqlite3_int64 nowValue[10];         /* Current value */
-  sqlite3_int64 mxValue[10];          /* Maximum value */
+typedef sqlite3_int64 sqlite3StatValueType;
 #else
-  u32 nowValue[10];                   /* Current value */
-  u32 mxValue[10];                    /* Maximum value */
+typedef u32 sqlite3StatValueType;
 #endif
+typedef struct sqlite3StatType sqlite3StatType;
+static SQLITE_WSD struct sqlite3StatType {
+  sqlite3StatValueType nowValue[10];  /* Current value */
+  sqlite3StatValueType mxValue[10];   /* Maximum value */
 } sqlite3Stat = { {0,}, {0,} };
 
 /*
@@ -112,7 +112,10 @@ void sqlite3StatusDown(int op, int N){
 ** The caller must hold the appropriate mutex.
 */
 void sqlite3StatusHighwater(int op, int X){
+  sqlite3StatValueType newValue;
   wsdStatInit;
+  assert( X>=0 );
+  newValue = (sqlite3StatValueType)X;
   assert( op>=0 && op<ArraySize(wsdStat.nowValue) );
   assert( op>=0 && op<ArraySize(statMutex) );
   assert( sqlite3_mutex_held(statMutex[op] ? sqlite3Pcache1Mutex()
@@ -121,8 +124,8 @@ void sqlite3StatusHighwater(int op, int X){
           || op==SQLITE_STATUS_PAGECACHE_SIZE
           || op==SQLITE_STATUS_SCRATCH_SIZE
           || op==SQLITE_STATUS_PARSER_STACK );
-  if( X>wsdStat.mxValue[op] ){
-    wsdStat.mxValue[op] = X;
+  if( newValue>wsdStat.mxValue[op] ){
+    wsdStat.mxValue[op] = newValue;
   }
 }