1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Minor changes to remove a few MSVC compiler warnings at /W3. Ticket #3610. (CVS 6215)

FossilOrigin-Name: c74c78e4eb7f6d674b7564b33387db996fbe5725
This commit is contained in:
shane
2009-01-30 05:40:27 +00:00
parent db15bcd550
commit d87897dfa2
7 changed files with 31 additions and 27 deletions

View File

@ -1,5 +1,5 @@
C Add\stest\scases\sto\smake\ssure\sthat\skeywords\sthat\swe\ssay\scan\sbe\sused\sas\nidentifiers\sreally\scan\sbe\sused\sas\sidentifiers.\s\sThese\stests\swere\ninspired\sby\sticket\s#3612,\sbut\sthey\sdo\snot\sdirectly\saddress\sticket\s#3612.\s(CVS\s6214) C Minor\schanges\sto\sremove\sa\sfew\sMSVC\scompiler\swarnings\sat\s/W3.\s\sTicket\s#3610.\s(CVS\s6215)
D 2009-01-29T19:27:47 D 2009-01-30T05:40:27
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 3871d308188cefcb7c5ab20da4c7b6aad023bc52 F Makefile.in 3871d308188cefcb7c5ab20da4c7b6aad023bc52
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -135,14 +135,14 @@ F src/mutex.h 9e686e83a88838dac8b9c51271c651e833060f1e
F src/mutex_noop.c f5a07671f25a1a9bd7c10ad7107bc2585446200f F src/mutex_noop.c f5a07671f25a1a9bd7c10ad7107bc2585446200f
F src/mutex_os2.c 6b5a74f812082a8483c3df05b47bbaac2424b9a0 F src/mutex_os2.c 6b5a74f812082a8483c3df05b47bbaac2424b9a0
F src/mutex_unix.c 2f936339dfef1a4c142db290d575a3509b77315f F src/mutex_unix.c 2f936339dfef1a4c142db290d575a3509b77315f
F src/mutex_w32.c ee9cf003a330e2a9d80feefbd2c49899d5d43d6d F src/mutex_w32.c bd473df1d9253fc105709e208239b474b7961996
F src/os.c ed93a6b46132a602c4fd7a58142e2981c829c79d F src/os.c ed93a6b46132a602c4fd7a58142e2981c829c79d
F src/os.h f996ab57d2035a20e63173419055608548a834c6 F src/os.h f996ab57d2035a20e63173419055608548a834c6
F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60 F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5 F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
F src/os_unix.c c74255cc1fcddc38fc3cc1dcf70c2325d3c2948e F src/os_unix.c c74255cc1fcddc38fc3cc1dcf70c2325d3c2948e
F src/os_win.c 496e3ceb499aedc63622a89ef76f7af2dd902709 F src/os_win.c 496e3ceb499aedc63622a89ef76f7af2dd902709
F src/pager.c ce459ad59b388d2beafd263c4365bb05c9bdfcc9 F src/pager.c 3a36360acb9caa54d4fdd6439454348eab3b4b5a
F src/pager.h 59e3b500a0f6a8d17ec61976535007b0de39b9a4 F src/pager.h 59e3b500a0f6a8d17ec61976535007b0de39b9a4
F src/parse.y 4f4d16aee0d11f69fec2adb77dac88878043ed8d F src/parse.y 4f4d16aee0d11f69fec2adb77dac88878043ed8d
F src/pcache.c fcf7738c83c4d3e9d45836b2334c8a368cc41274 F src/pcache.c fcf7738c83c4d3e9d45836b2334c8a368cc41274
@ -155,7 +155,7 @@ F src/random.c 676b9d7ac820fe81e6fb2394ac8c10cff7f38628
F src/resolve.c 18dc9f0df1d60048e012ce6632251063e0dd356a F src/resolve.c 18dc9f0df1d60048e012ce6632251063e0dd356a
F src/rowset.c ba9375f37053d422dd76965a9c370a13b6e1aac4 F src/rowset.c ba9375f37053d422dd76965a9c370a13b6e1aac4
F src/select.c ae72b604e47092521c4d9ae54e1b1cbeb872a747 F src/select.c ae72b604e47092521c4d9ae54e1b1cbeb872a747
F src/shell.c 0d801ef653fd73d17161afebaab898a58ec3524b F src/shell.c 8965cf0cd7a7dac39d586a43c97adb00930e025d
F src/sqlite.h.in 8821a61dceff26993ed6689239b6fbcd8d8f6e50 F src/sqlite.h.in 8821a61dceff26993ed6689239b6fbcd8d8f6e50
F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17 F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17
F src/sqliteInt.h 3ee870a4d5886992cd09af62f0d13dc7a6033f9f F src/sqliteInt.h 3ee870a4d5886992cd09af62f0d13dc7a6033f9f
@ -207,7 +207,7 @@ F src/vdbeblob.c b0dcebfafedcf9c0addc7901ad98f6f986c08935
F src/vdbemem.c 06311d5c46fd703fe95ff81bd0a1b72ba0341311 F src/vdbemem.c 06311d5c46fd703fe95ff81bd0a1b72ba0341311
F src/vtab.c e39e011d7443a8d574b1b9cde207a35522e6df43 F src/vtab.c e39e011d7443a8d574b1b9cde207a35522e6df43
F src/walker.c 488c2660e13224ff70c0c82761118efb547f8f0d F src/walker.c 488c2660e13224ff70c0c82761118efb547f8f0d
F src/where.c 48249767437bfbacbd3488270449240b9bfd05c4 F src/where.c ac21a2bcfda6f2051b1cbaad361924295ec52771
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
F test/alias.test 597662c5d777a122f9a3df0047ea5c5bd383a911 F test/alias.test 597662c5d777a122f9a3df0047ea5c5bd383a911
F test/all.test 14165b3e32715b700b5f0cbf8f6e3833dda0be45 F test/all.test 14165b3e32715b700b5f0cbf8f6e3833dda0be45
@ -675,7 +675,7 @@ F tool/genfkey.README 080ca2269f727fcf14c8e76d52e85d157e3a8e9a
F tool/genfkey.c e1b9c93da828db10c1109c7b4fa611aec8adc407 F tool/genfkey.c e1b9c93da828db10c1109c7b4fa611aec8adc407
F tool/genfkey.test 182829596fb15785b94b2493c5f735b847d91076 F tool/genfkey.test 182829596fb15785b94b2493c5f735b847d91076
F tool/lemon.c 0f65442d1c99a865525658a47ddf292f4ac2ec54 F tool/lemon.c 0f65442d1c99a865525658a47ddf292f4ac2ec54
F tool/lempar.c c9151d2a4adf418fd9c3970dbb923b7a188b37c2 F tool/lempar.c aeba88b8566ff66f8a67c96b3eb2dd95e7d8908d
F tool/mkkeywordhash.c 1583825e96c08491c288c190a569293d3d91686f F tool/mkkeywordhash.c 1583825e96c08491c288c190a569293d3d91686f
F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e x F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e x
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97 F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
@ -693,7 +693,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff 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
P 68c8cdd73b2b9f03264f9fdd27cddb65e1bdc7ae P 6041ca87a16858f047727bc01f10b0bbc83609ed
R 326a823ae7f359b7ba50517c53432cb2 R a851df11f0d7cbfaf098052579ba3c63
U drh U shane
Z 7d5305661f64863cd9b8b57a439851af Z ad023aaa740a87e78d48a907891c19d8

