/ Changes On Branch msvcW4
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch msvcW4 Excluding Merge-Ins

This is equivalent to a diff from 11e81ac2 to bdbeed01

2015-01-12
21:43
Fix harmless compiler warnings when using -W4 with MSVC. check-in: e693e11d user: mistachkin tags: trunk
20:25
Fix harmless compiler warning in an assert() statement. Closed-Leaf check-in: bdbeed01 user: mistachkin tags: msvcW4
20:20
Add two more classes of harmless MSVC compiler warnings. check-in: de30d5b0 user: mistachkin tags: msvcW4
18:52
Merge updates from trunk. check-in: ca5f2c54 user: mistachkin tags: msvcW4
17:56
Add an assert() in order to calm a scan-build warning. check-in: 11e81ac2 user: drh tags: trunk
2015-01-10
18:22
Add detection of the isnan() library function to the configure script. Make the code responsive to the HAVE_ISNAN configuration option. check-in: 46f3aba2 user: drh tags: trunk

Changes to Makefile.in.

   230    230     $(TOP)/src/malloc.c \
   231    231     $(TOP)/src/mem0.c \
   232    232     $(TOP)/src/mem1.c \
   233    233     $(TOP)/src/mem2.c \
   234    234     $(TOP)/src/mem3.c \
   235    235     $(TOP)/src/mem5.c \
   236    236     $(TOP)/src/memjournal.c \
          237  +  $(TOP)/src/msvc.h \
   237    238     $(TOP)/src/mutex.c \
   238    239     $(TOP)/src/mutex.h \
   239    240     $(TOP)/src/mutex_noop.c \
   240    241     $(TOP)/src/mutex_unix.c \
   241    242     $(TOP)/src/mutex_w32.c \
   242    243     $(TOP)/src/notify.c \
   243    244     $(TOP)/src/os.c \
................................................................................
   459    460   #
   460    461   HDR = \
   461    462      $(TOP)/src/btree.h \
   462    463      $(TOP)/src/btreeInt.h \
   463    464      $(TOP)/src/hash.h \
   464    465      $(TOP)/src/hwtime.h \
   465    466      keywordhash.h \
          467  +   $(TOP)/src/msvc.h \
   466    468      $(TOP)/src/mutex.h \
   467    469      opcodes.h \
   468    470      $(TOP)/src/os.h \
   469    471      $(TOP)/src/os_common.h \
   470    472      $(TOP)/src/os_setup.h \
   471    473      $(TOP)/src/os_win.h \
   472    474      $(TOP)/src/pager.h \

Changes to Makefile.msc.

    11     11   TOP = .
    12     12   
    13     13   # Set this non-0 to create and use the SQLite amalgamation file.
    14     14   #
    15     15   !IFNDEF USE_AMALGAMATION
    16     16   USE_AMALGAMATION = 1
    17     17   !ENDIF
           18  +
           19  +# Set this non-0 to enable full warnings (-W4, etc) when compiling.
           20  +#
           21  +!IFNDEF USE_FULLWARN
           22  +USE_FULLWARN = 0
           23  +!ENDIF
           24  +
           25  +# If necessary, create a list of harmless compiler warnings to disable when
           26  +# compiling the build tools.  For the SQLite source code itself, warnings,
           27  +# if any, will be disabled from within it.
           28  +#
           29  +!IFNDEF NO_WARN
           30  +!IF $(USE_FULLWARN)!=0
           31  +NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4152 -wd4189 -wd4206 -wd4210
           32  +NO_WARN = $(NO_WARN) -wd4232 -wd4244 -wd4305 -wd4306 -wd4702 -wd4706
           33  +!ENDIF
           34  +!ENDIF
    18     35   
    19     36   # Set this non-0 to use the library paths and other options necessary for
    20     37   # Windows Phone 8.1.
    21     38   #
    22     39   !IFNDEF USE_WP81_OPTS
    23     40   USE_WP81_OPTS = 0
    24     41   !ENDIF
................................................................................
   228    245   !ENDIF
   229    246   
   230    247   NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
   231    248   
   232    249   # C compiler and options for use in building executables that
   233    250   # will run on the platform that is doing the build.
   234    251   #
          252  +!IF $(USE_FULLWARN)!=0
          253  +BCC = $(NCC) -W4
          254  +!ELSE
   235    255   BCC = $(NCC) -W3
          256  +!ENDIF
   236    257   
   237    258   # Check if assembly code listings should be generated for the source
   238    259   # code files to be compiled.
   239    260   #
   240    261   !IF $(USE_LISTINGS)!=0
   241    262   BCC = $(BCC) -FAcs
   242    263   !ENDIF
................................................................................
   249    270   NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
   250    271   !ENDIF
   251    272   
   252    273   # C compiler and options for use in building executables that
   253    274   # will run on the target platform.  (BCC and TCC are usually the
   254    275   # same unless your are cross-compiling.)
   255    276   #
   256         -TCC = $(CC) -W3 -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
          277  +!IF $(USE_FULLWARN)!=0
          278  +TCC = $(CC) -W4 -DINCLUDE_MSVC_H=1
          279  +!ELSE
          280  +TCC = $(CC) -W3
          281  +!ENDIF
          282  +
          283  +TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
   257    284   RCC = $(RC) -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src
   258    285   
   259    286   # Check if assembly code listings should be generated for the source
   260    287   # code files to be compiled.
   261    288   #
   262    289   !IF $(USE_LISTINGS)!=0
   263    290   TCC = $(TCC) -FAcs
................................................................................
   702    729     $(TOP)\src\malloc.c \
   703    730     $(TOP)\src\mem0.c \
   704    731     $(TOP)\src\mem1.c \
   705    732     $(TOP)\src\mem2.c \
   706    733     $(TOP)\src\mem3.c \
   707    734     $(TOP)\src\mem5.c \
   708    735     $(TOP)\src\memjournal.c \
          736  +  $(TOP)\src\msvc.h \
   709    737     $(TOP)\src\mutex.c \
   710    738     $(TOP)\src\mutex.h \
   711    739     $(TOP)\src\mutex_noop.c \
   712    740     $(TOP)\src\mutex_unix.c \
   713    741     $(TOP)\src\mutex_w32.c \
   714    742     $(TOP)\src\notify.c \
   715    743     $(TOP)\src\os.c \
