mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Give the debugging routine print_pager_stats() external linkage in order to
suppress harmless compiler and TSAN warnings. FossilOrigin-Name: ff4dc08298ab3988e69fe60802657791f65d2af15f4b1cbd1d02649bc597d0d6
This commit is contained in:
13
src/pager.c
13
src/pager.c
@@ -997,8 +997,12 @@ static int assert_pager_state(Pager *p){
|
||||
** to "print *pPager" in gdb:
|
||||
**
|
||||
** (gdb) printf "%s", print_pager_state(pPager)
|
||||
**
|
||||
** This routine has external linkage in order to suppress compiler warnings
|
||||
** about an unused function. It is enclosed within SQLITE_DEBUG and so does
|
||||
** not appear in normal builds.
|
||||
*/
|
||||
static char *print_pager_state(Pager *p){
|
||||
char *print_pager_state(Pager *p){
|
||||
static char zRet[1024];
|
||||
|
||||
sqlite3_snprintf(1024, zRet,
|
||||
@@ -7278,13 +7282,6 @@ int sqlite3PagerLockingMode(Pager *pPager, int eMode){
|
||||
int sqlite3PagerSetJournalMode(Pager *pPager, int eMode){
|
||||
u8 eOld = pPager->journalMode; /* Prior journalmode */
|
||||
|
||||
#ifdef SQLITE_DEBUG
|
||||
/* The print_pager_state() routine is intended to be used by the debugger
|
||||
** only. We invoke it once here to suppress a compiler warning. */
|
||||
print_pager_state(pPager);
|
||||
#endif
|
||||
|
||||
|
||||
/* The eMode parameter is always valid */
|
||||
assert( eMode==PAGER_JOURNALMODE_DELETE
|
||||
|| eMode==PAGER_JOURNALMODE_TRUNCATE
|
||||
|
Reference in New Issue
Block a user