diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/memjournal.c | 7 | ||||
-rw-r--r-- | src/mutex_noop.c | 16 | ||||
-rw-r--r-- | src/os_unix.c | 2 | ||||
-rw-r--r-- | src/pager.c | 2 | ||||
-rw-r--r-- | src/wal.c | 18 |
5 files changed, 29 insertions, 16 deletions
diff --git a/src/memjournal.c b/src/memjournal.c index 048304b75..fa7fc2ccb 100644 --- a/src/memjournal.c +++ b/src/memjournal.c @@ -226,7 +226,12 @@ static const struct sqlite3_io_methods MemJournalMethods = { 0, /* xCheckReservedLock */ 0, /* xFileControl */ 0, /* xSectorSize */ - 0 /* xDeviceCharacteristics */ + 0, /* xDeviceCharacteristics */ + 0, /* xShmOpen */ + 0, /* xShmLock */ + 0, /* xShmMap */ + 0, /* xShmBarrier */ + 0 /* xShmClose */ }; /* diff --git a/src/mutex_noop.c b/src/mutex_noop.c index ae42c3430..e1e3b3288 100644 --- a/src/mutex_noop.c +++ b/src/mutex_noop.c @@ -37,11 +37,17 @@ */ static int noopMutexInit(void){ return SQLITE_OK; } static int noopMutexEnd(void){ return SQLITE_OK; } -static sqlite3_mutex *noopMutexAlloc(int id){ return (sqlite3_mutex*)8; } -static void noopMutexFree(sqlite3_mutex *p){ return; } -static void noopMutexEnter(sqlite3_mutex *p){ return; } -static int noopMutexTry(sqlite3_mutex *p){ return SQLITE_OK; } -static void noopMutexLeave(sqlite3_mutex *p){ return; } +static sqlite3_mutex *noopMutexAlloc(int id){ + UNUSED_PARAMETER(id); + return (sqlite3_mutex*)8; +} +static void noopMutexFree(sqlite3_mutex *p){ UNUSED_PARAMETER(p); return; } +static void noopMutexEnter(sqlite3_mutex *p){ UNUSED_PARAMETER(p); return; } +static int noopMutexTry(sqlite3_mutex *p){ + UNUSED_PARAMETER(p); + return SQLITE_OK; +} +static void noopMutexLeave(sqlite3_mutex *p){ UNUSED_PARAMETER(p); return; } sqlite3_mutex_methods const *sqlite3NoopMutex(void){ static const sqlite3_mutex_methods sMutex = { diff --git a/src/os_unix.c b/src/os_unix.c index 6cad8f008..06712668b 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3546,6 +3546,7 @@ static int unixShmLock( static void unixShmBarrier( sqlite3_file *fd /* Database file holding the shared memory */ ){ + UNUSED_PARAMETER(fd); unixEnterMutex(); unixLeaveMutex(); } @@ -4838,6 +4839,7 @@ static int unixCurrentTimeInt64(sqlite3_vfs *NotUsed, sqlite3_int64 *piNow){ */ static int unixCurrentTime(sqlite3_vfs *NotUsed, double *prNow){ sqlite3_int64 i; + UNUSED_PARAMETER(NotUsed); unixCurrentTimeInt64(0, &i); *prNow = i/86400000.0; return 0; diff --git a/src/pager.c b/src/pager.c index 215049e47..1d816b084 100644 --- a/src/pager.c +++ b/src/pager.c @@ -4201,7 +4201,7 @@ int sqlite3PagerSharedLock(Pager *pPager){ ** detected. The chance of an undetected change is so small that ** it can be neglected. */ - int nPage; + int nPage = 0; char dbFileVers[sizeof(pPager->dbFileVers)]; sqlite3PagerPagecount(pPager, &nPage); @@ -865,9 +865,9 @@ static u32 walFramePgno(Wal *pWal, u32 iFrame){ ** actually needed. */ static void walCleanupHash(Wal *pWal){ - volatile ht_slot *aHash; /* Pointer to hash table to clear */ - volatile u32 *aPgno; /* Page number array for hash table */ - u32 iZero; /* frame == (aHash[x]+iZero) */ + volatile ht_slot *aHash = 0; /* Pointer to hash table to clear */ + volatile u32 *aPgno = 0; /* Page number array for hash table */ + u32 iZero = 0; /* frame == (aHash[x]+iZero) */ int iLimit = 0; /* Zero values greater than this */ int nByte; /* Number of bytes to zero in aPgno[] */ int i; /* Used to iterate through aHash[] */ @@ -928,9 +928,9 @@ static void walCleanupHash(Wal *pWal){ */ static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){ int rc; /* Return code */ - u32 iZero; /* One less than frame number of aPgno[1] */ - volatile u32 *aPgno; /* Page number array */ - volatile ht_slot *aHash; /* Hash table */ + u32 iZero = 0; /* One less than frame number of aPgno[1] */ + volatile u32 *aPgno = 0; /* Page number array */ + volatile ht_slot *aHash = 0; /* Hash table */ rc = walHashGet(pWal, walFramePage(iFrame), &aHash, &aPgno, &iZero); @@ -1345,8 +1345,8 @@ static void walMergesort( }; const int nList = *pnList; /* Size of input list */ - int nMerge; /* Number of elements in list aMerge */ - ht_slot *aMerge; /* List to be merged */ + int nMerge = 0; /* Number of elements in list aMerge */ + ht_slot *aMerge = 0; /* List to be merged */ int iList; /* Index into input list */ int iSub = 0; /* Index into aSub array */ struct Sublist aSub[13]; /* Array of sub-lists */ @@ -1456,7 +1456,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){ ht_slot *aIndex; /* Sorted index for this segment */ aPgno++; - nEntry = ((i+1)==nSegment)?iLast-iZero:(u32 *)aHash-(u32 *)aPgno; + nEntry = ((i+1)==nSegment)?(int)(iLast-iZero):(u32 *)aHash-(u32 *)aPgno; aIndex = &((ht_slot *)&p->aSegment[p->nSegment])[iZero]; iZero++; |