/ Check-in [1af4a256]
Login

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

Overview
Comment:Fix harmless compiler warnings in FTS4.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1af4a25631c4077a9bfc64e15eb92fbf5146c89c
User & Date: drh 2011-10-19 18:21:47
Context
2011-10-20
00:55
Enhancements to the omittest.tcl script used to verify that the SQLITE_OMIT compile-time options are working. check-in: 4344483f user: drh tags: trunk
2011-10-19
18:21
Fix harmless compiler warnings in FTS4. check-in: 1af4a256 user: drh tags: trunk
17:13
Fix comments on SQLITE_CONFIG_HEAP so that they do not interfere with the requirements scanner. check-in: a3151ce1 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts3/fts3.c.

  1187   1187     */
  1188   1188     if( rc==SQLITE_OK && zContent ){
  1189   1189       sqlite3_free(zCompress); 
  1190   1190       sqlite3_free(zUncompress); 
  1191   1191       zCompress = 0;
  1192   1192       zUncompress = 0;
  1193   1193       if( nCol==0 ){
  1194         -      sqlite3_free(aCol); 
         1194  +      sqlite3_free((void*)aCol); 
  1195   1195         aCol = 0;
  1196   1196         rc = fts3ContentColumns(db, argv[1], zContent, &aCol, &nCol, &nString);
  1197   1197       }
  1198   1198       assert( rc!=SQLITE_OK || nCol>0 );
  1199   1199     }
  1200   1200     if( rc!=SQLITE_OK ) goto fts3_init_out;
  1201   1201   
................................................................................
  1958   1958     char *p2 = *pp2;
  1959   1959     int iCol1 = 0;
  1960   1960     int iCol2 = 0;
  1961   1961   
  1962   1962     /* Never set both isSaveLeft and isExact for the same invocation. */
  1963   1963     assert( isSaveLeft==0 || isExact==0 );
  1964   1964   
  1965         -  assert( *p1!=0 && *p2!=0 );
         1965  +  assert( p!=0 && *p1!=0 && *p2!=0 );
  1966   1966     if( *p1==POS_COLUMN ){ 
  1967   1967       p1++;
  1968   1968       p1 += sqlite3Fts3GetVarint32(p1, &iCol1);
  1969   1969     }
  1970   1970     if( *p2==POS_COLUMN ){ 
  1971   1971       p2++;
  1972   1972       p2 += sqlite3Fts3GetVarint32(p2, &iCol2);
................................................................................
  1993   1993           if( iPos2==iPos1+nToken 
  1994   1994            || (isExact==0 && iPos2>iPos1 && iPos2<=iPos1+nToken) 
  1995   1995           ){
  1996   1996             sqlite3_int64 iSave;
  1997   1997             iSave = isSaveLeft ? iPos1 : iPos2;
  1998   1998             fts3PutDeltaVarint(&p, &iPrev, iSave+2); iPrev -= 2;
  1999   1999             pSave = 0;
         2000  +          assert( p );
  2000   2001           }
  2001   2002           if( (!isSaveLeft && iPos2<=(iPos1+nToken)) || iPos2<=iPos1 ){
  2002   2003             if( (*p2&0xFE)==0 ) break;
  2003   2004             fts3GetDeltaVarint(&p2, &iPos2); iPos2 -= 2;
  2004   2005           }else{
  2005   2006             if( (*p1&0xFE)==0 ) break;
  2006   2007             fts3GetDeltaVarint(&p1, &iPos1); iPos1 -= 2;

Changes to ext/fts3/fts3_write.c.

  2964   2964   */
  2965   2965   static int fts3DoRebuild(Fts3Table *p){
  2966   2966     int rc;                         /* Return Code */
  2967   2967   
  2968   2968     rc = fts3DeleteAll(p, 0);
  2969   2969     if( rc==SQLITE_OK ){
  2970   2970       u32 *aSz = 0;
  2971         -    u32 *aSzIns;
  2972         -    u32 *aSzDel;
         2971  +    u32 *aSzIns = 0;
         2972  +    u32 *aSzDel = 0;
  2973   2973       sqlite3_stmt *pStmt = 0;
  2974   2974       int nEntry = 0;
  2975   2975   
  2976   2976       /* Compose and prepare an SQL statement to loop through the content table */
  2977   2977       char *zSql = sqlite3_mprintf("SELECT %s" , p->zReadExprlist);
  2978   2978       if( !zSql ){
  2979   2979         rc = SQLITE_NOMEM;