]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix compiler warnings in pager.c (CVS 6102)
authordrh <drh@noemail.net>
Fri, 2 Jan 2009 18:10:42 +0000 (18:10 +0000)
committerdrh <drh@noemail.net>
Fri, 2 Jan 2009 18:10:42 +0000 (18:10 +0000)
FossilOrigin-Name: 78dd7909da15a9b2cbcdb9cbe86798cfc24f3230

manifest
manifest.uuid
src/btree.c
src/pager.c
src/pager.h
src/test2.c

index 69e472e369926a5fae429bdc3a4a33a050149b88..3645ff513bd23d7a78211dd2fe019c7ce2ea7a1f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Modify\sthe\s(transaction)\smethod\sof\sthe\stcl\sinterface\sto\suse\ssavepoints.\sThis\smakes\snested\scalls\sto\s(transaction)\swork\smore\sintuitively.\s(CVS\s6101)
-D 2009-01-02T17:33:46
+C Fix\scompiler\swarnings\sin\spager.c\s(CVS\s6102)
+D 2009-01-02T18:10:42
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 05461a9b5803d5ad10c79f989801e9fd2cc3e592
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -103,7 +103,7 @@ F src/attach.c 1c35f95da3c62d19de75b44cfefd12c81c1791b3
 F src/auth.c c8b2ab5c8bad4bd90ed7c294694f48269162c627
 F src/bitvec.c 4300d311b17fb3c1476623fd895a8feac02a0b08
 F src/btmutex.c 63c5cc4ad5715690767ffcb741e185d7bc35ec1a
-F src/btree.c 581fdccd7b6539a8e37e843f9b45e0557b3b272f
+F src/btree.c 2a89b28a87a821cf27b04820161cf3cc2dd99725
 F src/btree.h 4f141cf748d2ee7c6d7fc175f64f87a45cd44113
 F src/btreeInt.h 8fea5cd7021cb8848fc2183a3e909469659daa0a
 F src/build.c 6eb9d20e99db8da8c7c6e7316096a6ff3d9acab9
@@ -142,8 +142,8 @@ F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60
 F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
 F src/os_unix.c e6eacc7ec735ded605fefcbaf250058baa8feb12
 F src/os_win.c 496e3ceb499aedc63622a89ef76f7af2dd902709
-F src/pager.c 1610863d7c1b63d3365f7735dfedd91d8c05c382
-F src/pager.h 0579740d4c18826b46124c82330467b41f407eb1
+F src/pager.c 22f2896d2a539ca7285eab0fb667d1bdeea66ffa
+F src/pager.h 75396879910768a0af03a4af8413e798d84c096f
 F src/parse.y 4d0e33a702dc3ea7b69d8ae1914b3fbd32e46057
 F src/pcache.c 16dc8da6e6ba6250f8dfd9ee46036db1cbceedc6
 F src/pcache.h f20c3e82dd6da622c3fe296170cb1801f9a2d75a
@@ -164,7 +164,7 @@ F src/status.c 237b193efae0cf6ac3f0817a208de6c6c6ef6d76
 F src/table.c 23db1e5f27c03160987c122a078b4bb51ef0b2f8
 F src/tclsqlite.c 4415e1033bd3e92b05a6a9cde911ee4de3b82df9
 F src/test1.c b193b8b80617bdb8297b25a87d00ee8d5a125d0d
-F src/test2.c 4e0ea288e1cf237f8ff26c8817f177f45486f4a6
+F src/test2.c 15dbd8b99a05017eaafee9840c4c9dd63d26697a
 F src/test3.c 88a246b56b824275300e6c899634fbac1dc94b14
 F src/test4.c f79ab52d27ff49b784b631a42e2ccd52cfd5c84c
 F src/test5.c 162a1cea2105a2c460a3f39fa6919617b562a288
