Fix various harmless compiler warnings seen with MSVC.
FossilOrigin-Name: 1c0fe5b5763fe5cbace9773dcdab742e126d0bd035ab13d61f9d134afa0afc0c
This commit is contained in:
+1
-1
@@ -747,7 +747,7 @@ static char *amatchDequote(const char *zIn){
|
||||
char q = zIn[0]; /* Quote character (if any ) */
|
||||
|
||||
if( q!='[' && q!= '\'' && q!='"' && q!='`' ){
|
||||
memcpy(zOut, zIn, nIn+1);
|
||||
memcpy(zOut, zIn, (size_t)(nIn+1));
|
||||
}else{
|
||||
int iOut = 0; /* Index of next byte to write to output */
|
||||
int iIn; /* Index of next byte to read from input */
|
||||
|
||||
+1
-1
@@ -431,7 +431,7 @@ static char *closureDequote(const char *zIn){
|
||||
char q = zIn[0]; /* Quote character (if any ) */
|
||||
|
||||
if( q!='[' && q!= '\'' && q!='"' && q!='`' ){
|
||||
memcpy(zOut, zIn, nIn+1);
|
||||
memcpy(zOut, zIn, (size_t)(nIn+1));
|
||||
}else{
|
||||
int iOut = 0; /* Index of next byte to write to output */
|
||||
int iIn; /* Index of next byte to read from input */
|
||||
|
||||
+1
-1
@@ -158,7 +158,7 @@ static void readFileContents(sqlite3_context *ctx, const char *zName){
|
||||
fclose(in);
|
||||
return;
|
||||
}
|
||||
if( nIn==fread(pBuf, 1, nIn, in) ){
|
||||
if( nIn==fread(pBuf, 1, (size_t)nIn, in) ){
|
||||
sqlite3_result_blob64(ctx, pBuf, nIn, sqlite3_free);
|
||||
}else{
|
||||
sqlite3_result_error_code(ctx, SQLITE_IOERR);
|
||||
|
||||
+2
-2
@@ -456,7 +456,7 @@ static char *fuzzerDequote(const char *zIn){
|
||||
char q = zIn[0]; /* Quote character (if any ) */
|
||||
|
||||
if( q!='[' && q!= '\'' && q!='"' && q!='`' ){
|
||||
memcpy(zOut, zIn, nIn+1);
|
||||
memcpy(zOut, zIn, (size_t)(nIn+1));
|
||||
}else{
|
||||
int iOut = 0; /* Index of next byte to write to output */
|
||||
int iIn; /* Index of next byte to read from input */
|
||||
@@ -524,7 +524,7 @@ static int fuzzerConnect(
|
||||
|
||||
memset(pNew, 0, sizeof(*pNew));
|
||||
pNew->zClassName = (char*)&pNew[1];
|
||||
memcpy(pNew->zClassName, zModule, nModule+1);
|
||||
memcpy(pNew->zClassName, zModule, (size_t)(nModule+1));
|
||||
|
||||
zTab = fuzzerDequote(argv[3]);
|
||||
if( zTab==0 ){
|
||||
|
||||
@@ -256,7 +256,7 @@ static void *unionMalloc(int *pRc, sqlite3_int64 nByte){
|
||||
if( *pRc==SQLITE_OK ){
|
||||
pRet = sqlite3_malloc64(nByte);
|
||||
if( pRet ){
|
||||
memset(pRet, 0, nByte);
|
||||
memset(pRet, 0, (size_t)nByte);
|
||||
}else{
|
||||
*pRc = SQLITE_NOMEM;
|
||||
}
|
||||
@@ -279,7 +279,7 @@ static char *unionStrdup(int *pRc, const char *zIn){
|
||||
sqlite3_int64 nByte = strlen(zIn) + 1;
|
||||
zRet = unionMalloc(pRc, nByte);
|
||||
if( zRet ){
|
||||
memcpy(zRet, zIn, nByte);
|
||||
memcpy(zRet, zIn, (size_t)nByte);
|
||||
}
|
||||
}
|
||||
return zRet;
|
||||
|
||||
Reference in New Issue
Block a user