diff --git a/manifest b/manifest index 84b351d95d..669b49e838 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sharmless\scompiler\swarnings.\s(CVS\s5073) -D 2008-05-01T17:03:49 +C Fix\smore\scompiler\swarnings.\s(CVS\s5074) +D 2008-05-01T17:16:53 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7 F Makefile.in 25b3282a4ac39388632c2fb0e044ff494d490952 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -89,12 +89,12 @@ F src/btmutex.c 483ced3c52205b04b97df69161fadbf87f4f1ea2 F src/btree.c 8b2294c64baeee6ae0519e1438c577fd601c02fb F src/btree.h 8826591bf54dd35fcf2e67473d5f1bae253861c7 F src/btreeInt.h dc04ee33d8eb84714b2acdf81336fbbf6e764530 -F src/build.c 2cde01caed5abaec38f579fabe343d89eb2907f7 +F src/build.c a52d9d51341444a2131e3431608f245db80d9591 F src/callback.c 77b302b0d41468dcda78c70e706e5b84577f0fa0 F src/complete.c 4cf68fd75d60257524cbe74f87351b9848399131 F src/date.c e41ce4513fb0e359dc678d6bddb4ace135fe365d F src/delete.c d3fc5987f2eb88f7b9549d58a5dfea079a83fe8b -F src/expr.c a896d1be67b2abe9759369cb7f3a3b7a1c21fc3f +F src/expr.c 89f192b22b8c06b61d9b944cb59f42370d80e362 F src/fault.c 83057e86815d473e526f7df0b0108dfdd022ff23 F src/func.c 77a910a1ca7613d291fd0b5cba3be14c02f0dce0 F src/hash.c 522a8f5a23cf18fe5845afee7263c5be76c25ca2 @@ -122,7 +122,7 @@ F src/os_common.h e8b748b2f2ecc8a498e50bfe5d8721f189c19d2a F src/os_os2.c 41015b3fa91568761eb10cbf6ca27a0624ba0bda F src/os_unix.c 8cf512c4321c3114f053dc9eaae394db2dc03ebe F src/os_win.c 3a60bddd07ea6f8adb2314dd5996ac97b988f403 -F src/pager.c fd4e176cbd9dbf09d59406b8346e2c00eeda2999 +F src/pager.c 2d495e9a439e7f5db12f02cd8efe6ae417bff26a F src/pager.h 4f051fd856de6fd3c19aef5f82eace54122b9173 F src/parse.y fc4bd35c6088901f7c8daead26c6fb11c87d22e7 F src/pragma.c 2e4bb2e76e48a32750529fdc4bfe86ac5f54e01b @@ -137,7 +137,7 @@ F src/sqlite3ext.h faacd0e6a81aabee0861c6d7883c9172e74ef5b3 F src/sqliteInt.h 6dbffa746c569b992e76051565d3531a07a54669 F src/sqliteLimit.h f435e728c6b620ef7312814d660a81f9356eb5c8 F src/table.c 46ccf9b7892a86f57420ae7bac69ecd5e72d26b5 -F src/tclsqlite.c 2877726bf32f7d72ff057b37ed6c93485b667ea1 +F src/tclsqlite.c c57e740e30bd6dda678796eed62c7f0e64689834 F src/test1.c caf46aac174a51be7077110dea8a05a5563b85d1 F src/test2.c f0808cc643528b9620e4059ca9bda8346f526121 F src/test3.c f5328839e29631ed9eef8674994ad7341b2de59b @@ -159,7 +159,7 @@ F src/test_malloc.c c92a65e8f9b31bb2b332448d92d2016c000a963d F src/test_md5.c bca40b727c57462ddb415e57c5323445a1bb1a40 F src/test_onefile.c 2fea6d22f13f5f286356c80c77ffd41f995f2b7a F src/test_osinst.c 7129ca5f91e655020539b4e628cb578dd30ac5c7 -F src/test_schema.c 12c9de7661d6294eec2d57afbb52e2af1128084f +F src/test_schema.c e3f93725f7c5b2cff84a69dc4332040dfbc8f81a F src/test_server.c a6ece6c835e7eae835054124e09e947e422b1ac5 F src/test_tclvar.c b2d1115e4d489179d3f029e765211b2ad527ba59 F src/test_thread.c e297dd41db0b249646e69f97d36ec13e56e8b730 @@ -172,7 +172,7 @@ F src/vacuum.c c3b2b70677f874102b8753bf494c232e777f3998 F src/vdbe.c 26964ba7ed76d2a1c52747d601aaf2dc5b09b651 F src/vdbe.h f4bb70962d9c13e0f65b215c90e8acea1ae6e8ee F src/vdbeInt.h 18aebaa7857de4507d92ced62d8fe0844671a681 -F src/vdbeapi.c 0e1b5a808bb0e556f2a975eb7d11fd3153e922bf +F src/vdbeapi.c c810f936b09a1cfcac6b3624ad237b7951ca1880 F src/vdbeaux.c aae523de91fb72a32a256253880739fe103ea76e F src/vdbeblob.c 554736781ee273a8089c776e96bdb53e66f57ce6 F src/vdbefifo.c a30c237b2a3577e1415fb6e288cbb6b8ed1e5736 @@ -633,7 +633,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P 682dc24dbe82d0326377e27c5ff97db3499873b0 -R 2a1e4afac9472a5800a38d1bea7bd744 +P 227a6f67c21c87a7cf98f84b9d57a6dc9da93ebb +R 6c9957669f2cdfef69a7c4eb23ccdec1 U drh -Z a7fa05d78dd2cc528c84b78b850c9e17 +Z 1e991c3831da5b5ff3ab383f3c915b8e diff --git a/manifest.uuid b/manifest.uuid index 2ce255a67d..273e9634e1 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -227a6f67c21c87a7cf98f84b9d57a6dc9da93ebb \ No newline at end of file +59568844e774dbe89fd20bbc8f49a3665cc54717 \ No newline at end of file diff --git a/src/build.c b/src/build.c index 91f7057f10..c1b5a45304 100644 --- a/src/build.c +++ b/src/build.c @@ -22,7 +22,7 @@ ** COMMIT ** ROLLBACK ** -** $Id: build.c,v 1.483 2008/04/28 18:46:43 drh Exp $ +** $Id: build.c,v 1.484 2008/05/01 17:16:53 drh Exp $ */ #include "sqliteInt.h" #include @@ -159,7 +159,7 @@ void sqlite3FinishCoding(Parse *pParse){ */ if( pParse->cookieGoto>0 ){ u32 mask; - int iDb, i; + int iDb; sqlite3VdbeJumpHere(v, pParse->cookieGoto-1); for(iDb=0, mask=1; iDbnDb; mask<<=1, iDb++){ if( (mask & pParse->cookieMask)==0 ) continue; @@ -168,11 +168,14 @@ void sqlite3FinishCoding(Parse *pParse){ sqlite3VdbeAddOp2(v,OP_VerifyCookie, iDb, pParse->cookieValue[iDb]); } #ifndef SQLITE_OMIT_VIRTUALTABLE - for(i=0; inVtabLock; i++){ - char *vtab = (char *)pParse->apVtabLock[i]->pVtab; - sqlite3VdbeAddOp4(v, OP_VBegin, 0, 0, 0, vtab, P4_VTAB); + { + int i; + for(i=0; inVtabLock; i++){ + char *vtab = (char *)pParse->apVtabLock[i]->pVtab; + sqlite3VdbeAddOp4(v, OP_VBegin, 0, 0, 0, vtab, P4_VTAB); + } + pParse->nVtabLock = 0; } - pParse->nVtabLock = 0; #endif /* Once all the cookies have been verified and transactions opened, diff --git a/src/expr.c b/src/expr.c index e0c5ecfbcb..bc5f0eab17 100644 --- a/src/expr.c +++ b/src/expr.c @@ -12,7 +12,7 @@ ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** -** $Id: expr.c,v 1.370 2008/04/29 00:15:21 drh Exp $ +** $Id: expr.c,v 1.371 2008/05/01 17:16:53 drh Exp $ */ #include "sqliteInt.h" #include @@ -266,8 +266,7 @@ Expr *sqlite3Expr( const Token *pToken /* Argument token */ ){ Expr *pNew; - static const Expr zeroExpr; - pNew = sqlite3DbMallocRaw(db, sizeof(Expr)); + pNew = sqlite3DbMallocZero(db, sizeof(Expr)); if( pNew==0 ){ /* When malloc fails, delete pLeft and pRight. Expressions passed to ** this function must always be allocated with sqlite3Expr() for this @@ -277,7 +276,6 @@ Expr *sqlite3Expr( sqlite3ExprDelete(pRight); return 0; } - *pNew = zeroExpr; pNew->op = op; pNew->pLeft = pLeft; pNew->pRight = pRight; diff --git a/src/pager.c b/src/pager.c index 89d6140e6f..fadcf29dc9 100644 --- a/src/pager.c +++ b/src/pager.c @@ -18,7 +18,7 @@ ** file simultaneously, or one process from reading the database while ** another is writing. ** -** @(#) $Id: pager.c,v 1.437 2008/05/01 17:03:49 drh Exp $ +** @(#) $Id: pager.c,v 1.438 2008/05/01 17:16:53 drh Exp $ */ #ifndef SQLITE_OMIT_DISKIO #include "sqliteInt.h" @@ -516,7 +516,9 @@ static const unsigned char aJournalMagic[] = { p->iInUseDB++; if( p->iInUseMM && p->iInUseDB==1 ){ sqlite3_mutex *mutex; +#ifndef SQLITE_MUTEX_NOOP mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MEM2); +#endif p->iInUseDB = 0; sqlite3_mutex_enter(mutex); p->iInUseDB = 1; @@ -2324,7 +2326,9 @@ int sqlite3PagerOpen( pPager->iInUseMM = 0; pPager->iInUseDB = 0; if( !memDb ){ +#ifndef SQLITE_MUTEX_NOOP sqlite3_mutex *mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MEM2); +#endif sqlite3_mutex_enter(mutex); pPager->pNext = sqlite3PagerList; if( sqlite3PagerList ){ @@ -2706,7 +2710,9 @@ int sqlite3PagerTruncate(Pager *pPager, Pgno nPage){ int sqlite3PagerClose(Pager *pPager){ #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT if( !MEMDB ){ +#ifndef SQLITE_MUTEX_NOOP sqlite3_mutex *mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MEM2); +#endif sqlite3_mutex_enter(mutex); if( pPager->pPrev ){ pPager->pPrev->pNext = pPager->pNext; @@ -3223,7 +3229,9 @@ int sqlite3PagerReleaseMemory(int nReq){ /* Acquire the memory-management mutex */ +#ifndef SQLITE_MUTEX_NOOP mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MEM2); +#endif sqlite3_mutex_enter(mutex); /* Signal all database connections that memory management wants diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 4818d898f2..0fd4602e3e 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -12,7 +12,7 @@ ** A TCL Interface to SQLite. Append this file to sqlite3.c and ** compile the whole thing to build a TCL-enabled version of SQLite. ** -** $Id: tclsqlite.c,v 1.216 2008/04/16 00:28:14 drh Exp $ +** $Id: tclsqlite.c,v 1.217 2008/05/01 17:16:53 drh Exp $ */ #include "tcl.h" #include @@ -479,6 +479,7 @@ static int DbBusyHandler(void *cd, int nTries){ return 1; } +#ifndef SQLITE_OMIT_PROGRESS_CALLBACK /* ** This routine is invoked as the 'progress callback' for the database. */ @@ -493,6 +494,7 @@ static int DbProgressHandler(void *cd){ } return 0; } +#endif #ifndef SQLITE_OMIT_TRACE /* diff --git a/src/test_schema.c b/src/test_schema.c index 8800520155..536af86a0c 100644 --- a/src/test_schema.c +++ b/src/test_schema.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** -** $Id: test_schema.c,v 1.13 2007/08/16 04:30:40 drh Exp $ +** $Id: test_schema.c,v 1.14 2008/05/01 17:16:53 drh Exp $ */ /* The code in this file defines a sqlite3 virtual-table module that @@ -66,6 +66,11 @@ struct schema_cursor { int rowid; }; +/* +** None of this works unless we have virtual tables. +*/ +#ifndef SQLITE_OMIT_VIRTUALTABLE + /* ** Table destructor for the schema module. */ @@ -287,6 +292,7 @@ static sqlite3_module schemaModule = { 0, /* xRename */ }; +#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */ #ifdef SQLITE_TEST diff --git a/src/vdbeapi.c b/src/vdbeapi.c index fdb585acf6..6e90084517 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -47,6 +47,7 @@ static struct StatementLruList sqlite3LruStatements; ** ** assert( stmtLruCheck() ); */ +#ifndef NDEBUG static int stmtLruCheck(){ Vdbe *p; for(p=sqlite3LruStatements.pFirst; p; p=p->pLruNext){ @@ -57,6 +58,7 @@ static int stmtLruCheck(){ } return 1; } +#endif /* ** Add vdbe p to the end of the statement lru list. It is assumed that