aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-03-14 11:46:10 +0000
committerdrh <drh@noemail.net>2014-03-14 11:46:10 +0000
commit18c7e40ca3de1a1d10548f07d7cdb73db8abbbf1 (patch)
tree8427af2c50d00717398be63020dd9a62d8b71e5e /src
parentd88e521f591a447cc13b377fcbd078ed435ebdb8 (diff)
downloadsqlite-18c7e40ca3de1a1d10548f07d7cdb73db8abbbf1.tar.gz
sqlite-18c7e40ca3de1a1d10548f07d7cdb73db8abbbf1.zip
Fix a harmless compiler warning that crops up with SQLITE_MAX_MMAP_SIZE=0.
FossilOrigin-Name: 1277932b7e8bb36c7070ffafbf110a8e128c267b
Diffstat (limited to 'src')
-rw-r--r--src/btree.c2
-rw-r--r--src/btree.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/btree.c b/src/btree.c
index 29ead1c67..9ca600e8c 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -2161,6 +2161,7 @@ int sqlite3BtreeSetCacheSize(Btree *p, int mxPage){
return SQLITE_OK;
}
+#if SQLITE_MAX_MMAP_SIZE>0
/*
** Change the limit on the amount of the database file that may be
** memory mapped.
@@ -2173,6 +2174,7 @@ int sqlite3BtreeSetMmapLimit(Btree *p, sqlite3_int64 szMmap){
sqlite3BtreeLeave(p);
return SQLITE_OK;
}
+#endif /* SQLITE_MAX_MMAP_SIZE>0 */
/*
** Change the way data is synced to disk in order to increase or decrease
diff --git a/src/btree.h b/src/btree.h
index eda7bef70..0c3fdfad6 100644
--- a/src/btree.h
+++ b/src/btree.h
@@ -63,7 +63,9 @@ int sqlite3BtreeOpen(
int sqlite3BtreeClose(Btree*);
int sqlite3BtreeSetCacheSize(Btree*,int);
-int sqlite3BtreeSetMmapLimit(Btree*,sqlite3_int64);
+#if SQLITE_MAX_MMAP_SIZE>0
+ int sqlite3BtreeSetMmapLimit(Btree*,sqlite3_int64);
+#endif
int sqlite3BtreeSetPagerFlags(Btree*,unsigned);
int sqlite3BtreeSyncDisabled(Btree*);
int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);