diff options
-rw-r--r-- | manifest | 54 | ||||
-rw-r--r-- | manifest.uuid | 2 | ||||
-rw-r--r-- | src/alter.c | 11 | ||||
-rw-r--r-- | src/analyze.c | 6 | ||||
-rw-r--r-- | src/attach.c | 10 | ||||
-rw-r--r-- | src/btree.c | 16 | ||||
-rw-r--r-- | src/date.c | 17 | ||||
-rw-r--r-- | src/delete.c | 4 | ||||
-rw-r--r-- | src/expr.c | 5 | ||||
-rw-r--r-- | src/func.c | 40 | ||||
-rw-r--r-- | src/insert.c | 6 | ||||
-rw-r--r-- | src/main.c | 3 | ||||
-rw-r--r-- | src/malloc.c | 6 | ||||
-rw-r--r-- | src/mem1.c | 4 | ||||
-rw-r--r-- | src/memjournal.c | 5 | ||||
-rw-r--r-- | src/os_unix.c | 10 | ||||
-rw-r--r-- | src/pcache1.c | 8 | ||||
-rw-r--r-- | src/prepare.c | 5 | ||||
-rw-r--r-- | src/select.c | 9 | ||||
-rw-r--r-- | src/sqliteInt.h | 11 | ||||
-rw-r--r-- | src/trigger.c | 3 | ||||
-rw-r--r-- | src/update.c | 6 | ||||
-rw-r--r-- | src/vdbeapi.c | 7 |
23 files changed, 142 insertions, 106 deletions
@@ -1,5 +1,5 @@ -C Add\san\salternative\sapplication-defined\spcache\simplementation\sand\sadd\stest\ncases\sto\spermutations.test\sto\sinvoke\sit.\s\sAdded\sthe\sSQLITE_CONFIG_GETPCACHE\nmethod\sto\ssqlite3_config().\s(CVS\s5920) -D 2008-11-19T01:20:26 +C Changes\sto\savoid\s"unused\sparameter"\scompiler\swarnings.\s(CVS\s5921) +D 2008-11-19T09:05:27 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 0aa7bbe3be6acc4045706e3bb3fd0b8f38f4a3b5 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -94,39 +94,39 @@ F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b F sqlite3.1 6be1ad09113570e1fc8dcaff84c9b0b337db5ffc F sqlite3.def a1be7b9a4b8b51ac41c6ff6e8e44a14ef66b338b F sqlite3.pc.in ae6f59a76e862f5c561eb32a380228a02afc3cad -F src/alter.c a03c9236476f0469eb830bcd16ac30b695e09b83 -F src/analyze.c 91b958435cbb423721ef2a841dbc459c1959bb3a -F src/attach.c 208881c87160d9e2c73a46cf86116c5a6d66f9d7 +F src/alter.c 0a00c184052b7fd20271e783f65fec4efec6fe30 +F src/analyze.c 0c69f21c8063dd0198b65749bf3ee372fa31f85c +F src/attach.c 85c6a3d0daf11965b47604190d7cf5597dc88382 F src/auth.c c8b2ab5c8bad4bd90ed7c294694f48269162c627 F src/bitvec.c 9e922b2577b7e46d8f95349bca6a52f7674d7582 F src/btmutex.c 63c5cc4ad5715690767ffcb741e185d7bc35ec1a -F src/btree.c 661d322468f8fd5811a20f24bd85388709773cb0 +F src/btree.c abbd6838ba2330d2559cdbbca34887ab8a691bde F src/btree.h 179c3ea813780df78a289a8f5130db18e6d4616e F src/btreeInt.h f4ed02e58381190d5303edb83cff2cc997ba2fa2 F src/build.c a89e901ea24d8ec845286f9a1fbfd14572a7777e F src/callback.c e970e5beddbdb23f89a6d05cb1a6419d9f755624 F src/complete.c cb14e06dbe79dee031031f0d9e686ff306afe07c -F src/date.c acae103fc63018707b7a64266ca389a2bf91c461 -F src/delete.c 3b156e1d396942fe50664af4e45e14e7de08c312 -F src/expr.c 0a23a7f58084a40c38e1fc3afcd8adbbc8950b45 +F src/date.c 88898ae96a0d7f66711caffa40b2cf30e623a387 +F src/delete.c 2f85d6d00333343a76824a899e15f241ca383c7c +F src/expr.c fafae5a4590b33c1862a086bf6a1e0b0e1712d94 F src/fault.c dc88c821842157460750d2d61a8a8b4197d047ff -F src/func.c d8eb180e4f454d480894522d8ed11de771a14c7e +F src/func.c bfe4dec1fc90ae9355453caedaa3c71736ed0513 F src/global.c 20a3fe46c8287a01ba3a7442558f0eb70c66b19a F src/hash.c 582c00618efe2051785e66ba1b6430d5a129de3f F src/hash.h 28f38ebb1006a5beedcb013bcdfe31befe7437ae F src/hwtime.h 4a1d45f4cae1f402ea19686acf24acf4f0cb53cb -F src/insert.c 47d2c27396724d5050a5f7d6a54ce44ec163e473 +F src/insert.c 73c4b33767d9540f8ead5d903504ed93f48ad147 F src/journal.c cffd2cd214e58c0e99c3ff632b3bee6c7cbb260e F src/legacy.c aac57bd984e666059011ea01ec4383892a253be3 F src/loadext.c 3872457afdf25bb174fd383cb4e3e0d2a9e60552 -F src/main.c 3b99ff818efa18a772b4fceb8bc72081aa9b1517 -F src/malloc.c 00532787dc7f0dbf4e2487aa823946e1d0524ef1 +F src/main.c d67d2eee7a643a4a894e5de91231a99ad88400b9 +F src/malloc.c 4e7bf5a3fcfd848a09f7ce7abb00f7b358128161 F src/mem0.c f2f84062d1f35814d6535c9f9e33de3bfb3b132c -F src/mem1.c 2091081d1c6bcd4516738f37cd84d42e814cf9a2 +F src/mem1.c bb8e26adde7d463270e961f045802c61dbabc8f1 F src/mem2.c 5d9968f576ba1babc787adbfb613cf428ab484ec F src/mem3.c 1594f117fde4cf11a6c16521f3f30af8d04bbe68 F src/mem5.c 528adcfaa78201d60fccdfddaf55b18b6fda9697 -F src/memjournal.c e2551e89243b39a972a1fbefeedaf4f74438a0cf +F src/memjournal.c 9e1f3c19baa566dd3f18f8eab8b70061f2eb5a9f F src/mutex.c e9cb5fbe94afb4328869afaf3ac49bd1327559eb F src/mutex.h 9e686e83a88838dac8b9c51271c651e833060f1e F src/mutex_noop.c 0004efdbc2fd48d261d5b3416fe537e888c79a54 @@ -137,24 +137,24 @@ F src/os.c 0b411644b87ad689d7250bbfd1834d99b81a3df4 F src/os.h ef8abeb9afc694b82dbd169a91c9b7e26db3c892 F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60 F src/os_os2.c d12285d66df674c42f6f544a6f7c21bf1a954ee1 -F src/os_unix.c 16b0981836576ad7e0c96f094bd2f41a339d078f +F src/os_unix.c a5f8a41b471196b5cf4c76b28fa8ad7ba4124264 F src/os_win.c 08d0b059ac01f32e8813bb96fc573486592b83f5 F src/pager.c d328fcea0bfb3abbc174dba6e6b1ca7c0e1ed7ba F src/pager.h 4a57b219c0765fe1870238064e3f46e4eb2cf5af F src/parse.y 2c4758b4c5ead6de8cf7112f5a7cce7561d313fe F src/pcache.c 439bcf164f10dd0595cbd63f7472881d46dcbb61 F src/pcache.h b6feb183dea39ede8336bb47c5969403d26fa5c0 -F src/pcache1.c 0fa9cce1b5fbaa98bb8ab7dd35dfc4c3845ea4ec +F src/pcache1.c 2453a3e925841fdb610f39bba24def8b2ad4a908 F src/pragma.c 0a5051029c5b687e2f2669d91aa3281ebcbe4fdb -F src/prepare.c 445452ce02b8826c9e5a7b6d5c08b00a824b3a42 +F src/prepare.c 72c8dc897f89ab6bd8354c7a7898a0347abe2291 F src/printf.c 5fe6ba48f897caacc8125e3d16c6bbae6b282214 F src/random.c a87afbd598aa877e23ac676ee92fd8ee5c786a51 F src/resolve.c 4af5391d2b4c1d6c583a6805ac6660181de4545b -F src/select.c 18c6d96f4f8c6e43cb35201a1245ff02be8c9378 +F src/select.c e01537d4d8b8b81a6507e07ebb17fc232dacdda7 F src/shell.c 650d1a87408682280d0e9d014d0d328c59c84b38 F src/sqlite.h.in e9a0aa2502dfe01bf166956051528f28871474c3 F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17 -F src/sqliteInt.h d48bb0ecc2d1c25d47ea144560d7a8e6864fbabe +F src/sqliteInt.h 21aaa8e2b53735eb2ed8a1a3d3e3246b9a446433 F src/sqliteLimit.h f435e728c6b620ef7312814d660a81f9356eb5c8 F src/status.c 237b193efae0cf6ac3f0817a208de6c6c6ef6d76 F src/table.c 22744786199c9195720c15a7a42cb97b2e2728d8 @@ -188,15 +188,15 @@ F src/test_tclvar.c 9e42fa59d3d2f064b7ab8628e7ab2dc8a9fe93d4 F src/test_thread.c d74fc445e0dba0e00806117eb449b307c0b146bf F src/test_wsd.c c297d7d6b8a990239e1bd25935e81d612d8ae31d F src/tokenize.c aaa5fa6a4536a9dd7c855a3f66f32508f1612138 -F src/trigger.c 649940b5bf5838a33721fb72372e7c9d1faf56a9 -F src/update.c f22a6f4507f9a0ef082418919382f83b90fd2e63 +F src/trigger.c b86eb6d216c0014138f858a04185113cb54518e4 +F src/update.c 37d03659f4d2186ffb8d0ab1df9c3038273fb488 F src/utf.c 86dc0f8076f606432a01f1498ae054c32de1f9d2 F src/util.c b9a5d1c4c1a433e17d5828f9717fac763016a2cb F src/vacuum.c 383d6297bddc011ab04a9eed110db6eaf523e8e9 F src/vdbe.c c5270245fcb5368634a9301481ab94a22e7a21b2 F src/vdbe.h 03516f28bf5aca00a53c4dccd6c313f96adb94f6 F src/vdbeInt.h 6b1082480832d406c57a7f469a1c61f1a8759aca -F src/vdbeapi.c ea22e171704906632cd971668359b8c0c5053001 +F src/vdbeapi.c 20722164e7701a0747eaea03cddbbe0de5cb37bf F src/vdbeaux.c 18dea7bbaf3657d77331b03a3ec34363348ea5b0 F src/vdbeblob.c b0dcebfafedcf9c0addc7901ad98f6f986c08935 F src/vdbefifo.c e6326ad6d16ccd8c2ef659046e3a509c0ae4990a @@ -659,7 +659,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 00ccc5967f8912961029a3513445c5e2ac713560 -R 073d299d61cca110cab93939ee191b26 -U drh -Z 897c512f710f8b2c13194a810c1ac26d +P 16f1e6ec2ad92f68c0079a0c2b5ca08a3b4af816 +R 647cc31f7b95c8653e9b9ac16a777558 +U danielk1977 +Z f14e92edbc704c5d9dbaca32e49b5ee7 diff --git a/manifest.uuid b/manifest.uuid index 798e4184a..deff8af06 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -16f1e6ec2ad92f68c0079a0c2b5ca08a3b4af816
\ No newline at end of file +88134322c36b41304aaeef99c39b4ef5b495ca3b
\ No newline at end of file diff --git a/src/alter.c b/src/alter.c index de01cbc08..fe1e2cb19 100644 --- a/src/alter.c +++ b/src/alter.c @@ -12,7 +12,7 @@ ** This file contains C code routines that used to generate VDBE code ** that implements the ALTER TABLE command. ** -** $Id: alter.c,v 1.49 2008/10/30 17:21:13 danielk1977 Exp $ +** $Id: alter.c,v 1.50 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -39,7 +39,7 @@ */ static void renameTableFunc( sqlite3_context *context, - int argc, + int NotUsed, sqlite3_value **argv ){ unsigned char const *zSql = sqlite3_value_text(argv[0]); @@ -53,6 +53,8 @@ static void renameTableFunc( sqlite3 *db = sqlite3_context_db_handle(context); + UNUSED_PARAMETER(NotUsed); + /* The principle used to locate the table name in the CREATE TABLE ** statement is that the table name is the first non-space token that ** is immediately followed by a TK_LP or TK_USING token. @@ -94,7 +96,7 @@ static void renameTableFunc( */ static void renameTriggerFunc( sqlite3_context *context, - int argc, + int NotUsed, sqlite3_value **argv ){ unsigned char const *zSql = sqlite3_value_text(argv[0]); @@ -106,9 +108,10 @@ static void renameTriggerFunc( unsigned char const *zCsr = zSql; int len = 0; char *zRet; - sqlite3 *db = sqlite3_context_db_handle(context); + UNUSED_PARAMETER(NotUsed); + /* The principle used to locate the table name in the CREATE TRIGGER ** statement is that the table name is the first token that is immediatedly ** preceded by either TK_ON or TK_DOT and immediatedly followed by one diff --git a/src/analyze.c b/src/analyze.c index 088edda74..3d0767694 100644 --- a/src/analyze.c +++ b/src/analyze.c @@ -11,7 +11,7 @@ ************************************************************************* ** This file contains code associated with the ANALYZE command. ** -** @(#) $Id: analyze.c,v 1.44 2008/11/03 20:55:07 drh Exp $ +** @(#) $Id: analyze.c,v 1.45 2008/11/19 09:05:27 danielk1977 Exp $ */ #ifndef SQLITE_OMIT_ANALYZE #include "sqliteInt.h" @@ -356,13 +356,15 @@ struct analysisInfo { ** argv[0] = name of the index ** argv[1] = results of analysis - on integer for each column */ -static int analysisLoader(void *pData, int argc, char **argv, char **azNotUsed){ +static int analysisLoader(void *pData, int argc, char **argv, char **NotUsed){ analysisInfo *pInfo = (analysisInfo*)pData; Index *pIndex; int i, c; unsigned int v; const char *z; + UNUSED_PARAMETER(NotUsed); + assert( argc==2 ); if( argv==0 || argv[0]==0 || argv[1]==0 ){ return 0; diff --git a/src/attach.c b/src/attach.c index f7d2db884..ccf1463f2 100644 --- a/src/attach.c +++ b/src/attach.c @@ -11,7 +11,7 @@ ************************************************************************* ** This file contains code used to implement the ATTACH and DETACH commands. ** -** $Id: attach.c,v 1.79 2008/10/28 17:52:39 danielk1977 Exp $ +** $Id: attach.c,v 1.80 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -64,7 +64,7 @@ static int resolveAttachExpr(NameContext *pName, Expr *pExpr) */ static void attachFunc( sqlite3_context *context, - int argc, + int NotUsed, sqlite3_value **argv ){ int i; @@ -76,6 +76,8 @@ static void attachFunc( char *zErrDyn = 0; char zErr[128]; + UNUSED_PARAMETER(NotUsed); + zFile = (const char *)sqlite3_value_text(argv[0]); zName = (const char *)sqlite3_value_text(argv[1]); if( zFile==0 ) zFile = ""; @@ -232,7 +234,7 @@ attach_error: */ static void detachFunc( sqlite3_context *context, - int argc, + int NotUsed, sqlite3_value **argv ){ const char *zName = (const char *)sqlite3_value_text(argv[0]); @@ -241,6 +243,8 @@ static void detachFunc( Db *pDb = 0; char zErr[128]; + UNUSED_PARAMETER(NotUsed); + if( zName==0 ) zName = ""; for(i=0; i<db->nDb; i++){ pDb = &db->aDb[i]; diff --git a/src/btree.c b/src/btree.c index b2383cde5..d5c39a656 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.537 2008/11/17 14:20:56 danielk1977 Exp $ +** $Id: btree.c,v 1.538 2008/11/19 09:05:27 danielk1977 Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** See the header comment on "btreeInt.h" for additional information. @@ -6238,7 +6238,6 @@ int sqlite3BtreeCreateTable(Btree *p, int *piTable, int flags){ static int clearDatabasePage( BtShared *pBt, /* The BTree that contains the table */ Pgno pgno, /* Page number to clear */ - MemPage *pParent, /* Parent page. NULL for the root */ int freePageFlag, /* Deallocate page if true */ int *pnChange ){ @@ -6257,14 +6256,14 @@ static int clearDatabasePage( for(i=0; i<pPage->nCell; i++){ pCell = findCell(pPage, i); if( !pPage->leaf ){ - rc = clearDatabasePage(pBt, get4byte(pCell), pPage, 1, pnChange); + rc = clearDatabasePage(pBt, get4byte(pCell), 1, pnChange); if( rc ) goto cleardatabasepage_out; } rc = clearCell(pPage, pCell); if( rc ) goto cleardatabasepage_out; } if( !pPage->leaf ){ - rc = clearDatabasePage(pBt, get4byte(&pPage->aData[8]), pPage, 1, pnChange); + rc = clearDatabasePage(pBt, get4byte(&pPage->aData[8]), 1, pnChange); if( rc ) goto cleardatabasepage_out; }else if( pnChange ){ assert( pPage->intKey ); @@ -6306,7 +6305,7 @@ int sqlite3BtreeClearTable(Btree *p, int iTable, int *pnChange){ }else if( SQLITE_OK!=(rc = saveAllCursors(pBt, iTable, 0)) ){ /* nothing to do */ }else{ - rc = clearDatabasePage(pBt, (Pgno)iTable, 0, 0, pnChange); + rc = clearDatabasePage(pBt, (Pgno)iTable, 0, pnChange); } sqlite3BtreeLeave(p); return rc; @@ -6752,7 +6751,6 @@ static void checkList( static int checkTreePage( IntegrityCk *pCheck, /* Context for the sanity check */ int iPage, /* Page number of the page to check */ - MemPage *pParent, /* Parent page */ char *zParentContext /* Parent context */ ){ MemPage *pPage; @@ -6822,7 +6820,7 @@ static int checkTreePage( checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, zContext); } #endif - d2 = checkTreePage(pCheck,pgno,pPage,zContext); + d2 = checkTreePage(pCheck, pgno, zContext); if( i>0 && d2!=depth ){ checkAppendMsg(pCheck, zContext, "Child page depth differs"); } @@ -6838,7 +6836,7 @@ static int checkTreePage( checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, 0); } #endif - checkTreePage(pCheck, pgno, pPage, zContext); + checkTreePage(pCheck, pgno, zContext); } /* Check for complete coverage of the page @@ -6985,7 +6983,7 @@ char *sqlite3BtreeIntegrityCheck( checkPtrmap(&sCheck, aRoot[i], PTRMAP_ROOTPAGE, 0, 0); } #endif - checkTreePage(&sCheck, aRoot[i], 0, "List of tree roots: "); + checkTreePage(&sCheck, aRoot[i], "List of tree roots: "); } /* Make sure every page in the file is referenced diff --git a/src/date.c b/src/date.c index dc62bed39..9edbd2887 100644 --- a/src/date.c +++ b/src/date.c @@ -16,7 +16,7 @@ ** sqlite3RegisterDateTimeFunctions() found at the bottom of the file. ** All other code has file scope. ** -** $Id: date.c,v 1.93 2008/11/17 19:18:55 danielk1977 Exp $ +** $Id: date.c,v 1.94 2008/11/19 09:05:27 danielk1977 Exp $ ** ** SQLite processes all times and dates as Julian Day numbers. The ** dates and times are stored as the number of days since noon @@ -968,9 +968,10 @@ static void strftimeFunc( */ static void ctimeFunc( sqlite3_context *context, - int argc, - sqlite3_value **argv + int NotUsed, + sqlite3_value **NotUsed2 ){ + UNUSED_PARAMETER2(NotUsed, NotUsed2); timeFunc(context, 0, 0); } @@ -981,9 +982,10 @@ static void ctimeFunc( */ static void cdateFunc( sqlite3_context *context, - int argc, - sqlite3_value **argv + int NotUsed, + sqlite3_value **NotUsed2 ){ + UNUSED_PARAMETER2(NotUsed, NotUsed2); dateFunc(context, 0, 0); } @@ -994,9 +996,10 @@ static void cdateFunc( */ static void ctimestampFunc( sqlite3_context *context, - int argc, - sqlite3_value **argv + int NotUsed, + sqlite3_value **NotUsed2 ){ + UNUSED_PARAMETER2(NotUsed, NotUsed2); datetimeFunc(context, 0, 0); } #endif /* !defined(SQLITE_OMIT_DATETIME_FUNCS) */ diff --git a/src/delete.c b/src/delete.c index 73e48ae3a..7c3f0add1 100644 --- a/src/delete.c +++ b/src/delete.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** in order to generate code for DELETE FROM statements. ** -** $Id: delete.c,v 1.186 2008/10/31 10:53:23 danielk1977 Exp $ +** $Id: delete.c,v 1.187 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -265,7 +265,7 @@ void sqlite3DeleteFrom( ** deleted from is a view */ #ifndef SQLITE_OMIT_TRIGGER - triggers_exist = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0); + triggers_exist = sqlite3TriggersExist(pTab, TK_DELETE, 0); isView = pTab->pSelect!=0; #else # define triggers_exist 0 diff --git a/src/expr.c b/src/expr.c index d0f7f85ff..a7f7ffcc4 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.402 2008/11/12 08:07:12 danielk1977 Exp $ +** $Id: expr.c,v 1.403 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -939,7 +939,8 @@ static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){ return WRC_Continue; } } -static int selectNodeIsConstant(Walker *pWalker, Select *pSelect){ +static int selectNodeIsConstant(Walker *pWalker, Select *NotUsed){ + UNUSED_PARAMETER(NotUsed); pWalker->u.i = 0; return WRC_Abort; } diff --git a/src/func.c b/src/func.c index 37338c680..57a4b29ee 100644 --- a/src/func.c +++ b/src/func.c @@ -16,7 +16,7 @@ ** sqliteRegisterBuildinFunctions() found at the bottom of the file. ** All other code has file scope. ** -** $Id: func.c,v 1.204 2008/10/28 17:52:39 danielk1977 Exp $ +** $Id: func.c,v 1.205 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -65,10 +65,11 @@ static void minmaxFunc( */ static void typeofFunc( sqlite3_context *context, - int argc, + int NotUsed, sqlite3_value **argv ){ const char *z = 0; + UNUSED_PARAMETER(NotUsed); switch( sqlite3_value_type(argv[0]) ){ case SQLITE_NULL: z = "null"; break; case SQLITE_INTEGER: z = "integer"; break; @@ -324,10 +325,11 @@ static void ifnullFunc( */ static void randomFunc( sqlite3_context *context, - int argc, - sqlite3_value **argv + int NotUsed, + sqlite3_value **NotUsed2 ){ sqlite_int64 r; + UNUSED_PARAMETER2(NotUsed, NotUsed2); sqlite3_randomness(sizeof(r), &r); if( (r<<1)==0 ) r = 0; /* Prevent 0x8000.... as the result so that we */ /* can always do abs() of the result */ @@ -363,10 +365,11 @@ static void randomBlob( */ static void last_insert_rowid( sqlite3_context *context, - int arg, - sqlite3_value **argv + int NotUsed, + sqlite3_value **NotUsed2 ){ sqlite3 *db = sqlite3_context_db_handle(context); + UNUSED_PARAMETER2(NotUsed, NotUsed2); sqlite3_result_int64(context, sqlite3_last_insert_rowid(db)); } @@ -376,10 +379,11 @@ static void last_insert_rowid( */ static void changes( sqlite3_context *context, - int arg, - sqlite3_value **argv + int NotUsed, + sqlite3_value **NotUsed2 ){ sqlite3 *db = sqlite3_context_db_handle(context); + UNUSED_PARAMETER2(NotUsed, NotUsed2); sqlite3_result_int(context, sqlite3_changes(db)); } @@ -389,10 +393,11 @@ static void changes( */ static void total_changes( sqlite3_context *context, - int arg, - sqlite3_value **argv + int NotUsed, + sqlite3_value **NotUsed2 ){ sqlite3 *db = sqlite3_context_db_handle(context); + UNUSED_PARAMETER2(NotUsed, NotUsed2); sqlite3_result_int(context, sqlite3_total_changes(db)); } @@ -637,10 +642,11 @@ static void likeFunc( */ static void nullifFunc( sqlite3_context *context, - int argc, + int NotUsed, sqlite3_value **argv ){ CollSeq *pColl = sqlite3GetFuncCollSeq(context); + UNUSED_PARAMETER(NotUsed); if( sqlite3MemCompare(argv[0], argv[1], pColl)!=0 ){ sqlite3_result_value(context, argv[0]); } @@ -652,9 +658,10 @@ static void nullifFunc( */ static void versionFunc( sqlite3_context *context, - int argc, - sqlite3_value **argv + int NotUsed, + sqlite3_value **NotUsed2 ){ + UNUSED_PARAMETER2(NotUsed, NotUsed2); sqlite3_result_text(context, sqlite3_version, -1, SQLITE_STATIC); } @@ -1115,9 +1122,14 @@ static void countFinalize(sqlite3_context *context){ /* ** Routines to implement min() and max() aggregate functions. */ -static void minmaxStep(sqlite3_context *context, int argc, sqlite3_value **argv){ +static void minmaxStep( + sqlite3_context *context, + int NotUsed, + sqlite3_value **argv +){ Mem *pArg = (Mem *)argv[0]; Mem *pBest; + UNUSED_PARAMETER(NotUsed); if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; pBest = (Mem *)sqlite3_aggregate_context(context, sizeof(*pBest)); diff --git a/src/insert.c b/src/insert.c index f3f7622a7..f7492ebc9 100644 --- a/src/insert.c +++ b/src/insert.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle INSERT statements in SQLite. ** -** $Id: insert.c,v 1.252 2008/11/17 19:18:55 danielk1977 Exp $ +** $Id: insert.c,v 1.253 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -430,7 +430,7 @@ void sqlite3Insert( ** inserted into is a view */ #ifndef SQLITE_OMIT_TRIGGER - triggers_exist = sqlite3TriggersExist(pParse, pTab, TK_INSERT, 0); + triggers_exist = sqlite3TriggersExist(pTab, TK_INSERT, 0); isView = pTab->pSelect!=0; #else # define triggers_exist 0 @@ -936,7 +936,6 @@ void sqlite3Insert( regIns, aRegIdx, 0, - 0, (triggers_exist & TRIGGER_AFTER)!=0 ? newIdx : -1, appendFlag ); @@ -1328,7 +1327,6 @@ void sqlite3CompleteInsertion( int baseCur, /* Index of a read/write cursor pointing at pTab */ int regRowid, /* Range of content */ int *aRegIdx, /* Register used by each index. 0 for unused indices */ - int rowidChng, /* True if the record number will change */ int isUpdate, /* True for UPDATE, False for INSERT */ int newIdx, /* Index of NEW table for triggers. -1 if none */ int appendBias /* True if this is likely to be an append */ diff --git a/src/main.c b/src/main.c index 16f89b785..d1533cfeb 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.513 2008/11/19 01:20:26 drh Exp $ +** $Id: main.c,v 1.514 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -515,6 +515,7 @@ static int nocaseCollatingFunc( ){ int r = sqlite3StrNICmp( (const char *)pKey1, (const char *)pKey2, (nKey1<nKey2)?nKey1:nKey2); + UNUSED_PARAMETER(NotUsed); if( 0==r ){ r = nKey1-nKey2; } diff --git a/src/malloc.c b/src/malloc.c index 8e9bbd381..a4520933e 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -12,7 +12,7 @@ ** ** Memory allocation functions used throughout sqlite. ** -** $Id: malloc.c,v 1.47 2008/11/18 07:27:24 danielk1977 Exp $ +** $Id: malloc.c,v 1.48 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" #include <stdarg.h> @@ -25,9 +25,10 @@ */ static void softHeapLimitEnforcer( void *NotUsed, - sqlite3_int64 inUse, + sqlite3_int64 NotUsed2, int allocSize ){ + UNUSED_PARAMETER2(NotUsed, NotUsed2); sqlite3_release_memory(allocSize); } @@ -69,6 +70,7 @@ int sqlite3_release_memory(int n){ nRet += sqlite3PcacheReleaseMemory(n-nRet); return nRet; #else + UNUSED_PARAMETER(n); return SQLITE_OK; #endif } diff --git a/src/mem1.c b/src/mem1.c index d85a39000..7522fc8d2 100644 --- a/src/mem1.c +++ b/src/mem1.c @@ -17,7 +17,7 @@ ** This file contains implementations of the low-level memory allocation ** routines specified in the sqlite3_mem_methods object. ** -** $Id: mem1.c,v 1.27 2008/10/28 18:58:20 drh Exp $ +** $Id: mem1.c,v 1.28 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -110,6 +110,7 @@ static int sqlite3MemRoundup(int n){ ** Initialize this module. */ static int sqlite3MemInit(void *NotUsed){ + UNUSED_PARAMETER(NotUsed); return SQLITE_OK; } @@ -117,6 +118,7 @@ static int sqlite3MemInit(void *NotUsed){ ** Deinitialize this module. */ static void sqlite3MemShutdown(void *NotUsed){ + UNUSED_PARAMETER(NotUsed); return; } diff --git a/src/memjournal.c b/src/memjournal.c index 897358682..5805d2970 100644 --- a/src/memjournal.c +++ b/src/memjournal.c @@ -14,7 +14,7 @@ ** The in-memory rollback journal is used to journal transactions for ** ":memory:" databases and when the journal_mode=MEMORY pragma is used. ** -** @(#) $Id: memjournal.c,v 1.3 2008/11/12 15:24:28 drh Exp $ +** @(#) $Id: memjournal.c,v 1.4 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -184,7 +184,8 @@ static int memjrnlClose(sqlite3_file *pJfd){ /* ** Sync the file. */ -static int memjrnlSync(sqlite3_file *pJfd, int flags){ +static int memjrnlSync(sqlite3_file *NotUsed, int NotUsed2){ + UNUSED_PARAMETER2(NotUsed, NotUsed2); return SQLITE_OK; } diff --git a/src/os_unix.c b/src/os_unix.c index 26a653461..b59d768fd 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -12,7 +12,7 @@ ** ** This file contains code that is specific to Unix systems. ** -** $Id: os_unix.c,v 1.211 2008/11/17 19:18:55 danielk1977 Exp $ +** $Id: os_unix.c,v 1.212 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" #if SQLITE_OS_UNIX /* This file is used on unix only */ @@ -770,12 +770,12 @@ static int testLockingStyle(int fd){ ** If SQLITE_ENABLE_LOCKING_STYLE is not defined, this function always ** returns LOCKING_STYLE_POSIX. */ +#if SQLITE_ENABLE_LOCKING_STYLE static int detectLockingStyle( sqlite3_vfs *pVfs, const char *filePath, int fd ){ -#if SQLITE_ENABLE_LOCKING_STYLE #if defined(__RTP__) || defined(_WRS_KERNEL) if( !filePath ){ return LOCKING_STYLE_NONE; @@ -826,10 +826,12 @@ static int detectLockingStyle( /* Default case. Handles, amongst others, "nfs". */ return testLockingStyle(fd); -#endif -#endif +#endif /* if defined(__RTP__) || defined(_WRS_KERNEL) */ return LOCKING_STYLE_POSIX; } +#else + #define detectLockingStyle(x,y,z) LOCKING_STYLE_POSIX +#endif /* ifdef SQLITE_ENABLE_LOCKING_STYLE */ /* ** Given a file descriptor, locate lockInfo and openCnt structures that diff --git a/src/pcache1.c b/src/pcache1.c index 025c5dc4c..86df88856 100644 --- a/src/pcache1.c +++ b/src/pcache1.c @@ -16,7 +16,7 @@ ** If the default page cache implementation is overriden, then neither of ** these two features are available. ** -** @(#) $Id: pcache1.c,v 1.2 2008/11/15 11:22:45 danielk1977 Exp $ +** @(#) $Id: pcache1.c,v 1.3 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -380,7 +380,8 @@ static void pcache1TruncateUnsafe( /* ** Implementation of the sqlite3_pcache.xInit method. */ -static int pcache1Init(void *pUnused){ +static int pcache1Init(void *NotUsed){ + UNUSED_PARAMETER(NotUsed); memset(&pcache1, 0, sizeof(pcache1)); if( sqlite3GlobalConfig.bCoreMutex ){ pcache1.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_LRU); @@ -391,7 +392,8 @@ static int pcache1Init(void *pUnused){ /* ** Implementation of the sqlite3_pcache.xShutdown method. */ -static void pcache1Shutdown(void *pUnused){ +static void pcache1Shutdown(void *NotUsed){ + UNUSED_PARAMETER(NotUsed); /* no-op */ } diff --git a/src/prepare.c b/src/prepare.c index cdd023ad7..131efa877 100644 --- a/src/prepare.c +++ b/src/prepare.c @@ -13,7 +13,7 @@ ** interface, and routines that contribute to loading the database schema ** from disk. ** -** $Id: prepare.c,v 1.99 2008/11/17 19:18:55 danielk1977 Exp $ +** $Id: prepare.c,v 1.100 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -52,11 +52,12 @@ static void corruptSchema( ** argv[2] = SQL text for the CREATE statement. ** */ -int sqlite3InitCallback(void *pInit, int argc, char **argv, char **azColName){ +int sqlite3InitCallback(void *pInit, int argc, char **argv, char **NotUsed){ InitData *pData = (InitData*)pInit; sqlite3 *db = pData->db; int iDb = pData->iDb; + UNUSED_PARAMETER(NotUsed); assert( sqlite3_mutex_held(db->mutex) ); DbClearProperty(db, iDb, DB_Empty); if( db->mallocFailed ){ diff --git a/src/select.c b/src/select.c index a1034029e..22bdfd23a 100644 --- a/src/select.c +++ b/src/select.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle SELECT statements in SQLite. ** -** $Id: select.c,v 1.485 2008/11/17 19:18:55 danielk1977 Exp $ +** $Id: select.c,v 1.486 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -2921,7 +2921,7 @@ static int flattenSubquery( ** 2. There is a single expression in the result set, and it is ** either min(x) or max(x), where x is a column reference. */ -static int minMaxQuery(Parse *pParse, Select *p){ +static int minMaxQuery(Select *p){ Expr *pExpr; ExprList *pEList = p->pEList; @@ -3221,7 +3221,8 @@ static int selectExpander(Walker *pWalker, Select *p){ ** Walker.xSelectCallback is set to do something useful for every ** subquery in the parser tree. */ -static int exprWalkNoop(Walker *pWalker, Expr *pExpr){ +static int exprWalkNoop(Walker *NotUsed, Expr *NotUsed2){ + UNUSED_PARAMETER2(NotUsed, NotUsed2); return WRC_Continue; } @@ -4012,7 +4013,7 @@ int sqlite3Select( ** satisfying the 'ORDER BY' clause than it does in other cases. ** Refer to code and comments in where.c for details. */ - flag = minMaxQuery(pParse, p); + flag = minMaxQuery(p); if( flag ){ pDel = pMinMax = sqlite3ExprListDup(db, p->pEList->a[0].pExpr->pList); if( pMinMax && !db->mallocFailed ){ diff --git a/src/sqliteInt.h b/src/sqliteInt.h index f35cbd903..f1188f1db 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.796 2008/11/18 07:27:24 danielk1977 Exp $ +** @(#) $Id: sqliteInt.h,v 1.797 2008/11/19 09:05:27 danielk1977 Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -478,6 +478,9 @@ struct BusyHandler { #define sqlite3GlobalConfig sqlite3Config #endif +#define UNUSED_PARAMETER(x) (void)(x) +#define UNUSED_PARAMETER2(x,y) (void)(x),(void)(y) + /* ** Forward references to structures */ @@ -2223,7 +2226,7 @@ void sqlite3GenerateRowIndexDelete(Parse*, Table*, int, int*); int sqlite3GenerateIndexKey(Parse*, Index*, int, int, int); void sqlite3GenerateConstraintChecks(Parse*,Table*,int,int, int*,int,int,int,int); -void sqlite3CompleteInsertion(Parse*, Table*, int, int, int*,int,int,int,int); +void sqlite3CompleteInsertion(Parse*, Table*, int, int, int*, int, int, int); int sqlite3OpenTableAndIndices(Parse*, Table*, int, int); void sqlite3BeginWriteOperation(Parse*, int, int); Expr *sqlite3ExprDup(sqlite3*,Expr*); @@ -2259,7 +2262,7 @@ void sqlite3MaterializeView(Parse*, Table*, Expr*, int); void sqlite3FinishTrigger(Parse*, TriggerStep*, Token*); void sqlite3DropTrigger(Parse*, SrcList*, int); void sqlite3DropTriggerPtr(Parse*, Trigger*); - int sqlite3TriggersExist(Parse*, Table*, int, ExprList*); + int sqlite3TriggersExist(Table*, int, ExprList*); int sqlite3CodeRowTrigger(Parse*, int, ExprList*, int, Table *, int, int, int, int, u32*, u32*); void sqliteViewTriggers(Parse*, Table*, Expr*, int, ExprList*); @@ -2272,7 +2275,7 @@ void sqlite3MaterializeView(Parse*, Table*, Expr*, int); void sqlite3DeleteTrigger(sqlite3*, Trigger*); void sqlite3UnlinkAndDeleteTrigger(sqlite3*,int,const char*); #else -# define sqlite3TriggersExist(A,B,C,D,E,F) 0 +# define sqlite3TriggersExist(B,C,D,E,F) 0 # define sqlite3DeleteTrigger(A,B) # define sqlite3DropTriggerPtr(A,B) # define sqlite3UnlinkAndDeleteTrigger(A,B,C) diff --git a/src/trigger.c b/src/trigger.c index 8010fda29..2ac3374fd 100644 --- a/src/trigger.c +++ b/src/trigger.c @@ -10,7 +10,7 @@ ************************************************************************* ** ** -** $Id: trigger.c,v 1.129 2008/08/20 16:35:10 drh Exp $ +** $Id: trigger.c,v 1.130 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -603,7 +603,6 @@ static int checkColumnOverLap(IdList *pIdList, ExprList *pEList){ ** TRIGGER_AFTER. */ int sqlite3TriggersExist( - Parse *pParse, /* Used to check for recursive triggers */ Table *pTab, /* The table the contains the triggers */ int op, /* one of TK_DELETE, TK_INSERT, TK_UPDATE */ ExprList *pChanges /* Columns that change in an UPDATE statement */ diff --git a/src/update.c b/src/update.c index b2d310253..34a496e48 100644 --- a/src/update.c +++ b/src/update.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle UPDATE statements. ** -** $Id: update.c,v 1.186 2008/10/31 10:53:23 danielk1977 Exp $ +** $Id: update.c,v 1.187 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -142,7 +142,7 @@ void sqlite3Update( ** updated is a view */ #ifndef SQLITE_OMIT_TRIGGER - triggers_exist = sqlite3TriggersExist(pParse, pTab, TK_UPDATE, pChanges); + triggers_exist = sqlite3TriggersExist(pTab, TK_UPDATE, pChanges); isView = pTab->pSelect!=0; #else # define triggers_exist 0 @@ -525,7 +525,7 @@ void sqlite3Update( /* Create the new index entries and the new record. */ sqlite3CompleteInsertion(pParse, pTab, iCur, regNewRowid, - aRegIdx, chngRowid, 1, -1, 0); + aRegIdx, 1, -1, 0); } /* Increment the row counter diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 6fbd2a8f2..95fbf5c18 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -13,7 +13,7 @@ ** This file contains code use to implement APIs that are part of the ** VDBE. ** -** $Id: vdbeapi.c,v 1.148 2008/11/05 16:37:35 drh Exp $ +** $Id: vdbeapi.c,v 1.149 2008/11/19 09:05:27 danielk1977 Exp $ */ #include "sqliteInt.h" #include "vdbeInt.h" @@ -601,11 +601,12 @@ sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){ */ void sqlite3InvalidFunction( sqlite3_context *context, /* The function calling context */ - int argc, /* Number of arguments to the function */ - sqlite3_value **argv /* Value of each argument */ + int NotUsed, /* Number of arguments to the function */ + sqlite3_value **NotUsed2 /* Value of each argument */ ){ const char *zName = context->pFunc->zName; char *zErr; + UNUSED_PARAMETER2(NotUsed, NotUsed2); zErr = sqlite3MPrintf(0, "unable to use function %s in the requested context", zName); sqlite3_result_error(context, zErr, -1); |