aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2023-10-06 13:05:42 +0000
committerdrh <>2023-10-06 13:05:42 +0000
commit91f3cd987456997941c88ea67f7a45ac9c7f52d2 (patch)
treeb419d89d72cceb7ef340e2d116fb18309a02aca3 /src
parentdd7f09e6c00315eff7930a8c13d4e8d659c541a9 (diff)
parent00eee7a786bf165e10de253fe3da19d1057f4aad (diff)
downloadsqlite-91f3cd987456997941c88ea67f7a45ac9c7f52d2.tar.gz
sqlite-91f3cd987456997941c88ea67f7a45ac9c7f52d2.zip
Merge compiler warning fixes from trunk into the jsonb branch.
FossilOrigin-Name: 6409d307915f8969f12df2d5ffa961645bd4db7ccfbd6f52237a217b6a867252
Diffstat (limited to 'src')
-rw-r--r--src/build.c6
-rw-r--r--src/dbpage.c3
-rw-r--r--src/dbstat.c3
-rw-r--r--src/json.c6
-rw-r--r--src/pragma.c3
-rw-r--r--src/shell.c.in1
-rw-r--r--src/test8.c11
-rw-r--r--src/test_bestindex.c5
-rw-r--r--src/test_fs.c15
-rw-r--r--src/test_intarray.c5
-rw-r--r--src/test_osinst.c7
-rw-r--r--src/test_schema.c5
-rw-r--r--src/test_tclvar.c5
-rw-r--r--src/vdbesort.c8
-rw-r--r--src/vdbevtab.c3
15 files changed, 69 insertions, 17 deletions
diff --git a/src/build.c b/src/build.c
index 3e011c625..59e3e23f0 100644
--- a/src/build.c
+++ b/src/build.c
@@ -2302,7 +2302,7 @@ static int isDupColumn(Index *pIdx, int nKey, Index *pPk, int iCol){
** The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask
** to determine if the index is covering index.
*/
-static void recomputeColumnsNotIndexed(Parse *pParse, Index *pIdx){
+static void recomputeColumnsNotIndexed(Index *pIdx){
Bitmask m = 0;
int j;
Table *pTab = pIdx->pTable;
@@ -2493,7 +2493,7 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){
}
assert( pPk->nColumn==j );
assert( pTab->nNVCol<=j );
- recomputeColumnsNotIndexed(pParse, pPk);
+ recomputeColumnsNotIndexed(pPk);
}
@@ -4273,7 +4273,7 @@ void sqlite3CreateIndex(
** it as a covering index */
assert( HasRowid(pTab)
|| pTab->iPKey<0 || sqlite3TableColumnToIndex(pIndex, pTab->iPKey)>=0 );
- recomputeColumnsNotIndexed(pParse, pIndex);
+ recomputeColumnsNotIndexed(pIndex);
if( pTblName!=0 && pIndex->nColumn>=pTab->nCol ){
pIndex->isCovering = 1;
for(j=0; j<pTab->nCol; j++){
diff --git a/src/dbpage.c b/src/dbpage.c
index 32a9ce55b..73c31f0da 100644
--- a/src/dbpage.c
+++ b/src/dbpage.c
@@ -425,7 +425,8 @@ int sqlite3DbpageRegister(sqlite3 *db){
0, /* xSavepoint */
0, /* xRelease */
0, /* xRollbackTo */
- 0 /* xShadowName */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
return sqlite3_create_module(db, "sqlite_dbpage", &dbpage_module, 0);
}
diff --git a/src/dbstat.c b/src/dbstat.c
index 0a89d0524..c70d80637 100644
--- a/src/dbstat.c
+++ b/src/dbstat.c
@@ -895,7 +895,8 @@ int sqlite3DbstatRegister(sqlite3 *db){
0, /* xSavepoint */
0, /* xRelease */
0, /* xRollbackTo */
- 0 /* xShadowName */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
return sqlite3_create_module(db, "dbstat", &dbstat_module, 0);
}
diff --git a/src/json.c b/src/json.c
index 7522c9571..341957275 100644
--- a/src/json.c
+++ b/src/json.c
@@ -5618,7 +5618,8 @@ static sqlite3_module jsonEachModule = {
0, /* xSavepoint */
0, /* xRelease */
0, /* xRollbackTo */
- 0 /* xShadowName */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
/* The methods of the json_tree virtual table. */
@@ -5646,7 +5647,8 @@ static sqlite3_module jsonTreeModule = {
0, /* xSavepoint */
0, /* xRelease */
0, /* xRollbackTo */
- 0 /* xShadowName */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
#endif /* SQLITE_OMIT_VIRTUALTABLE */
#endif /* !defined(SQLITE_OMIT_JSON) */
diff --git a/src/pragma.c b/src/pragma.c
index a4e05bbdf..7c8911b2c 100644
--- a/src/pragma.c
+++ b/src/pragma.c
@@ -2900,7 +2900,8 @@ static const sqlite3_module pragmaVtabModule = {
0, /* xSavepoint */
0, /* xRelease */
0, /* xRollbackTo */
- 0 /* xShadowName */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
/*
diff --git a/src/shell.c.in b/src/shell.c.in
index 2d382a681..f9bea8e7a 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -455,7 +455,6 @@ static int stdin_is_interactive = 1;
static int console_utf8 = sizeof(char*)/4 - 1;
#else
# define SHELL_WIN_UTF8_OPT 0
- static const int console_utf8 = 0;
#endif
/*
diff --git a/src/test8.c b/src/test8.c
index f0f574310..4aeb555c7 100644
--- a/src/test8.c
+++ b/src/test8.c
@@ -1317,7 +1317,12 @@ static sqlite3_module echoModule = {
echoCommit, /* xCommit - commit transaction */
echoRollback, /* xRollback - rollback transaction */
echoFindFunction, /* xFindFunction - function overloading */
- echoRename /* xRename - rename the table */
+ echoRename, /* xRename - rename the table */
+ 0, /* xSavepoint */
+ 0, /* xRelease */
+ 0, /* xRollbackTo */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
static sqlite3_module echoModuleV2 = {
@@ -1343,7 +1348,9 @@ static sqlite3_module echoModuleV2 = {
echoRename, /* xRename - rename the table */
echoSavepoint,
echoRelease,
- echoRollbackTo
+ echoRollbackTo,
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
/*
diff --git a/src/test_bestindex.c b/src/test_bestindex.c
index f6e0678ce..8128530b4 100644
--- a/src/test_bestindex.c
+++ b/src/test_bestindex.c
@@ -814,6 +814,11 @@ static sqlite3_module tclModule = {
0, /* xRollback */
tclFindFunction, /* xFindFunction */
0, /* xRename */
+ 0, /* xSavepoint */
+ 0, /* xRelease */
+ 0, /* xRollbackTo */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
/*
diff --git a/src/test_fs.c b/src/test_fs.c
index ddfdc7fb5..f88f3a942 100644
--- a/src/test_fs.c
+++ b/src/test_fs.c
@@ -816,6 +816,11 @@ static sqlite3_module fsModule = {
0, /* xRollback */
0, /* xFindMethod */
0, /* xRename */
+ 0, /* xSavepoint */
+ 0, /* xRelease */
+ 0, /* xRollbackTo */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
static sqlite3_module fsdirModule = {
@@ -839,6 +844,11 @@ static sqlite3_module fsdirModule = {
0, /* xRollback */
0, /* xFindMethod */
0, /* xRename */
+ 0, /* xSavepoint */
+ 0, /* xRelease */
+ 0, /* xRollbackTo */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
static sqlite3_module fstreeModule = {
@@ -862,6 +872,11 @@ static sqlite3_module fstreeModule = {
0, /* xRollback */
0, /* xFindMethod */
0, /* xRename */
+ 0, /* xSavepoint */
+ 0, /* xRelease */
+ 0, /* xRollbackTo */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
/*
diff --git a/src/test_intarray.c b/src/test_intarray.c
index 8c74a0415..a978ed585 100644
--- a/src/test_intarray.c
+++ b/src/test_intarray.c
@@ -205,6 +205,11 @@ static sqlite3_module intarrayModule = {
0, /* xRollback */
0, /* xFindMethod */
0, /* xRename */
+ 0, /* xSavepoint */
+ 0, /* xRelease */
+ 0, /* xRollbackTo */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
diff --git a/src/test_osinst.c b/src/test_osinst.c
index 3e698c032..062e83159 100644
--- a/src/test_osinst.c
+++ b/src/test_osinst.c
@@ -1090,7 +1090,12 @@ int sqlite3_vfslog_register(sqlite3 *db){
0, /* xRollback */
0, /* xFindMethod */
0, /* xRename */
- };
+ 0, /* xSavepoint */
+ 0, /* xRelease */
+ 0, /* xRollbackTo */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
+ };
sqlite3_create_module(db, "vfslog", &vfslog_module, 0);
return SQLITE_OK;
diff --git a/src/test_schema.c b/src/test_schema.c
index d2cae7f2a..2cbc18e2b 100644
--- a/src/test_schema.c
+++ b/src/test_schema.c
@@ -292,6 +292,11 @@ static sqlite3_module schemaModule = {
0, /* xRollback */
0, /* xFindMethod */
0, /* xRename */
+ 0, /* xSavepoint */
+ 0, /* xRelease */
+ 0, /* xRollbackTo */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
diff --git a/src/test_tclvar.c b/src/test_tclvar.c
index bf99a8ead..36165bc27 100644
--- a/src/test_tclvar.c
+++ b/src/test_tclvar.c
@@ -487,6 +487,11 @@ static sqlite3_module tclvarModule = {
0, /* xRollback */
0, /* xFindMethod */
0, /* xRename */
+ 0, /* xSavepoint */
+ 0, /* xRelease */
+ 0, /* xRollbackTo */
+ 0, /* xShadowName */
+ 0 /* xIntegrity */
};
/*
diff --git a/src/vdbesort.c b/src/vdbesort.c
index 2b7da94f7..008369030 100644
--- a/src/vdbesort.c
+++ b/src/vdbesort.c
@@ -186,7 +186,7 @@ struct SorterFile {
struct SorterList {
SorterRecord *pList; /* Linked list of records */
u8 *aMemory; /* If non-NULL, bulk memory to hold pList */
- int szPMA; /* Size of pList as PMA in bytes */
+ i64 szPMA; /* Size of pList as PMA in bytes */
};
/*
@@ -295,10 +295,10 @@ typedef int (*SorterCompare)(SortSubtask*,int*,const void*,int,const void*,int);
struct SortSubtask {
SQLiteThread *pThread; /* Background thread, if any */
int bDone; /* Set if thread is finished but not joined */
+ int nPMA; /* Number of PMAs currently in file */
VdbeSorter *pSorter; /* Sorter that owns this sub-task */
UnpackedRecord *pUnpacked; /* Space to unpack a record */
SorterList list; /* List for thread to write to a PMA */
- int nPMA; /* Number of PMAs currently in file */
SorterCompare xCompare; /* Compare function to use */
SorterFile file; /* Temp file for level-0 PMAs */
SorterFile file2; /* Space for other PMAs */
@@ -1772,8 +1772,8 @@ int sqlite3VdbeSorterWrite(
int rc = SQLITE_OK; /* Return Code */
SorterRecord *pNew; /* New list element */
int bFlush; /* True to flush contents of memory to PMA */
- int nReq; /* Bytes of memory required */
- int nPMA; /* Bytes of PMA space required */
+ i64 nReq; /* Bytes of memory required */
+ i64 nPMA; /* Bytes of PMA space required */
int t; /* serial type of first record field */
assert( pCsr->eCurType==CURTYPE_SORTER );
diff --git a/src/vdbevtab.c b/src/vdbevtab.c
index 59030e0e1..b295dff7b 100644
--- a/src/vdbevtab.c
+++ b/src/vdbevtab.c
@@ -428,7 +428,8 @@ static sqlite3_module bytecodevtabModule = {
/* xSavepoint */ 0,
/* xRelease */ 0,
/* xRollbackTo */ 0,
- /* xShadowName */ 0
+ /* xShadowName */ 0,
+ /* xIntegrity */ 0
};