From: drh Date: Sun, 1 Mar 2009 22:29:20 +0000 (+0000) Subject: Suppress some compiler warnings (where possible). Ticket #3696. (CVS 6331) X-Git-Tag: version-3.6.15~419 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d43fe20bc901dbb0537414b60c4df3c1886e94ac;p=thirdparty%2Fsqlite.git Suppress some compiler warnings (where possible). Ticket #3696. (CVS 6331) FossilOrigin-Name: a2373e5409e4e59903f315a4446db8cb6ba000cc --- diff --git a/manifest b/manifest index 76e57efdb6..129d5834a6 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\scritical\sbug\sin\sthe\sVDBE\sopcode\sarray\sresizer\sintroduced\sby\ncheck-in\s(6307).\s\sBug\sdetected\sby\sregression\stesting.\s(CVS\s6330) -D 2009-03-01T19:42:11 +C Suppress\ssome\scompiler\swarnings\s(where\spossible).\s\sTicket\s#3696.\s(CVS\s6331) +D 2009-03-01T22:29:20 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in d64baddbf55cdf33ff030e14da837324711a4ef7 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -140,7 +140,7 @@ F src/os.c ed93a6b46132a602c4fd7a58142e2981c829c79d F src/os.h fa3f4aa0119ff721a2da4b47ffd74406ac864c05 F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5 -F src/os_unix.c 4e916cafbf5ec0166213ac62d680ebbe12b8c5a7 +F src/os_unix.c 52352674c19688026a72cd0e8620e6a29bacba4a F src/os_win.c 45cb430884da7e9360a55a0fcd5c2c44c22dd79d F src/pager.c d62fd62f7c0ad257019c21158b597fdbb0182529 F src/pager.h 0c9f3520c00d8a3b8e792ca56c9a11b6b02b4b0f @@ -197,7 +197,7 @@ F src/tokenize.c 6987fb7f0d6a87ac53499aee568cabb05eb4bea8 F src/trigger.c 21f39db410cdc32166a94900ac1b3df98ea560e6 F src/update.c 8ededddcde6f7b6da981dd0429a5d34518a475b7 F src/utf.c 1da9c832dba0fa8f865b5b902d93f420a1ee4245 -F src/util.c 1363f64351f3b544790f3c523439354c02f8c4e9 +F src/util.c 469d74f5bf09ed6398702c7da2ef8a34e979a1c1 F src/vacuum.c 4929a585ef0fb1dfaf46302f8a9c4aa30c2d9cf5 F src/vdbe.c e03512022ed2dd57bf2ea9ebe4f54cbc091adb0b F src/vdbe.h d70a68bee196ab228914a3902c79dbd24342a0f2 @@ -703,7 +703,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 3befe1ef7e6ebddedfa69579553a1b85b411ee98 -R a65db1ef203e4eca12f2cc229afd0499 +P ec3b18acaecabae6eb04eda006870e602faacb8c +R 54956e5fad91f855ede30eccd038cab5 U drh -Z fcfdee8dd50a10684f80adfbab26dab6 +Z 82111cc0e3cd0c60f383783eb123460b diff --git a/manifest.uuid b/manifest.uuid index a1bfb64906..8151471f9e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -ec3b18acaecabae6eb04eda006870e602faacb8c \ No newline at end of file +a2373e5409e4e59903f315a4446db8cb6ba000cc \ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index 5696b141c6..e21a59b15c 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -43,7 +43,7 @@ ** * Definitions of sqlite3_vfs objects for all locking methods ** plus implementations of sqlite3_os_init() and sqlite3_os_end(). ** -** $Id: os_unix.c,v 1.241 2009/02/09 17:34:07 drh Exp $ +** $Id: os_unix.c,v 1.242 2009/03/01 22:29:20 drh Exp $ */ #include "sqliteInt.h" #if SQLITE_OS_UNIX /* This file is used on unix only */ @@ -3984,16 +3984,18 @@ static int unixSleep(sqlite3_vfs *NotUsed, int microseconds){ sp.tv_sec = microseconds / 1000000; sp.tv_nsec = (microseconds % 1000000) * 1000; nanosleep(&sp, NULL); + UNUSED_PARAMETER(NotUsed); return microseconds; #elif defined(HAVE_USLEEP) && HAVE_USLEEP usleep(microseconds); + UNUSED_PARAMETER(NotUsed); return microseconds; #else int seconds = (microseconds+999999)/1000000; sleep(seconds); + UNUSED_PARAMETER(NotUsed); return seconds*1000000; #endif - UNUSED_PARAMETER(NotUsed); } /* diff --git a/src/util.c b/src/util.c index 829dfe8474..b0bd1e17bb 100644 --- a/src/util.c +++ b/src/util.c @@ -14,7 +14,7 @@ ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** -** $Id: util.c,v 1.248 2009/02/04 03:59:25 shane Exp $ +** $Id: util.c,v 1.249 2009/03/01 22:29:20 drh Exp $ */ #include "sqliteInt.h" #include @@ -694,7 +694,7 @@ u8 sqlite3GetVarint(const unsigned char *p, u64 *v){ /* a: p2<<28 | p4<<14 | p6 (unmasked) */ if (!(a&0x80)) { - a &= (0x7f<<28)|(0x7f<<14)|(0x7f); + a &= (0x1f<<28)|(0x7f<<14)|(0x7f); b &= (0x7f<<14)|(0x7f); b = b<<7; a |= b; @@ -711,7 +711,7 @@ u8 sqlite3GetVarint(const unsigned char *p, u64 *v){ /* b: p3<<28 | p5<<14 | p7 (unmasked) */ if (!(b&0x80)) { - b &= (0x7f<<28)|(0x7f<<14)|(0x7f); + b &= (0x1f<<28)|(0x7f<<14)|(0x7f); /* moved CSE2 up */ /* a &= (0x7f<<14)|(0x7f); */ a = a<<7; @@ -806,8 +806,8 @@ u8 sqlite3GetVarint32(const unsigned char *p, u32 *v){ /* a: p0<<28 | p2<<14 | p4 (unmasked) */ if (!(a&0x80)) { - a &= (0x7f<<28)|(0x7f<<14)|(0x7f); - b &= (0x7f<<28)|(0x7f<<14)|(0x7f); + a &= (0x1f<<28)|(0x7f<<14)|(0x7f); + b &= (0x1f<<28)|(0x7f<<14)|(0x7f); b = b<<7; *v = a | b; return 5;