diff options
Diffstat (limited to 'src/os_win.c')
-rw-r--r-- | src/os_win.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/os_win.c b/src/os_win.c index c16198bd5..33ca96c92 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -1245,9 +1245,19 @@ int sqlite3_fullsync_count = 0; ** Make sure all writes to a particular file are committed to disk. */ static int winSync(sqlite3_file *id, int flags){ -#if !defined(NDEBUG) || !defined(SQLITE_NO_SYNC) || defined(SQLITE_DEBUG) - winFile *pFile = (winFile*)id; +#ifndef SQLITE_NO_SYNC + /* + ** Used only when SQLITE_NO_SYNC is not defined. + */ BOOL rc; +#endif +#if !defined(NDEBUG) || !defined(SQLITE_NO_SYNC) || \ + (defined(SQLITE_TEST) && defined(SQLITE_DEBUG)) + /* + ** Used when SQLITE_NO_SYNC is not defined and by the assert() and/or + ** OSTRACE() macros. + */ + winFile *pFile = (winFile*)id; #else UNUSED_PARAMETER(id); #endif |