From 8016448fb15c374c649479c816ec16beefcff1cf Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 28 Mar 2019 16:28:25 +0800 Subject: [PATCH] coap: silence format truncation warning (appears with GCC 8) --- components/coap/CMakeLists.txt | 2 ++ components/coap/component.mk | 2 ++ 2 files changed, 4 insertions(+) diff --git a/components/coap/CMakeLists.txt b/components/coap/CMakeLists.txt index 5c3fcd783..45788001c 100644 --- a/components/coap/CMakeLists.txt +++ b/components/coap/CMakeLists.txt @@ -29,3 +29,5 @@ register_component() # TODO: find a way to move this to a port header target_compile_definitions(${COMPONENT_TARGET} PUBLIC WITH_POSIX) +# Silence format truncation warning, until it is fixed upstream +set_source_files_properties(libcoap/src/coap_debug.c PROPERTIES COMPILE_FLAGS -Wno-format-truncation) diff --git a/components/coap/component.mk b/components/coap/component.mk index b5a50afeb..2eb07afd2 100644 --- a/components/coap/component.mk +++ b/components/coap/component.mk @@ -10,3 +10,5 @@ COMPONENT_SRCDIRS := libcoap/src libcoap port COMPONENT_SUBMODULES += libcoap +# Silence format truncation warning, until it is fixed upstream +libcoap/src/coap_debug.o: CFLAGS += -Wno-format-truncation