From 0d588bbc38f846737f88e3b33d0d2abf5569bdc6 Mon Sep 17 00:00:00 2001 From: drh Date: Wed, 17 Jun 2009 13:09:38 +0000 Subject: [PATCH] Suppress some -Wextra compiler warnings from GCC. (CVS 6774) FossilOrigin-Name: 59ec937ce226bbf6c48c5e0466d3bab48873c9ea --- manifest | 18 +++++++++--------- manifest.uuid | 2 +- src/btree.c | 8 +++++--- src/btreeInt.h | 7 +++++-- src/os_unix.c | 7 ++++--- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/manifest b/manifest index 1fe24cba34..b38c086c6a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\sbug\saffecting\ssecure-delete\smode\sintroduced\sby\s(6768).\s(CVS\s6773) -D 2009-06-17T11:49:53 +C Suppress\ssome\s-Wextra\scompiler\swarnings\sfrom\sGCC.\s(CVS\s6774) +D 2009-06-17T13:09:39 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 8b8fb7823264331210cddf103831816c286ba446 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -106,9 +106,9 @@ F src/auth.c 98db07c2088455797678eb1031f42d4d94d18a71 F src/backup.c ff50af53184a5fd7bdee4d620b5dabef74717c79 F src/bitvec.c 0ef0651714728055d43de7a4cdd95e703fac0119 F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c -F src/btree.c 9225e0726c5837425dab4f5888ea427f8fa69854 +F src/btree.c 5d4e1fdae7c765b6a04b086545357bc93d7d6a63 F src/btree.h f70b694e8c163227369a66863b01fbff9009f323 -F src/btreeInt.h df64030d632f8c8ac217ed52e8b6b3eacacb33a5 +F src/btreeInt.h 122021a7d70633b389c447d9a05f9242f410809d F src/build.c 75b57e3f4de1b34d4e1e49d350dc87febff48ba0 F src/callback.c cb68b21b0d4ae7d11ae0e487933bce3323784dcf F src/complete.c 5ad5c6cd4548211867c204c41a126d73a9fbcea0 @@ -144,7 +144,7 @@ F src/os.c c2aa4a7d8bb845222e5c37f56cde377b20c3b087 F src/os.h fa3f4aa0119ff721a2da4b47ffd74406ac864c05 F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5 -F src/os_unix.c f00dbdc09d67b7e45f2aa0b1ff7111e36db4651e +F src/os_unix.c b64129c296e480c2827606e206ea51bb30904626 F src/os_win.c 725c38a524d168ce280446ad8761d731bc516405 F src/pager.c efdd56a49622fe87d5cf4b6e69aeb62b45bcb9b0 F src/pager.h 73f481a308a873ccd626d97331c081db3b53e2e5 @@ -735,7 +735,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746 -P 368e44ec2e648b04f3b817f82586ccd864e60c89 -R 444656ca6a3315a23012c708051029b1 -U danielk1977 -Z d87ec3d960f446a07cb36cccdf89b502 +P a433ca821c134caeac0fa16416eb95c647416b95 +R 78208bbf9f02e17d66a45d7dc43ed13f +U drh +Z d64390aa8acff4ee038b1b110ea1e1e2 diff --git a/manifest.uuid b/manifest.uuid index bfa8917293..a98d4836e4 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a433ca821c134caeac0fa16416eb95c647416b95 \ No newline at end of file +59ec937ce226bbf6c48c5e0466d3bab48873c9ea \ No newline at end of file diff --git a/src/btree.c b/src/btree.c index 128e0c5f32..5fc6760383 100644 --- a/src/btree.c +++ b/src/btree.c @@ -9,7 +9,7 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btree.c,v 1.632 2009/06/17 11:49:53 danielk1977 Exp $ +** $Id: btree.c,v 1.633 2009/06/17 13:09:39 drh Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** See the header comment on "btreeInt.h" for additional information. @@ -3196,6 +3196,7 @@ int sqlite3BtreeCloseCursor(BtCursor *pCur){ return SQLITE_OK; } +#ifdef SQLITE_TEST /* ** Make a temporary cursor by filling in the fields of pTempCur. ** The temporary cursor is not on the cursor list for the Btree. @@ -3211,7 +3212,9 @@ void sqlite3BtreeGetTempCursor(BtCursor *pCur, BtCursor *pTempCur){ } assert( pTempCur->pKey==0 ); } +#endif /* SQLITE_TEST */ +#ifdef SQLITE_TEST /* ** Delete a temporary cursor such as was made by the CreateTemporaryCursor() ** function above. @@ -3224,8 +3227,7 @@ void sqlite3BtreeReleaseTempCursor(BtCursor *pCur){ } sqlite3_free(pCur->pKey); } - - +#endif /* SQLITE_TEST */ /* ** Make sure the BtCursor* given in the argument has a valid diff --git a/src/btreeInt.h b/src/btreeInt.h index 0c196d36e6..1301e82834 100644 --- a/src/btreeInt.h +++ b/src/btreeInt.h @@ -9,7 +9,7 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btreeInt.h,v 1.46 2009/03/20 14:18:52 danielk1977 Exp $ +** $Id: btreeInt.h,v 1.47 2009/06/17 13:09:39 drh Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** For a detailed discussion of BTrees, refer to @@ -636,6 +636,9 @@ int sqlite3BtreeInitPage(MemPage *pPage); void sqlite3BtreeParseCellPtr(MemPage*, u8*, CellInfo*); void sqlite3BtreeParseCell(MemPage*, int, CellInfo*); int sqlite3BtreeRestoreCursorPosition(BtCursor *pCur); +void sqlite3BtreeMoveToParent(BtCursor *pCur); + +#ifdef SQLITE_TEST void sqlite3BtreeGetTempCursor(BtCursor *pCur, BtCursor *pTempCur); void sqlite3BtreeReleaseTempCursor(BtCursor *pCur); -void sqlite3BtreeMoveToParent(BtCursor *pCur); +#endif diff --git a/src/os_unix.c b/src/os_unix.c index 963f8e7686..b917a1a40f 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.252 2009/06/15 20:45:35 drh Exp $ +** $Id: os_unix.c,v 1.253 2009/06/17 13:09:39 drh Exp $ */ #include "sqliteInt.h" #if SQLITE_OS_UNIX /* This file is used on unix only */ @@ -911,7 +911,7 @@ static int findLockInfo( struct unixLockKey lockKey; /* Lookup key for the unixLockInfo structure */ struct unixFileId fileId; /* Lookup key for the unixOpenCnt struct */ struct stat statbuf; /* Low-level file information */ - struct unixLockInfo *pLock; /* Candidate unixLockInfo object */ + struct unixLockInfo *pLock = 0;/* Candidate unixLockInfo object */ struct unixOpenCnt *pOpen; /* Candidate unixOpenCnt object */ /* Get low-level information about the file that we can used to @@ -1815,7 +1815,8 @@ static int dotlockUnlock(sqlite3_file *id, int locktype) { /* To fully unlock the database, delete the lock file */ assert( locktype==NO_LOCK ); if( unlink(zLockFile) ){ - int rc, tErrno = errno; + int rc = 0; + int tErrno = errno; if( ENOENT != tErrno ){ rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK); }