diff options
Diffstat (limited to 'src')
-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 |
21 files changed, 114 insertions, 78 deletions
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); |