From b77d529099083986c258a8b800f7c40acedfe127 Mon Sep 17 00:00:00 2001 From: Eric House Date: Thu, 21 Aug 2014 07:15:20 -0700 Subject: [PATCH] fix linux-side compile errors --- xwords4/common/board.c | 4 ++-- xwords4/common/dictnry.c | 12 ++++++++---- xwords4/common/dictnry.h | 6 +++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/xwords4/common/board.c b/xwords4/common/board.c index 83bc526d2..e8b737448 100644 --- a/xwords4/common/board.c +++ b/xwords4/common/board.c @@ -400,7 +400,7 @@ board_reset( BoardCtxt* board ) } /* board_reset */ #ifdef COMMON_LAYOUT -# ifdef DEBUG +# if 0 static void printDims( const BoardDims* dimsp ) { @@ -543,7 +543,7 @@ board_figureLayout( BoardCtxt* board, const CurGameInfo* gi, break; } - // printDims( &ldims ); + printDims( &ldims ); if ( !!dimsp ) { XP_MEMCPY( dimsp, &ldims, sizeof(ldims) ); diff --git a/xwords4/common/dictnry.c b/xwords4/common/dictnry.c index b3e884812..b434d0ad2 100644 --- a/xwords4/common/dictnry.c +++ b/xwords4/common/dictnry.c @@ -49,8 +49,10 @@ p_dict_ref( DictionaryCtxt* dict if ( !!dict ) { pthread_mutex_lock( &dict->mutex ); ++dict->refCount; - /* XP_LOGF( "%s(dict=%p): refCount now %d (from line %d of %s() in %s)", */ - /* __func__, dict, dict->refCount, line, func, file ); */ +#ifdef DEBUG_REF + XP_LOGF( "%s(dict=%p): refCount now %d (from line %d of %s() in %s)", + __func__, dict, dict->refCount, line, func, file ); +#endif pthread_mutex_unlock( &dict->mutex ); } return dict; @@ -67,8 +69,10 @@ p_dict_unref( DictionaryCtxt* dict pthread_mutex_lock( &dict->mutex ); --dict->refCount; XP_ASSERT( 0 <= dict->refCount ); - /* XP_LOGF( "%s(dict=%p): refCount now %d (from line %d of %s() in %s)", */ - /* __func__, dict, dict->refCount, line, func, file ); */ +#ifdef DEBUG_REF + XP_LOGF( "%s(dict=%p): refCount now %d (from line %d of %s() in %s)", + __func__, dict, dict->refCount, line, func, file ); +#endif pthread_mutex_unlock( &dict->mutex ); if ( 0 == dict->refCount ) { (*dict->destructor)( dict ); diff --git a/xwords4/common/dictnry.h b/xwords4/common/dictnry.h index 6195ae156..759ef358a 100644 --- a/xwords4/common/dictnry.h +++ b/xwords4/common/dictnry.h @@ -21,9 +21,9 @@ #ifndef __DICTNRY_H__ #define __DICTNRY_H__ -#ifdef DEBUG -# define DEBUG_REF 1 -#endif +/* #ifdef DEBUG */ +/* # define DEBUG_REF 1 */ +/* #endif */ #include