From: shane Date: Tue, 31 Mar 2009 03:41:56 +0000 (+0000) Subject: Fix compiler warnings from gcc and MSVC; Correct typo in select.c; (CVS 6417) X-Git-Tag: version-3.6.15~333 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b08a67a77237cd2b8d46bb1696980d90cafcb3f8;p=thirdparty%2Fsqlite.git Fix compiler warnings from gcc and MSVC; Correct typo in select.c; (CVS 6417) FossilOrigin-Name: 768514179a63783c4e70b931d1697403c04bedf5 --- diff --git a/manifest b/manifest index ceb35cfc13..d7ad0f2146 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Make\ssure\sa\sROLLBACK\sthat\sfollows\san\sincremental\svacuum\sworks.\s\sTicket\s#3761.\s(CVS\s6416) -D 2009-03-31T02:54:40 +C Fix\scompiler\swarnings\sfrom\sgcc\sand\sMSVC;\sCorrect\stypo\sin\sselect.c;\s(CVS\s6417) +D 2009-03-31T03:41:57 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -106,7 +106,7 @@ F src/btmutex.c 341502bc496dc0840dcb00cde65680fb0e85c3ab F src/btree.c 304c18b7e3d6e921764cede594c36e755200ce08 F src/btree.h e302c5747494067cd4f5763000fbe7bca767d816 F src/btreeInt.h df64030d632f8c8ac217ed52e8b6b3eacacb33a5 -F src/build.c be2bdaf2a3f6b24ef08dc14b9fd33aa84c689908 +F src/build.c 72357fd75ef036d0afbf1756edab6d62c56fcf4b F src/callback.c 73016376d6848ba987709e8c9048d4f0e0776036 F src/complete.c cb14e06dbe79dee031031f0d9e686ff306afe07c F src/date.c 0d804df3bbda46329946a01ff5c75c3f4f135218 @@ -142,7 +142,7 @@ F src/os.h fa3f4aa0119ff721a2da4b47ffd74406ac864c05 F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5 F src/os_unix.c 5d667f24615043c937a138faaed5f3e93b8619b0 -F src/os_win.c e655b2a640ed0481940161ddf811ddcc16d94783 +F src/os_win.c 524fe4c31c469531191857e8036ef59bfb52d684 F src/pager.c 34aeb87dc8177901d49dd02207828a2121064c25 F src/pager.h 0c9f3520c00d8a3b8e792ca56c9a11b6b02b4b0f F src/parse.y b9ba0946a13e9f32a96044e64a3e8780269b08b0 @@ -155,7 +155,7 @@ F src/printf.c 9866a9a9c4a90f6d4147407f373df3fd5d5f9b6f F src/random.c 676b9d7ac820fe81e6fb2394ac8c10cff7f38628 F src/resolve.c 094e44450371fb27869eb8bf679aacbe51fdc56d F src/rowset.c ba9375f37053d422dd76965a9c370a13b6e1aac4 -F src/select.c 607e5b2d3be379781e5be3ac0854f5c237152d26 +F src/select.c bd494b68a54a51de3df94ecdd6d24fa7598929d1 F src/shell.c 0a11f831603f17fea20ca97133c0f64e716af4a7 F src/sqlite.h.in 0db1e59d89aeacb8fe64a19fd14c13a796060ccb F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17 @@ -194,10 +194,10 @@ F src/test_server.c f0a403b5f699c09bd2b1236b6f69830fd6221f6b F src/test_tclvar.c 9e42fa59d3d2f064b7ab8628e7ab2dc8a9fe93d4 F src/test_thread.c b8a1ab7ca1a632f18e8a361880d5d65eeea08eac F src/test_wsd.c 3ae5101de6cbfda2720152ab659ea84079719241 -F src/tokenize.c fff72a9bc0af326583e5966daecebeb5ed9b9614 +F src/tokenize.c 7bd3b6dd56566604ad24ed4aa017e6618166b500 F src/trigger.c 21f39db410cdc32166a94900ac1b3df98ea560e6 F src/update.c 8ededddcde6f7b6da981dd0429a5d34518a475b7 -F src/utf.c 1da9c832dba0fa8f865b5b902d93f420a1ee4245 +F src/utf.c f9ed1ca795933e82675865ef15ed4852e0b19db3 F src/util.c 469d74f5bf09ed6398702c7da2ef8a34e979a1c1 F src/vacuum.c 4929a585ef0fb1dfaf46302f8a9c4aa30c2d9cf5 F src/vdbe.c 624922027b8b5fe203bd89e204aaed447e8b7ce7 @@ -713,7 +713,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P d5cab05c9ecbc5cb5e9ed658a55c35434717e969 -R 2bd28920ec005b7244d3e2d73df16d8f -U drh -Z 01a279d64c0fdf6f17549621a13916ca +P 8c1d0c6ad9646816eb8ca15b7df4e79b9b1b59ee +R 8ff971e643eaceccb56ede9fc8f877ab +U shane +Z 7f017c8372324788b13ed9da4ef3bc95 diff --git a/manifest.uuid b/manifest.uuid index f8c72136c3..eab47068a7 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -8c1d0c6ad9646816eb8ca15b7df4e79b9b1b59ee \ No newline at end of file +768514179a63783c4e70b931d1697403c04bedf5 \ No newline at end of file diff --git a/src/build.c b/src/build.c index f226334dd6..dd3958876b 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 64e89969b9..a95340d9eb 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 86c0c8c9f0..b7f3c63828 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 60313aef43..4677811d28 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 @@ -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 */ diff --git a/src/utf.c b/src/utf.c index 6822490a2f..685ed27974 100644 --- a/src/utf.c +++ b/src/utf.c @@ -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