/ Check-in [0ddb2532]
Login

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

Overview
Comment:Fix harmless compiler warnings in FTS5 code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fts5NoWarn
Files: files | file ages | folders
SHA1: 0ddb2532b2daaaf1b0109ac360822f84cb999b7f
User & Date: mistachkin 2015-08-06 03:19:14
Context
2015-08-11
14:25
Merge fixes from the fts5NoWarn branch. check-in: 61cb2fc6 user: dan tags: trunk
2015-08-06
03:19
Fix harmless compiler warnings in FTS5 code. Closed-Leaf check-in: 0ddb2532 user: mistachkin tags: fts5NoWarn
03:09
Fix duplicate test numbering in the FTS5 matchinfo tests. check-in: 483ebe89 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to ext/fts5/fts5_index.c.

  2308   2308     Fts5Buffer *pBuf,               /* Buffer to use for loading pages */
  2309   2309     const u8 *pTerm, int nTerm,     /* Term to seek to */
  2310   2310     int flags,                      /* Mask of FTS5INDEX_XXX flags */
  2311   2311     Fts5StructureSegment *pSeg,     /* Description of segment */
  2312   2312     Fts5SegIter *pIter              /* Object to populate */
  2313   2313   ){
  2314   2314     int iPg = 1;
  2315         -  int h;
  2316   2315     int bGe = (flags & FTS5INDEX_QUERY_SCAN);
  2317   2316     int bDlidx = 0;                 /* True if there is a doclist-index */
  2318   2317   
  2319   2318     static int nCall = 0;
  2320   2319     nCall++;
  2321   2320   
  2322   2321     assert( bGe==0 || (flags & FTS5INDEX_QUERY_DESC)==0 );
................................................................................
  2335   2334       ));
  2336   2335     }
  2337   2336     if( p->rc ) return;
  2338   2337     sqlite3_bind_int(p->pIdxSelect, 1, pSeg->iSegid);
  2339   2338     sqlite3_bind_blob(p->pIdxSelect, 2, pTerm, nTerm, SQLITE_STATIC);
  2340   2339     if( SQLITE_ROW==sqlite3_step(p->pIdxSelect) ){
  2341   2340       i64 val = sqlite3_column_int(p->pIdxSelect, 0);
  2342         -    iPg = (val>>1);
         2341  +    iPg = (int)(val>>1);
  2343   2342       bDlidx = (val & 0x0001);
  2344   2343     }
  2345   2344     p->rc = sqlite3_reset(p->pIdxSelect);
  2346   2345   
  2347   2346     if( iPg<pSeg->pgnoFirst ){
  2348   2347       iPg = pSeg->pgnoFirst;
  2349   2348       bDlidx = 0;
................................................................................
  5072   5071     ));
  5073   5072   
  5074   5073     /* Iterate through the b-tree hierarchy.  */
  5075   5074     while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){
  5076   5075       i64 iRow;                     /* Rowid for this leaf */
  5077   5076       Fts5Data *pLeaf;              /* Data for this leaf */
  5078   5077       int iOff;                     /* Offset of first term on leaf */
  5079         -    int i;                        /* Used to iterate through empty leaves */
  5080   5078   
  5081   5079       int nIdxTerm = sqlite3_column_bytes(pStmt, 1);
  5082   5080       const char *zIdxTerm = (const char*)sqlite3_column_text(pStmt, 1);
  5083   5081       int iIdxLeaf = sqlite3_column_int(pStmt, 2);
  5084   5082       int bIdxDlidx = sqlite3_column_int(pStmt, 3);
  5085   5083   
  5086   5084       /* If the leaf in question has already been trimmed from the segment, 
................................................................................
  5124   5122       if( p->rc ) break;
  5125   5123   
  5126   5124       /* If there is a doclist-index, check that it looks right. */
  5127   5125       if( bIdxDlidx ){
  5128   5126         Fts5DlidxIter *pDlidx = 0;  /* For iterating through doclist index */
  5129   5127         int iPrevLeaf = iIdxLeaf;
  5130   5128         int iSegid = pSeg->iSegid;
  5131         -      int iPg;
         5129  +      int iPg = 0;
  5132   5130         i64 iKey;
  5133   5131   
  5134   5132         for(pDlidx=fts5DlidxIterInit(p, 0, iSegid, iIdxLeaf);
  5135   5133             fts5DlidxIterEof(p, pDlidx)==0;
  5136   5134             fts5DlidxIterNext(p, pDlidx)
  5137   5135         ){
  5138   5136   

Changes to ext/fts5/fts5_tcl.c.

    19     19   #ifdef SQLITE_ENABLE_FTS5
    20     20   
    21     21   #include "fts5.h"
    22     22   #include <string.h>
    23     23   #include <assert.h>
    24     24   
    25     25   extern int sqlite3_fts5_may_be_corrupt;
           26  +extern int sqlite3Fts5TestRegisterMatchinfo(sqlite3 *);
    26     27   
    27     28   /*************************************************************************
    28     29   ** This is a copy of the first part of the SqliteDb structure in 
    29     30   ** tclsqlite.c.  We need it here so that the get_sqlite_pointer routine
    30     31   ** can extract the sqlite3* pointer from an existing Tcl SQLite
    31     32   ** connection.
    32     33   */

Changes to ext/fts5/fts5_test_mi.c.

   255    255         memset(aOut, 0, sizeof(u32) * p->nCol);
   256    256   
   257    257         rc = pApi->xInstCount(pFts, &nInst);
   258    258         for(i=0; rc==SQLITE_OK && i<nInst; i++){
   259    259           int iPhrase, iOff, iCol = 0;
   260    260           int iNextPhrase;
   261    261           int iNextOff;
   262         -        int nSeq = 1;
          262  +        u32 nSeq = 1;
   263    263           int j;
   264    264   
   265    265           rc = pApi->xInst(pFts, i, &iPhrase, &iCol, &iOff);
   266    266           iNextPhrase = iPhrase+1;
   267    267           iNextOff = iOff+pApi->xPhraseSize(pFts, 0);
   268    268           for(j=i+1; rc==SQLITE_OK && j<nInst; j++){
   269    269             int ip, ic, io;