/ Check-in [51a6a797]
Login

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

Overview
Comment:More warning fixes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | warnings
Files: files | file ages | folders
SHA1:51a6a797e1d61c4361b87cdf3467bfd3ce161cc3
User & Date: mistachkin 2012-10-18 10:35:19
Context
2012-10-18
15:01
Merge Watcom compiler warning fixes into trunk. check-in: 5be96788 user: drh tags: trunk
10:35
More warning fixes. Closed-Leaf check-in: 51a6a797 user: mistachkin tags: warnings
09:39
Fix harmless compiler warnings. check-in: 018e09c7 user: mistachkin tags: warnings
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  5740   5740     Pgno pgnoNew;                        /* Page number of pNew */
  5741   5741   
  5742   5742     assert( sqlite3_mutex_held(pPage->pBt->mutex) );
  5743   5743     assert( sqlite3PagerIswriteable(pParent->pDbPage) );
  5744   5744     assert( pPage->nOverflow==1 );
  5745   5745   
  5746   5746     /* This error condition is now caught prior to reaching this function */
  5747         -  if( pPage->nCell<=0 ) return SQLITE_CORRUPT_BKPT;
         5747  +  if( pPage->nCell==0 ) return SQLITE_CORRUPT_BKPT;
  5748   5748   
  5749   5749     /* Allocate a new page. This page will become the right-sibling of 
  5750   5750     ** pPage. Make the parent page writable, so that the new divider cell
  5751   5751     ** may be inserted. If both these operations are successful, proceed.
  5752   5752     */
  5753   5753     rc = allocateBtreePage(pBt, &pNew, &pgnoNew, 0, 0);
  5754   5754   

Changes to src/hash.c.

   189    189         pEntry->chain = elem->next;
   190    190       }
   191    191       pEntry->count--;
   192    192       assert( pEntry->count>=0 );
   193    193     }
   194    194     sqlite3_free( elem );
   195    195     pH->count--;
   196         -  if( pH->count<=0 ){
          196  +  if( pH->count==0 ){
   197    197       assert( pH->first==0 );
   198    198       assert( pH->count==0 );
   199    199       sqlite3HashClear(pH);
   200    200     }
   201    201   }
   202    202   
   203    203   /* Attempt to locate an element of the hash table pH with a key

Changes to src/test6.c.

   633    633         ** to the xRead() method reads less than 128KB of data.
   634    634         */
   635    635         const int isDb = (flags&SQLITE_OPEN_MAIN_DB);
   636    636         i64 iOff;
   637    637   
   638    638         memset(pWrapper->zData, 0, pWrapper->nData);
   639    639         for(iOff=0; iOff<pWrapper->iSize; iOff += 512){
   640         -        int nRead = pWrapper->iSize - iOff;
          640  +        int nRead = pWrapper->iSize - (int)iOff;
   641    641           if( nRead>512 ) nRead = 512;
   642    642           if( isDb && iOff==PENDING_BYTE ) continue;
   643    643           rc = sqlite3OsRead(pReal, &pWrapper->zData[iOff], nRead, iOff);
   644    644         }
   645    645       }else{
   646    646         rc = SQLITE_NOMEM;
   647    647       }