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 */ } /* stack_redo */
void void
stack_freeEntry( StackCtxt* stack, StackEntry* entry ) stack_freeEntry( StackCtxt* XP_UNUSED_DBG(stack), StackEntry* entry )
{ {
XP_ASSERT( entry->moveType != __BOGUS ); XP_ASSERT( entry->moveType != __BOGUS );
switch( entry->moveType ) { switch( entry->moveType ) {

View file

@ -1009,7 +1009,7 @@ updateOthersTiles( ServerCtxt* server )
} }
static XP_Bool 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 ); XP_ASSERT( XP_why == TIMER_DUP_TIMERCHECK );
ServerCtxt* server = (ServerCtxt*)closure; ServerCtxt* server = (ServerCtxt*)closure;

View file

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

View file

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

View file

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

View file

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