From d6a5cd6e82d590daaeac5e83fc27c6a778e508e1 Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Tue, 18 Sep 2018 14:16:19 +0800 Subject: [PATCH] mqtt: silence a format warning --- components/mqtt/CMakeLists.txt | 8 ++++++++ components/mqtt/component.mk | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/components/mqtt/CMakeLists.txt b/components/mqtt/CMakeLists.txt index 27cf1e285..d100f80a0 100644 --- a/components/mqtt/CMakeLists.txt +++ b/components/mqtt/CMakeLists.txt @@ -9,3 +9,11 @@ set(COMPONENT_SRCS "esp-mqtt/mqtt_client.c" set(COMPONENT_REQUIRES lwip nghttp mbedtls tcp_transport) register_component() + +if(GCC_NOT_5_2_0) + # Temporary suppress "format-overflow" warning until we are fixed in esp-mqtt repo + set_source_files_properties( + esp-mqtt/lib/transport_ws.c + PROPERTIES COMPILE_FLAGS + -Wno-format-overflow) +endif() diff --git a/components/mqtt/component.mk b/components/mqtt/component.mk index 19e498025..7c7715954 100644 --- a/components/mqtt/component.mk +++ b/components/mqtt/component.mk @@ -2,3 +2,7 @@ COMPONENT_SUBMODULES += esp-mqtt COMPONENT_ADD_INCLUDEDIRS := esp-mqtt/include COMPONENT_SRCDIRS := esp-mqtt esp-mqtt/lib COMPONENT_PRIV_INCLUDEDIRS := esp-mqtt/lib/include + +ifeq ($(GCC_NOT_5_2_0), 1) +esp-mqtt/lib/transport_ws.o: CFLAGS += -Wno-format-overflow +endif