Skip to content

Commit 143c1d0

Browse files
committed
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 <[email protected]>
1 parent 956e0c8 commit 143c1d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mqttclient/mqttclient.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,9 @@ int mqtt_publish(mqtt_client_t* c, const char* topic_filter, mqtt_message_t* msg
14621462

14631463
int mqtt_list_subscribe_topic(mqtt_client_t* c)
14641464
{
1465+
#if MQTT_LOG_LEVEL >= MQTT_LOG_INFO_LEVEL
14651466
int i = 0;
1467+
#endif
14661468
mqtt_list_t *curr, *next;
14671469
message_handlers_t *msg_handler;
14681470

0 commit comments

Comments
 (0)