@@ -690,7 +690,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 524c8634dfa5926f38fac8bac1da6a14178c7764
-R 2c40d2ccc6b74b81b7ef9d1e2941c402
-U danielk1977
-Z aab5684424ca9aa2a11e60efaac97954
+P f047758de9b499866aa4ddf16011498b12a7b963
+R bc499a9b609b8aa680130c2bc94cb8ac
+U drh
+Z d740db87b2b43b18f6a418266f6c36a4
index 258eb19cafb983ace4d718d60da0cf9d45c083ef..16d9a1df986928c619fd6438a5c0e48341f5c4ca 100644 (file)
@@ -1 +1 @@
-f047758de9b499866aa4ddf16011498b12a7b963
\ No newline at end of file
+78dd7909da15a9b2cbcdb9cbe86798cfc24f3230
\ No newline at end of file
index c018d5b145137b5d5b0b537f80e282e64745f31f..f9ec4898f1cabc11c1abed9926704e3e161b7fdf 100644 (file)
@@ -9,7 +9,7 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** $Id: btree.c,v 1.553 2008/12/27 15:23:13 danielk1977 Exp $
+** $Id: btree.c,v 1.554 2009/01/02 18:10:42 drh Exp $
 **
 ** This file implements a external (disk-based) database using BTrees.
 ** See the header comment on "btreeInt.h" for additional information.
@@ -2484,7 +2484,6 @@ int sqlite3BtreeCommitPhaseOne(Btree *p, const char *zMaster){
   int rc = SQLITE_OK;
   if( p->inTrans==TRANS_WRITE ){
     BtShared *pBt = p->pBt;
-    Pgno nTrunc = 0;
     sqlite3BtreeEnter(p);
     pBt->db = p->db;
 #ifndef SQLITE_OMIT_AUTOVACUUM
@@ -2496,7 +2495,7 @@ int sqlite3BtreeCommitPhaseOne(Btree *p, const char *zMaster){
       }
     }
 #endif
-    rc = sqlite3PagerCommitPhaseOne(pBt->pPager, zMaster, nTrunc, 0);
+    rc = sqlite3PagerCommitPhaseOne(pBt->pPager, zMaster, 0);
     sqlite3BtreeLeave(p);
   }
   return rc;
