aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/mmapwarm.c
diff options
context:
space:
mode:
authordrh <>2023-10-25 19:06:23 +0000
committerdrh <>2023-10-25 19:06:23 +0000
commit208f5c65d4d97b7257bd13adcf2bcb07a34352b2 (patch)
tree75fbd950267ccff3cf831154c135bf48234ef746 /ext/misc/mmapwarm.c
parentd91884586a773b72f6fbaa46a86c56797fa24282 (diff)
downloadsqlite-208f5c65d4d97b7257bd13adcf2bcb07a34352b2.tar.gz
sqlite-208f5c65d4d97b7257bd13adcf2bcb07a34352b2.zip
Fix harmless compiler warnings.
FossilOrigin-Name: cc8efe0494b8fe0df18aa67b1675779bf704d1ac53647fe1f7f55d8048041680
Diffstat (limited to 'ext/misc/mmapwarm.c')
-rw-r--r--ext/misc/mmapwarm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/misc/mmapwarm.c b/ext/misc/mmapwarm.c
index 5afa47bf7..851f8b0eb 100644
--- a/ext/misc/mmapwarm.c
+++ b/ext/misc/mmapwarm.c
@@ -38,7 +38,7 @@ int sqlite3_mmap_warm(sqlite3 *db, const char *zDb){
int rc = SQLITE_OK;
char *zSql = 0;
int pgsz = 0;
- int nTotal = 0;
+ unsigned int nTotal = 0;
if( 0==sqlite3_get_autocommit(db) ) return SQLITE_MISUSE;
@@ -86,8 +86,8 @@ int sqlite3_mmap_warm(sqlite3 *db, const char *zDb){
rc = p->xFetch(pFd, pgsz*iPg, pgsz, (void**)&pMap);
if( rc!=SQLITE_OK || pMap==0 ) break;
- nTotal += pMap[0];
- nTotal += pMap[pgsz-1];
+ nTotal += (unsigned int)pMap[0];
+ nTotal += (unsigned int)pMap[pgsz-1];
rc = p->xUnfetch(pFd, pgsz*iPg, (void*)pMap);
if( rc!=SQLITE_OK ) break;
@@ -103,5 +103,6 @@ int sqlite3_mmap_warm(sqlite3 *db, const char *zDb){
if( rc==SQLITE_OK ) rc = rc2;
}
+ (void)nTotal;
return rc;
}