Skip to content

Commit b441ab9

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 b441ab9

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
@@ -1463,6 +1463,8 @@ int mqtt_publish(mqtt_client_t* c, const char* topic_filter, mqtt_message_t* msg
14631463
int mqtt_list_subscribe_topic(mqtt_client_t* c)
14641464
{
14651465
int i = 0;
1466+
1467+
(void) i; /* prevent compiler warning */
14661468
mqtt_list_t *curr, *next;
14671469
message_handlers_t *msg_handler;
14681470

0 commit comments

Comments
 (0)