Fix a couple more compiler warnings under MSVC.

FossilOrigin-Name: 26bc27e3f4c8a666f3358f73fc21eccdec3508f6
This commit is contained in:
shaneh 2010-07-02 18:15:31 +00:00
parent 0ab216a6b4
commit 8a300f8095
5 changed files with 18 additions and 15 deletions

View File

@ -607,6 +607,9 @@ static int fts3CreateTables(Fts3Table *p){
** An sqlite3_exec() callback for fts3TableExists. ** An sqlite3_exec() callback for fts3TableExists.
*/ */
static int fts3TableExistsCallback(void *pArg, int n, char **pp1, char **pp2){ static int fts3TableExistsCallback(void *pArg, int n, char **pp1, char **pp2){
UNUSED_PARAMETER(n);
UNUSED_PARAMETER(pp1);
UNUSED_PARAMETER(pp2);
*(int*)pArg = 1; *(int*)pArg = 1;
return 1; return 1;
} }
@ -632,7 +635,7 @@ static void fts3TableExists(
); );
rc = sqlite3_exec(db, zSql, fts3TableExistsCallback, &res, 0); rc = sqlite3_exec(db, zSql, fts3TableExistsCallback, &res, 0);
sqlite3_free(zSql); sqlite3_free(zSql);
*pResult = res & 0xff; *pResult = (u8)(res & 0xff);
if( rc!=SQLITE_ABORT ) *pRc = rc; if( rc!=SQLITE_ABORT ) *pRc = rc;
} }

View File

@ -1,5 +1,5 @@
C Fix\scompiler\swarnings\sin\sthe\sproxy\slocking\scode. C Fix\sa\scouple\smore\scompiler\swarnings\sunder\sMSVC.
D 2010-07-02T17:10:40 D 2010-07-02T18:15:31
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3 F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -60,7 +60,7 @@ F ext/fts2/mkfts2amal.tcl 974d5d438cb3f7c4a652639262f82418c1e4cff0
F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a
F ext/fts3/README.tokenizers 998756696647400de63d5ba60e9655036cb966e9 F ext/fts3/README.tokenizers 998756696647400de63d5ba60e9655036cb966e9
F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
F ext/fts3/fts3.c 20c55bed37307a2cd590387d33a9c8127b354ab4 F ext/fts3/fts3.c 51948505e018316cf0b76d249cdd87e409254e8f
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
F ext/fts3/fts3Int.h 70528ba8c33991699f96ecc64112122833cdbdb5 F ext/fts3/fts3Int.h 70528ba8c33991699f96ecc64112122833cdbdb5
F ext/fts3/fts3_expr.c f4ff02ebe854e97ac03ff00b38b728a9ab57fd4b F ext/fts3/fts3_expr.c f4ff02ebe854e97ac03ff00b38b728a9ab57fd4b
@ -221,12 +221,12 @@ F src/vdbe.c 8b3bae957a874891361e4b5ada373e6f49e18630
F src/vdbe.h 471f6a3dcec4817ca33596fe7f6654d56c0e75f3 F src/vdbe.h 471f6a3dcec4817ca33596fe7f6654d56c0e75f3
F src/vdbeInt.h 19ebc8c2a2e938340051ee65af3f377fb99102d1 F src/vdbeInt.h 19ebc8c2a2e938340051ee65af3f377fb99102d1
F src/vdbeapi.c dc3138f10afbc95ed3c21dd25abb154504b1db9d F src/vdbeapi.c dc3138f10afbc95ed3c21dd25abb154504b1db9d
F src/vdbeaux.c 4e96a5169b988a8697d4a417f902277b4152e43e F src/vdbeaux.c 10d14b40a19e1aef3a271f78f7a55ecaca7e4c41
F src/vdbeblob.c 258a6010ba7a82b72b327fb24c55790655689256 F src/vdbeblob.c 258a6010ba7a82b72b327fb24c55790655689256
F src/vdbemem.c 5e579abf6532001dfbee0e640dc34eae897a9807 F src/vdbemem.c 5e579abf6532001dfbee0e640dc34eae897a9807
F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2 F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2
F src/vtab.c a0f8a40274e4261696ef57aa806de2776ab72cda F src/vtab.c a0f8a40274e4261696ef57aa806de2776ab72cda
F src/wal.c a56876d405a38a88bb4db9bc4dffcfab67eff645 F src/wal.c 737408e8e6f2386e6318cd01dfaa534c45ffe3ed
F src/wal.h 906c85760598b18584921fe08008435aa4eeeeb2 F src/wal.h 906c85760598b18584921fe08008435aa4eeeeb2
F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
F src/where.c 9c642e4f74605039a6881d671e23471e6805322c F src/where.c 9c642e4f74605039a6881d671e23471e6805322c
@ -830,7 +830,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P 4f12e8ebdea0451cb32188a4bb812ca702c63275 P 26c7689cfedf03e65bcd51df68d128101ed2c1ec
R dd50a62a23a351f895fe97e6e7ee7360 R ecac527da519d1e7dd4890e5f5130a3c
U drh U shaneh
Z ce4932a249c59f257fa082491231c511 Z 30d6c92ca3ce1f48ef2b3c7f2015e303

View File

@ -1 +1 @@
26c7689cfedf03e65bcd51df68d128101ed2c1ec 26bc27e3f4c8a666f3358f73fc21eccdec3508f6

View File

@ -830,7 +830,7 @@ void sqlite3VdbeNoopComment(Vdbe *p, const char *zFormat, ...){
** check the value of p->nOp-1 before continuing. ** check the value of p->nOp-1 before continuing.
*/ */
VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){ VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){
static const VdbeOp dummy; static const VdbeOp dummy = { 0 };
assert( p->magic==VDBE_MAGIC_INIT ); assert( p->magic==VDBE_MAGIC_INIT );
if( addr<0 ){ if( addr<0 ){
#ifdef SQLITE_OMIT_TRACE #ifdef SQLITE_OMIT_TRACE

View File

@ -497,12 +497,12 @@ static int walIndexPage(Wal *pWal, int iPage, volatile u32 **ppPage){
if( pWal->nWiData<=iPage ){ if( pWal->nWiData<=iPage ){
int nByte = sizeof(u32 *)*(iPage+1); int nByte = sizeof(u32 *)*(iPage+1);
volatile u32 **apNew; volatile u32 **apNew;
apNew = (volatile u32 **)sqlite3_realloc(pWal->apWiData, nByte); apNew = (volatile u32 **)sqlite3_realloc((void *)pWal->apWiData, nByte);
if( !apNew ){ if( !apNew ){
*ppPage = 0; *ppPage = 0;
return SQLITE_NOMEM; return SQLITE_NOMEM;
} }
memset(&apNew[pWal->nWiData], 0, sizeof(u32 *)*(iPage+1-pWal->nWiData)); memset((void *)&apNew[pWal->nWiData], 0, sizeof(u32 *)*(iPage+1-pWal->nWiData));
pWal->apWiData = apNew; pWal->apWiData = apNew;
pWal->nWiData = iPage+1; pWal->nWiData = iPage+1;
} }
@ -1648,7 +1648,7 @@ int sqlite3WalClose(
sqlite3OsDelete(pWal->pVfs, pWal->zWalName, 0); sqlite3OsDelete(pWal->pVfs, pWal->zWalName, 0);
} }
WALTRACE(("WAL%p: closed\n", pWal)); WALTRACE(("WAL%p: closed\n", pWal));
sqlite3_free(pWal->apWiData); sqlite3_free((void *)pWal->apWiData);
sqlite3_free(pWal); sqlite3_free(pWal);
} }
return rc; return rc;