Fix some MSVC compiler warnings in the ASYNC extension.

FossilOrigin-Name: b951c8675df3e719c30a1dd94200b7c04252a3ea
diff --git a/ext/async/sqlite3async.c b/ext/async/sqlite3async.c
index 65399a5..0590230 100644
--- a/ext/async/sqlite3async.c
+++ b/ext/async/sqlite3async.c
@@ -690,7 +690,7 @@
     }
     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 @@
       )){
         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 @@
         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 @@
   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]=='/' ){