diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/build.c | 4 | ||||
-rw-r--r-- | src/os_win.c | 7 | ||||
-rw-r--r-- | src/select.c | 4 | ||||
-rw-r--r-- | src/tokenize.c | 4 | ||||
-rw-r--r-- | src/utf.c | 4 |
5 files changed, 13 insertions, 10 deletions
diff --git a/src/build.c b/src/build.c index f226334dd..dd3958876 100644 --- a/src/build.c +++ b/src/build.c @@ -22,7 +22,7 @@ ** COMMIT ** ROLLBACK ** -** $Id: build.c,v 1.526 2009/03/24 15:08:10 drh Exp $ +** $Id: build.c,v 1.527 2009/03/31 03:41:57 shane Exp $ */ #include "sqliteInt.h" @@ -1855,7 +1855,7 @@ int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){ assert( pTable->pSelect ); pSel = sqlite3SelectDup(db, pTable->pSelect, 0); if( pSel ){ - int enableLookaside = db->lookaside.bEnabled; + u8 enableLookaside = db->lookaside.bEnabled; n = pParse->nTab; sqlite3SrcListAssignCursors(pParse, pSel->pSrc); pTable->nCol = -1; diff --git a/src/os_win.c b/src/os_win.c index 64e89969b..a95340d9e 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -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) */ diff --git a/src/select.c b/src/select.c index 86c0c8c9f..b7f3c6382 100644 --- a/src/select.c +++ b/src/select.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle SELECT statements in SQLite. ** -** $Id: select.c,v 1.505 2009/03/24 15:08:10 drh Exp $ +** $Id: select.c,v 1.506 2009/03/31 03:41:57 shane Exp $ */ #include "sqliteInt.h" @@ -1229,7 +1229,7 @@ static int selectColumnsFromExprList( ** The column list has only names, not types or collations. This ** routine goes through and adds the types and collations. ** -** This routine requires that all indentifiers in the SELECT +** This routine requires that all identifiers in the SELECT ** statement be resolved. */ static void selectAddColumnTypeAndCollation( diff --git a/src/tokenize.c b/src/tokenize.c index 60313aef4..4677811d2 100644 --- a/src/tokenize.c +++ b/src/tokenize.c @@ -15,7 +15,7 @@ ** individual tokens and sends those tokens one-by-one over to the ** parser for analysis. ** -** $Id: tokenize.c,v 1.154 2009/03/24 15:08:10 drh Exp $ +** $Id: tokenize.c,v 1.155 2009/03/31 03:41:57 shane Exp $ */ #include "sqliteInt.h" #include <stdlib.h> @@ -386,7 +386,7 @@ int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){ void *pEngine; /* The LEMON-generated LALR(1) parser */ int tokenType; /* type of the next token */ int lastTokenParsed = -1; /* type of the previous token */ - int enableLookaside; /* Saved value of db->lookaside.bEnabled */ + u8 enableLookaside; /* Saved value of db->lookaside.bEnabled */ sqlite3 *db = pParse->db; /* The database connection */ int mxSqlLen; /* Max length of an SQL string */ @@ -12,7 +12,7 @@ ** This file contains routines used to translate between UTF-8, ** UTF-16, UTF-16BE, and UTF-16LE. ** -** $Id: utf.c,v 1.70 2008/12/10 22:30:25 shane Exp $ +** $Id: utf.c,v 1.71 2009/03/31 03:41:57 shane Exp $ ** ** Notes on UTF-8: ** @@ -417,7 +417,7 @@ int sqlite3Utf8To8(unsigned char *zIn){ } } *zOut = 0; - return zOut - zStart; + return (int)(zOut - zStart); } #endif |