................................................................................
   934    962   #
   935    963   HDR = \
   936    964      $(TOP)\src\btree.h \
   937    965      $(TOP)\src\btreeInt.h \
   938    966      $(TOP)\src\hash.h \
   939    967      $(TOP)\src\hwtime.h \
   940    968      keywordhash.h \
          969  +   $(TOP)\src\msvc.h \
   941    970      $(TOP)\src\mutex.h \
   942    971      opcodes.h \
   943    972      $(TOP)\src\os.h \
   944    973      $(TOP)\src\os_common.h \
   945    974      $(TOP)\src\os_setup.h \
   946    975      $(TOP)\src\os_win.h \
   947    976      $(TOP)\src\pager.h \
................................................................................
   985   1014   libsqlite3.lib:	$(LIBOBJ)
   986   1015   	$(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
   987   1016   
   988   1017   libtclsqlite3.lib:	tclsqlite.lo libsqlite3.lib
   989   1018   	$(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS)
   990   1019   
   991   1020   sqlite3.exe:	$(TOP)\src\shell.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h
   992         -	$(LTLINK) $(READLINE_FLAGS) \
   993         -		$(TOP)\src\shell.c \
         1021  +	$(LTLINK) $(READLINE_FLAGS) $(TOP)\src\shell.c \
   994   1022   		/link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
   995   1023   
   996   1024   mptester.exe:	$(TOP)\mptest\mptest.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h
   997   1025   	$(LTLINK) $(TOP)\mptest\mptest.c \
   998   1026   		/link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
   999   1027   
  1000   1028   # This target creates a directory named "tsrc" and fills it with
................................................................................
  1036   1064   
  1037   1065   # Rules to build the LEMON compiler generator
  1038   1066   #
  1039   1067   lempar.c:	$(TOP)\src\lempar.c
  1040   1068   	copy $(TOP)\src\lempar.c .
  1041   1069   
  1042   1070   lemon.exe:	$(TOP)\tool\lemon.c lempar.c
  1043         -	$(BCC) -Daccess=_access -Fe$@ $(TOP)\tool\lemon.c /link $(NLTLINKOPTS) $(NLTLIBPATHS)
         1071  +	$(BCC) $(NO_WARN) -Daccess=_access \
         1072  +		-Fe$@ $(TOP)\tool\lemon.c /link $(NLTLINKOPTS) $(NLTLIBPATHS)
  1044   1073   
  1045   1074   # Rules to build individual *.lo files from generated *.c files. This
  1046   1075   # applies to:
  1047   1076   #
  1048   1077   #     parse.lo
  1049   1078   #     opcodes.lo
  1050   1079   #
................................................................................
  1307   1336   	move parse.h parse.h.temp
  1308   1337   	$(NAWK) -f $(TOP)\addopcodes.awk parse.h.temp > parse.h
  1309   1338   
  1310   1339   sqlite3.h:	$(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
  1311   1340   	$(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > sqlite3.h
  1312   1341   
  1313   1342   mkkeywordhash.exe:	$(TOP)\tool\mkkeywordhash.c
  1314         -	$(BCC) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)\tool\mkkeywordhash.c /link $(NLTLINKOPTS) $(NLTLIBPATHS)
         1343  +	$(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) \
         1344  +		$(TOP)\tool\mkkeywordhash.c /link $(NLTLINKOPTS) $(NLTLIBPATHS)
  1315   1345   
  1316   1346   keywordhash.h:	$(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
  1317   1347   	.\mkkeywordhash.exe > keywordhash.h
  1318   1348   
  1319   1349   
  1320   1350   
  1321   1351   # Rules to build the extension objects.
................................................................................
  1388   1418   #
  1389   1419   # If using the amalgamation, use sqlite3.c directly to build the test
  1390   1420   # fixture.  Otherwise link against libsqlite3.lib.  (This distinction is
  1391   1421   # necessary because the test fixture requires non-API symbols which are
  1392   1422   # hidden when the library is built via the amalgamation).
  1393   1423   #
  1394   1424   TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
  1395         -TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
         1425  +TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
         1426  +TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
  1396   1427   
  1397   1428   TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) libsqlite3.lib
  1398   1429   TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
  1399   1430   !IF $(USE_AMALGAMATION)==0
  1400   1431   TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
  1401   1432   !ELSE
  1402   1433   TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)

Changes to Makefile.vxworks.

   249    249     $(TOP)/src/malloc.c \
   250    250     $(TOP)/src/mem0.c \
   251    251     $(TOP)/src/mem1.c \
   252    252     $(TOP)/src/mem2.c \
   253    253     $(TOP)/src/mem3.c \
   254    254     $(TOP)/src/mem5.c \
   255    255     $(TOP)/src/memjournal.c \
          256  +  $(TOP)/src/msvc.h \
   256    257     $(TOP)/src/mutex.c \
   257    258     $(TOP)/src/mutex.h \
   258    259     $(TOP)/src/mutex_noop.c \
   259    260     $(TOP)/src/mutex_unix.c \
   260    261     $(TOP)/src/mutex_w32.c \
   261    262     $(TOP)/src/notify.c \
   262    263     $(TOP)/src/os.c \
................................................................................
   410    411   #
   411    412   HDR = \
   412    413      $(TOP)/src/btree.h \
   413    414      $(TOP)/src/btreeInt.h \
   414    415      $(TOP)/src/hash.h \
   415    416      $(TOP)/src/hwtime.h \
   416    417      keywordhash.h \
          418  +   $(TOP)/src/msvc.h \
   417    419      $(TOP)/src/mutex.h \
   418    420      opcodes.h \
   419    421      $(TOP)/src/os.h \
   420    422      $(TOP)/src/os_common.h \
   421    423      $(TOP)/src/os_setup.h \
   422    424      $(TOP)/src/os_win.h \
   423    425      $(TOP)/src/pager.h \

Changes to ext/fts3/fts3.c.

  1849   1849     const char *zTerm,              /* Term to select leaves for */
  1850   1850     int nTerm,                      /* Size of term zTerm in bytes */
  1851   1851     const char *zNode,              /* Buffer containing segment interior node */
  1852   1852     int nNode,                      /* Size of buffer at zNode */
  1853   1853     sqlite3_int64 *piLeaf,          /* Selected leaf node */
  1854   1854     sqlite3_int64 *piLeaf2          /* Selected leaf node */
  1855   1855   ){
  1856         -  int rc;                         /* Return code */
         1856  +  int rc = SQLITE_OK;             /* Return code */
  1857   1857     int iHeight;                    /* Height of this node in tree */
  1858   1858   
  1859   1859     assert( piLeaf || piLeaf2 );
  1860   1860   
  1861   1861     fts3GetVarint32(zNode, &iHeight);
  1862   1862     rc = fts3ScanInteriorNode(zTerm, nTerm, zNode, nNode, piLeaf, piLeaf2);
  1863   1863     assert( !piLeaf2 || !piLeaf || rc!=SQLITE_OK || (*piLeaf<=*piLeaf2) );
  1864   1864   
  1865   1865     if( rc==SQLITE_OK && iHeight>1 ){
  1866   1866       char *zBlob = 0;              /* Blob read from %_segments table */
  1867         -    int nBlob;                    /* Size of zBlob in bytes */
         1867  +    int nBlob = 0;                /* Size of zBlob in bytes */
  1868   1868   
  1869   1869       if( piLeaf && piLeaf2 && (*piLeaf!=*piLeaf2) ){
  1870   1870         rc = sqlite3Fts3ReadBlock(p, *piLeaf, &zBlob, &nBlob, 0);
  1871   1871         if( rc==SQLITE_OK ){
  1872   1872           rc = fts3SelectLeaf(p, zTerm, nTerm, zBlob, nBlob, piLeaf, 0);
  1873   1873         }
  1874   1874         sqlite3_free(zBlob);
................................................................................
  3082   3082   static int fts3FilterMethod(
  3083   3083     sqlite3_vtab_cursor *pCursor,   /* The cursor used for this query */
  3084   3084     int idxNum,                     /* Strategy index */
  3085   3085     const char *idxStr,             /* Unused */
  3086   3086     int nVal,                       /* Number of elements in apVal */
  3087   3087     sqlite3_value **apVal           /* Arguments for the indexing scheme */
  3088   3088   ){
  3089         -  int rc;
         3089  +  int rc = SQLITE_OK;
  3090   3090     char *zSql;                     /* SQL statement used to access %_content */
  3091   3091     int eSearch;
  3092   3092     Fts3Table *p = (Fts3Table *)pCursor->pVtab;
  3093   3093     Fts3Cursor *pCsr = (Fts3Cursor *)pCursor;
  3094   3094   
  3095   3095     sqlite3_value *pCons = 0;       /* The MATCH or rowid constraint, if any */
  3096   3096     sqlite3_value *pLangid = 0;     /* The "langid = ?" constraint, if any */

Changes to ext/fts3/fts3_tokenize_vtab.c.

   159    159     sqlite3 *db,                    /* Database connection */
   160    160     void *pHash,                    /* Hash table of tokenizers */
   161    161     int argc,                       /* Number of elements in argv array */
   162    162     const char * const *argv,       /* xCreate/xConnect argument array */
   163    163     sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */
   164    164     char **pzErr                    /* OUT: sqlite3_malloc'd error message */
   165    165   ){
   166         -  Fts3tokTable *pTab;
          166  +  Fts3tokTable *pTab = 0;
   167    167     const sqlite3_tokenizer_module *pMod = 0;
   168    168     sqlite3_tokenizer *pTok = 0;
   169    169     int rc;
   170    170     char **azDequote = 0;
   171    171     int nDequote;
   172    172   
   173    173     rc = sqlite3_declare_vtab(db, FTS3_TOK_SCHEMA);

Changes to ext/fts3/fts3_write.c.

  3078   3078         }
  3079   3079         bOk = 1;
  3080   3080       }
  3081   3081       rc = sqlite3_reset(pRange);
  3082   3082   
  3083   3083       if( bOk ){
  3084   3084         int iIdx = 0;
  3085         -      sqlite3_stmt *pUpdate1;
  3086         -      sqlite3_stmt *pUpdate2;
         3085  +      sqlite3_stmt *pUpdate1 = 0;
         3086  +      sqlite3_stmt *pUpdate2 = 0;
  3087   3087   
  3088   3088         if( rc==SQLITE_OK ){
  3089   3089           rc = fts3SqlStmt(p, SQL_UPDATE_LEVEL_IDX, &pUpdate1, 0);
  3090   3090         }
  3091   3091         if( rc==SQLITE_OK ){
  3092   3092           rc = fts3SqlStmt(p, SQL_UPDATE_LEVEL, &pUpdate2, 0);
  3093   3093         }

Changes to ext/misc/amatch.c.

   394    394   }
   395    395   
   396    396   /* Remove node pOld from the tree.  pOld must be an element of the tree or
   397    397   ** the AVL tree will become corrupt.
   398    398   */
   399    399   static void amatchAvlRemove(amatch_avl **ppHead, amatch_avl *pOld){
   400    400     amatch_avl **ppParent;
   401         -  amatch_avl *pBalance;
          401  +  amatch_avl *pBalance = 0;
   402    402     /* assert( amatchAvlSearch(*ppHead, pOld->zKey)==pOld ); */
   403    403     ppParent = amatchAvlFromPtr(pOld, ppHead);
   404    404     if( pOld->pBefore==0 && pOld->pAfter==0 ){
   405    405       *ppParent = 0;
   406    406       pBalance = pOld->pUp;
   407    407     }else if( pOld->pBefore && pOld->pAfter ){
   408    408       amatch_avl *pX, *pY;

Changes to ext/misc/spellfix.c.

   352    352   ** then this value is always the number of bytes in zB (i.e. strlen(zB)).
   353    353   ** If zA does end in a '*', then it is the number of bytes in the prefix
   354    354   ** of zB that was deemed to match zA.
   355    355   */
   356    356   static int editdist1(const char *zA, const char *zB, int *pnMatch){
   357    357     int nA, nB;            /* Number of characters in zA[] and zB[] */
   358    358     int xA, xB;            /* Loop counters for zA[] and zB[] */
   359         -  char cA, cB;           /* Current character of zA and zB */
          359  +  char cA = 0, cB;       /* Current character of zA and zB */
   360    360     char cAprev, cBprev;   /* Previous character of zA and zB */
   361    361     char cAnext, cBnext;   /* Next character in zA and zB */
   362    362     int d;                 /* North-west cost value */
   363    363     int dc = 0;            /* North-west character value */
   364    364     int res;               /* Final result */
   365    365     int *m;                /* The cost matrix */
   366    366     char *cx;              /* Corresponding character values */

Changes to ext/rtree/rtree.c.

  2801   2801     Rtree *pRtree = (Rtree *)pVtab;
  2802   2802     int rc = SQLITE_OK;
  2803   2803     RtreeCell cell;                 /* New cell to insert if nData>1 */
  2804   2804     int bHaveRowid = 0;             /* Set to 1 after new rowid is determined */
  2805   2805   
  2806   2806     rtreeReference(pRtree);
  2807   2807     assert(nData>=1);
         2808  +
         2809  +  cell.iRowid = 0;  /* Used only to suppress a compiler warning */
  2808   2810   
  2809   2811     /* Constraint handling. A write operation on an r-tree table may return
  2810   2812     ** SQLITE_CONSTRAINT for two reasons:
  2811   2813     **
  2812   2814     **   1. A duplicate rowid value, or
  2813   2815     **   2. The supplied data violates the "x2>=x1" constraint.
  2814   2816     **

Changes to main.mk.

   108    108     $(TOP)/src/malloc.c \
   109    109     $(TOP)/src/mem0.c \
   110    110     $(TOP)/src/mem1.c \
   111    111     $(TOP)/src/mem2.c \
   112    112     $(TOP)/src/mem3.c \
   113    113     $(TOP)/src/mem5.c \
   114    114     $(TOP)/src/memjournal.c \
          115  +  $(TOP)/src/msvc.h \
   115    116     $(TOP)/src/mutex.c \
   116    117     $(TOP)/src/mutex.h \
   117    118     $(TOP)/src/mutex_noop.c \
   118    119     $(TOP)/src/mutex_unix.c \
   119    120     $(TOP)/src/mutex_w32.c \
   120    121     $(TOP)/src/notify.c \
   121    122     $(TOP)/src/os.c \
................................................................................
   341    342   #
   342    343   HDR = \
   343    344      $(TOP)/src/btree.h \
   344    345      $(TOP)/src/btreeInt.h \
   345    346      $(TOP)/src/hash.h \
   346    347      $(TOP)/src/hwtime.h \
   347    348      keywordhash.h \
          349  +   $(TOP)/src/msvc.h \
   348    350      $(TOP)/src/mutex.h \
   349    351      opcodes.h \
   350    352      $(TOP)/src/os.h \
   351    353      $(TOP)/src/os_common.h \
   352    354      $(TOP)/src/os_setup.h \
   353    355      $(TOP)/src/os_win.h \
   354    356      $(TOP)/src/pager.h \

Changes to src/delete.c.

   222    222     Vdbe *v;               /* The virtual database engine */
   223    223     Table *pTab;           /* The table from which records will be deleted */
   224    224     const char *zDb;       /* Name of database holding pTab */
   225    225     int i;                 /* Loop counter */
   226    226     WhereInfo *pWInfo;     /* Information about the WHERE clause */
   227    227     Index *pIdx;           /* For looping over indices of the table */
   228    228     int iTabCur;           /* Cursor number for the table */
   229         -  int iDataCur;          /* VDBE cursor for the canonical data source */
   230         -  int iIdxCur;           /* Cursor number of the first index */
          229  +  int iDataCur = 0;      /* VDBE cursor for the canonical data source */
          230  +  int iIdxCur = 0;       /* Cursor number of the first index */
   231    231     int nIdx;              /* Number of indices */
   232    232     sqlite3 *db;           /* Main database structure */
   233    233     AuthContext sContext;  /* Authorization context */
   234    234     NameContext sNC;       /* Name context to resolve expressions in */
   235    235     int iDb;               /* Database number */
   236    236     int memCnt = -1;       /* Memory cell used for change counting */
   237    237     int rcauth;            /* Value returned by authorization callback */

Changes to src/main.c.

  3136   3136     int *pPrimaryKey,           /* OUTPUT: True if column part of PK */
  3137   3137     int *pAutoinc               /* OUTPUT: True if column is auto-increment */
  3138   3138   ){
  3139   3139     int rc;
  3140   3140     char *zErrMsg = 0;
  3141   3141     Table *pTab = 0;
  3142   3142     Column *pCol = 0;
  3143         -  int iCol;
         3143  +  int iCol = 0;
  3144   3144   
  3145   3145     char const *zDataType = 0;
  3146   3146     char const *zCollSeq = 0;
  3147   3147     int notnull = 0;
  3148   3148     int primarykey = 0;
  3149   3149     int autoinc = 0;
  3150   3150   

Added src/msvc.h.

            1  +/*
            2  +** 2015 January 12
            3  +**
            4  +** The author disclaims copyright to this source code.  In place of
            5  +** a legal notice, here is a blessing:
            6  +**
            7  +**    May you do good and not evil.
            8  +**    May you find forgiveness for yourself and forgive others.
            9  +**    May you share freely, never taking more than you give.
           10  +**
           11  +******************************************************************************
           12  +**
           13  +** This file contains code that is specific to MSVC.
           14  +*/
           15  +#ifndef _MSVC_H_
           16  +#define _MSVC_H_
           17  +
           18  +#if defined(_MSC_VER)
           19  +#pragma warning(disable : 4054)
           20  +#pragma warning(disable : 4055)
           21  +#pragma warning(disable : 4100)
           22  +#pragma warning(disable : 4127)
           23  +#pragma warning(disable : 4152)
           24  +#pragma warning(disable : 4189)
           25  +#pragma warning(disable : 4206)
           26  +#pragma warning(disable : 4210)
           27  +#pragma warning(disable : 4232)
           28  +#pragma warning(disable : 4244)
           29  +#pragma warning(disable : 4305)
           30  +#pragma warning(disable : 4306)
           31  +#pragma warning(disable : 4702)
           32  +#pragma warning(disable : 4706)
           33  +#endif /* defined(_MSC_VER) */
           34  +
           35  +#endif /* _MSVC_H_ */

Changes to src/pragma.c.

   723    723   ){
   724    724     char *zLeft = 0;       /* Nul-terminated UTF-8 string <id> */
   725    725     char *zRight = 0;      /* Nul-terminated UTF-8 string <value>, or NULL */
   726    726     const char *zDb = 0;   /* The database name */
   727    727     Token *pId;            /* Pointer to <id> token */
   728    728     char *aFcntl[4];       /* Argument to SQLITE_FCNTL_PRAGMA */
   729    729     int iDb;               /* Database index for <database> */
   730         -  int lwr, upr, mid;           /* Binary search bounds */
          730  +  int lwr, upr, mid = 0;       /* Binary search bounds */
   731    731     int rc;                      /* return value form SQLITE_FCNTL_PRAGMA */
   732    732     sqlite3 *db = pParse->db;    /* The database connection */
   733    733     Db *pDb;                     /* The specific database being pragmaed */
   734    734     Vdbe *v = sqlite3GetVdbe(pParse);  /* Prepared statement */
   735    735   
   736    736     if( v==0 ) return;
   737    737     sqlite3VdbeRunOnlyOnce(v);

Changes to src/shell.c.

    13     13   ** utility for accessing SQLite databases.
    14     14   */
    15     15   #if (defined(_WIN32) || defined(WIN32)) && !defined(_CRT_SECURE_NO_WARNINGS)
    16     16   /* This needs to come before any includes for MSVC compiler */
    17     17   #define _CRT_SECURE_NO_WARNINGS
    18     18   #endif
    19     19   
           20  +/*
           21  +** If requested, include the SQLite compiler options file for MSVC.
           22  +*/
           23  +#if defined(INCLUDE_MSVC_H)
           24  +#include "msvc.h"
           25  +#endif
           26  +
    20     27   /*
    21     28   ** Enable large-file support for fopen() and friends on unix.
    22     29   */
    23     30   #ifndef SQLITE_DISABLE_LFS
    24     31   # define _LARGE_FILE       1
    25     32   # ifndef _FILE_OFFSET_BITS
    26     33   #   define _FILE_OFFSET_BITS 64

Changes to src/sqliteInt.h.

    11     11   *************************************************************************
    12     12   ** Internal interface definitions for SQLite.
    13     13   **
    14     14   */
    15     15   #ifndef _SQLITEINT_H_
    16     16   #define _SQLITEINT_H_
    17     17   
           18  +/*
           19  +** Include the header file used to customize the compiler options for MSVC.
           20  +** This should be done first so that it can successfully prevent spurious
           21  +** compiler warnings due to subsequent content in this file and other files
           22  +** that are included by this file.
           23  +*/
           24  +#include "msvc.h"
           25  +
    18     26   /*
    19     27   ** These #defines should enable >2GB file support on POSIX if the
    20     28   ** underlying operating system supports it.  If the OS lacks
    21     29   ** large file support, or if the OS is windows, these should be no-ops.
    22     30   **
    23     31   ** Ticket #2739:  The _LARGEFILE_SOURCE macro must appear before any
    24     32   ** system #includes.  Hence, this block of code must be the very first

Changes to src/tclsqlite.c.

    21     21   **                        generating MD5 checksums:  md5, md5file,
    22     22   **                        md5-10x8, and md5file-10x8.
    23     23   **
    24     24   **  -DSQLITE_TEST         When used in conjuction with -DTCLSH=1, add
    25     25   **                        hundreds of new commands used for testing
    26     26   **                        SQLite.  This option implies -DSQLITE_TCLMD5.
    27     27   */
           28  +
           29  +/*
           30  +** If requested, include the SQLite compiler options file for MSVC.
           31  +*/
           32  +#if defined(INCLUDE_MSVC_H)
           33  +#include "msvc.h"
           34  +#endif
           35  +
    28     36   #include "tcl.h"
    29     37   #include <errno.h>
    30     38   
    31     39   /*
    32     40   ** Some additional include files are needed if this file is not
    33     41   ** appended to the amalgamation.
    34     42   */
................................................................................
  1081   1089   static int dbPrepareAndBind(
  1082   1090     SqliteDb *pDb,                  /* Database object */
  1083   1091     char const *zIn,                /* SQL to compile */
  1084   1092     char const **pzOut,             /* OUT: Pointer to next SQL statement */
  1085   1093     SqlPreparedStmt **ppPreStmt     /* OUT: Object used to cache statement */
  1086   1094   ){
  1087   1095     const char *zSql = zIn;         /* Pointer to first SQL statement in zIn */
  1088         -  sqlite3_stmt *pStmt;            /* Prepared statement object */
         1096  +  sqlite3_stmt *pStmt = 0;        /* Prepared statement object */
  1089   1097     SqlPreparedStmt *pPreStmt;      /* Pointer to cached statement */
  1090   1098     int nSql;                       /* Length of zSql in bytes */
  1091         -  int nVar;                       /* Number of variables in statement */
         1099  +  int nVar = 0;                   /* Number of variables in statement */
  1092   1100     int iParm = 0;                  /* Next free entry in apParm */
  1093   1101     char c;
  1094   1102     int i;
  1095   1103     Tcl_Interp *interp = pDb->interp;
  1096   1104   
  1097   1105     *ppPreStmt = 0;
  1098   1106   
................................................................................
  3098   3106   ** if the extension only supplies one new name!)  The "sqlite" command is
  3099   3107   ** used to open a new SQLite database.  See the DbMain() routine above
  3100   3108   ** for additional information.
  3101   3109   **
  3102   3110   ** The EXTERN macros are required by TCL in order to work on windows.
  3103   3111   */
  3104   3112   EXTERN int Sqlite3_Init(Tcl_Interp *interp){
  3105         -  int rc = Tcl_InitStubs(interp, "8.4", 0)==0 ? TCL_ERROR : TCL_OK;
         3113  +  int rc = Tcl_InitStubs(interp, "8.4", 0) ? TCL_OK : TCL_ERROR;
  3106   3114     if( rc==TCL_OK ){
  3107   3115       Tcl_CreateObjCommand(interp, "sqlite3", (Tcl_ObjCmdProc*)DbMain, 0, 0);
  3108   3116   #ifndef SQLITE_3_SUFFIX_ONLY
  3109   3117       /* The "sqlite" alias is undocumented.  It is here only to support
  3110   3118       ** legacy scripts.  All new scripts should use only the "sqlite3"
  3111   3119       ** command. */
  3112   3120       Tcl_CreateObjCommand(interp, "sqlite", (Tcl_ObjCmdProc*)DbMain, 0, 0);

Changes to src/test1.c.

   563    563     int argc,              /* Number of arguments */
   564    564     char **argv            /* Text of each argument */
   565    565   ){
   566    566     sqlite3 *db;
   567    567     Tcl_DString str;
   568    568     int rc;
   569    569     char *zErr = 0;
   570         -  int nRow, nCol;
          570  +  int nRow = 0, nCol = 0;
   571    571     char **aResult;
   572    572     int i;
   573    573     char zBuf[30];
   574    574     char *zSql;
   575    575     int resCount = -1;
   576    576     if( argc==5 ){
   577    577       if( Tcl_GetInt(interp, argv[4], &resCount) ) return TCL_ERROR;
................................................................................
  2116   2116   static int test_stmt_status(
  2117   2117     void * clientData,
  2118   2118     Tcl_Interp *interp,
  2119   2119     int objc,
  2120   2120     Tcl_Obj *CONST objv[]
  2121   2121   ){
  2122   2122     int iValue;
  2123         -  int i, op, resetFlag;
         2123  +  int i, op = 0, resetFlag;
  2124   2124     const char *zOpName;
  2125   2125     sqlite3_stmt *pStmt;
  2126   2126   
  2127   2127     static const struct {
  2128   2128       const char *zName;
  2129   2129       int op;
  2130   2130     } aOp[] = {
................................................................................
  3094   3094     void * clientData,
  3095   3095     Tcl_Interp *interp,
  3096   3096     int objc,
  3097   3097     Tcl_Obj *CONST objv[]
  3098   3098   ){
  3099   3099     sqlite3_stmt *pStmt;
  3100   3100     int idx;
  3101         -  double value;
         3101  +  double value = 0;
  3102   3102     int rc;
  3103   3103     const char *zVal;
  3104   3104     int i;
  3105   3105     static const struct {
  3106   3106       const char *zName;     /* Name of the special floating point value */
  3107   3107       unsigned int iUpper;   /* Upper 32 bits */
  3108   3108       unsigned int iLower;   /* Lower 32 bits */
................................................................................
  5454   5454       { "SQLITE_LIMIT_TRIGGER_DEPTH",       SQLITE_LIMIT_TRIGGER_DEPTH        },
  5455   5455       { "SQLITE_LIMIT_WORKER_THREADS",      SQLITE_LIMIT_WORKER_THREADS       },
  5456   5456       
  5457   5457       /* Out of range test cases */
  5458   5458       { "SQLITE_LIMIT_TOOSMALL",            -1,                               },
  5459   5459       { "SQLITE_LIMIT_TOOBIG",              SQLITE_LIMIT_WORKER_THREADS+1     },
  5460   5460     };
  5461         -  int i, id;
         5461  +  int i, id = 0;
  5462   5462     int val;
  5463   5463     const char *zId;
  5464   5464   
  5465   5465     if( objc!=4 ){
  5466   5466       Tcl_AppendResult(interp, "wrong # args: should be \"",
  5467   5467           Tcl_GetStringFromObj(objv[0], 0), " DB ID VALUE", 0);
  5468   5468       return TCL_ERROR;

Changes to src/test2.c.

   306    306     void *NotUsed,
   307    307     Tcl_Interp *interp,    /* The TCL interpreter that invoked this command */
   308    308     int argc,              /* Number of arguments */
   309    309     const char **argv      /* Text of each argument */
   310    310   ){
   311    311     Pager *pPager;
   312    312     char zBuf[100];
   313         -  DbPage *pPage;
          313  +  DbPage *pPage = 0;
   314    314     int pgno;
   315    315     int rc;
   316    316     if( argc!=3 ){
   317    317       Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
   318    318          " ID PGNO\"", 0);
   319    319       return TCL_ERROR;
   320    320     }

Changes to src/test8.c.

   773    773     char *zNew;
   774    774     int nArg = 0;
   775    775     const char *zSep = "WHERE";
   776    776     echo_vtab *pVtab = (echo_vtab *)tab;
   777    777     sqlite3_stmt *pStmt = 0;
   778    778     Tcl_Interp *interp = pVtab->interp;
   779    779   
   780         -  int nRow;
          780  +  int nRow = 0;
   781    781     int useIdx = 0;
   782    782     int rc = SQLITE_OK;
   783    783     int useCost = 0;
   784         -  double cost;
          784  +  double cost = 0;
   785    785     int isIgnoreUsable = 0;
   786    786     if( Tcl_GetVar(interp, "echo_module_ignore_usable", TCL_GLOBAL_ONLY) ){
   787    787       isIgnoreUsable = 1;
   788    788     }
   789    789   
   790    790     if( simulateVtabError(pVtab, "xBestIndex") ){
   791    791       return SQLITE_ERROR;
................................................................................
   923    923     sqlite3_value **apData, 
   924    924     sqlite_int64 *pRowid
   925    925   ){
   926    926     echo_vtab *pVtab = (echo_vtab *)tab;
   927    927     sqlite3 *db = pVtab->db;
   928    928     int rc = SQLITE_OK;
   929    929   
   930         -  sqlite3_stmt *pStmt;
          930  +  sqlite3_stmt *pStmt = 0;
   931    931     char *z = 0;               /* SQL statement to execute */
   932    932     int bindArgZero = 0;       /* True to bind apData[0] to sql var no. nData */
   933    933     int bindArgOne = 0;        /* True to bind apData[1] to sql var no. 1 */
   934    934     int i;                     /* Counter variable used by for loops */
   935    935   
   936    936     assert( nData==pVtab->nCol+2 || nData==1 );
   937    937   

Changes to src/test_journal.c.

   405    405       if( rc==SQLITE_OK ){
   406    406         int ii;
   407    407         for(ii=0; rc==SQLITE_OK && ii<(int)pMain->nPage; ii++){
   408    408           i64 iOff = (i64)(pMain->nPagesize) * (i64)ii;
   409    409           if( iOff==PENDING_BYTE ) continue;
   410    410           rc = sqlite3OsRead(pMain->pReal, aData, pMain->nPagesize, iOff);
   411    411           pMain->aCksum[ii] = genCksum(aData, pMain->nPagesize);
   412         -        if( ii+1==pMain->nPage && rc==SQLITE_IOERR_SHORT_READ ) rc = SQLITE_OK;
          412  +        if( ii+1==(int)pMain->nPage && rc==SQLITE_IOERR_SHORT_READ ){
          413  +          rc = SQLITE_OK;
          414  +        }
   413    415         }
   414    416       }
   415    417   
   416    418       start_ioerr_simulation(iSave, iSave2);
   417    419     }
   418    420   
   419    421     sqlite3_free(aData);
................................................................................
   546    548         /* No-op. This special case is hit when the backup code is copying a
   547    549         ** to a database with a larger page-size than the source database and
   548    550         ** it needs to fill in the non-locking-region part of the original
   549    551         ** pending-byte page.
   550    552         */
   551    553       }else{
   552    554         u32 pgno = (u32)(iOfst/p->nPagesize + 1);
   553         -      assert( (iAmt==1||iAmt==p->nPagesize) && ((iOfst+iAmt)%p->nPagesize)==0 );
          555  +      assert( (iAmt==1||iAmt==(int)p->nPagesize) &&
          556  +              ((iOfst+iAmt)%p->nPagesize)==0 );
   554    557         assert( pgno<=p->nPage || p->nSync>0 );
   555    558         assert( pgno>p->nPage || sqlite3BitvecTest(p->pWritable, pgno) );
   556    559       }
   557    560     }
   558    561   
   559    562     rc = sqlite3OsWrite(p->pReal, zBuf, iAmt, iOfst);
   560    563     if( (p->flags&SQLITE_OPEN_MAIN_JOURNAL) && iAmt==12 ){

Changes to src/test_malloc.c.

  1334   1334   static int test_status(
  1335   1335     void * clientData,
  1336   1336     Tcl_Interp *interp,
  1337   1337     int objc,
  1338   1338     Tcl_Obj *CONST objv[]
  1339   1339   ){
  1340   1340     int rc, iValue, mxValue;
  1341         -  int i, op, resetFlag;
         1341  +  int i, op = 0, resetFlag;
  1342   1342     const char *zOpName;
  1343   1343     static const struct {
  1344   1344       const char *zName;
  1345   1345       int op;
  1346   1346     } aOp[] = {
  1347   1347       { "SQLITE_STATUS_MEMORY_USED",         SQLITE_STATUS_MEMORY_USED         },
  1348   1348       { "SQLITE_STATUS_MALLOC_SIZE",         SQLITE_STATUS_MALLOC_SIZE         },
................................................................................
  1391   1391   static int test_db_status(
  1392   1392     void * clientData,
  1393   1393     Tcl_Interp *interp,
  1394   1394     int objc,
  1395   1395     Tcl_Obj *CONST objv[]
  1396   1396   ){
  1397   1397     int rc, iValue, mxValue;
  1398         -  int i, op, resetFlag;
         1398  +  int i, op = 0, resetFlag;
  1399   1399     const char *zOpName;
  1400   1400     sqlite3 *db;
  1401   1401     extern int getDbPointer(Tcl_Interp*, const char*, sqlite3**);
  1402   1402     static const struct {
  1403   1403       const char *zName;
  1404   1404       int op;
  1405   1405     } aOp[] = {

Changes to src/test_multiplex.c.

   402    402   static void multiplexControlFunc(
   403    403     sqlite3_context *context,
   404    404     int argc,
   405    405     sqlite3_value **argv
   406    406   ){
   407    407     int rc = SQLITE_OK;
   408    408     sqlite3 *db = sqlite3_context_db_handle(context);
   409         -  int op;
          409  +  int op = 0;
   410    410     int iVal;
   411    411   
   412    412     if( !db || argc!=2 ){ 
   413    413       rc = SQLITE_ERROR; 
   414    414     }else{
   415    415       /* extract params */
   416    416       op = sqlite3_value_int(argv[0]);
................................................................................
   531    531     }
   532    532   
   533    533     if( rc==SQLITE_OK ){
   534    534       const char *zUri = (flags & SQLITE_OPEN_URI) ? zName : 0;
   535    535       /* assign pointers to extra space allocated */
   536    536       memset(pGroup, 0, sz);
   537    537       pMultiplexOpen->pGroup = pGroup;
   538         -    pGroup->bEnabled = -1;
          538  +    pGroup->bEnabled = (unsigned char)-1;
   539    539       pGroup->bTruncate = sqlite3_uri_boolean(zUri, "truncate", 
   540    540                                      (flags & SQLITE_OPEN_MAIN_DB)==0);
   541    541       pGroup->szChunk = (int)sqlite3_uri_int64(zUri, "chunksize",
   542    542                                           SQLITE_MULTIPLEX_CHUNK_SIZE);
   543    543       pGroup->szChunk = (pGroup->szChunk+0xffff)&~0xffff;
   544    544       if( zName ){
   545    545         char *p = (char *)&pGroup[1];

Changes to src/test_quota.c.

   885    885   }
   886    886   
   887    887   /*
   888    888   ** Bring the named file under quota management.  Or if it is already under
   889    889   ** management, update its size.
   890    890   */
   891    891   int sqlite3_quota_file(const char *zFilename){
   892         -  char *zFull;
          892  +  char *zFull = 0;
   893    893     sqlite3_file *fd;
   894    894     int rc;
   895    895     int outFlags = 0;
   896    896     sqlite3_int64 iSize;
   897    897     int nAlloc = gQuota.sThisVfs.szOsFile + gQuota.sThisVfs.mxPathname+2;
   898    898   
   899    899     /* Allocate space for a file-handle and the full path for file zFilename */

Changes to src/test_vfs.c.

   417    417   */
   418    418   static int tvfsSync(sqlite3_file *pFile, int flags){
   419    419     int rc = SQLITE_OK;
   420    420     TestvfsFd *pFd = tvfsGetFd(pFile);
   421    421     Testvfs *p = (Testvfs *)pFd->pVfs->pAppData;
   422    422   
   423    423     if( p->pScript && p->mask&TESTVFS_SYNC_MASK ){
   424         -    char *zFlags;
          424  +    char *zFlags = 0;
   425    425   
   426    426       switch( flags ){
   427    427         case SQLITE_SYNC_NORMAL:
   428    428           zFlags = "normal";
   429    429           break;
   430    430         case SQLITE_SYNC_FULL:
   431    431           zFlags = "full";
................................................................................
  1221   1221       ** TESTVFS ioerr ?IFAIL PERSIST?
  1222   1222       **
  1223   1223       **   Where IFAIL is an integer and PERSIST is boolean.
  1224   1224       */
  1225   1225       case CMD_CANTOPENERR:
  1226   1226       case CMD_IOERR:
  1227   1227       case CMD_FULLERR: {
  1228         -      TestFaultInject *pTest;
         1228  +      TestFaultInject *pTest = 0;
  1229   1229         int iRet;
  1230   1230   
  1231   1231         switch( aSubcmd[i].eCmd ){
  1232   1232           case CMD_IOERR: pTest = &p->ioerr_err; break;
  1233   1233           case CMD_FULLERR: pTest = &p->full_err; break;
  1234   1234           case CMD_CANTOPENERR: pTest = &p->cantopen_err; break;
  1235   1235           default: assert(0);

Changes to src/vdbe.c.

  3819   3819       sqlite3VdbeRecordUnpack(pC->pKeyInfo, pIn3->n, pIn3->z, pIdxKey);
  3820   3820     }
  3821   3821     pIdxKey->default_rc = 0;
  3822   3822     if( pOp->opcode==OP_NoConflict ){
  3823   3823       /* For the OP_NoConflict opcode, take the jump if any of the
  3824   3824       ** input fields are NULL, since any key with a NULL will not
  3825   3825       ** conflict */
  3826         -    for(ii=0; ii<r.nField; ii++){
  3827         -      if( r.aMem[ii].flags & MEM_Null ){
         3826  +    for(ii=0; ii<pIdxKey->nField; ii++){
         3827  +      if( pIdxKey->aMem[ii].flags & MEM_Null ){
  3828   3828           pc = pOp->p2 - 1; VdbeBranchTaken(1,2);
  3829   3829           break;
  3830   3830         }
  3831   3831       }
  3832   3832     }
  3833   3833     rc = sqlite3BtreeMovetoUnpacked(pC->pCursor, pIdxKey, 0, 0, &res);
  3834   3834     if( pOp->p4.i==0 ){

Changes to tool/lemon.c.

  2438   2438           psp->errorcnt++;
  2439   2439         }
  2440   2440         break;
  2441   2441       case WAITING_FOR_DECL_ARG:
  2442   2442         if( x[0]=='{' || x[0]=='\"' || isalnum(x[0]) ){
  2443   2443           const char *zOld, *zNew;
  2444   2444           char *zBuf, *z;
  2445         -        int nOld, n, nLine, nNew, nBack;
         2445  +        int nOld, n, nLine = 0, nNew, nBack;
  2446   2446           int addLineMacro;
  2447   2447           char zLine[50];
  2448   2448           zNew = x;
  2449   2449           if( zNew[0]=='"' || zNew[0]=='{' ) zNew++;
  2450   2450           nNew = lemonStrlen(zNew);
  2451   2451           if( *psp->declargslot ){
  2452   2452             zOld = *psp->declargslot;
................................................................................
  2637   2637   ** the appropriate data structures in the global state vector "gp".
  2638   2638   */
  2639   2639   void Parse(struct lemon *gp)
  2640   2640   {
  2641   2641     struct pstate ps;
  2642   2642     FILE *fp;
  2643   2643     char *filebuf;
  2644         -  int filesize;
         2644  +  unsigned int filesize;
  2645   2645     int lineno;
  2646   2646     int c;
  2647   2647     char *cp, *nextcp;
  2648   2648     int startline = 0;
  2649   2649   
  2650   2650     memset(&ps, '\0', sizeof(ps));
  2651   2651     ps.gp = gp;
................................................................................
  2771   2771       }else{                          /* All other (one character) operators */
  2772   2772         cp++;
  2773   2773         nextcp = cp;
  2774   2774       }
  2775   2775       c = *cp;
  2776   2776       *cp = 0;                        /* Null terminate the token */
  2777   2777       parseonetoken(&ps);             /* Parse the token */
  2778         -    *cp = c;                        /* Restore the buffer */
         2778  +    *cp = (char)c;                  /* Restore the buffer */
  2779   2779       cp = nextcp;
  2780   2780     }
  2781   2781     free(filebuf);                    /* Release the buffer after parsing */
  2782   2782     gp->rule = ps.firstrule;
  2783   2783     gp->errorcnt = ps.errorcnt;
  2784   2784   }
  2785   2785   /*************************** From the file "plink.c" *********************/
................................................................................
  3394   3394         lemon_sprintf(zInt, "%d", p1);
  3395   3395         p1 = p2;
  3396   3396         lemon_strcpy(&z[used], zInt);
  3397   3397         used += lemonStrlen(&z[used]);
  3398   3398         zText++;
  3399   3399         n--;
  3400   3400       }else{
  3401         -      z[used++] = c;
         3401  +      z[used++] = (char)c;
  3402   3402       }
  3403   3403     }
  3404   3404     z[used] = 0;
  3405   3405     return z;
  3406   3406   }
  3407   3407   
  3408   3408   /*

Changes to tool/mksqlite3c-noext.tcl.

    92     92   #
    93     93   foreach hdr {
    94     94      btree.h
    95     95      btreeInt.h
    96     96      hash.h
    97     97      hwtime.h
    98     98      keywordhash.h
           99  +   msvc.h
    99    100      mutex.h
   100    101      opcodes.h
   101    102      os_common.h
   102    103      os_setup.h
   103    104      os_win.h
   104    105      os.h
   105    106      pager.h

Changes to tool/mksqlite3c.tcl.

    96     96      fts3.h
    97     97      fts3Int.h
    98     98      fts3_hash.h
    99     99      fts3_tokenizer.h
   100    100      hash.h
   101    101      hwtime.h
   102    102      keywordhash.h
          103  +   msvc.h
   103    104      mutex.h
   104    105      opcodes.h
   105    106      os_common.h
   106    107      os_setup.h
   107    108      os_win.h
   108    109      os.h
   109    110      pager.h

Changes to tool/mksqlite3internalh.tcl.

    54     54   #
    55     55   foreach hdr {
    56     56      btree.h
    57     57      btreeInt.h
    58     58      hash.h
    59     59      hwtime.h
    60     60      keywordhash.h
           61  +   msvc.h
    61     62      opcodes.h
    62     63      os_common.h
    63     64      os_setup.h
    64     65      os_win.h
    65     66      os.h
    66     67      pager.h
    67     68      parse.h