From ac5bbced8f0e51d32e7647b47244ba472a1a982d Mon Sep 17 00:00:00 2001 From: ehouse Date: Sat, 11 Oct 2008 17:58:43 +0000 Subject: [PATCH] mark debug-only formals and wrap in #defines to fix compile-time warnings of clean wince build. --- xwords4/common/server.c | 2 +- xwords4/wince/cedict.c | 8 +++++--- xwords4/wince/cesvdgms.c | 7 +++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/xwords4/common/server.c b/xwords4/common/server.c index 2e68b6f6c..63cd58d43 100644 --- a/xwords4/common/server.c +++ b/xwords4/common/server.c @@ -138,7 +138,7 @@ static void tellMoveWasLegal( ServerCtxt* server ); #define PICK_NEXT -1 -#ifdef DEBUG +#if defined DEBUG && ! defined XWFEATURE_STANDALONE_ONLY static char* getStateStr( XW_State st ) { diff --git a/xwords4/wince/cedict.c b/xwords4/wince/cedict.c index a3493a20e..41620a189 100755 --- a/xwords4/wince/cedict.c +++ b/xwords4/wince/cedict.c @@ -375,7 +375,8 @@ ceMakeBitmap( CEDictionaryCtxt* XP_UNUSED_DBG(ctxt), XP_U8** ptrp ) } /* ceMakeBitmap */ static void -ceDeleteBitmap( const CEDictionaryCtxt* ctxt, XP_Bitmap* bitmap ) +ceDeleteBitmap( const CEDictionaryCtxt* XP_UNUSED_DBG(ctxt), + XP_Bitmap* bitmap ) { if ( !!bitmap ) { CEBitmapInfo* bmi = (CEBitmapInfo*)bitmap; @@ -715,7 +716,7 @@ matchShortName( const wchar_t* wPath, XP_U16 XP_UNUSED(index), void* ctxt ) * look. */ static XP_Bool -findAlternateDict( CEAppGlobals* globals, wchar_t* path ) +findAlternateDict( CEAppGlobals* XP_UNUSED_DBG(globals), wchar_t* path ) { wchar_t shortPath[CE_MAX_PATH_LEN+1]; FindOneData data; @@ -724,7 +725,8 @@ findAlternateDict( CEAppGlobals* globals, wchar_t* path ) data.sought = wbname( shortPath, sizeof(shortPath), path ); data.result = path; - (void)ceLocateNDicts( MPPARM(globals->mpool) CE_MAXDICTS, matchShortName, &data ); + (void)ceLocateNDicts( MPPARM(globals->mpool) CE_MAXDICTS, matchShortName, + &data ); return data.found; } /* findAlternateDict */ diff --git a/xwords4/wince/cesvdgms.c b/xwords4/wince/cesvdgms.c index acb2b4126..012ffe4a8 100644 --- a/xwords4/wince/cesvdgms.c +++ b/xwords4/wince/cesvdgms.c @@ -52,11 +52,14 @@ ceFileExists( const wchar_t* name ) } static void -makeUniqueName( wchar_t* buf, XP_U16 bufLen ) +makeUniqueName( wchar_t* buf, XP_U16 XP_UNUSED_DBG(bufLen) ) { XP_U16 ii; for ( ii = 1; ii < 100; ++ii ) { - int len = swprintf( buf, L"Untitled%d", ii ); +#ifdef DEBUG + int len = +#endif + swprintf( buf, L"Untitled%d", ii ); XP_ASSERT( len < bufLen ); if ( !ceFileExists( buf ) ) { break;