/ Check-in [44c760d1]
Login

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

Overview
Comment:Fix compiler warnings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | begin-concurrent
Files: files | file ages | folders
SHA3-256: 44c760d150b494ddd88382360cfcc4734fec936ed620f88b9df33ea7215c2fc2
User & Date: drh 2017-07-20 19:08:35
Wiki:begin-concurrent
Context
2017-07-20
19:28
Minor fix to the concurrent.test module so that it works on windows. check-in: 58553d61 user: drh tags: begin-concurrent
19:08
Fix compiler warnings. check-in: 44c760d1 user: drh tags: begin-concurrent
18:56
Fix a faulty #ifdef on the previous check-in check-in: 7355e742 user: drh tags: begin-concurrent
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  4072   4072         if( iNew==PENDING_BYTE_PAGE(pBt) ) iNew = ++(*pnCurrent);
  4073   4073         rc = relocatePage(pBt, pPg, pEntry->eType, pEntry->parent, iNew, 1);
  4074   4074         releasePageNotNull(pPg);
  4075   4075       }else{
  4076   4076         rc = allocateBtreePage(pBt, &pFree, &iNew, iFirst-1, BTALLOC_LE);
  4077   4077         assert( rc!=SQLITE_OK || iNew<iFirst );
  4078   4078         if( rc==SQLITE_OK ){
  4079         -        MemPage *pPg = 0;
  4080   4079           releasePage(pFree);
  4081   4080           btreeGetPage(pBt, iPg, &pPg, 0);
  4082   4081           rc = relocatePage(pBt, pPg, pEntry->eType, pEntry->parent,iNew,1);
  4083   4082           releasePage(pPg);
  4084   4083         }
  4085   4084       }
  4086   4085     }

Changes to src/pager.c.

  5470   5470     assert( assert_pager_state(pPager) );
  5471   5471     assert( pPager->hasHeldSharedLock==1 );
  5472   5472   
  5473   5473   #ifndef SQLITE_OMIT_CONCURRENT
  5474   5474     /* If this is an CONCURRENT transaction and the page being read was
  5475   5475     ** present in the database file when the transaction was opened,
  5476   5476     ** mark it as read in the pAllRead vector.  */
         5477  +  pPg = 0;
  5477   5478     if( pPager->pAllRead && pgno<=pPager->dbOrigSize ){
  5478   5479       rc = sqlite3BitvecSet(pPager->pAllRead, pgno);
  5479   5480       if( rc!=SQLITE_OK ) goto pager_acquire_err;
  5480   5481     }
  5481   5482   #endif
  5482   5483   
  5483   5484     if( pgno==0 ) return SQLITE_CORRUPT_BKPT;

Changes to src/wal.c.

  2895   2895         for(iHash=walFramePage(iFirst); iHash<=iLastHash; iHash++){
  2896   2896           volatile ht_slot *aHash;
  2897   2897           volatile u32 *aPgno;
  2898   2898           u32 iZero;
  2899   2899   
  2900   2900           rc = walHashGet(pWal, iHash, &aHash, &aPgno, &iZero);
  2901   2901           if( rc==SQLITE_OK ){
  2902         -          int i;
  2903         -          int iMin = (iFirst - iZero);
  2904         -          int iMax = (iHash==0) ? HASHTABLE_NPAGE_ONE : HASHTABLE_NPAGE;
         2902  +          u32 i, iMin, iMax;
         2903  +          assert( iFirst >= iZero );
         2904  +          iMin = (iFirst - iZero);
         2905  +          iMax = (iHash==0) ? HASHTABLE_NPAGE_ONE : HASHTABLE_NPAGE;
  2905   2906             if( iMin<1 ) iMin = 1;
  2906   2907             if( iMax>head.mxFrame ) iMax = head.mxFrame;
  2907   2908             for(i=iMin; rc==SQLITE_OK && i<=iMax; i++){
  2908   2909               PgHdr *pPg;
  2909   2910               if( aPgno[i]==1 ){
  2910   2911                 /* Check that the schema cookie has not been modified. If
  2911   2912                 ** it has not, the commit can proceed. */