1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Fix compiler warnings from gcc and MSVC; Correct typo in select.c; (CVS 6417)

FossilOrigin-Name: 768514179a63783c4e70b931d1697403c04bedf5
This commit is contained in:
shane
2009-03-31 03:41:56 +00:00
parent 86655a1d2a
commit b08a67a772
7 changed files with 25 additions and 22 deletions

View File

@@ -12,7 +12,7 @@
**
** This file contains code that is specific to windows.
**
** $Id: os_win.c,v 1.152 2009/03/30 13:04:18 drh Exp $
** $Id: os_win.c,v 1.153 2009/03/31 03:41:57 shane Exp $
*/
#include "sqliteInt.h"
#if SQLITE_OS_WIN /* This file is used for windows only */
@@ -1775,6 +1775,9 @@ int winCurrentTime(sqlite3_vfs *pVfs, double *prNow){
static const sqlite3_int64 ntuPerHalfDay =
10000000*(sqlite3_int64)43200;
/* 2^32 - to avoid use of LL and warnings in gcc */
static const sqlite3_int64 max32BitValue =
(sqlite3_int64)2000000000 + (sqlite3_int64)2000000000 + (sqlite3_int64)294967296;
#if SQLITE_OS_WINCE
SYSTEMTIME time;
@@ -1787,7 +1790,7 @@ int winCurrentTime(sqlite3_vfs *pVfs, double *prNow){
GetSystemTimeAsFileTime( &ft );
#endif
UNUSED_PARAMETER(pVfs);
timeW = (((sqlite3_int64)ft.dwHighDateTime)*4294967296) + ft.dwLowDateTime;
timeW = (((sqlite3_int64)ft.dwHighDateTime)*max32BitValue) + (sqlite3_int64)ft.dwLowDateTime;
timeF = timeW % ntuPerDay; /* fractional days (100-nanoseconds) */
timeW = timeW / ntuPerDay; /* whole days */
timeW = timeW + 2305813; /* add whole days (from 2305813.5) */