diff options
author | mistachkin <mistachkin@noemail.net> | 2015-01-12 21:43:00 +0000 |
---|---|---|
committer | mistachkin <mistachkin@noemail.net> | 2015-01-12 21:43:00 +0000 |
commit | 9ab31fcee1b23700863377df7de1af0826b6df9c (patch) | |
tree | 5f29dc9c11cff0627a95af0d6f456ceb501b04bd | |
parent | 8d9da63dacde128e546f84cb34392188aab1be83 (diff) | |
parent | 189143d355334b248d7748ae049a08591ec13d47 (diff) | |
download | sqlite-9ab31fcee1b23700863377df7de1af0826b6df9c.tar.gz sqlite-9ab31fcee1b23700863377df7de1af0826b6df9c.zip |
Fix harmless compiler warnings when using -W4 with MSVC.
FossilOrigin-Name: e693e11d1b9265974c32bddba873ea30a4d0b708
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | Makefile.msc | 43 | ||||
-rw-r--r-- | Makefile.vxworks | 2 | ||||
-rw-r--r-- | ext/fts3/fts3.c | 6 | ||||
-rw-r--r-- | ext/fts3/fts3_tokenize_vtab.c | 2 | ||||
-rw-r--r-- | ext/fts3/fts3_write.c | 4 | ||||
-rw-r--r-- | ext/misc/amatch.c | 2 | ||||
-rw-r--r-- | ext/misc/spellfix.c | 2 | ||||
-rw-r--r-- | ext/rtree/rtree.c | 2 | ||||
-rw-r--r-- | main.mk | 2 | ||||
-rw-r--r-- | manifest | 71 | ||||
-rw-r--r-- | manifest.uuid | 2 | ||||
-rw-r--r-- | src/delete.c | 4 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/msvc.h | 35 | ||||
-rw-r--r-- | src/pragma.c | 2 | ||||
-rw-r--r-- | src/shell.c | 7 | ||||
-rw-r--r-- | src/sqliteInt.h | 8 | ||||
-rw-r--r-- | src/tclsqlite.c | 14 | ||||
-rw-r--r-- | src/test1.c | 8 | ||||
-rw-r--r-- | src/test2.c | 2 | ||||
-rw-r--r-- | src/test8.c | 6 | ||||
-rw-r--r-- | src/test_journal.c | 7 | ||||
-rw-r--r-- | src/test_malloc.c | 4 | ||||
-rw-r--r-- | src/test_multiplex.c | 4 | ||||
-rw-r--r-- | src/test_quota.c | 2 | ||||
-rw-r--r-- | src/test_vfs.c | 4 | ||||
-rw-r--r-- | src/vdbe.c | 4 | ||||
-rw-r--r-- | tool/lemon.c | 8 | ||||
-rw-r--r-- | tool/mksqlite3c-noext.tcl | 1 | ||||
-rw-r--r-- | tool/mksqlite3c.tcl | 1 | ||||
-rw-r--r-- | tool/mksqlite3internalh.tcl | 1 |
32 files changed, 184 insertions, 80 deletions
diff --git a/Makefile.in b/Makefile.in index 01a7a570b..2d781fc54 100644 --- a/Makefile.in +++ b/Makefile.in @@ -234,6 +234,7 @@ SRC = \ $(TOP)/src/mem3.c \ $(TOP)/src/mem5.c \ $(TOP)/src/memjournal.c \ + $(TOP)/src/msvc.h \ $(TOP)/src/mutex.c \ $(TOP)/src/mutex.h \ $(TOP)/src/mutex_noop.c \ @@ -463,6 +464,7 @@ HDR = \ $(TOP)/src/hash.h \ $(TOP)/src/hwtime.h \ keywordhash.h \ + $(TOP)/src/msvc.h \ $(TOP)/src/mutex.h \ opcodes.h \ $(TOP)/src/os.h \ diff --git a/Makefile.msc b/Makefile.msc index 3fc675ee4..4ebe9fd20 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -16,6 +16,23 @@ TOP = . USE_AMALGAMATION = 1 !ENDIF +# Set this non-0 to enable full warnings (-W4, etc) when compiling. +# +!IFNDEF USE_FULLWARN +USE_FULLWARN = 0 +!ENDIF + +# If necessary, create a list of harmless compiler warnings to disable when +# compiling the build tools. For the SQLite source code itself, warnings, +# if any, will be disabled from within it. +# +!IFNDEF NO_WARN +!IF $(USE_FULLWARN)!=0 +NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4152 -wd4189 -wd4206 -wd4210 +NO_WARN = $(NO_WARN) -wd4232 -wd4244 -wd4305 -wd4306 -wd4702 -wd4706 +!ENDIF +!ENDIF + # Set this non-0 to use the library paths and other options necessary for # Windows Phone 8.1. # @@ -232,7 +249,11 @@ NSDKLIBPATH = $(NSDKLIBPATH:\\=\) # C compiler and options for use in building executables that # will run on the platform that is doing the build. # +!IF $(USE_FULLWARN)!=0 +BCC = $(NCC) -W4 +!ELSE BCC = $(NCC) -W3 +!ENDIF # Check if assembly code listings should be generated for the source # code files to be compiled. @@ -253,7 +274,13 @@ NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)" # will run on the target platform. (BCC and TCC are usually the # same unless your are cross-compiling.) # -TCC = $(CC) -W3 -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise +!IF $(USE_FULLWARN)!=0 +TCC = $(CC) -W4 -DINCLUDE_MSVC_H=1 +!ELSE +TCC = $(CC) -W3 +!ENDIF + +TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise RCC = $(RC) -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src # Check if assembly code listings should be generated for the source @@ -706,6 +733,7 @@ SRC = \ $(TOP)\src\mem3.c \ $(TOP)\src\mem5.c \ $(TOP)\src\memjournal.c \ + $(TOP)\src\msvc.h \ $(TOP)\src\mutex.c \ $(TOP)\src\mutex.h \ $(TOP)\src\mutex_noop.c \ @@ -938,6 +966,7 @@ HDR = \ $(TOP)\src\hash.h \ $(TOP)\src\hwtime.h \ keywordhash.h \ + $(TOP)\src\msvc.h \ $(TOP)\src\mutex.h \ opcodes.h \ $(TOP)\src\os.h \ @@ -989,8 +1018,7 @@ libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS) sqlite3.exe: $(TOP)\src\shell.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h - $(LTLINK) $(READLINE_FLAGS) \ - $(TOP)\src\shell.c \ + $(LTLINK) $(READLINE_FLAGS) $(TOP)\src\shell.c \ /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS) mptester.exe: $(TOP)\mptest\mptest.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h @@ -1040,7 +1068,8 @@ lempar.c: $(TOP)\src\lempar.c copy $(TOP)\src\lempar.c . lemon.exe: $(TOP)\tool\lemon.c lempar.c - $(BCC) -Daccess=_access -Fe$@ $(TOP)\tool\lemon.c /link $(NLTLINKOPTS) $(NLTLIBPATHS) + $(BCC) $(NO_WARN) -Daccess=_access \ + -Fe$@ $(TOP)\tool\lemon.c /link $(NLTLINKOPTS) $(NLTLIBPATHS) # Rules to build individual *.lo files from generated *.c files. This # applies to: @@ -1311,7 +1340,8 @@ sqlite3.h: $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > sqlite3.h mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c - $(BCC) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)\tool\mkkeywordhash.c /link $(NLTLINKOPTS) $(NLTLIBPATHS) + $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) \ + $(TOP)\tool\mkkeywordhash.c /link $(NLTLINKOPTS) $(NLTLIBPATHS) keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe .\mkkeywordhash.exe > keywordhash.h @@ -1392,7 +1422,8 @@ rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR) # hidden when the library is built via the amalgamation). # TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 -TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE +TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" +TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN) TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) libsqlite3.lib TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C) diff --git a/Makefile.vxworks b/Makefile.vxworks index 0d9c27f63..706261fc0 100644 --- a/Makefile.vxworks +++ b/Makefile.vxworks @@ -253,6 +253,7 @@ SRC = \ $(TOP)/src/mem3.c \ $(TOP)/src/mem5.c \ $(TOP)/src/memjournal.c \ + $(TOP)/src/msvc.h \ $(TOP)/src/mutex.c \ $(TOP)/src/mutex.h \ $(TOP)/src/mutex_noop.c \ @@ -414,6 +415,7 @@ HDR = \ $(TOP)/src/hash.h \ $(TOP)/src/hwtime.h \ keywordhash.h \ + $(TOP)/src/msvc.h \ $(TOP)/src/mutex.h \ opcodes.h \ $(TOP)/src/os.h \ diff --git a/ext/fts3/fts3.c b/ext/fts3/fts3.c index 2b93c6271..fe28eb2cf 100644 --- a/ext/fts3/fts3.c +++ b/ext/fts3/fts3.c @@ -1853,7 +1853,7 @@ static int fts3SelectLeaf( sqlite3_int64 *piLeaf, /* Selected leaf node */ sqlite3_int64 *piLeaf2 /* Selected leaf node */ ){ - int rc; /* Return code */ + int rc = SQLITE_OK; /* Return code */ int iHeight; /* Height of this node in tree */ assert( piLeaf || piLeaf2 ); @@ -1864,7 +1864,7 @@ static int fts3SelectLeaf( if( rc==SQLITE_OK && iHeight>1 ){ char *zBlob = 0; /* Blob read from %_segments table */ - int nBlob; /* Size of zBlob in bytes */ + int nBlob = 0; /* Size of zBlob in bytes */ if( piLeaf && piLeaf2 && (*piLeaf!=*piLeaf2) ){ rc = sqlite3Fts3ReadBlock(p, *piLeaf, &zBlob, &nBlob, 0); @@ -3086,7 +3086,7 @@ static int fts3FilterMethod( int nVal, /* Number of elements in apVal */ sqlite3_value **apVal /* Arguments for the indexing scheme */ ){ - int rc; + int rc = SQLITE_OK; char *zSql; /* SQL statement used to access %_content */ int eSearch; Fts3Table *p = (Fts3Table *)pCursor->pVtab; diff --git a/ext/fts3/fts3_tokenize_vtab.c b/ext/fts3/fts3_tokenize_vtab.c index 364852ef8..fb99f8b80 100644 --- a/ext/fts3/fts3_tokenize_vtab.c +++ b/ext/fts3/fts3_tokenize_vtab.c @@ -163,7 +163,7 @@ static int fts3tokConnectMethod( sqlite3_vtab **ppVtab, /* OUT: New sqlite3_vtab object */ char **pzErr /* OUT: sqlite3_malloc'd error message */ ){ - Fts3tokTable *pTab; + Fts3tokTable *pTab = 0; const sqlite3_tokenizer_module *pMod = 0; sqlite3_tokenizer *pTok = 0; int rc; diff --git a/ext/fts3/fts3_write.c b/ext/fts3/fts3_write.c index 0da08c62d..09294bc45 100644 --- a/ext/fts3/fts3_write.c +++ b/ext/fts3/fts3_write.c @@ -3082,8 +3082,8 @@ static int fts3PromoteSegments( if( bOk ){ int iIdx = 0; - sqlite3_stmt *pUpdate1; - sqlite3_stmt *pUpdate2; + sqlite3_stmt *pUpdate1 = 0; + sqlite3_stmt *pUpdate2 = 0; if( rc==SQLITE_OK ){ rc = fts3SqlStmt(p, SQL_UPDATE_LEVEL_IDX, &pUpdate1, 0); diff --git a/ext/misc/amatch.c b/ext/misc/amatch.c index d869dbd8d..98c01431b 100644 --- a/ext/misc/amatch.c +++ b/ext/misc/amatch.c @@ -398,7 +398,7 @@ static amatch_avl *amatchAvlInsert(amatch_avl **ppHead, amatch_avl *pNew){ */ static void amatchAvlRemove(amatch_avl **ppHead, amatch_avl *pOld){ amatch_avl **ppParent; - amatch_avl *pBalance; + amatch_avl *pBalance = 0; /* assert( amatchAvlSearch(*ppHead, pOld->zKey)==pOld ); */ ppParent = amatchAvlFromPtr(pOld, ppHead); if( pOld->pBefore==0 && pOld->pAfter==0 ){ diff --git a/ext/misc/spellfix.c b/ext/misc/spellfix.c index 2a26e0839..a6f780584 100644 --- a/ext/misc/spellfix.c +++ b/ext/misc/spellfix.c @@ -356,7 +356,7 @@ static int substituteCost(char cPrev, char cFrom, char cTo){ static int editdist1(const char *zA, const char *zB, int *pnMatch){ int nA, nB; /* Number of characters in zA[] and zB[] */ int xA, xB; /* Loop counters for zA[] and zB[] */ - char cA, cB; /* Current character of zA and zB */ + char cA = 0, cB; /* Current character of zA and zB */ char cAprev, cBprev; /* Previous character of zA and zB */ char cAnext, cBnext; /* Next character in zA and zB */ int d; /* North-west cost value */ diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c index 57b38de03..058dc96a4 100644 --- a/ext/rtree/rtree.c +++ b/ext/rtree/rtree.c @@ -2806,6 +2806,8 @@ static int rtreeUpdate( rtreeReference(pRtree); assert(nData>=1); + cell.iRowid = 0; /* Used only to suppress a compiler warning */ + /* Constraint handling. A write operation on an r-tree table may return ** SQLITE_CONSTRAINT for two reasons: ** @@ -112,6 +112,7 @@ SRC = \ $(TOP)/src/mem3.c \ $(TOP)/src/mem5.c \ $(TOP)/src/memjournal.c \ + $(TOP)/src/msvc.h \ $(TOP)/src/mutex.c \ $(TOP)/src/mutex.h \ $(TOP)/src/mutex_noop.c \ @@ -345,6 +346,7 @@ HDR = \ $(TOP)/src/hash.h \ $(TOP)/src/hwtime.h \ keywordhash.h \ + $(TOP)/src/msvc.h \ $(TOP)/src/mutex.h \ opcodes.h \ $(TOP)/src/os.h \ @@ -1,10 +1,10 @@ -C Add\san\sassert()\sin\sorder\sto\scalm\sa\sscan-build\swarning. -D 2015-01-12T17:56:06.382 +C Fix\sharmless\scompiler\swarnings\swhen\susing\s-W4\swith\sMSVC. +D 2015-01-12T21:43:00.602 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f -F Makefile.in 876093578650b28af50a20c819993ee779885adb +F Makefile.in 9efcdb5c6025caea362cdfc38817451170fc6344 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc b363b90fe1bfc3b87d190f2f728a126c00d9ce09 -F Makefile.vxworks 034289efa9d591b04b1a73598623119c306cbba0 +F Makefile.msc 4c057774e6138b9023fc16ec05639ddd3329b152 +F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858 F README.md d58e3bebc0a4145e0f2a87994015fdb575a8e866 F VERSION d846487aff892625eb8e75960234e7285f0462fe F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -78,7 +78,7 @@ F ext/fts3/README.content fdc666a70d5257a64fee209f97cf89e0e6e32b51 F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a F ext/fts3/README.tokenizers e0a8b81383ea60d0334d274fadf305ea14a8c314 F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d -F ext/fts3/fts3.c 8b6cceb3e0be22da26d83a3cec0e0e337e6b8ec6 +F ext/fts3/fts3.c 5c464816508e40feb3c61f1f5566551764698fc8 F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe F ext/fts3/fts3Int.h 53d4eca1fb23eab00681fb028fb82eb5705c1e21 F ext/fts3/fts3_aux.c 5c211e17a64885faeb16b9ba7772f9d5445c2365 @@ -90,13 +90,13 @@ F ext/fts3/fts3_porter.c 3565faf04b626cddf85f03825e86056a4562c009 F ext/fts3/fts3_snippet.c 51beb5c1498176fd9caccaf1c75b55cb803a985a F ext/fts3/fts3_term.c a521f75132f9a495bdca1bdd45949b3191c52763 F ext/fts3/fts3_test.c 8a3a78c4458b2d7c631fcf4b152a5cd656fa7038 -F ext/fts3/fts3_tokenize_vtab.c 011170fe9eba5ff062f1a31d3188e00267716706 +F ext/fts3/fts3_tokenize_vtab.c becc661223db7898b213f9e8a23d75bac02408c9 F ext/fts3/fts3_tokenizer.c bbdc731bc91338050675c6d1da9ab82147391e16 F ext/fts3/fts3_tokenizer.h 64c6ef6c5272c51ebe60fc607a896e84288fcbc3 F ext/fts3/fts3_tokenizer1.c 5c98225a53705e5ee34824087478cf477bdb7004 F ext/fts3/fts3_unicode.c a93f5edc0aff44ef8b06d7cb55b52026541ca145 F ext/fts3/fts3_unicode2.c c3d01968d497bd7001e7dc774ba75b372738c057 -F ext/fts3/fts3_write.c 8260388626516a7005d06a9dce94f9e55c6c2a41 +F ext/fts3/fts3_write.c 9b3a32cbecf40a1f41cb08c00df8c066c23c7a25 F ext/fts3/fts3speed.tcl b54caf6a18d38174f1a6e84219950d85e98bb1e9 F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100 F ext/fts3/tool/fts3view.c 3986531f2fc0ceca0c89c31ec7d0589b6adb19d6 @@ -106,7 +106,7 @@ F ext/fts3/unicode/mkunicode.tcl a2567f9d6ad6779879a2e394c120ad8718557e65 F ext/icu/README.txt d9fbbad0c2f647c3fdf715fc9fd64af53aedfc43 F ext/icu/icu.c d415ccf984defeb9df2c0e1afcfaa2f6dc05eacb F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37 -F ext/misc/amatch.c 678056a4bfcd83c4e82dea81d37543cd1d6dbee1 +F ext/misc/amatch.c 17ba78dc9b33601a40d2a7bc54c748b6f3eb7176 F ext/misc/closure.c 636024302cde41b2bf0c542f81c40c624cfb7012 F ext/misc/compress.c 76e45655f4046e756064ab10c62e18f2eb846b9f F ext/misc/eval.c f971962e92ebb8b0a4e6b62949463ee454d88fa2 @@ -118,13 +118,13 @@ F ext/misc/percentile.c bcbee3c061b884eccb80e21651daaae8e1e43c63 F ext/misc/regexp.c af92cdaa5058fcec1451e49becc7ba44dba023dc F ext/misc/rot13.c 1ac6f95f99b575907b9b09c81a349114cf9be45a F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52 -F ext/misc/spellfix.c 56739fab8c2ed6a9e2dac5592a88d281a999c43b +F ext/misc/spellfix.c 25810dda37fc904b0772a13efd8ca072fb09e355 F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512 F ext/misc/vfslog.c fe40fab5c077a40477f7e5eba994309ecac6cc95 F ext/misc/vtshim.c babb0dc2bf116029e3e7c9a618b8a1377045303e F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 -F ext/rtree/rtree.c a03ebd2480a1a4969cb363bb696d9d911e5a6ecd +F ext/rtree/rtree.c b61e9eab7229a443d0d2029da7624299e19301a2 F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e F ext/rtree/rtree1.test 541bbcab74613907fea08b2ecdcdd5b7aa724cc9 F ext/rtree/rtree2.test acbb3a4ce0f4fbc2c304d2b4b784cfa161856bba @@ -152,7 +152,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60 -F main.mk 9f8c54fe62b60e0a24a2e65cfc8d2add063dda07 +F main.mk 1d0cf88b6e89249608677215ad36e4f8a231accc F mkopcodec.awk c2ff431854d702cdd2d779c9c0d1f58fa16fa4ea F mkopcodeh.awk c6b3fa301db6ef7ac916b14c60868aeaec1337b5 F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83 @@ -181,7 +181,7 @@ F src/callback.c 7b44ce59674338ad48b0e84e7b72f935ea4f68b0 F src/complete.c 198a0066ba60ab06fc00fba1998d870a4d575463 F src/ctime.c 98f89724adc891a1a4c655bee04e33e716e05887 F src/date.c e4d50b3283696836ec1036b695ead9a19e37a5ac -F src/delete.c 0750b1eb4d96cd3fb2c798599a3a7c85e92f1417 +F src/delete.c bd1a91ddd247ce13004075251e0b7fe2bf9925ef F src/expr.c 7be80f7dc337329a24df45c2f3bdb2ea3b64c90e F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb F src/fkey.c e0444b61bed271a76840cbe6182df93a9baa3f12 @@ -195,7 +195,7 @@ F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e F src/lempar.c 7274c97d24bb46631e504332ccd3bd1b37841770 F src/loadext.c 86bd4e2fccd520b748cba52492ab60c4a770f660 -F src/main.c 54c26e3f92153db87be276ca72605e7aa4c78029 +F src/main.c 05bf368c934cc73d02906030846eb4d1818c10f7 F src/malloc.c 740db54387204c9a2eb67c6d98e68b08e9ef4eab F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem1.c abe6ee469b6c5a35c7f22bfeb9c9bac664a1c987 @@ -203,6 +203,7 @@ F src/mem2.c f1940d9e91948dd6a908fbb9ce3835c36b5d83c3 F src/mem3.c 61c9d47b792908c532ca3a62b999cf21795c6534 F src/mem5.c 61eeb90134f9a5be6c2e68d8daae7628b25953fb F src/memjournal.c 3eb2c0b51adbd869cb6a44780323f05fa904dc85 +F src/msvc.h e78002098966e39b2fd9915bd70b7bc3ec8398b7 F src/mutex.c 19bf9acba69ca2f367c3761080f8a9f0cf4670a8 F src/mutex.h 779d588e3b7756ec3ecf7d78cde1d84aba414f85 F src/mutex_noop.c f3f09fd7a2eb4287cfc799753ffc30380e7b71a1 @@ -222,30 +223,30 @@ F src/parse.y c5d0d964f9ac023e8154cad512e54b0b6058e086 F src/pcache.c d210cf90d04365a74f85d21374dded65af67b0cb F src/pcache.h b44658c9c932d203510279439d891a2a83e12ba8 F src/pcache1.c 1e77432b40b7d3288327d9cdf399dcdfd2b6d3bf -F src/pragma.c bd33aa24456f043bb6f6d32a918bbeed41d8c591 +F src/pragma.c ba149bbbc90783f84815636c509ced8eac11bbcf F src/prepare.c 173a5a499138451b2561614ecb87d78f9f4644b9 F src/printf.c ea82bcb1b83273b4c67177c233c1f78c81fc42f9 F src/random.c ba2679f80ec82c4190062d756f22d0c358180696 F src/resolve.c f6c46d3434439ab2084618d603e6d6dbeb0d6ada F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e F src/select.c e4c38c75e36f28aed80a69a725d888751bfd53df -F src/shell.c 96ba1f6300d36b8c8694ee9e27edf92590f384b4 +F src/shell.c 5b8e786a7c8eec87fa3f2ea615b337d2d99e284c F src/sqlite.h.in 9dfc99d6533d36d6a549c4f3f01cacc8be956ada F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad F src/sqlite3ext.h 17d487c3c91b0b8c584a32fbeb393f6f795eea7d -F src/sqliteInt.h 8cdd843985cdc28bf5f291d89dc23a410a50f5ae +F src/sqliteInt.h eaf210295b551d4e40e622aec1b2261c0b28f844 F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d F src/status.c 81712116e826b0089bb221b018929536b2b5406f F src/table.c e7a09215315a978057fb42c640f890160dbcc45e -F src/tclsqlite.c b1d0a181a9f8e8dae960370518a3450db93a6a8c -F src/test1.c 163cff8c4ebdda512e3b055716e3cc7f0e563a44 -F src/test2.c 98049e51a17dc62606a99a9eb95ee477f9996712 +F src/tclsqlite.c 0bbb44543175ef2033d39780a233f98bf354eff9 +F src/test1.c 093d8b5b54b829dcfebae3181d4406edcc935d90 +F src/test2.c 577961fe48961b2f2e5c8b56ee50c3f459d3359d F src/test3.c 1c0e5d6f080b8e33c1ce8b3078e7013fdbcd560c F src/test4.c 9b32d22f5f150abe23c1830e2057c4037c45b3df F src/test5.c 5a34feec76d9b3a86aab30fd4f6cc9c48cbab4c1 F src/test6.c 41cacf3b0dd180823919bf9e1fbab287c9266723 F src/test7.c 72b732baa5642f795655ba1126ea032af46ecfd2 -F src/test8.c bf3bad9a7df2e7c58d3371ea913abeaedb429a38 +F src/test8.c df8dd4c99c1dd2225cb2a6f334299cddc5dcf1f1 F src/test9.c bea1e8cf52aa93695487badedd6e1886c321ea60 F src/test_async.c 21e11293a2f72080eda70e1124e9102044531cd8 F src/test_autoext.c dea8a01a7153b9adc97bd26161e4226329546e12 @@ -261,16 +262,16 @@ F src/test_hexio.c abfdecb6fa58c354623978efceb088ca18e379cd F src/test_init.c 66b33120ffe9cd853b5a905ec850d51151337b32 F src/test_intarray.c 6c610a21ab8edde85a3a2c7f2b069244ecf4d834 F src/test_intarray.h 9dc57417fb65bc7835cc18548852cc08cc062202 -F src/test_journal.c f5c0a05b7b3d5930db769b5ee6c3766dc2221a64 +F src/test_journal.c 5360fbe1d1e4416ca36290562fd5a2e3f70f32aa F src/test_loadext.c a5251f956ab6af21e138dc1f9c0399394a510cb4 -F src/test_malloc.c fffc66b2e7743ce93f039187d3fd78664193c664 -F src/test_multiplex.c caadb62cc777268b4f8fb94d5b27b80156c8f7c0 +F src/test_malloc.c b9495384e74923aefde8311de974bf9b0f5ba570 +F src/test_multiplex.c 72c0ad1e97af3d6d19975bbd81813072b40c7290 F src/test_multiplex.h c08e4e8f8651f0c5e0509b138ff4d5b43ed1f5d3 F src/test_mutex.c 293042d623ebba969160f471a82aa1551626454f F src/test_onefile.c 0396f220561f3b4eedc450cef26d40c593c69a25 F src/test_osinst.c 3d0340bc31a9f3d8a3547e0272373e80f78dde25 F src/test_pcache.c a5cd24730cb43c5b18629043314548c9169abb00 -F src/test_quota.c 65f6348fec0f2b3020c907247fb47556b214abb9 +F src/test_quota.c 180813f43683be5725458fc1ff13ac455d8e722d F src/test_quota.h 2a8ad1952d1d2ca9af0ce0465e56e6c023b5e15d F src/test_rtree.c fdd8d29ca5165c7857987a2ba263fac5c69e231f F src/test_schema.c 2bdba21b82f601da69793e1f1d11bf481a79b091 @@ -281,7 +282,7 @@ F src/test_superlock.c 2b97936ca127d13962c3605dbc9a4ef269c424cd F src/test_syscall.c 2e21ca7f7dc54a028f1967b63f1e76155c356f9b F src/test_tclvar.c f4dc67d5f780707210d6bb0eb6016a431c04c7fa F src/test_thread.c 1e133a40b50e9c035b00174035b846e7eef481cb -F src/test_vfs.c f84075a388527892ff184988f43b69ce69b8083c +F src/test_vfs.c 8ee7be45fe773a150b4015ef957da960179ee43a F src/test_vfstrace.c bab9594adc976cbe696ff3970728830b4c5ed698 F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9 F src/threads.c 2fb3ea4d70d5acf68b539c2489b4adace61cc01b @@ -291,7 +292,7 @@ F src/update.c 3c4ecc282accf12d39edb8d524cf089645e55a13 F src/utf.c fc6b889ba0779b7722634cdeaa25f1930d93820c F src/util.c 98a7627ca48ad3265b6940915a1d08355eb3fc7e F src/vacuum.c 9b30ec729337dd012ed88d4c292922c8ef9cf00c -F src/vdbe.c 1a9e671c9cfc259e4d2affc71f7df4a4c00a842c +F src/vdbe.c ddfc977981cd6324668aa6b114045eb1c677421a F src/vdbe.h 6fc69d9c5e146302c56e163cb4b31d1ee64a18c3 F src/vdbeInt.h 9bb69ff2447c34b6ccc58b34ec35b615f86ead78 F src/vdbeapi.c 4bc511a46b9839392ae0e90844a71dc96d9dbd71 @@ -1193,7 +1194,7 @@ F tool/fragck.tcl 5265a95126abcf6ab357f7efa544787e5963f439 F tool/genfkey.README cf68fddd4643bbe3ff8e31b8b6d8b0a1b85e20f4 F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5 F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce -F tool/lemon.c 20f3132a1a150d50b022aa0b1fa26bd46aebf7b5 +F tool/lemon.c 1864c4fe4a72b1bb28f1792b60504804fe82c5d2 F tool/lempar.c 01ca97f87610d1dac6d8cd96ab109ab1130e76dc F tool/logest.c eef612f8adf4d0993dafed0416064cf50d5d33c6 F tool/mkautoconfamal.sh 5dc5010e2e748a9e1bba67baca5956a2c2deda7b @@ -1201,10 +1202,10 @@ F tool/mkkeywordhash.c dfff09dbbfaf950e89af294f48f902181b144670 F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e F tool/mkpragmatab.tcl 07a5124cf2dbafa1b375eefcf8ac4227028b0f8b F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97 -F tool/mksqlite3c-noext.tcl 88a1e3b0c769773fb7a9ebb363ffc603a4ac21d8 -F tool/mksqlite3c.tcl e94bdc37b531bba50d421e82efbe3738d0c1e950 +F tool/mksqlite3c-noext.tcl 9ef48e1748dce7b844f67e2450ff9dfeb0fb4ab5 +F tool/mksqlite3c.tcl cfde806851c413db7689b9cb74a4eeb92539c601 F tool/mksqlite3h.tcl ba24038056f51fde07c0079c41885ab85e2cff12 -F tool/mksqlite3internalh.tcl b6514145a7d5321b47e64e19b8116cc44f973eb1 +F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b F tool/mkvsix.tcl 52a4c613707ac34ae9c226e5ccc69cb948556105 F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091 F tool/omittest.tcl 34d7ac01fe4fd18e3637f64abe12c40eca0f6b97 @@ -1235,7 +1236,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 46f3aba2692d74c29ab5c1f24a6daac600fd6af8 -R 92ea1bf6542c9d9c7faa1f3f4f13619f -U drh -Z e7423f8002cbebe040ecb69ba833d201 +P 11e81ac2a7c917f7c9afc218d104d9870daf9668 bdbeed01ddc60a4ab322621fc118cc4767660fd3 +R 79278f99b3f4d9aaeb5b2b5be8f618ce +U mistachkin +Z 24816da0c39ded9b418b6d7a785804dc diff --git a/manifest.uuid b/manifest.uuid index 37e56a13f..a243cd4a6 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -11e81ac2a7c917f7c9afc218d104d9870daf9668
\ No newline at end of file +e693e11d1b9265974c32bddba873ea30a4d0b708
\ No newline at end of file diff --git a/src/delete.c b/src/delete.c index d81dd3f6b..011fb80de 100644 --- a/src/delete.c +++ b/src/delete.c @@ -226,8 +226,8 @@ void sqlite3DeleteFrom( WhereInfo *pWInfo; /* Information about the WHERE clause */ Index *pIdx; /* For looping over indices of the table */ int iTabCur; /* Cursor number for the table */ - int iDataCur; /* VDBE cursor for the canonical data source */ - int iIdxCur; /* Cursor number of the first index */ + int iDataCur = 0; /* VDBE cursor for the canonical data source */ + int iIdxCur = 0; /* Cursor number of the first index */ int nIdx; /* Number of indices */ sqlite3 *db; /* Main database structure */ AuthContext sContext; /* Authorization context */ diff --git a/src/main.c b/src/main.c index 191d624b7..8cf16b001 100644 --- a/src/main.c +++ b/src/main.c @@ -3140,7 +3140,7 @@ int sqlite3_table_column_metadata( char *zErrMsg = 0; Table *pTab = 0; Column *pCol = 0; - int iCol; + int iCol = 0; char const *zDataType = 0; char const *zCollSeq = 0; diff --git a/src/msvc.h b/src/msvc.h new file mode 100644 index 000000000..4508e6941 --- /dev/null +++ b/src/msvc.h @@ -0,0 +1,35 @@ +/* +** 2015 January 12 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +****************************************************************************** +** +** This file contains code that is specific to MSVC. +*/ +#ifndef _MSVC_H_ +#define _MSVC_H_ + +#if defined(_MSC_VER) +#pragma warning(disable : 4054) +#pragma warning(disable : 4055) +#pragma warning(disable : 4100) +#pragma warning(disable : 4127) +#pragma warning(disable : 4152) +#pragma warning(disable : 4189) +#pragma warning(disable : 4206) +#pragma warning(disable : 4210) +#pragma warning(disable : 4232) +#pragma warning(disable : 4244) +#pragma warning(disable : 4305) +#pragma warning(disable : 4306) +#pragma warning(disable : 4702) +#pragma warning(disable : 4706) +#endif /* defined(_MSC_VER) */ + +#endif /* _MSVC_H_ */ diff --git a/src/pragma.c b/src/pragma.c index 1312beef0..34830e33a 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -727,7 +727,7 @@ void sqlite3Pragma( Token *pId; /* Pointer to <id> token */ char *aFcntl[4]; /* Argument to SQLITE_FCNTL_PRAGMA */ int iDb; /* Database index for <database> */ - int lwr, upr, mid; /* Binary search bounds */ + int lwr, upr, mid = 0; /* Binary search bounds */ int rc; /* return value form SQLITE_FCNTL_PRAGMA */ sqlite3 *db = pParse->db; /* The database connection */ Db *pDb; /* The specific database being pragmaed */ diff --git a/src/shell.c b/src/shell.c index 18313fabd..9c0481c0d 100644 --- a/src/shell.c +++ b/src/shell.c @@ -18,6 +18,13 @@ #endif /* +** If requested, include the SQLite compiler options file for MSVC. +*/ +#if defined(INCLUDE_MSVC_H) +#include "msvc.h" +#endif + +/* ** Enable large-file support for fopen() and friends on unix. */ #ifndef SQLITE_DISABLE_LFS diff --git a/src/sqliteInt.h b/src/sqliteInt.h index e1642a08c..379456d5f 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -16,6 +16,14 @@ #define _SQLITEINT_H_ /* +** Include the header file used to customize the compiler options for MSVC. +** This should be done first so that it can successfully prevent spurious +** compiler warnings due to subsequent content in this file and other files +** that are included by this file. +*/ +#include "msvc.h" + +/* ** These #defines should enable >2GB file support on POSIX if the ** underlying operating system supports it. If the OS lacks ** large file support, or if the OS is windows, these should be no-ops. diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 852f966a8..a912e8aba 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -25,6 +25,14 @@ ** hundreds of new commands used for testing ** SQLite. This option implies -DSQLITE_TCLMD5. */ + +/* +** If requested, include the SQLite compiler options file for MSVC. +*/ +#if defined(INCLUDE_MSVC_H) +#include "msvc.h" +#endif + #include "tcl.h" #include <errno.h> @@ -1085,10 +1093,10 @@ static int dbPrepareAndBind( SqlPreparedStmt **ppPreStmt /* OUT: Object used to cache statement */ ){ const char *zSql = zIn; /* Pointer to first SQL statement in zIn */ - sqlite3_stmt *pStmt; /* Prepared statement object */ + sqlite3_stmt *pStmt = 0; /* Prepared statement object */ SqlPreparedStmt *pPreStmt; /* Pointer to cached statement */ int nSql; /* Length of zSql in bytes */ - int nVar; /* Number of variables in statement */ + int nVar = 0; /* Number of variables in statement */ int iParm = 0; /* Next free entry in apParm */ char c; int i; @@ -3102,7 +3110,7 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ ** The EXTERN macros are required by TCL in order to work on windows. */ EXTERN int Sqlite3_Init(Tcl_Interp *interp){ - int rc = Tcl_InitStubs(interp, "8.4", 0)==0 ? TCL_ERROR : TCL_OK; + int rc = Tcl_InitStubs(interp, "8.4", 0) ? TCL_OK : TCL_ERROR; if( rc==TCL_OK ){ Tcl_CreateObjCommand(interp, "sqlite3", (Tcl_ObjCmdProc*)DbMain, 0, 0); #ifndef SQLITE_3_SUFFIX_ONLY diff --git a/src/test1.c b/src/test1.c index 475473d77..8f21660c2 100644 --- a/src/test1.c +++ b/src/test1.c @@ -567,7 +567,7 @@ static int test_get_table_printf( Tcl_DString str; int rc; char *zErr = 0; - int nRow, nCol; + int nRow = 0, nCol = 0; char **aResult; int i; char zBuf[30]; @@ -2120,7 +2120,7 @@ static int test_stmt_status( Tcl_Obj *CONST objv[] ){ int iValue; - int i, op, resetFlag; + int i, op = 0, resetFlag; const char *zOpName; sqlite3_stmt *pStmt; @@ -3098,7 +3098,7 @@ static int test_bind_double( ){ sqlite3_stmt *pStmt; int idx; - double value; + double value = 0; int rc; const char *zVal; int i; @@ -5458,7 +5458,7 @@ static int test_limit( { "SQLITE_LIMIT_TOOSMALL", -1, }, { "SQLITE_LIMIT_TOOBIG", SQLITE_LIMIT_WORKER_THREADS+1 }, }; - int i, id; + int i, id = 0; int val; const char *zId; diff --git a/src/test2.c b/src/test2.c index 58f271ff2..7192ddfff 100644 --- a/src/test2.c +++ b/src/test2.c @@ -310,7 +310,7 @@ static int page_get( ){ Pager *pPager; char zBuf[100]; - DbPage *pPage; + DbPage *pPage = 0; int pgno; int rc; if( argc!=3 ){ diff --git a/src/test8.c b/src/test8.c index 407dd54c7..f37a28ced 100644 --- a/src/test8.c +++ b/src/test8.c @@ -777,11 +777,11 @@ static int echoBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){ sqlite3_stmt *pStmt = 0; Tcl_Interp *interp = pVtab->interp; - int nRow; + int nRow = 0; int useIdx = 0; int rc = SQLITE_OK; int useCost = 0; - double cost; + double cost = 0; int isIgnoreUsable = 0; if( Tcl_GetVar(interp, "echo_module_ignore_usable", TCL_GLOBAL_ONLY) ){ isIgnoreUsable = 1; @@ -927,7 +927,7 @@ int echoUpdate( sqlite3 *db = pVtab->db; int rc = SQLITE_OK; - sqlite3_stmt *pStmt; + sqlite3_stmt *pStmt = 0; char *z = 0; /* SQL statement to execute */ int bindArgZero = 0; /* True to bind apData[0] to sql var no. nData */ int bindArgOne = 0; /* True to bind apData[1] to sql var no. 1 */ diff --git a/src/test_journal.c b/src/test_journal.c index e8701a4ee..6e320b7ab 100644 --- a/src/test_journal.c +++ b/src/test_journal.c @@ -409,7 +409,9 @@ static int openTransaction(jt_file *pMain, jt_file *pJournal){ if( iOff==PENDING_BYTE ) continue; rc = sqlite3OsRead(pMain->pReal, aData, pMain->nPagesize, iOff); pMain->aCksum[ii] = genCksum(aData, pMain->nPagesize); - if( ii+1==pMain->nPage && rc==SQLITE_IOERR_SHORT_READ ) rc = SQLITE_OK; + if( ii+1==(int)pMain->nPage && rc==SQLITE_IOERR_SHORT_READ ){ + rc = SQLITE_OK; + } } } @@ -550,7 +552,8 @@ static int jtWrite( */ }else{ u32 pgno = (u32)(iOfst/p->nPagesize + 1); - assert( (iAmt==1||iAmt==p->nPagesize) && ((iOfst+iAmt)%p->nPagesize)==0 ); + assert( (iAmt==1||iAmt==(int)p->nPagesize) && + ((iOfst+iAmt)%p->nPagesize)==0 ); assert( pgno<=p->nPage || p->nSync>0 ); assert( pgno>p->nPage || sqlite3BitvecTest(p->pWritable, pgno) ); } diff --git a/src/test_malloc.c b/src/test_malloc.c index 54a89472d..1ea4de506 100644 --- a/src/test_malloc.c +++ b/src/test_malloc.c @@ -1338,7 +1338,7 @@ static int test_status( Tcl_Obj *CONST objv[] ){ int rc, iValue, mxValue; - int i, op, resetFlag; + int i, op = 0, resetFlag; const char *zOpName; static const struct { const char *zName; @@ -1395,7 +1395,7 @@ static int test_db_status( Tcl_Obj *CONST objv[] ){ int rc, iValue, mxValue; - int i, op, resetFlag; + int i, op = 0, resetFlag; const char *zOpName; sqlite3 *db; extern int getDbPointer(Tcl_Interp*, const char*, sqlite3**); diff --git a/src/test_multiplex.c b/src/test_multiplex.c index 99819371c..8f204c669 100644 --- a/src/test_multiplex.c +++ b/src/test_multiplex.c @@ -406,7 +406,7 @@ static void multiplexControlFunc( ){ int rc = SQLITE_OK; sqlite3 *db = sqlite3_context_db_handle(context); - int op; + int op = 0; int iVal; if( !db || argc!=2 ){ @@ -535,7 +535,7 @@ static int multiplexOpen( /* assign pointers to extra space allocated */ memset(pGroup, 0, sz); pMultiplexOpen->pGroup = pGroup; - pGroup->bEnabled = -1; + pGroup->bEnabled = (unsigned char)-1; pGroup->bTruncate = sqlite3_uri_boolean(zUri, "truncate", (flags & SQLITE_OPEN_MAIN_DB)==0); pGroup->szChunk = (int)sqlite3_uri_int64(zUri, "chunksize", diff --git a/src/test_quota.c b/src/test_quota.c index 80ebd0589..e8e0b3407 100644 --- a/src/test_quota.c +++ b/src/test_quota.c @@ -889,7 +889,7 @@ int sqlite3_quota_set( ** management, update its size. */ int sqlite3_quota_file(const char *zFilename){ - char *zFull; + char *zFull = 0; sqlite3_file *fd; int rc; int outFlags = 0; diff --git a/src/test_vfs.c b/src/test_vfs.c index 7ee2a9345..37081af78 100644 --- a/src/test_vfs.c +++ b/src/test_vfs.c @@ -421,7 +421,7 @@ static int tvfsSync(sqlite3_file *pFile, int flags){ Testvfs *p = (Testvfs *)pFd->pVfs->pAppData; if( p->pScript && p->mask&TESTVFS_SYNC_MASK ){ - char *zFlags; + char *zFlags = 0; switch( flags ){ case SQLITE_SYNC_NORMAL: @@ -1225,7 +1225,7 @@ static int testvfs_obj_cmd( case CMD_CANTOPENERR: case CMD_IOERR: case CMD_FULLERR: { - TestFaultInject *pTest; + TestFaultInject *pTest = 0; int iRet; switch( aSubcmd[i].eCmd ){ diff --git a/src/vdbe.c b/src/vdbe.c index 3dac74dfd..1e0ff96af 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -3823,8 +3823,8 @@ case OP_Found: { /* jump, in3 */ /* For the OP_NoConflict opcode, take the jump if any of the ** input fields are NULL, since any key with a NULL will not ** conflict */ - for(ii=0; ii<r.nField; ii++){ - if( r.aMem[ii].flags & MEM_Null ){ + for(ii=0; ii<pIdxKey->nField; ii++){ + if( pIdxKey->aMem[ii].flags & MEM_Null ){ pc = pOp->p2 - 1; VdbeBranchTaken(1,2); break; } diff --git a/tool/lemon.c b/tool/lemon.c index 54c155204..4ada425d6 100644 --- a/tool/lemon.c +++ b/tool/lemon.c @@ -2442,7 +2442,7 @@ to follow the previous rule."); if( x[0]=='{' || x[0]=='\"' || isalnum(x[0]) ){ const char *zOld, *zNew; char *zBuf, *z; - int nOld, n, nLine, nNew, nBack; + int nOld, n, nLine = 0, nNew, nBack; int addLineMacro; char zLine[50]; zNew = x; @@ -2641,7 +2641,7 @@ void Parse(struct lemon *gp) struct pstate ps; FILE *fp; char *filebuf; - int filesize; + unsigned int filesize; int lineno; int c; char *cp, *nextcp; @@ -2775,7 +2775,7 @@ void Parse(struct lemon *gp) c = *cp; *cp = 0; /* Null terminate the token */ parseonetoken(&ps); /* Parse the token */ - *cp = c; /* Restore the buffer */ + *cp = (char)c; /* Restore the buffer */ cp = nextcp; } free(filebuf); /* Release the buffer after parsing */ @@ -3398,7 +3398,7 @@ PRIVATE char *append_str(const char *zText, int n, int p1, int p2){ zText++; n--; }else{ - z[used++] = c; + z[used++] = (char)c; } } z[used] = 0; diff --git a/tool/mksqlite3c-noext.tcl b/tool/mksqlite3c-noext.tcl index f54b347be..27522265b 100644 --- a/tool/mksqlite3c-noext.tcl +++ b/tool/mksqlite3c-noext.tcl @@ -96,6 +96,7 @@ foreach hdr { hash.h hwtime.h keywordhash.h + msvc.h mutex.h opcodes.h os_common.h diff --git a/tool/mksqlite3c.tcl b/tool/mksqlite3c.tcl index 72098c735..1d597a51a 100644 --- a/tool/mksqlite3c.tcl +++ b/tool/mksqlite3c.tcl @@ -100,6 +100,7 @@ foreach hdr { hash.h hwtime.h keywordhash.h + msvc.h mutex.h opcodes.h os_common.h diff --git a/tool/mksqlite3internalh.tcl b/tool/mksqlite3internalh.tcl index 7e92b3ad7..8db593fe7 100644 --- a/tool/mksqlite3internalh.tcl +++ b/tool/mksqlite3internalh.tcl @@ -58,6 +58,7 @@ foreach hdr { hash.h hwtime.h keywordhash.h + msvc.h opcodes.h os_common.h os_setup.h |