fix linux side to compile without DEBUG on

This commit is contained in:
Eric House 2020-02-01 10:50:27 -08:00
parent 03faeecd0b
commit dd0ad8f479
6 changed files with 21 additions and 15 deletions

View file

@ -525,7 +525,7 @@ stack_redo( StackCtxt* stack, StackEntry* entry )
} /* stack_redo */
void
stack_freeEntry( StackCtxt* stack, StackEntry* entry )
stack_freeEntry( StackCtxt* XP_UNUSED_DBG(stack), StackEntry* entry )
{
XP_ASSERT( entry->moveType != __BOGUS );
switch( entry->moveType ) {

View file

@ -1009,7 +1009,7 @@ updateOthersTiles( ServerCtxt* server )
}
static XP_Bool
checkDupTimerProc( void* closure, XWTimerReason XP_why )
checkDupTimerProc( void* closure, XWTimerReason XP_UNUSED_DBG(XP_why) )
{
XP_ASSERT( XP_why == TIMER_DUP_TIMERCHECK );
ServerCtxt* server = (ServerCtxt*)closure;

View file

@ -866,8 +866,8 @@ curses_util_informMove( XW_UtilCtxt* uc, XP_S16 XP_UNUSED(turn),
static void
curses_util_notifyDupStatus( XW_UtilCtxt* XP_UNUSED(uc),
XP_Bool amHost,
const XP_UCHAR* msg )
XP_Bool XP_UNUSED_DBG(amHost),
const XP_UCHAR* XP_UNUSED_DBG(msg) )
{
XP_LOGF( "%s(amHost=%d, msg=%s)", __func__, amHost, msg );
}
@ -1043,8 +1043,9 @@ curses_util_remSelected( XW_UtilCtxt* uc )
}
static void
curses_util_timerSelected( XW_UtilCtxt* XP_UNUSED(uc), XP_Bool inDuplicateMode,
XP_Bool canPause )
curses_util_timerSelected( XW_UtilCtxt* XP_UNUSED(uc),
XP_Bool XP_UNUSED_DBG(inDuplicateMode),
XP_Bool XP_UNUSED_DBG(canPause) )
{
XP_LOGF( "%s(inDuplicateMode=%d, canPause=%d)", __func__, inDuplicateMode,
canPause );

View file

@ -58,17 +58,21 @@ static XP_UCHAR* linux_dutil_md5sum( XW_DUtilCtxt* duc, const XP_U8* ptr,
#endif
static void
linux_dutil_notifyPause( XW_DUtilCtxt* XP_UNUSED(duc), XP_U32 gameID,
DupPauseType pauseTyp, XP_U16 pauser,
const XP_UCHAR* name, const XP_UCHAR* msg )
linux_dutil_notifyPause( XW_DUtilCtxt* XP_UNUSED(duc), XP_U32 XP_UNUSED_DBG(gameID),
DupPauseType XP_UNUSED_DBG(pauseTyp),
XP_U16 XP_UNUSED_DBG(pauser),
const XP_UCHAR* XP_UNUSED_DBG(name),
const XP_UCHAR* XP_UNUSED_DBG(msg) )
{
XP_LOGF( "%s(id=%d, turn=%d, name=%s, typ=%d, %s)", __func__, gameID, pauser,
name, pauseTyp, msg );
}
static void
linux_dutil_onDupTimerChanged( XW_DUtilCtxt* XP_UNUSED(duc), XP_U32 gameID,
XP_U32 oldVal, XP_U32 newVal )
linux_dutil_onDupTimerChanged( XW_DUtilCtxt* XP_UNUSED(duc),
XP_U32 XP_UNUSED_DBG(gameID),
XP_U32 XP_UNUSED_DBG(oldVal),
XP_U32 XP_UNUSED_DBG(newVal) )
{
XP_LOGF( "%s(id=%d, oldVal=%d, newVal=%d)", __func__, gameID, oldVal, newVal );
}

View file

@ -140,7 +140,7 @@ tryConnectToServer( CommonGlobals* cGlobals )
}
void
ensureLocalPlayerNames( LaunchParams* params, CurGameInfo* gi )
ensureLocalPlayerNames( LaunchParams* XP_UNUSED_DBG(params), CurGameInfo* gi )
{
for ( int ii = 0; ii < gi->nPlayers; ++ii ) {
LocalPlayer* lp = &gi->players[ii];

View file

@ -73,15 +73,16 @@ typedef unsigned long XP_Time;
#ifdef DEBUG
extern void linux_debugf(const char*, ...)
__attribute__ ((format (printf, 1, 2)));
#define XP_DEBUGF(...) linux_debugf(__VA_ARGS__)
# define XP_DEBUGF(...) linux_debugf(__VA_ARGS__)
extern void linux_debugff(const char* func, const char* file, const char* fmt, ...)
__attribute__ ((format (printf, 3, 4)));
#define XP_LOGFF( FMT, ... ) \
# define XP_LOGFF( FMT, ... ) \
linux_debugff( __func__, __FILE__, FMT, __VA_ARGS__ )
#else
#define XP_DEBUGF(ch,...)
# define XP_DEBUGF(ch,...)
# define XP_LOGFF(fmt,...)
#endif
#define XP_WARNF XP_DEBUGF