@@ -7302,7 +7301,7 @@ static int btreeCopyFile(Btree *pTo, Btree *pFrom){
       ** file APIs on the database file directly.
       */
       pBtTo->db = pTo->db;
-      rc = sqlite3PagerCommitPhaseOne(pBtTo->pPager, 0, 0, 1);
+      rc = sqlite3PagerCommitPhaseOne(pBtTo->pPager, 0, 1);
       if( iSize<iNow && rc==SQLITE_OK ){
         rc = sqlite3OsTruncate(pFile, iSize);
       }
index fe344e76784facf6208aadb59b5ee958f91d3d1d..280541102013e3db8c3e16367560ad217900e8e7 100644 (file)
@@ -18,7 +18,7 @@
 ** file simultaneously, or one process from reading the database while
 ** another is writing.
 **
-** @(#) $Id: pager.c,v 1.525 2009/01/01 15:20:37 danielk1977 Exp $
+** @(#) $Id: pager.c,v 1.526 2009/01/02 18:10:42 drh Exp $
 */
 #ifndef SQLITE_OMIT_DISKIO
 #include "sqliteInt.h"
@@ -1712,7 +1712,7 @@ static int pagerPlaybackSavepoint(Pager *pPager, PagerSavepoint *pSavepoint){
 
   /* Now roll back pages from the sub-journal. */
   if( pSavepoint ){
-    for(ii=pSavepoint->iSubRec; rc==SQLITE_OK && ii<pPager->stmtNRec; ii++){
+    for(ii=pSavepoint->iSubRec; rc==SQLITE_OK&&ii<(u32)pPager->stmtNRec; ii++){
       i64 offset = ii*(4+pPager->pageSize);
       rc = pager_playback_one_page(pPager, 0, offset, 1, pDone);
       assert( rc!=SQLITE_DONE );
@@ -3709,9 +3709,6 @@ int sqlite3PagerSync(Pager *pPager){
 ** Note that if zMaster==NULL, this does not overwrite a previous value
 ** passed to an sqlite3PagerCommitPhaseOne() call.
 **
-** If parameter nTrunc is non-zero, then the pager file is truncated to
-** nTrunc pages (this is used by auto-vacuum databases).
-**
 ** If the final parameter - noSync - is true, then the database file itself
 ** is not synced. The caller must call sqlite3PagerSync() directly to
 ** sync the database file before calling CommitPhaseTwo() to delete the
@@ -3720,7 +3717,6 @@ int sqlite3PagerSync(Pager *pPager){
 int sqlite3PagerCommitPhaseOne(
   Pager *pPager, 
   const char *zMaster, 
-  Pgno nTrunc,
   int noSync
 ){
   int rc = SQLITE_OK;
@@ -4006,6 +4002,7 @@ int sqlite3PagerOpenSavepoint(Pager *pPager, int nSavepoint){
 
   if( nSavepoint>pPager->nSavepoint && pPager->useJournal ){
     int ii;
+    PagerSavepoint *aNew;
 
     /* Either the sub-journal is open or there are no active savepoints. */
     assert( pPager->nSavepoint==0 || pPager->sjfd->pMethods );
@@ -4014,7 +4011,7 @@ int sqlite3PagerOpenSavepoint(Pager *pPager, int nSavepoint){
     ** if the allocation fails. Otherwise, zero the new portion in case a 
     ** malloc failure occurs while populating it in the for(...) loop below.
     */
-    PagerSavepoint *aNew = (PagerSavepoint *)sqlite3Realloc(
+    aNew = (PagerSavepoint *)sqlite3Realloc(
         pPager->aSavepoint, sizeof(PagerSavepoint)*nSavepoint
     );
     if( !aNew ){
index 03ce8f5cddba7f5e2713007881bc37932fcce8af..329515918aeef529bd284de5ac807232c8dacd54 100644 (file)
@@ -13,7 +13,7 @@
 ** subsystem.  The page cache subsystem reads and writes a file a page
 ** at a time and provides a journal for rollback.
 **
-** @(#) $Id: pager.h,v 1.90 2008/12/27 15:23:13 danielk1977 Exp $
+** @(#) $Id: pager.h,v 1.91 2009/01/02 18:10:42 drh Exp $
 */
 
 #ifndef _PAGER_H_
@@ -90,7 +90,7 @@ int sqlite3PagerWrite(DbPage*);
 int sqlite3PagerPagecount(Pager*, int*);
 int sqlite3PagerTruncate(Pager*,Pgno);
 int sqlite3PagerBegin(DbPage*, int exFlag);
-int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, Pgno, int);
+int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, int);
 int sqlite3PagerCommitPhaseTwo(Pager*);
 int sqlite3PagerRollback(Pager*);
 u8 sqlite3PagerIsreadonly(Pager*);
index 1111ebba50331e197e20bbbe29c747b4ddc9fe88..5762714d1059305b10010e181238da0eac125864 100644 (file)
@@ -13,7 +13,7 @@
 ** is not included in the SQLite library.  It is used for automated
 ** testing of the SQLite library.
 **
-** $Id: test2.c,v 1.63 2008/12/17 17:30:26 danielk1977 Exp $
+** $Id: test2.c,v 1.64 2009/01/02 18:10:42 drh Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
@@ -165,7 +165,7 @@ static int pager_commit(
     return TCL_ERROR;
   }
   pPager = sqlite3TestTextToPtr(argv[1]);
-  rc = sqlite3PagerCommitPhaseOne(pPager, 0, 0, 0);
+  rc = sqlite3PagerCommitPhaseOne(pPager, 0, 0);
   if( rc!=SQLITE_OK ){
     Tcl_AppendResult(interp, errorName(rc), 0);
     return TCL_ERROR;