/ Check-in [2b8eecbf]
Login

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

Overview
Comment:Fix some harmless compiler warnings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | msvcW4
Files: files | file ages | folders
SHA1: 2b8eecbfe7935d3d9826fbcd473dd3a49138ad11
User & Date: mistachkin 2015-01-12 18:38:02
Context
2015-01-12
18:52
Get things compiling cleanly with MSVC and W4. check-in: c8725fa5 user: mistachkin tags: msvcW4
18:38
Fix some harmless compiler warnings. check-in: 2b8eecbf user: mistachkin tags: msvcW4
18:27
Fix comments and add another disabled warning for MSVC. check-in: 43b6b4cc user: mistachkin tags: msvcW4
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

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 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   

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);