View File

@ -1 +1 @@
6041ca87a16858f047727bc01f10b0bbc83609ed c74c78e4eb7f6d674b7564b33387db996fbe5725

View File

@ -11,7 +11,7 @@
************************************************************************* *************************************************************************
** This file contains the C functions that implement mutexes for win32 ** This file contains the C functions that implement mutexes for win32
** **
** $Id: mutex_w32.c,v 1.13 2008/12/08 18:19:18 drh Exp $ ** $Id: mutex_w32.c,v 1.14 2009/01/30 05:40:27 shane Exp $
*/ */
#include "sqliteInt.h" #include "sqliteInt.h"
@ -195,6 +195,7 @@ static void winMutexEnter(sqlite3_mutex *p){
} }
static int winMutexTry(sqlite3_mutex *p){ static int winMutexTry(sqlite3_mutex *p){
int rc = SQLITE_BUSY; int rc = SQLITE_BUSY;
UNUSED_PARAMETER(p);
assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld(p) ); assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld(p) );
/* /*
** The sqlite3_mutex_try() routine is very rarely used, and when it ** The sqlite3_mutex_try() routine is very rarely used, and when it

View File

@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while ** file simultaneously, or one process from reading the database while
** another is writing. ** another is writing.
** **
** @(#) $Id: pager.c,v 1.559 2009/01/24 11:30:43 drh Exp $ ** @(#) $Id: pager.c,v 1.560 2009/01/30 05:40:27 shane Exp $
*/ */
#ifndef SQLITE_OMIT_DISKIO #ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h" #include "sqliteInt.h"
@ -2174,7 +2174,7 @@ static int pagerPlaybackSavepoint(Pager *pPager, PagerSavepoint *pSavepoint){
if( nJRec==0 if( nJRec==0
&& pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff && pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff
){ ){
nJRec = (szJ - pPager->journalOff)/JOURNAL_PG_SZ(pPager); nJRec = (u32)((szJ - pPager->journalOff)/JOURNAL_PG_SZ(pPager));
} }
for(ii=0; rc==SQLITE_OK && ii<nJRec && pPager->journalOff<szJ; ii++){ for(ii=0; rc==SQLITE_OK && ii<nJRec && pPager->journalOff<szJ; ii++){
rc = pager_playback_one_page(pPager, 1, &pPager->journalOff, 1, pDone); rc = pager_playback_one_page(pPager, 1, &pPager->journalOff, 1, pDone);
@ -2501,11 +2501,11 @@ int sqlite3PagerPagecount(Pager *pPager, int *pnPage){
if( n>0 && n<pPager->pageSize ){ if( n>0 && n<pPager->pageSize ){
nPage = 1; nPage = 1;
}else{ }else{
nPage = n / pPager->pageSize; nPage = (Pgno)(n / pPager->pageSize);
} }
if( pPager->state!=PAGER_UNLOCK ){ if( pPager->state!=PAGER_UNLOCK ){
pPager->dbSize = (Pgno)nPage; pPager->dbSize = nPage;
pPager->dbFileSize = (Pgno)nPage; pPager->dbFileSize = nPage;
pPager->dbSizeValid = 1; pPager->dbSizeValid = 1;
} }
} }
@ -3197,8 +3197,13 @@ int sqlite3PagerOpen(
*/ */
if( rc==SQLITE_OK && !readOnly ){ if( rc==SQLITE_OK && !readOnly ){
setSectorSize(pPager); setSectorSize(pPager);
assert(SQLITE_DEFAULT_PAGE_SIZE<=SQLITE_MAX_DEFAULT_PAGE_SIZE);
if( szPageDflt<pPager->sectorSize ){ if( szPageDflt<pPager->sectorSize ){
szPageDflt = pPager->sectorSize; if( pPager->sectorSize>SQLITE_MAX_DEFAULT_PAGE_SIZE ){
szPageDflt = SQLITE_MAX_DEFAULT_PAGE_SIZE;
}else{
szPageDflt = (u16)pPager->sectorSize;
}
} }
#ifdef SQLITE_ENABLE_ATOMIC_WRITE #ifdef SQLITE_ENABLE_ATOMIC_WRITE
{ {
@ -3214,9 +3219,6 @@ int sqlite3PagerOpen(
} }
} }
#endif #endif
if( szPageDflt>SQLITE_MAX_DEFAULT_PAGE_SIZE ){
szPageDflt = SQLITE_MAX_DEFAULT_PAGE_SIZE;
}
} }
}else{ }else{
/* If a temporary file is requested, it is not opened immediately. /* If a temporary file is requested, it is not opened immediately.

View File

@ -12,7 +12,7 @@
** This file contains code to implement the "sqlite" command line ** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases. ** utility for accessing SQLite databases.
** **
** $Id: shell.c,v 1.198 2009/01/14 23:38:03 drh Exp $ ** $Id: shell.c,v 1.199 2009/01/30 05:40:27 shane Exp $
*/ */
#if defined(_WIN32) || defined(WIN32) #if defined(_WIN32) || defined(WIN32)
/* This needs to come before any includes for MSVC compiler */ /* This needs to come before any includes for MSVC compiler */
@ -227,6 +227,7 @@ static void shellstaticFunc(
){ ){
assert( 0==argc ); assert( 0==argc );
assert( zShellStatic ); assert( zShellStatic );
UNUSED_PARAMETER(argc);
UNUSED_PARAMETER(argv); UNUSED_PARAMETER(argv);
sqlite3_result_text(context, zShellStatic, -1, SQLITE_STATIC); sqlite3_result_text(context, zShellStatic, -1, SQLITE_STATIC);
} }

View File

@ -16,7 +16,7 @@
** so is applicable. Because this module is responsible for selecting ** so is applicable. Because this module is responsible for selecting
** indices, you might also think of this module as the "query optimizer". ** indices, you might also think of this module as the "query optimizer".
** **
** $Id: where.c,v 1.365 2009/01/24 09:56:15 danielk1977 Exp $ ** $Id: where.c,v 1.366 2009/01/30 05:40:27 shane Exp $
*/ */
#include "sqliteInt.h" #include "sqliteInt.h"
@ -3127,7 +3127,7 @@ WhereInfo *sqlite3WhereBegin(
pLevel->iIdxCur = -1; pLevel->iIdxCur = -1;
} }
notReady &= ~getMask(pMaskSet, pTabList->a[bestJ].iCursor); notReady &= ~getMask(pMaskSet, pTabList->a[bestJ].iCursor);
pLevel->iFrom = bestJ; pLevel->iFrom = (u8)bestJ;
/* Check that if the table scanned by this loop iteration had an /* Check that if the table scanned by this loop iteration had an
** INDEXED BY clause attached to it, that the named index is being ** INDEXED BY clause attached to it, that the named index is being

View File

@ -591,8 +591,8 @@ static void yy_reduce(
if( yysize ){ if( yysize ){
yypParser->yyidx++; yypParser->yyidx++;
yymsp -= yysize-1; yymsp -= yysize-1;
yymsp->stateno = yyact; yymsp->stateno = (YYACTIONTYPE)yyact;
yymsp->major = yygoto; yymsp->major = (YYCODETYPE)yygoto;
yymsp->minor = yygotominor; yymsp->minor = yygotominor;
}else }else
#endif #endif