Skip to content

Commit 6bb5a5b

Browse files
committed
fix: clang analyzer unknown pragma warning
1 parent b527203 commit 6bb5a5b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mqtt_client.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,8 +945,12 @@ esp_err_t esp_mqtt_client_set_uri(esp_mqtt_client_handle_t client, const char *u
945945
MQTT_API_LOCK(client);
946946
// set uri overrides actual scheme, host, path if configured previously
947947
// False-positive leak detection. TODO: GCC-366
948-
#pragma GCC diagnostic push
948+
#pragma GCC diagnostic push // TODO: IDF-10105
949+
#if __clang__
950+
#pragma clang diagnostic ignored "-Wunknown-warning-option"
951+
#else
949952
#pragma GCC diagnostic ignored "-Wpragmas"
953+
#endif
950954
#pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak"
951955
free(client->config->scheme);
952956
free(client->config->host);

0 commit comments

Comments
 (0)