Fix compiler warnings on WinCE.

FossilOrigin-Name: cc910b8e0c45e7387024f3a729003e2fef08b198
This commit is contained in:
mistachkin 2014-08-14 18:31:56 +00:00
parent 4ed2fb9d84
commit ce64d61050
5 changed files with 28 additions and 15 deletions

View File

@ -1,5 +1,5 @@
C Fix\stypos\sin\scomments\sused\sto\shelp\sgenerate\sdocumentation.\s\sNo\schanges\sto\scode.
D 2014-08-14T13:06:25.245
C Fix\scompiler\swarnings\son\sWinCE.
D 2014-08-14T18:31:56.425
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5eb79e334a5de69c87740edd56af6527dd219308
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -201,15 +201,15 @@ F src/mutex.c 84a073c9a23a8d7bdd2ea832522d1730df18812c
F src/mutex.h 5bc526e19dccc412b7ff04642f6fdad3fdfdabea
F src/mutex_noop.c f3f09fd7a2eb4287cfc799753ffc30380e7b71a1
F src/mutex_unix.c 1b10d5413dfc794364a8adf3eb3a192926b43fa3
F src/mutex_w32.c c50939b72368f1cfbddb58520372081a50558548
F src/mutex_w32.c 06bfff9a3a83b53389a51a967643db3967032e1e
F src/notify.c 976dd0f6171d4588e89e874fcc765e92914b6d30
F src/os.c 1b147e4cf7cc39e618115c14a086aed44bc91ace
F src/os.h 60d419395e32a8029fa380a80a3da2e9030f635e
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa
F src/os_unix.c bd7df3094a60915c148517504c76df4fca24e542
F src/os_win.c 1c936c7b0659d0eb12b868e2cd710a570e78873e
F src/os_win.h 057344a6720b4c8405d9bd98f58cb37a6ee46c25
F src/os_win.c d067fce558a5032e6e6afe62899e5397bf63cf3e
F src/os_win.h 09e751b20bbc107ffbd46e13555dc73576d88e21
F src/pager.c f6bb1fa6cdf2062f2d8aec3e64db302bca519ab8
F src/pager.h ffd5607f7b3e4590b415b007a4382f693334d428
F src/parse.y 22d6a074e5f5a7258947a1dc55a9bf946b765dd0
@ -1186,7 +1186,10 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P f5cce9db109a2bbe9a05b4c01b076a51d5fad8ba
R b4842944a4c3679f5b3af787e9b322df
U drh
Z 52db703ea373cd617fd2c598672c0ab8
P 13a2d90a2869c53b79754de39045bbbdbc7688e3
R 9127229654219d70056c71e11a62fce3
T *branch * winCeWarn
T *sym-winCeWarn *
T -sym-trunk *
U mistachkin
Z 13b8e5c3b082e69ddfa9c76704e89cbc

View File

@ -1 +1 @@
13a2d90a2869c53b79754de39045bbbdbc7688e3
cc910b8e0c45e7387024f3a729003e2fef08b198

View File

@ -99,7 +99,7 @@ static int winMutex_isNt = -1; /* <0 means "need to query" */
** of the sqlite3_initialize() and sqlite3_shutdown() processing, the
** "interlocked" magic used here is probably not strictly necessary.
*/
static LONG volatile winMutex_lock = 0;
static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0;
int sqlite3_win32_is_nt(void); /* os_win.c */
void sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */

View File

@ -410,9 +410,9 @@ const sqlite3_mem_methods *sqlite3MemGetWin32(void);
** can manually set this value to 1 to emulate Win98 behavior.
*/
#ifdef SQLITE_TEST
LONG volatile sqlite3_os_type = 0;
LONG SQLITE_WIN32_VOLATILE sqlite3_os_type = 0;
#else
static LONG volatile sqlite3_os_type = 0;
static LONG SQLITE_WIN32_VOLATILE sqlite3_os_type = 0;
#endif
#ifndef SYSCALL
@ -1055,8 +1055,8 @@ static struct win_syscall {
#else
{ "InterlockedCompareExchange", (SYSCALL)InterlockedCompareExchange, 0 },
#define osInterlockedCompareExchange ((LONG(WINAPI*)(LONG volatile*, \
LONG,LONG))aSyscall[76].pCurrent)
#define osInterlockedCompareExchange ((LONG(WINAPI*)(LONG \
SQLITE_WIN32_VOLATILE*, LONG,LONG))aSyscall[76].pCurrent)
#endif /* defined(InterlockedCompareExchange) */
}; /* End of the overrideable system calls */

View File

@ -64,4 +64,14 @@
# define SQLITE_OS_WINRT 0
#endif
/*
** For WinCE, some API function parameters do not appear to be declared as
** volatile.
*/
#if SQLITE_OS_WINCE
# define SQLITE_WIN32_VOLATILE
#else
# define SQLITE_WIN32_VOLATILE volatile
#endif
#endif /* _OS_WIN_H_ */