From: mistachkin Date: Thu, 12 Sep 2013 01:47:57 +0000 (+0000) Subject: Fix a couple more harmless compiler warnings. X-Git-Tag: version-3.8.1~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=36ca5359dc5eed1886a3f97bb9bac1ae90957989;p=thirdparty%2Fsqlite.git Fix a couple more harmless compiler warnings. FossilOrigin-Name: 59708674f66e06c9c31c1a24f2f1c51f0bf4fa3e --- diff --git a/manifest b/manifest index 6cddbe1bc9..121d808050 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remove\stwo\sobsolete\sfields\sfrom\sthe\ssqlite3\sobject. -D 2013-09-12T01:33:53.069 +C Fix\sa\scouple\smore\sharmless\scompiler\swarnings. +D 2013-09-12T01:47:57.395 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -203,7 +203,7 @@ F src/os.c b4ad71336fd96f97776f75587cd9e8218288f5be F src/os.h 4a46270a64e9193af4a0aaa3bc2c66dc07c29b3f F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04 F src/os_unix.c 243fb37f47dc072fc59839ea241ff0a17c8d76e6 -F src/os_win.c af9db76467add89679d3ebb451069c2f842ecd3c +F src/os_win.c d18f670eeca4ab3da61230628d9042dfa282bd89 F src/pager.c 2aa4444ffe86e9282d03bc349a4a5e49bd77c0e8 F src/pager.h f094af9f6ececfaa8a1e93876905a4f34233fb0c F src/parse.y 27c6b4138497d6f8360ba7847da6ed48033f957f @@ -1112,7 +1112,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 2b510614dc6d878bd49eb428f167014f7f2e2568 -R c3304550dc7e156a767f11782ed297f6 -U drh -Z 81bb05c3046a00cec99b12eff1620df6 +P 117fa5fbc9bed1a7b982c8ddc21b7e228905ccb4 +R 381ae7788d46844675761732daa8c2f7 +U mistachkin +Z 423fbd0e140db731445f28d728ebdbaa diff --git a/manifest.uuid b/manifest.uuid index 8f27c878e4..e87cede53b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -117fa5fbc9bed1a7b982c8ddc21b7e228905ccb4 \ No newline at end of file +59708674f66e06c9c31c1a24f2f1c51f0bf4fa3e \ No newline at end of file diff --git a/src/os_win.c b/src/os_win.c index 3cadd036ab..c1b95d565e 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -108,6 +108,14 @@ # define winIsDirSep(a) (((a) == '/') || ((a) == '\\')) #endif +/* +** This macro is used when a local variable is set to a value that is +** [sometimes] not used by the code (e.g. via conditional compilation). +*/ +#ifndef UNUSED_VARIABLE_VALUE +# define UNUSED_VARIABLE_VALUE(x) (void)(x) +#endif + /* ** Returns the string that should be used as the directory separator. */ @@ -358,7 +366,8 @@ const sqlite3_mem_methods *sqlite3MemGetWin32(void); */ #ifdef SQLITE_TEST int sqlite3_os_type = 0; -#else +#elif !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && \ + defined(SQLITE_WIN32_HAS_ANSI) && defined(SQLITE_WIN32_HAS_WIDE) static int sqlite3_os_type = 0; #endif @@ -3185,7 +3194,6 @@ static int winDelete(sqlite3_vfs *,const char*,int); static void winShmPurge(sqlite3_vfs *pVfs, int deleteFlag){ winShmNode **pp; winShmNode *p; - BOOL bRc; assert( winShmMutexHeld() ); OSTRACE(("SHM-PURGE pid=%lu, deleteFlag=%d\n", osGetCurrentProcessId(), deleteFlag)); @@ -3195,12 +3203,14 @@ static void winShmPurge(sqlite3_vfs *pVfs, int deleteFlag){ int i; if( p->mutex ) sqlite3_mutex_free(p->mutex); for(i=0; inRegion; i++){ - bRc = osUnmapViewOfFile(p->aRegion[i].pMap); + BOOL bRc = osUnmapViewOfFile(p->aRegion[i].pMap); OSTRACE(("SHM-PURGE-UNMAP pid=%lu, region=%d, rc=%s\n", osGetCurrentProcessId(), i, bRc ? "ok" : "failed")); + UNUSED_VARIABLE_VALUE(bRc); bRc = osCloseHandle(p->aRegion[i].hMap); OSTRACE(("SHM-PURGE-CLOSE pid=%lu, region=%d, rc=%s\n", osGetCurrentProcessId(), i, bRc ? "ok" : "failed")); + UNUSED_VARIABLE_VALUE(bRc); } if( p->hFile.h!=NULL && p->hFile.h!=INVALID_HANDLE_VALUE ){ SimulateIOErrorBenign(1);