From 143c1d0e3ca1ef9c88547af4a7b602584d9dbf11 Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Date: Thu, 1 Feb 2024 20:07:39 +0530 Subject: [PATCH] fix build warning when LOG_LEVEL < LOG_INFO_LEVEL Compiler generate unused variable 'i' warning in mqtt_list_subscribe_topic when MQTT_LOG_LEVEL < MQTT_LOG_INFO_LEVEL. Signed-off-by: Ajay Bhargav --- mqttclient/mqttclient.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mqttclient/mqttclient.c b/mqttclient/mqttclient.c index fc9b465..a7e013f 100755 --- a/mqttclient/mqttclient.c +++ b/mqttclient/mqttclient.c @@ -1462,7 +1462,9 @@ int mqtt_publish(mqtt_client_t* c, const char* topic_filter, mqtt_message_t* msg int mqtt_list_subscribe_topic(mqtt_client_t* c) { +#if MQTT_LOG_LEVEL >= MQTT_LOG_INFO_LEVEL int i = 0; +#endif mqtt_list_t *curr, *next; message_handlers_t *msg_handler;