diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/memjournal.c | 4 | ||||
-rw-r--r-- | src/os_unix.c | 1 | ||||
-rw-r--r-- | src/vdbetrace.c | 22 |
3 files changed, 15 insertions, 12 deletions
diff --git a/src/memjournal.c b/src/memjournal.c index 3e66e215b..05725948f 100644 --- a/src/memjournal.c +++ b/src/memjournal.c @@ -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 */ }; /* diff --git a/src/os_unix.c b/src/os_unix.c index 8dfbe6181..7448afe4c 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -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), diff --git a/src/vdbetrace.c b/src/vdbetrace.c index 91554d671..88935beea 100644 --- a/src/vdbetrace.c +++ b/src/vdbetrace.c @@ -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 } } |