]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix compiler warnings and remove unreachable code.
authordrh <drh@noemail.net>
Sat, 8 Aug 2015 22:47:47 +0000 (22:47 +0000)
committerdrh <drh@noemail.net>
Sat, 8 Aug 2015 22:47:47 +0000 (22:47 +0000)
FossilOrigin-Name: be190fe7826d157fc5acd84210095725b059e4f6

ext/rbu/sqlite3rbu.c
manifest
manifest.uuid
src/build.c
tool/sqldiff.c

index b25e4ebb72cd13a588d29eb3b2ff49a2db520416..00a655053f77e43fe9c2dfac7c1199dc97882635 100644 (file)
@@ -597,7 +597,7 @@ static void rbuFossilDeltaFunc(
   if( aOut==0 ){
     sqlite3_result_error_nomem(context);
   }else{
-    int nOut2 = rbuDeltaApply(aOrig, nOrig, aDelta, nDelta, aOut);
+    nOut2 = rbuDeltaApply(aOrig, nOrig, aDelta, nDelta, aOut);
     if( nOut2!=nOut ){
       sqlite3_result_error(context, "corrupt fossil delta", -1);
     }else{
index 0a40e63b8e93e9feb1041edd66e9adb2fa7e73b8..b81474f479d1d2bb3550872441c08f78baa2a7bc 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Update\sRBU\sto\savoid\srepreparing\sa\sstatement\simmediately\safter\sit\sis\sprepared.
-D 2015-08-08T15:13:08.522
+C Fix\scompiler\swarnings\sand\sremove\sunreachable\scode.
+D 2015-08-08T22:47:47.511
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 2fc9ca6bf5949d415801c007ed3004a4bdb7c380
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -223,7 +223,7 @@ F ext/rbu/rbudiff.test 6cc806dc36389292f2a8f5842d0103721df4a07d
 F ext/rbu/rbufault.test cc0be8d5d392d98b0c2d6a51be377ea989250a89
 F ext/rbu/rbufault2.test 9a7f19edd6ea35c4c9f807d8a3db0a03a5670c06
 F ext/rbu/rbufts.test 828cd689da825f0a7b7c53ffc1f6f7fdb6fa5bda
-F ext/rbu/sqlite3rbu.c df8658bc7a2545290681790bb85cb7ed44014d35
+F ext/rbu/sqlite3rbu.c 07cef1986347694306b82cb61de27e00fde6ce23
 F ext/rbu/sqlite3rbu.h f0754a19fcc155f6d39d72b38bdbeb1d7623f02e
 F ext/rbu/test_rbu.c f99698956cc9158d6bf865e461e2d15876538ac1
 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
@@ -279,7 +279,7 @@ F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79
 F src/btree.c f48b3ef91676c06a90a8832987ecef6b94c931ee
 F src/btree.h 969adc948e89e449220ff0ff724c94bb2a52e9f1
 F src/btreeInt.h 8177c9ab90d772d6d2c6c517e05bed774b7c92c0
-F src/build.c 70a18e12291c49f4c1a0512fb6af4b3eab902ff8
+F src/build.c 31782da5c79d38c04ee761fba1cb0b606431dda6
 F src/callback.c 7b44ce59674338ad48b0e84e7b72f935ea4f68b0
 F src/complete.c addcd8160b081131005d5bc2d34adf20c1c5c92f
 F src/ctime.c 5a0b735dc95604766f5dac73973658eef782ee8b
@@ -1361,7 +1361,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
-F tool/sqldiff.c 4fe09e784cf2ec8b8e6ff7357b17f890ff9c78b4
+F tool/sqldiff.c a6988cc6e10e08662d73df28538df43b01dc371e
 F tool/stack_usage.tcl f8e71b92cdb099a147dad572375595eae55eca43
 F tool/symbols-mingw.sh 4dbcea7e74768305384c9fd2ed2b41bbf9f0414d
 F tool/symbols.sh fec58532668296d7c7dc48be9c87f75ccdb5814f
@@ -1372,7 +1372,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 065765902d2774d7432b9c00ea2efed26e0aaa5e
-R 2765017da5ae3c60aa92dacb0d16c018
-U dan
-Z eb512e32ba2a4fc03cf96df6b1123d12
+P 1d75a41bb2f7fcd32f9f08768517b814e452e456
+R aba5c14bf2c68b28cc52b65e65f7a0e4
+U drh
+Z de04371715be8dc36aa7df7c7bd4ee40
index 14d68e9162f1a25dad88504dd449706004cf48a6..7cb8841274a787dbac17d15ae3eb0ae3004590ce 100644 (file)
@@ -1 +1 @@
-1d75a41bb2f7fcd32f9f08768517b814e452e456
\ No newline at end of file
+be190fe7826d157fc5acd84210095725b059e4f6
\ No newline at end of file
index a84aa570ffadfe2f3608a7606e9d895e1cbcc78c..ead15e4721e85239cc471a5ba2d2563c5e11972e 100644 (file)
@@ -1816,7 +1816,8 @@ void sqlite3EndTable(
   int iDb;                  /* Database in which the table lives */
   Index *pIdx;              /* An implied index of the table */
 
-  if( (pEnd==0 && pSelect==0) || db->mallocFailed ){
+  assert( !db->mallocFailed );
+  if( pEnd==0 && pSelect==0 ){
     return;
   }
   p = pParse->pNewTable;
index 82ef4ad150f1f01081011ee049d95ffec5d82eca..3a5c4e4f7c1d8cd7b03e7b83831f24305509f84c 100644 (file)
@@ -844,36 +844,6 @@ static void putInt(unsigned int v, char **pz){
   }
 }
 
-/*
-** Read bytes from *pz and convert them into a positive integer.  When
-** finished, leave *pz pointing to the first character past the end of
-** the integer.  The *pLen parameter holds the length of the string
-** in *pz and is decremented once for each character in the integer.
-*/
-static unsigned int getInt(const char **pz, int *pLen){
-  static const signed char zValue[] = {
-    -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,
-    -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,
-    -1, -1, -1, -1, -1, -1, -1, -1,   -1, -1, -1, -1, -1, -1, -1, -1,
-     0,  1,  2,  3,  4,  5,  6,  7,    8,  9, -1, -1, -1, -1, -1, -1,
-    -1, 10, 11, 12, 13, 14, 15, 16,   17, 18, 19, 20, 21, 22, 23, 24,
-    25, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35, -1, -1, -1, -1, 36,
-    -1, 37, 38, 39, 40, 41, 42, 43,   44, 45, 46, 47, 48, 49, 50, 51,
-    52, 53, 54, 55, 56, 57, 58, 59,   60, 61, 62, -1, -1, -1, 63, -1,
-  };
-  unsigned int v = 0;
-  int c;
-  unsigned char *z = (unsigned char*)*pz;
-  unsigned char *zStart = z;
-  while( (c = zValue[0x7f&*(z++)])>=0 ){
-     v = (v<<6) + c;
-  }
-  z--;
-  *pLen -= z - zStart;
-  *pz = (char*)z;
-  return v;
-}
-
 /*
 ** Return the number digits in the base-64 representation of a positive integer
 */