1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-03 08:01:19 +03:00

Fix harmless compiler warnings.

FossilOrigin-Name: 1a1cf5aa86734c832d845e07780262a178188d56
This commit is contained in:
drh
2013-04-22 23:38:50 +00:00
parent d99aaf10df
commit da8caa0b2d
6 changed files with 31 additions and 23 deletions

View File

@@ -230,7 +230,9 @@ static const struct sqlite3_io_methods MemJournalMethods = {
0, /* xShmMap */
0, /* xShmLock */
0, /* xShmBarrier */
0 /* xShmUnlock */
0, /* xShmUnmap */
0, /* xFetch */
0 /* xUnfetch */
};
/*

View File

@@ -4782,6 +4782,7 @@ static int unixFetch(sqlite3_file *fd, i64 iOff, int nAmt, void **pp){
*/
static int unixUnfetch(sqlite3_file *fd, i64 iOff, void *p){
unixFile *pFd = (unixFile *)fd; /* The underlying database file */
UNUSED_PARAMETER(iOff);
/* If p==0 (unmap the entire file) then there must be no outstanding
** xFetch references. Or, if p!=0 (meaning it is an xFetch reference),

View File

@@ -128,7 +128,7 @@ char *sqlite3VdbeExpandSql(
}else if( pVar->flags & MEM_Real ){
sqlite3XPrintf(&out, "%!.15g", pVar->r);
}else if( pVar->flags & MEM_Str ){
int n; /* Number of bytes of the string text to include in output */
int nOut; /* Number of bytes of the string text to include in output */
#ifndef SQLITE_OMIT_UTF16
u8 enc = ENC(db);
Mem utf8;
@@ -140,16 +140,16 @@ char *sqlite3VdbeExpandSql(
pVar = &utf8;
}
#endif
n = pVar->n;
nOut = pVar->n;
#ifdef SQLITE_TRACE_SIZE_LIMIT
if( n>SQLITE_TRACE_SIZE_LIMIT ){
n = SQLITE_TRACE_SIZE_LIMIT;
while( n<pVar->n && (pVar->z[n]&0xc0)==0x80 ){ n++; }
nOut = SQLITE_TRACE_SIZE_LIMIT;
while( nOut<pVar->n && (pVar->z[n]&0xc0)==0x80 ){ n++; }
}
#endif
sqlite3XPrintf(&out, "'%.*q'", n, pVar->z);
sqlite3XPrintf(&out, "'%.*q'", nOut, pVar->z);
#ifdef SQLITE_TRACE_SIZE_LIMIT
if( n<pVar->n ) sqlite3XPrintf(&out, "/*+%d bytes*/", pVar->n-n);
if( nOut<pVar->n ) sqlite3XPrintf(&out, "/*+%d bytes*/", pVar->n-n);
#endif
#ifndef SQLITE_OMIT_UTF16
if( enc!=SQLITE_UTF8 ) sqlite3VdbeMemRelease(&utf8);
@@ -157,19 +157,19 @@ char *sqlite3VdbeExpandSql(
}else if( pVar->flags & MEM_Zero ){
sqlite3XPrintf(&out, "zeroblob(%d)", pVar->u.nZero);
}else{
int n; /* Number of bytes of the blob to include in output */
int nOut; /* Number of bytes of the blob to include in output */
assert( pVar->flags & MEM_Blob );
sqlite3StrAccumAppend(&out, "x'", 2);
n = pVar->n;
nOut = pVar->n;
#ifdef SQLITE_TRACE_SIZE_LIMIT
if( n>SQLITE_TRACE_SIZE_LIMIT ) n = SQLITE_TRACE_SIZE_LIMIT;
if( nOut>SQLITE_TRACE_SIZE_LIMIT ) nOut = SQLITE_TRACE_SIZE_LIMIT;
#endif
for(i=0; i<n; i++){
for(i=0; i<nOut; i++){
sqlite3XPrintf(&out, "%02x", pVar->z[i]&0xff);
}
sqlite3StrAccumAppend(&out, "'", 1);
#ifdef SQLITE_TRACE_SIZE_LIMIT
if( n<pVar->n ) sqlite3XPrintf(&out, "/*+%d bytes*/", pVar->n-n);
if( nOut<pVar->n ) sqlite3XPrintf(&out, "/*+%d bytes*/", pVar->n-n);
#endif
}
}