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
+2 -2
View File
@@ -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;
+5 -2
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) */
+2 -2
View File
@@ -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(
+2 -2
View File
@@ -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 */
+2 -2
View File
@@ -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