diff options
author | shaneh <shaneh@noemail.net> | 2010-07-07 16:49:46 +0000 |
---|---|---|
committer | shaneh <shaneh@noemail.net> | 2010-07-07 16:49:46 +0000 |
commit | b638a3d3eb0df0db9566945b99e7496ed59f29ca (patch) | |
tree | 1d9ccbd2821e52c74d2ae2ed9b438ec0fd17ea8c /ext/async/sqlite3async.c | |
parent | 8fb66141ede604a5b48b52f30c798775a29a82e1 (diff) | |
download | sqlite-b638a3d3eb0df0db9566945b99e7496ed59f29ca.tar.gz sqlite-b638a3d3eb0df0db9566945b99e7496ed59f29ca.zip |
Fix some MSVC compiler warnings in the ASYNC extension.
FossilOrigin-Name: b951c8675df3e719c30a1dd94200b7c04252a3ea
Diffstat (limited to 'ext/async/sqlite3async.c')
-rw-r--r-- | ext/async/sqlite3async.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/async/sqlite3async.c b/ext/async/sqlite3async.c index 65399a57a..0590230a5 100644 --- a/ext/async/sqlite3async.c +++ b/ext/async/sqlite3async.c @@ -690,7 +690,7 @@ static int asyncRead( } nRead = MIN(filesize - iOffset, iAmt64); if( nRead>0 ){ - rc = pBase->pMethods->xRead(pBase, zOut, nRead, iOffset); + rc = pBase->pMethods->xRead(pBase, zOut, (int)nRead, iOffset); ASYNC_TRACE(("READ %s %d bytes at %d\n", p->zName, nRead, iOffset)); } } @@ -706,7 +706,6 @@ static int asyncRead( )){ sqlite3_int64 nCopy; sqlite3_int64 nByte64 = (sqlite3_int64)pWrite->nByte; - filesize = MAX(filesize, pWrite->iOffset+nByte64); /* Set variable iBeginIn to the offset in buffer pWrite->zBuf[] from ** which data should be copied. Set iBeginOut to the offset within @@ -718,9 +717,11 @@ static int asyncRead( if( iBeginIn<0 ) iBeginIn = 0; if( iBeginOut<0 ) iBeginOut = 0; + filesize = MAX(filesize, pWrite->iOffset+nByte64); + nCopy = MIN(nByte64-iBeginIn, iAmt64-iBeginOut); if( nCopy>0 ){ - memcpy(&((char *)zOut)[iBeginOut], &pWrite->zBuf[iBeginIn], nCopy); + memcpy(&((char *)zOut)[iBeginOut], &pWrite->zBuf[iBeginIn], (size_t)nCopy); ASYNC_TRACE(("OVERREAD %d bytes at %d\n", nCopy, iBeginOut+iOffset)); } } @@ -1236,7 +1237,7 @@ static int asyncFullPathname( if( rc==SQLITE_OK ){ int i, j; char *z = zPathOut; - int n = strlen(z); + int n = (int)strlen(z); while( n>1 && z[n-1]=='/' ){ n--; } for(i=j=0; i<n; i++){ if( z[i]=='/' ){ |