From 131826d34fc6aa1b3db07faf68a339af440b3929 Mon Sep 17 00:00:00 2001 From: Eric House Date: Thu, 6 Apr 2023 20:02:30 -0700 Subject: [PATCH] fix release build --- xwords4/android/jni/xportwrapper.c | 5 ++++- xwords4/common/comms.c | 1 + xwords4/linux/mqttcon.c | 7 +++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/xwords4/android/jni/xportwrapper.c b/xwords4/android/jni/xportwrapper.c index 13e1ca3ff..7d733f566 100644 --- a/xwords4/android/jni/xportwrapper.c +++ b/xwords4/android/jni/xportwrapper.c @@ -55,7 +55,10 @@ passTAPToAndroid( AndTransportProcs* aprocs, JNIEnv* env, jobject jtap ) { const char* sig = "(L" PKG_PATH("jni/XwJNI$TopicsAndPackets") ";)I"; jmethodID mid = getMethodID( env, aprocs->jxport, "transportSendMQTT", sig ); - XP_S16 tmp = (*env)->CallIntMethod( env, aprocs->jxport, mid, jtap ); +#ifdef DEBUG + XP_S16 tmp = +#endif + (*env)->CallIntMethod( env, aprocs->jxport, mid, jtap ); XP_LOGFF( "%s() => %d", sig, tmp ); deleteLocalRef( env, jtap ); LOG_RETURN_VOID(); diff --git a/xwords4/common/comms.c b/xwords4/common/comms.c index 8fc625a29..244545a9d 100644 --- a/xwords4/common/comms.c +++ b/xwords4/common/comms.c @@ -335,6 +335,7 @@ static void logAddrComms( const CommsCtxt* comms, const CommsAddrRec* addr, # define printQueue( comms ) # define logAddr( comms, addr, caller) # define listRecs( comms, caller ) +# define logAddrComms(comms, addr, caller) #endif /* def DEBUG */ #if defined RELAY_HEARTBEAT || defined COMMS_HEARTBEAT diff --git a/xwords4/linux/mqttcon.c b/xwords4/linux/mqttcon.c index 38cd7ce37..f9aae94e0 100644 --- a/xwords4/linux/mqttcon.c +++ b/xwords4/linux/mqttcon.c @@ -52,8 +52,11 @@ sendQueueHead( MQTTConStorage* storage ) for ( GSList* iter = storage->queue; !!iter; iter = iter->next ) { QElem* elem = (QElem*)iter->data; if ( 0 == elem->mid ) { - int err = mosquitto_publish( storage->mosq, &elem->mid, elem->topic, - elem->len, elem->buf, DEFAULT_QOS, true ); +#ifdef DEBUG + int err = +#endif + mosquitto_publish( storage->mosq, &elem->mid, elem->topic, + elem->len, elem->buf, DEFAULT_QOS, true ); XP_LOGFF( "mosquitto_publish(topic=%s, len=%d) => %s; mid=%d", elem->topic, elem->len, mosquitto_strerror(err), elem->mid ); break;