/ Check-in [d17bc2c9]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix another compiler warning in fts5 code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d17bc2c92f4d086280e49a3cc72993be7fee2da7
User & Date: dan 2016-01-14 14:19:50
Context
2016-01-14
14:29
Fix more compiler warnings in FTS5. check-in: f791fc70 user: drh tags: trunk
14:19
Fix another compiler warning in fts5 code. check-in: d17bc2c9 user: dan tags: trunk
14:15
Fix compiler warnings in fts5. check-in: 5a343cc0 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts5/fts5_index.c.

  1997   1997   
  1998   1998   /*
  1999   1999   ** Iterator pIter currently points to the first rowid in a doclist. This
  2000   2000   ** function sets the iterator up so that iterates in reverse order through
  2001   2001   ** the doclist.
  2002   2002   */
  2003   2003   static void fts5SegIterReverse(Fts5Index *p, Fts5SegIter *pIter){
  2004         -  int eDetail = p->pConfig->eDetail;
  2005   2004     Fts5DlidxIter *pDlidx = pIter->pDlidx;
  2006   2005     Fts5Data *pLast = 0;
  2007   2006     int pgnoLast = 0;
  2008   2007   
  2009   2008     if( pDlidx ){
  2010   2009       int iSegid = pIter->pSeg->iSegid;
  2011   2010       pgnoLast = fts5DlidxIterPgno(pDlidx);
................................................................................
  2012   2011       pLast = fts5DataRead(p, FTS5_SEGMENT_ROWID(iSegid, pgnoLast));
  2013   2012     }else{
  2014   2013       Fts5Data *pLeaf = pIter->pLeaf;         /* Current leaf data */
  2015   2014   
  2016   2015       /* Currently, Fts5SegIter.iLeafOffset points to the first byte of
  2017   2016       ** position-list content for the current rowid. Back it up so that it
  2018   2017       ** points to the start of the position-list size field. */
  2019         -#if 0
  2020         -    if( eDetail!=FTS5_DETAIL_NONE ){
  2021         -      pIter->iLeafOffset -= sqlite3Fts5GetVarintLen(pIter->nPos*2+pIter->bDel);
  2022         -    }
  2023         -#else
  2024   2018       int iPoslist;
  2025   2019       if( pIter->iTermLeafPgno==pIter->iLeafPgno ){
  2026   2020         iPoslist = pIter->iTermLeafOffset;
  2027   2021       }else{
  2028   2022         iPoslist = 4;
  2029   2023       }
  2030   2024       fts5IndexSkipVarint(pLeaf->p, iPoslist);
  2031         -    assert( eDetail==FTS5_DETAIL_NONE || iPoslist==(
         2025  +    assert( p->pConfig->eDetail==FTS5_DETAIL_NONE || iPoslist==(
  2032   2026           pIter->iLeafOffset - sqlite3Fts5GetVarintLen(pIter->nPos*2+pIter->bDel)
  2033   2027       ));
  2034   2028       pIter->iLeafOffset = iPoslist;
  2035         -#endif
  2036   2029   
  2037   2030       /* If this condition is true then the largest rowid for the current
  2038   2031       ** term may not be stored on the current page. So search forward to
  2039   2032       ** see where said rowid really is.  */
  2040   2033       if( pIter->iEndofDoclist>=pLeaf->szLeaf ){
  2041   2034         int pgno;
  2042   2035         Fts5StructureSegment *pSeg = pIter->pSeg;