From a03396aafbb3e92d8d33126b986e2d0b426989fb Mon Sep 17 00:00:00 2001 From: danielk1977 Date: Wed, 19 Nov 2008 14:35:46 +0000 Subject: [PATCH] Fix a few more compiler warnings. (CVS 5926) FossilOrigin-Name: 70b2f6839ca97dfc08f72875283f5c75c8fcf0cc --- manifest | 16 ++++++++-------- manifest.uuid | 2 +- src/mem3.c | 14 ++++++++------ src/mem5.c | 5 ++++- src/os_unix.c | 11 ++++++++--- 5 files changed, 29 insertions(+), 19 deletions(-) diff --git a/manifest b/manifest index c0ff93c00e..37348dacd0 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C In\sos_unix.c,\suse\s"IS_VXWORKS"\sinstead\sof\s"defined(__RTP__)\s||\sdefined(_WRS_KERNEL)".\sPurely\sbecause\sit's\seasier\son\sthe\seyes.\s(CVS\s5925) -D 2008-11-19T13:52:30 +C Fix\sa\sfew\smore\scompiler\swarnings.\s(CVS\s5926) +D 2008-11-19T14:35:47 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 0aa7bbe3be6acc4045706e3bb3fd0b8f38f4a3b5 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -124,8 +124,8 @@ F src/malloc.c 4e7bf5a3fcfd848a09f7ce7abb00f7b358128161 F src/mem0.c f2f84062d1f35814d6535c9f9e33de3bfb3b132c F src/mem1.c bb8e26adde7d463270e961f045802c61dbabc8f1 F src/mem2.c 5d9968f576ba1babc787adbfb613cf428ab484ec -F src/mem3.c 1594f117fde4cf11a6c16521f3f30af8d04bbe68 -F src/mem5.c 528adcfaa78201d60fccdfddaf55b18b6fda9697 +F src/mem3.c 5644d8eb9a01bc20ee1498d9bbd160a4d4875ef5 +F src/mem5.c d0f785214a6a51deb222fb934101df7794d8563a F src/memjournal.c 9e1f3c19baa566dd3f18f8eab8b70061f2eb5a9f F src/mutex.c e9cb5fbe94afb4328869afaf3ac49bd1327559eb F src/mutex.h 9e686e83a88838dac8b9c51271c651e833060f1e @@ -137,7 +137,7 @@ F src/os.c 0b411644b87ad689d7250bbfd1834d99b81a3df4 F src/os.h ef8abeb9afc694b82dbd169a91c9b7e26db3c892 F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60 F src/os_os2.c d12285d66df674c42f6f544a6f7c21bf1a954ee1 -F src/os_unix.c 88cfaa018b62a708bee91a984a48a59e56df2bc4 +F src/os_unix.c 975cdd3e1bc1de82053db8c0b948db530e778650 F src/os_win.c 08d0b059ac01f32e8813bb96fc573486592b83f5 F src/pager.c ae5da38b6415bdd88e56a2a484f29282c4ea09f5 F src/pager.h a02ef8e6cc7e78b54874166e5ce786c9d4c489bf @@ -659,7 +659,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 8cc120fb3aed835a2cd081963317b7f1b1ac4b73 -R a60912d7c8bf8ef16c32d0eefce892ef +P 92c91a6cd7bcbe79206bdf7708fe9049a7b7fdd6 +R becaca1ce8e489233fe07373da291409 U danielk1977 -Z 773ef59016ee6ed7937cc42866024e39 +Z 28a506bcb2c5bad1b973ed3ce4c1ed0f diff --git a/manifest.uuid b/manifest.uuid index c88e8296bb..3f1df850ba 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -92c91a6cd7bcbe79206bdf7708fe9049a7b7fdd6 \ No newline at end of file +70b2f6839ca97dfc08f72875283f5c75c8fcf0cc \ No newline at end of file diff --git a/src/mem3.c b/src/mem3.c index 1c2c9511c2..956d3734f2 100644 --- a/src/mem3.c +++ b/src/mem3.c @@ -23,7 +23,7 @@ ** This version of the memory allocation subsystem is included ** in the build only if SQLITE_ENABLE_MEMSYS3 is defined. ** -** $Id: mem3.c,v 1.23 2008/09/02 17:52:52 danielk1977 Exp $ +** $Id: mem3.c,v 1.24 2008/11/19 14:35:47 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -251,7 +251,7 @@ static void memsys3OutOfMemory(int nByte){ ** size parameters for check-out and return a pointer to the ** user portion of the chunk. */ -static void *memsys3Checkout(u32 i, int nBlock){ +static void *memsys3Checkout(u32 i, u32 nBlock){ u32 x; assert( sqlite3_mutex_held(mem3.mutex) ); assert( i>=1 ); @@ -269,7 +269,7 @@ static void *memsys3Checkout(u32 i, int nBlock){ ** Return a pointer to the new allocation. Or, if the master chunk ** is not large enough, return 0. */ -static void *memsys3FromMaster(int nBlock){ +static void *memsys3FromMaster(u32 nBlock){ assert( sqlite3_mutex_held(mem3.mutex) ); assert( mem3.szMaster>=nBlock ); if( nBlock>=mem3.szMaster-1 ){ @@ -355,8 +355,8 @@ static void memsys3Merge(u32 *pRoot){ */ static void *memsys3MallocUnsafe(int nByte){ u32 i; - int nBlock; - int toFree; + u32 nBlock; + u32 toFree; assert( sqlite3_mutex_held(mem3.mutex) ); assert( sizeof(Mem3Block)==8 ); @@ -552,6 +552,7 @@ void *memsys3Realloc(void *pPrior, int nBytes){ ** Initialize this module. */ static int memsys3Init(void *NotUsed){ + UNUSED_PARAMETER(NotUsed); if( !sqlite3GlobalConfig.pHeap ){ return SQLITE_ERROR; } @@ -576,6 +577,7 @@ static int memsys3Init(void *NotUsed){ ** Deinitialize this module. */ static void memsys3Shutdown(void *NotUsed){ + UNUSED_PARAMETER(NotUsed); return; } @@ -588,7 +590,7 @@ static void memsys3Shutdown(void *NotUsed){ void sqlite3Memsys3Dump(const char *zFilename){ #ifdef SQLITE_DEBUG FILE *out; - int i, j; + u32 i, j; u32 size; if( zFilename==0 || zFilename[0]==0 ){ out = stdout; diff --git a/src/mem5.c b/src/mem5.c index b470a5eb34..eb95dc1775 100644 --- a/src/mem5.c +++ b/src/mem5.c @@ -23,7 +23,7 @@ ** This version of the memory allocation subsystem is included ** in the build only if SQLITE_ENABLE_MEMSYS5 is defined. ** -** $Id: mem5.c,v 1.17 2008/11/17 19:18:55 danielk1977 Exp $ +** $Id: mem5.c,v 1.18 2008/11/19 14:35:47 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -379,6 +379,8 @@ static int memsys5Init(void *NotUsed){ int nMinLog; /* Log of minimum allocation size in bytes*/ int iOffset; + UNUSED_PARAMETER(NotUsed); + if( !zByte ){ return SQLITE_ERROR; } @@ -415,6 +417,7 @@ static int memsys5Init(void *NotUsed){ ** Deinitialize this module. */ static void memsys5Shutdown(void *NotUsed){ + UNUSED_PARAMETER(NotUsed); return; } diff --git a/src/os_unix.c b/src/os_unix.c index e28cda5d63..867ec96b35 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -12,7 +12,7 @@ ** ** This file contains code that is specific to Unix systems. ** -** $Id: os_unix.c,v 1.214 2008/11/19 13:52:30 danielk1977 Exp $ +** $Id: os_unix.c,v 1.215 2008/11/19 14:35:47 danielk1977 Exp $ */ #include "sqliteInt.h" #if SQLITE_OS_UNIX /* This file is used on unix only */ @@ -2758,6 +2758,13 @@ static int fillInUnixFile( assert( pNew->pLock==NULL ); assert( pNew->pOpen==NULL ); + /* Parameter isDelete is only used on vxworks. Parameter pVfs is only + ** used if ENABLE_LOCKING_STYLE is defined. Express this explicitly + ** here to prevent compiler warnings about unused parameters. + */ + if( IS_VXWORKS ) UNUSED_PARAMETER(isDelete); + if( SQLITE_ENABLE_LOCKING_STYLE ) UNUSED_PARAMETER(pVfs); + OSTRACE3("OPEN %-3d %s\n", h, zFilename); pNew->h = h; pNew->dirfd = dirfd; @@ -2881,9 +2888,7 @@ static int fillInUnixFile( } #endif -#if !IS_VXWORKS case LOCKING_STYLE_FLOCK: -#endif case LOCKING_STYLE_NONE: break; #endif -- 2.47.2