From 6a693b4b2dda2ee862a9e3c7ceb121ad22e1eb6e Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 3 Aug 2018 17:56:22 +0200 Subject: [PATCH 1/3] pkg: libcoap: ignore -Wformat-nonliteral --- pkg/libcoap/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/libcoap/Makefile b/pkg/libcoap/Makefile index 1887f76b5e..e6cca7fcc5 100644 --- a/pkg/libcoap/Makefile +++ b/pkg/libcoap/Makefile @@ -12,3 +12,7 @@ all: git-download "$(MAKE)" -C $(PKG_BUILDDIR) include $(RIOTBASE)/pkg/pkg.mk + +ifeq (llvm,$(TOOLCHAIN)) + CFLAGS += -Wno-format-nonliteral +endif From 0a5acd91cf129d3369ccc8a91e82fcf158cfc9ea Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 3 Aug 2018 17:56:34 +0200 Subject: [PATCH 2/3] pkg: tinydtls: ignore -Wformat-nonliteral --- pkg/tinydtls/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/tinydtls/Makefile b/pkg/tinydtls/Makefile index 8d5285c619..dcf411273b 100644 --- a/pkg/tinydtls/Makefile +++ b/pkg/tinydtls/Makefile @@ -17,3 +17,7 @@ all: git-download "$(MAKE)" -C $(PKG_BUILDDIR) include $(RIOTBASE)/pkg/pkg.mk + +ifeq (llvm,$(TOOLCHAIN)) + CFLAGS += -Wno-format-nonliteral +endif From d6cdf4d06f2aeed05dcf86a5437254e2403e147b Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 3 Aug 2018 17:57:21 +0200 Subject: [PATCH 3/3] pkg: openthread: mark otPlatLog() as printf style function --- pkg/openthread/contrib/platform_logging.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/openthread/contrib/platform_logging.c b/pkg/openthread/contrib/platform_logging.c index a3aed1db7d..a7deade082 100644 --- a/pkg/openthread/contrib/platform_logging.c +++ b/pkg/openthread/contrib/platform_logging.c @@ -28,6 +28,7 @@ /* adapted from OpenThread posix example: * See: https://github.com/openthread/openthread/blob/master/examples/platforms/posix/logging.c */ +__attribute__((__format__ (__printf__, 3, 4))) void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...) { va_list args;