/ Check-in [bcc8a755]
Login

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

Overview
Comment:Fix harmless compiler warnings and one macro VVA_ONLY macro usage issue.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bcc8a75509aafda61feb6dcc074668c79611a662
User & Date: mistachkin 2015-07-02 16:52:01
Context
2015-07-02
18:47
Merge in the latest enhancements from trunks, especially the use of _byteswap_ulong() and similar intrinsics on MSVC. check-in: 85ca4409 user: drh tags: sessions
18:16
Add fts5_source_id() SQL function, similar to sqlite_source_id(). check-in: ec257348 user: dan tags: trunk
16:52
Fix harmless compiler warnings and one macro VVA_ONLY macro usage issue. check-in: bcc8a755 user: mistachkin tags: trunk
16:50
Simplify FTS5 handling in the MSVC makefile. check-in: f022e043 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  3585   3585   ** the database file should be truncated to during the commit process. 
  3586   3586   ** i.e. the database has been reorganized so that only the first *pnTrunc
  3587   3587   ** pages are in use.
  3588   3588   */
  3589   3589   static int autoVacuumCommit(BtShared *pBt){
  3590   3590     int rc = SQLITE_OK;
  3591   3591     Pager *pPager = pBt->pPager;
  3592         -  VVA_ONLY( int nRef = sqlite3PagerRefcount(pPager) );
         3592  +  VVA_ONLY( int nRef = sqlite3PagerRefcount(pPager); )
  3593   3593   
  3594   3594     assert( sqlite3_mutex_held(pBt->mutex) );
  3595   3595     invalidateAllOverflowCache(pBt);
  3596   3596     assert(pBt->autoVacuum);
  3597   3597     if( !pBt->incrVacuum ){
  3598   3598       Pgno nFin;         /* Number of pages in database after autovacuuming */
  3599   3599       Pgno nFree;        /* Number of pages on the freelist initially */
................................................................................
  9112   9112       ** EVIDENCE-OF: R-20690-50594 The second field of the b-tree page header
  9113   9113       ** is the offset of the first freeblock, or zero if there are no
  9114   9114       ** freeblocks on the page. 
  9115   9115       */
  9116   9116       i = get2byte(&data[hdr+1]);
  9117   9117       while( i>0 ){
  9118   9118         int size, j;
  9119         -      assert( i<=usableSize-4 );     /* Enforced by btreeInitPage() */
         9119  +      assert( (u32)i<=usableSize-4 );     /* Enforced by btreeInitPage() */
  9120   9120         size = get2byte(&data[i+2]);
  9121         -      assert( i+size<=usableSize );  /* Enforced by btreeInitPage() */
         9121  +      assert( (u32)(i+size)<=usableSize );  /* Enforced by btreeInitPage() */
  9122   9122         btreeHeapInsert(heap, (i<<16)|(i+size-1));
  9123   9123         /* EVIDENCE-OF: R-58208-19414 The first 2 bytes of a freeblock are a
  9124   9124         ** big-endian integer which is the offset in the b-tree page of the next
  9125   9125         ** freeblock in the chain, or zero if the freeblock is the last on the
  9126   9126         ** chain. */
  9127   9127         j = get2byte(&data[i]);
  9128   9128         /* EVIDENCE-OF: R-06866-39125 Freeblocks are always connected in order of
  9129   9129         ** increasing offset. */
  9130   9130         assert( j==0 || j>i+size );  /* Enforced by btreeInitPage() */
  9131         -      assert( j<=usableSize-4 );   /* Enforced by btreeInitPage() */
         9131  +      assert( (u32)j<=usableSize-4 );   /* Enforced by btreeInitPage() */
  9132   9132         i = j;
  9133   9133       }
  9134   9134       /* Analyze the min-heap looking for overlap between cells and/or 
  9135   9135       ** freeblocks, and counting the number of untracked bytes in nFrag.
  9136   9136       */
  9137   9137       nFrag = 0;
  9138   9138       assert( heap[0]>0 );

Changes to src/select.c.

  4765   4765     Select *p,             /* The SELECT statement being coded. */
  4766   4766     SelectDest *pDest      /* What to do with the query results */
  4767   4767   ){
  4768   4768     int i, j;              /* Loop counters */
  4769   4769     WhereInfo *pWInfo;     /* Return from sqlite3WhereBegin() */
  4770   4770     Vdbe *v;               /* The virtual machine under construction */
  4771   4771     int isAgg;             /* True for select lists like "count(*)" */
  4772         -  ExprList *pEList;      /* List of columns to extract. */
         4772  +  ExprList *pEList = 0;  /* List of columns to extract. */
  4773   4773     SrcList *pTabList;     /* List of tables to select from */
  4774   4774     Expr *pWhere;          /* The WHERE clause.  May be NULL */
  4775   4775     ExprList *pGroupBy;    /* The GROUP BY clause.  May be NULL */
  4776   4776     Expr *pHaving;         /* The HAVING clause.  May be NULL */
  4777   4777     int rc = 1;            /* Value to return from this function */
  4778   4778     DistinctCtx sDistinct; /* Info on how to code the DISTINCT keyword */
  4779   4779     SortCtx sSort;         /* Info on how to code the ORDER BY clause */