Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix compiler warnings on WinCE. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | winCeWarn |
Files: | files | file ages | folders |
SHA1: |
cc910b8e0c45e7387024f3a729003e2f |
User & Date: | mistachkin 2014-08-14 18:31:56 |
Context
2014-08-15
| ||
16:13 | Fix compiler warnings on WinCE. check-in: 28a379fc user: drh tags: trunk | |
2014-08-14
| ||
18:31 | Fix compiler warnings on WinCE. Closed-Leaf check-in: cc910b8e user: mistachkin tags: winCeWarn | |
13:06 | Fix typos in comments used to help generate documentation. No changes to code. check-in: 13a2d90a user: drh tags: trunk | |
Changes
Changes to src/mutex_w32.c.
95 95 static int winMutex_isInit = 0; 96 96 static int winMutex_isNt = -1; /* <0 means "need to query" */ 97 97 98 98 /* As the winMutexInit() and winMutexEnd() functions are called as part 99 99 ** of the sqlite3_initialize() and sqlite3_shutdown() processing, the 100 100 ** "interlocked" magic used here is probably not strictly necessary. 101 101 */ 102 -static LONG volatile winMutex_lock = 0; 102 +static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0; 103 103 104 104 int sqlite3_win32_is_nt(void); /* os_win.c */ 105 105 void sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */ 106 106 107 107 static int winMutexInit(void){ 108 108 /* The first to increment to 1 does actual initialization */ 109 109 if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){
Changes to src/os_win.c.
406 406 ** 1: Operating system is Win9x. 407 407 ** 2: Operating system is WinNT. 408 408 ** 409 409 ** In order to facilitate testing on a WinNT system, the test fixture 410 410 ** can manually set this value to 1 to emulate Win98 behavior. 411 411 */ 412 412 #ifdef SQLITE_TEST 413 -LONG volatile sqlite3_os_type = 0; 413 +LONG SQLITE_WIN32_VOLATILE sqlite3_os_type = 0; 414 414 #else 415 -static LONG volatile sqlite3_os_type = 0; 415 +static LONG SQLITE_WIN32_VOLATILE sqlite3_os_type = 0; 416 416 #endif 417 417 418 418 #ifndef SYSCALL 419 419 # define SYSCALL sqlite3_syscall_ptr 420 420 #endif 421 421 422 422 /* ................................................................................ 1051 1051 #if defined(InterlockedCompareExchange) 1052 1052 { "InterlockedCompareExchange", (SYSCALL)0, 0 }, 1053 1053 1054 1054 #define osInterlockedCompareExchange InterlockedCompareExchange 1055 1055 #else 1056 1056 { "InterlockedCompareExchange", (SYSCALL)InterlockedCompareExchange, 0 }, 1057 1057 1058 -#define osInterlockedCompareExchange ((LONG(WINAPI*)(LONG volatile*, \ 1059 - LONG,LONG))aSyscall[76].pCurrent) 1058 +#define osInterlockedCompareExchange ((LONG(WINAPI*)(LONG \ 1059 + SQLITE_WIN32_VOLATILE*, LONG,LONG))aSyscall[76].pCurrent) 1060 1060 #endif /* defined(InterlockedCompareExchange) */ 1061 1061 1062 1062 }; /* End of the overrideable system calls */ 1063 1063 1064 1064 /* 1065 1065 ** This is the xSetSystemCall() method of sqlite3_vfs for all of the 1066 1066 ** "win32" VFSes. Return SQLITE_OK opon successfully updating the
Changes to src/os_win.h.
60 60 ** Determine if we are dealing with WinRT, which provides only a subset of 61 61 ** the full Win32 API. 62 62 */ 63 63 #if !defined(SQLITE_OS_WINRT) 64 64 # define SQLITE_OS_WINRT 0 65 65 #endif 66 66 67 +/* 68 +** For WinCE, some API function parameters do not appear to be declared as 69 +** volatile. 70 +*/ 71 +#if SQLITE_OS_WINCE 72 +# define SQLITE_WIN32_VOLATILE 73 +#else 74 +# define SQLITE_WIN32_VOLATILE volatile 75 +#endif 76 + 67 77 #endif /* _OS_WIN_H_ */