]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix compiler warnings from gcc and MSVC; Correct typo in select.c; (CVS 6417)
authorshane <shane@noemail.net>
Tue, 31 Mar 2009 03:41:56 +0000 (03:41 +0000)
committershane <shane@noemail.net>
Tue, 31 Mar 2009 03:41:56 +0000 (03:41 +0000)
FossilOrigin-Name: 768514179a63783c4e70b931d1697403c04bedf5

manifest
manifest.uuid
src/build.c
src/os_win.c
src/select.c
src/tokenize.c
src/utf.c

index ceb35cfc1382a2aa8d262b40206ede4b7bfa9290..d7ad0f2146457896b663f2892bac55c2d53be738 100644 (file)
--- 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
index f8c72136c34850ee8fc5ecb89e16413d8720f61d..eab47068a790d194409094608b37f0e7aff96ae2 100644 (file)
@@ -1 +1 @@
-8c1d0c6ad9646816eb8ca15b7df4e79b9b1b59ee
\ No newline at end of file
+768514179a63783c4e70b931d1697403c04bedf5
\ No newline at end of file
index f226334dd655eaa338be4520bc7623913b2655bd..dd3958876be2f3d3c31992b74898739a5dceb4c6 100644 (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;
index 64e89969b9dfd5152b563e4a77bd734dcfd87c36..a95340d9eb0e5cbbc1e98dc0dcc9dd15b8bb9868 100644 (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) */
index 86c0c8c9f0e77f40e48f33b1d5a48da38dcefd5e..b7f3c638289c3cfbd8d7169704c302b091ca4806 100644 (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(
index 60313aef435ded611004ac4e3fbb087a4f33a215..4677811d2890805ff5bd4138d2f77d0043b79a70 100644 (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 */
 
index 6822490a2fb7814b7c615ae871338195c2bb4dd2..685ed279744b1f131de8fb77118ddd55a9f814f5 100644 (file)
--- 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