Skip to content

Commit

Permalink
fix build warning when LOG_LEVEL < LOG_INFO_LEVEL
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ajaybhargav committed Feb 1, 2024
1 parent 956e0c8 commit 143c1d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mqttclient/mqttclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 143c1d0

Please sign in to comment.