From a0f5e2d5d4662b812e721cc7eebfde259fe5a794 Mon Sep 17 00:00:00 2001 From: Eric House <eehouse@eehouse.org> Date: Thu, 23 Feb 2023 10:55:05 -0800 Subject: [PATCH] remove dead code --- xwords4/common/comms.c | 1 - xwords4/common/knownplyr.c | 3 ++- xwords4/wasm/Makefile | 2 +- xwords4/wasm/main.c | 11 ++--------- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/xwords4/common/comms.c b/xwords4/common/comms.c index 4754dd25b..b5ca6520a 100644 --- a/xwords4/common/comms.c +++ b/xwords4/common/comms.c @@ -3226,7 +3226,6 @@ void comms_gatherPlayers( CommsCtxt* comms, XWEnv xwe, XP_U32 created ) { THREAD_CHECK_START(comms); - LOG_FUNC(); if ( 0 == (comms->flags & FLAG_HARVEST_DONE) ) { CommsAddrRec addrs[4] = {{0}}; XP_U16 nRecs = VSIZE(addrs); diff --git a/xwords4/common/knownplyr.c b/xwords4/common/knownplyr.c index d7184bdfc..036f3a123 100644 --- a/xwords4/common/knownplyr.c +++ b/xwords4/common/knownplyr.c @@ -215,7 +215,7 @@ XP_Bool kplr_addAddrs( XW_DUtilCtxt* dutil, XWEnv xwe, const CurGameInfo* gi, CommsAddrRec addrs[], XP_U16 nAddrs, XP_U32 modTime ) { - LOG_FUNC(); + XP_LOGFF( "(nAddrs=%d)", nAddrs ); XP_Bool canUse = XP_TRUE; for ( int ii = 0; ii < nAddrs && canUse; ++ii ) { canUse = addr_hasType( &addrs[ii], COMMS_CONN_MQTT ); @@ -237,6 +237,7 @@ kplr_addAddrs( XW_DUtilCtxt* dutil, XWEnv xwe, const CurGameInfo* gi, releaseState( dutil, xwe, state ); } + LOG_RETURNF( "%s", boolToStr(canUse) ); return canUse; } diff --git a/xwords4/wasm/Makefile b/xwords4/wasm/Makefile index 8893a0dc9..c2a3b87e7 100644 --- a/xwords4/wasm/Makefile +++ b/xwords4/wasm/Makefile @@ -86,7 +86,7 @@ main.html: ${INPUTS} Makefile shell_minimal.html --preload-file assets_dir --shell-file shell_minimal.html \ -s USE_SDL_TTF=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='["png"]' -lidbfs.js \ -s "EXPORTED_RUNTIME_METHODS=['ccall']" \ - -s EXPORTED_FUNCTIONS='["_main", "_mainPostSync", "_cbckBinary", "_cbckMsg", "_cbckVoid", "_cbckString", "_MQTTConnectedChanged", "_onNewGame", "_gotDictBinary", "_onResize"]' \ + -s EXPORTED_FUNCTIONS='["_main", "_mainPostSync", "_cbckMsg", "_cbckVoid", "_cbckString", "_MQTTConnectedChanged", "_onNewGame", "_gotDictBinary", "_onResize"]' \ -s WASM=1 \ ${INPUTS} -o $@ diff --git a/xwords4/wasm/main.c b/xwords4/wasm/main.c index 3c3c0702f..b7bcd6098 100644 --- a/xwords4/wasm/main.c +++ b/xwords4/wasm/main.c @@ -2042,7 +2042,7 @@ static bool inviteFromArgv( Globals* globals, NetLaunchInfo* nlip, int argc, const char** argv ) { - LOG_FUNC(); + XP_LOGFF( "(argc=%d)", argc ); CurGameInfo gi = {0}; CommsAddrRec addr = {0}; MQTTDevID mqttDevID = 0; @@ -2104,7 +2104,7 @@ inviteFromArgv( Globals* globals, NetLaunchInfo* nlip, LOGNLI( nlip ); } gi_disposePlayerInfo( MPPARM(globals->mpool) &gi ); - LOG_RETURNF( "%d", success ); + LOG_RETURNF( "%s", boolToStr(success) ); return success; } @@ -2120,12 +2120,6 @@ MQTTConnectedChanged( void* closure, bool connected ) } } -void -cbckBinary( BinProc proc, void* closure, int len, const uint8_t* msg ) -{ - (*proc)( closure, msg, len ); -} - void cbckMsg( MsgProc proc, void* closure, const char* topic, int len, const uint8_t* msg ) @@ -2237,7 +2231,6 @@ storeOrAlert( Globals* globals, GotDictData* gdd ) static void onGotInviteDictAtLaunch( void* closure, GotDictData* gdd ) { - // XP_LOGFF("(gdd: %p)", gdd ); LaunchState* ls = (LaunchState*)closure; Globals* globals = ls->globals;