From: drh Date: Tue, 17 Aug 2010 19:40:08 +0000 (+0000) Subject: Suppress harmless compiler warning. X-Git-Tag: version-3.7.2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43b18e1e5582a4c2a907108b98ffeeb3346390e8;p=thirdparty%2Fsqlite.git Suppress harmless compiler warning. FossilOrigin-Name: 3f8c068a41b01f59d7f5d56f3bced78587f4d26c --- diff --git a/manifest b/manifest index 8c4c88c705..7426bd9d12 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,8 @@ -C Return\san\serror\swhen\sparsing\s"?NNN"\sif\sNNN\sis\sso\slarge\sit\scannot\sbe\sstored\sas\sa\s32-bit\sint. -D 2010-08-17T19:34:14 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +C Suppress\sharmless\scompiler\swarning. +D 2010-08-17T19:40:08 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in ec08dc838fd8110fe24c92e5130bcd91cbb1ff2e F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -107,13 +110,13 @@ F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b F sqlite3.1 6be1ad09113570e1fc8dcaff84c9b0b337db5ffc F sqlite3.pc.in ae6f59a76e862f5c561eb32a380228a02afc3cad F src/alter.c 8dc27638e7e2553e80b2b621f232be5eb1e85ef3 -F src/analyze.c 3642ebcd13f1ffb5773b9e08910e0492ec4cf946 +F src/analyze.c da65ce99bb159b10e85a1e460adbe53a88062500 F src/attach.c 17bec1f18254d9341369f20f90ba24ce35d20d10 F src/auth.c 523da7fb4979469955d822ff9298352d6b31de34 F src/backup.c 51d83300fe0baee39405c416ceb19a58ed30a8ed F src/bitvec.c af50f1c8c0ff54d6bdb7a80e2fceca5a93670bef F src/btmutex.c 96a12f50f7a17475155971a241d85ec5171573ff -F src/btree.c 083ced0941ef7c3bcb667b7319114ab492ed4325 +F src/btree.c 3b4bca08abcc289922fbc0c87ab9b89d487b2df6 F src/btree.h b4ba2fdf6b64c7c376bdfffa826af6b786b151d9 F src/btreeInt.h 5b034ff54800046cc5870605d683ac1f9134bd99 F src/build.c 0018d49629fc4807100c988dd191dd95e185bb38 @@ -156,7 +159,7 @@ F src/os_common.h a8f95b81eca8a1ab8593d23e94f8a35f35d4078f F src/os_os2.c 72d0b2e562952a2464308c4ce5f7913ac10bef3e F src/os_unix.c 11194cbcf6a57456e58022dc537ab8c3497d9bb9 F src/os_win.c 51cb62f76262d961ea4249489383d714501315a7 -F src/pager.c db2c8d85ac97610b05e23797fa7b9fe1d146852e +F src/pager.c 67193153faa34f1577d10f81e677cdcfc36070a7 F src/pager.h ef8c8f71ab022cc2fff768a1175dd32355be9dcd F src/parse.y 12b7ebd61ea54f0e1b1083ff69cc2c8ce9353d58 F src/pcache.c 1e9aa2dbc0845b52e1b51cc39753b6d1e041cb07 @@ -843,7 +846,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P d7ed463496c4474cc435d032874a4e55d780e74a -R 3be15ad5597167776a39a56056816d30 -U dan -Z 8343604ee459a9523d2a5de8f96f92a2 +P fc9014be0f00d046e7ba830a644f9ce93eca5db8 +R 08dc99eaf91bba1ab1abe808bc12426d +U drh +Z 72b8c51b52c60a3d7d15cc0c39638b2f +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.6 (GNU/Linux) + +iD8DBQFMauWboxKgR168RlERApB6AJ9KS20DweXJdlAQEkHQT7Uvl25P2wCeMZCL +jmhmura1hUYwBMHtIse3KbQ= +=MfR5 +-----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index 5ba01f1712..74a3511176 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -fc9014be0f00d046e7ba830a644f9ce93eca5db8 \ No newline at end of file +3f8c068a41b01f59d7f5d56f3bced78587f4d26c \ No newline at end of file diff --git a/src/analyze.c b/src/analyze.c index 42705cafd2..59849456fc 100644 --- a/src/analyze.c +++ b/src/analyze.c @@ -503,6 +503,7 @@ void sqlite3DeleteIndexSamples(sqlite3 *db, Index *pIdx){ sqlite3DbFree(db, pIdx->aSample); } #else + UNUSED_PARAMETER(db); UNUSED_PARAMETER(pIdx); #endif } diff --git a/src/btree.c b/src/btree.c index 89e6408b58..b9987a27b8 100644 --- a/src/btree.c +++ b/src/btree.c @@ -2265,8 +2265,8 @@ static int lockBtree(BtShared *pBt){ nPage = nPageFile; } if( nPage>0 ){ - int pageSize; - int usableSize; + u32 pageSize; + u32 usableSize; u8 *page1 = pPage1->aData; rc = SQLITE_NOTADB; if( memcmp(page1, zMagicHeader, 16)!=0 ){ @@ -2334,8 +2334,8 @@ static int lockBtree(BtShared *pBt){ ** again with the correct page-size. */ releasePage(pPage1); - pBt->usableSize = (u32)usableSize; - pBt->pageSize = (u32)pageSize; + pBt->usableSize = usableSize; + pBt->pageSize = pageSize; freeTempSpace(pBt); rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, pageSize-usableSize); @@ -2348,8 +2348,8 @@ static int lockBtree(BtShared *pBt){ if( usableSize<480 ){ goto page1_init_failed; } - pBt->pageSize = (u32)pageSize; - pBt->usableSize = (u32)usableSize; + pBt->pageSize = pageSize; + pBt->usableSize = usableSize; #ifndef SQLITE_OMIT_AUTOVACUUM pBt->autoVacuum = (get4byte(&page1[36 + 4*4])?1:0); pBt->incrVacuum = (get4byte(&page1[36 + 7*4])?1:0); @@ -5333,7 +5333,7 @@ static int fillInCell( */ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){ int i; /* Loop counter */ - int pc; /* Offset to cell content of cell being deleted */ + u32 pc; /* Offset to cell content of cell being deleted */ u8 *data; /* pPage->aData */ u8 *ptr; /* Used to move bytes around within data[] */ int rc; /* The return code */ @@ -5351,7 +5351,7 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){ hdr = pPage->hdrOffset; testcase( pc==get2byte(&data[hdr+5]) ); testcase( pc+sz==pPage->pBt->usableSize ); - if( pc < get2byte(&data[hdr+5]) || pc+sz > pPage->pBt->usableSize ){ + if( pc < (u32)get2byte(&data[hdr+5]) || pc+sz > pPage->pBt->usableSize ){ *pRC = SQLITE_CORRUPT_BKPT; return; } @@ -5889,7 +5889,7 @@ static int balance_nonroot( ** is allocated. */ if( pBt->secureDelete ){ int iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData); - if( (iOff+szNew[i])>pBt->usableSize ){ + if( (iOff+szNew[i])>(int)pBt->usableSize ){ rc = SQLITE_CORRUPT_BKPT; memset(apOld, 0, (i+1)*sizeof(MemPage*)); goto balance_cleanup; @@ -7458,7 +7458,7 @@ static void checkList( checkPtrmap(pCheck, iPage, PTRMAP_FREEPAGE, 0, zContext); } #endif - if( n>pCheck->pBt->usableSize/4-2 ){ + if( n>(int)pCheck->pBt->usableSize/4-2 ){ checkAppendMsg(pCheck, zContext, "freelist leaf count too big on page %d", iPage); N--; @@ -7682,7 +7682,7 @@ static int checkTreePage( if( pc<=usableSize-4 ){ size = cellSizePtr(pPage, &data[pc]); } - if( (pc+size-1)>=usableSize ){ + if( (int)(pc+size-1)>=usableSize ){ checkAppendMsg(pCheck, 0, "Corruption detected in cell %d on page %d",i,iPage); }else{ diff --git a/src/pager.c b/src/pager.c index 31f5acdb47..1bda5322d2 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1334,7 +1334,7 @@ static int zeroJournalHdr(Pager *pPager, int doTruncate){ static int writeJournalHdr(Pager *pPager){ int rc = SQLITE_OK; /* Return code */ char *zHeader = pPager->pTmpSpace; /* Temporary space used to build header */ - u32 nHeader = pPager->pageSize; /* Size of buffer pointed to by zHeader */ + u32 nHeader = (u32)pPager->pageSize;/* Size of buffer pointed to by zHeader */ u32 nWrite; /* Bytes of header sector written */ int ii; /* Loop counter */ @@ -3364,7 +3364,7 @@ int sqlite3PagerSetPagesize(Pager *pPager, u32 *pPageSize, int nReserve){ assert( pageSize==0 || (pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE) ); if( (pPager->memDb==0 || pPager->dbSize==0) && sqlite3PcacheRefCount(pPager->pPCache)==0 - && pageSize && pageSize!=pPager->pageSize + && pageSize && pageSize!=(u32)pPager->pageSize ){ char *pNew; /* New temp space */ i64 nByte = 0; @@ -4899,7 +4899,7 @@ int sqlite3PagerAcquire( goto pager_acquire_err; } - if( MEMDB || pPager->dbSize<(int)pgno || noContent || !isOpen(pPager->fd) ){ + if( MEMDB || pPager->dbSizefd) ){ if( pgno>pPager->mxPgno ){ rc = SQLITE_FULL; goto pager_acquire_err;