aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2025-05-31 09:44:00 +0000
committerstephan <stephan@noemail.net>2025-05-31 09:44:00 +0000
commitb504aab848cb6f2c09cc227d0507db17d9af7dc4 (patch)
tree6f104eb2453ac12ccbced2fceb10adf397e0ef61 /src
parentd930d7ef14b2449bd9d8c18ed6aaf8a27a9f16d9 (diff)
downloadsqlite-b504aab848cb6f2c09cc227d0507db17d9af7dc4.tar.gz
sqlite-b504aab848cb6f2c09cc227d0507db17d9af7dc4.zip
Add some missing UNUSED_PARAMETER() annotations to squelch downstream build warnings when using -Wextra -pedantic.
FossilOrigin-Name: a98a2f49355ec39c56e571c70d377675b1bd99a6d43cf9217b0eb1e081895d8e
Diffstat (limited to 'src')
-rw-r--r--src/btree.c2
-rw-r--r--src/dbpage.c13
-rw-r--r--src/select.c4
3 files changed, 13 insertions, 6 deletions
diff --git a/src/btree.c b/src/btree.c
index 1bd59a1b1..ed1dde98c 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -2856,6 +2856,7 @@ static int removeFromSharingList(BtShared *pBt){
sqlite3_mutex_leave(pMainMtx);
return removed;
#else
+ UNUSED_PARAMETER( pBt );
return 1;
#endif
}
@@ -11317,6 +11318,7 @@ void *sqlite3BtreeSchema(Btree *p, int nBytes, void(*xFree)(void *)){
*/
int sqlite3BtreeSchemaLocked(Btree *p){
int rc;
+ UNUSED_PARAMETER(p); /* only used in DEBUG builds */
assert( sqlite3_mutex_held(p->db->mutex) );
sqlite3BtreeEnter(p);
rc = querySharedCacheTableLock(p, SCHEMA_ROOT, READ_LOCK);
diff --git a/src/dbpage.c b/src/dbpage.c
index f9fdcc5a3..4e2addad9 100644
--- a/src/dbpage.c
+++ b/src/dbpage.c
@@ -227,7 +227,7 @@ static int dbpageEof(sqlite3_vtab_cursor *pCursor){
** idxStr is not used
*/
static int dbpageFilter(
- sqlite3_vtab_cursor *pCursor,
+ sqlite3_vtab_cursor *pCursor,
int idxNum, const char *idxStr,
int argc, sqlite3_value **argv
){
@@ -237,10 +237,11 @@ static int dbpageFilter(
sqlite3 *db = pTab->db;
Btree *pBt;
- (void)idxStr;
-
+ UNUSED_PARAMETER(idxStr);
+ UNUSED_PARAMETER(argc);
+
/* Default setting is no rows of result */
- pCsr->pgno = 1;
+ pCsr->pgno = 1;
pCsr->mxPgno = 0;
if( idxNum & 2 ){
@@ -275,8 +276,8 @@ static int dbpageFilter(
}
static int dbpageColumn(
- sqlite3_vtab_cursor *pCursor,
- sqlite3_context *ctx,
+ sqlite3_vtab_cursor *pCursor,
+ sqlite3_context *ctx,
int i
){
DbpageCursor *pCsr = (DbpageCursor *)pCursor;
diff --git a/src/select.c b/src/select.c
index 81cb1184e..a8af934e4 100644
--- a/src/select.c
+++ b/src/select.c
@@ -2110,6 +2110,10 @@ static void generateColumnTypes(
#endif
sqlite3VdbeSetColName(v, i, COLNAME_DECLTYPE, zType, SQLITE_TRANSIENT);
}
+#else
+ UNUSED_PARAMETER(pParse);
+ UNUSED_PARAMETER(pTabList);
+ UNUSED_PARAMETER(pEList);
#endif /* !defined(SQLITE_OMIT_DECLTYPE) */
}