Fossil SCM

Cherry-pick [http://www.sqlite.org/src/info/1277932b7e8bb36c7070ffafbf110a8e128c267b|1277932b7e]: Fix a harmless compiler warning that crops up with SQLITE_MAX_MMAP_SIZE=0.

jan.nijtmans 2014-04-15 09:40 trunk
Commit 53aea235faf2cefca0729b5cf825260d2b9deaff
1 file changed +5 -1
+5 -1
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -8767,11 +8767,13 @@
87678767
#define BTREE_SINGLE 4 /* The file contains at most 1 b-tree */
87688768
#define BTREE_UNORDERED 8 /* Use of a hash implementation is OK */
87698769
87708770
SQLITE_PRIVATE int sqlite3BtreeClose(Btree*);
87718771
SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree*,int);
8772
-SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree*,sqlite3_int64);
8772
+#if SQLITE_MAX_MMAP_SIZE>0
8773
+SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree*,sqlite3_int64);
8774
+#endif
87738775
SQLITE_PRIVATE int sqlite3BtreeSetPagerFlags(Btree*,unsigned);
87748776
SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*);
87758777
SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
87768778
SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*);
87778779
SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int);
@@ -52977,10 +52979,11 @@
5297752979
sqlite3PagerSetCachesize(pBt->pPager, mxPage);
5297852980
sqlite3BtreeLeave(p);
5297952981
return SQLITE_OK;
5298052982
}
5298152983
52984
+#if SQLITE_MAX_MMAP_SIZE>0
5298252985
/*
5298352986
** Change the limit on the amount of the database file that may be
5298452987
** memory mapped.
5298552988
*/
5298652989
SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree *p, sqlite3_int64 szMmap){
@@ -52989,10 +52992,11 @@
5298952992
sqlite3BtreeEnter(p);
5299052993
sqlite3PagerSetMmapLimit(pBt->pPager, szMmap);
5299152994
sqlite3BtreeLeave(p);
5299252995
return SQLITE_OK;
5299352996
}
52997
+#endif /* SQLITE_MAX_MMAP_SIZE>0 */
5299452998
5299552999
/*
5299653000
** Change the way data is synced to disk in order to increase or decrease
5299753001
** how well the database resists damage due to OS crashes and power
5299853002
** failures. Level 1 is the same as asynchronous (no syncs() occur and
5299953003
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -8767,11 +8767,13 @@
8767 #define BTREE_SINGLE 4 /* The file contains at most 1 b-tree */
8768 #define BTREE_UNORDERED 8 /* Use of a hash implementation is OK */
8769
8770 SQLITE_PRIVATE int sqlite3BtreeClose(Btree*);
8771 SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree*,int);
8772 SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree*,sqlite3_int64);
 
 
8773 SQLITE_PRIVATE int sqlite3BtreeSetPagerFlags(Btree*,unsigned);
8774 SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*);
8775 SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
8776 SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*);
8777 SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int);
@@ -52977,10 +52979,11 @@
52977 sqlite3PagerSetCachesize(pBt->pPager, mxPage);
52978 sqlite3BtreeLeave(p);
52979 return SQLITE_OK;
52980 }
52981
 
52982 /*
52983 ** Change the limit on the amount of the database file that may be
52984 ** memory mapped.
52985 */
52986 SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree *p, sqlite3_int64 szMmap){
@@ -52989,10 +52992,11 @@
52989 sqlite3BtreeEnter(p);
52990 sqlite3PagerSetMmapLimit(pBt->pPager, szMmap);
52991 sqlite3BtreeLeave(p);
52992 return SQLITE_OK;
52993 }
 
52994
52995 /*
52996 ** Change the way data is synced to disk in order to increase or decrease
52997 ** how well the database resists damage due to OS crashes and power
52998 ** failures. Level 1 is the same as asynchronous (no syncs() occur and
52999
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -8767,11 +8767,13 @@
8767 #define BTREE_SINGLE 4 /* The file contains at most 1 b-tree */
8768 #define BTREE_UNORDERED 8 /* Use of a hash implementation is OK */
8769
8770 SQLITE_PRIVATE int sqlite3BtreeClose(Btree*);
8771 SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree*,int);
8772 #if SQLITE_MAX_MMAP_SIZE>0
8773 SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree*,sqlite3_int64);
8774 #endif
8775 SQLITE_PRIVATE int sqlite3BtreeSetPagerFlags(Btree*,unsigned);
8776 SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*);
8777 SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
8778 SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*);
8779 SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int);
@@ -52977,10 +52979,11 @@
52979 sqlite3PagerSetCachesize(pBt->pPager, mxPage);
52980 sqlite3BtreeLeave(p);
52981 return SQLITE_OK;
52982 }
52983
52984 #if SQLITE_MAX_MMAP_SIZE>0
52985 /*
52986 ** Change the limit on the amount of the database file that may be
52987 ** memory mapped.
52988 */
52989 SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree *p, sqlite3_int64 szMmap){
@@ -52989,10 +52992,11 @@
52992 sqlite3BtreeEnter(p);
52993 sqlite3PagerSetMmapLimit(pBt->pPager, szMmap);
52994 sqlite3BtreeLeave(p);
52995 return SQLITE_OK;
52996 }
52997 #endif /* SQLITE_MAX_MMAP_SIZE>0 */
52998
52999 /*
53000 ** Change the way data is synced to disk in order to increase or decrease
53001 ** how well the database resists damage due to OS crashes and power
53002 ** failures. Level 1 is the same as asynchronous (no syncs() occur and
53003

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button