aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2009-06-17 13:09:38 +0000
committerdrh <drh@noemail.net>2009-06-17 13:09:38 +0000
commit0d588bbc38f846737f88e3b33d0d2abf5569bdc6 (patch)
tree001bd831d7303c8aa9899d04aaa7d1c5389d013a /src
parent11a8a8660c55c877dfc8a970824a206866e5dc63 (diff)
downloadsqlite-0d588bbc38f846737f88e3b33d0d2abf5569bdc6.tar.gz
sqlite-0d588bbc38f846737f88e3b33d0d2abf5569bdc6.zip
Suppress some -Wextra compiler warnings from GCC. (CVS 6774)
FossilOrigin-Name: 59ec937ce226bbf6c48c5e0466d3bab48873c9ea
Diffstat (limited to 'src')
-rw-r--r--src/btree.c8
-rw-r--r--src/btreeInt.h7
-rw-r--r--src/os_unix.c7
3 files changed, 14 insertions, 8 deletions
diff --git a/src/btree.c b/src/btree.c
index 128e0c5f3..5fc676038 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 0c196d36e..1301e8283 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 963f8e768..b917a1a40 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);
}