/ Check-in [1a0a8865]
Login

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

Overview
Comment:Fix harmless compiler warnings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1a0a88657f54874703fc05f828ce29ad115d9f28
User & Date: mistachkin 2013-10-31 06:11:10
Context
2013-10-31
06:13
Enable some more tests on Windows. check-in: 72389c29 user: mistachkin tags: trunk
06:11
Fix harmless compiler warnings. check-in: 1a0a8865 user: mistachkin tags: trunk
2013-10-30
12:43
Enhance the timer in the shell to show wall-clock time in addition to user and kernel CPU time. check-in: 908e2c21 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test6.c.

   617    617       pWrapper->zName = (char *)zName;
   618    618       pWrapper->pRealFile = pReal;
   619    619       rc = sqlite3OsFileSize(pReal, &iSize);
   620    620       pWrapper->iSize = (int)iSize;
   621    621       pWrapper->flags = flags;
   622    622     }
   623    623     if( rc==SQLITE_OK ){
   624         -    pWrapper->nData = (4096 + pWrapper->iSize);
          624  +    pWrapper->nData = (int)(4096 + pWrapper->iSize);
   625    625       pWrapper->zData = crash_malloc(pWrapper->nData);
   626    626       if( pWrapper->zData ){
   627    627         /* os_unix.c contains an assert() that fails if the caller attempts
   628    628         ** to read data from the 512-byte locking region of a file opened
   629    629         ** with the SQLITE_OPEN_MAIN_DB flag. This region of a database file
   630    630         ** never contains valid data anyhow. So avoid doing such a read here.
   631    631         **
................................................................................
   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 - (int)iOff;
          640  +        int nRead = (int)(pWrapper->iSize - 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       }