Suppress various compiler warnings.

FossilOrigin-Name: e82d008eaffb5522080cad6c69c1b194b78eadbd
This commit is contained in:
drh
2010-06-26 21:34:06 +00:00
parent 37f9918758
commit ff82894faa
7 changed files with 43 additions and 30 deletions
+6 -1
View File
@@ -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 */
};
/*
+11 -5
View File
@@ -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 = {
+2
View File
@@ -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;
+1 -1
View File
@@ -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);
+9 -9
View File
@@ -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++;