From d5b019fdc2ef4dfd2b7f247ca2c66b2e0bf03d30 Mon Sep 17 00:00:00 2001
From: Hauke Petersen <hauke.petersen@fu-berlin.de>
Date: Thu, 18 Oct 2018 14:36:35 +0200
Subject: [PATCH] pkg/nimble: disable selected compiler warnings

---
 pkg/nimble/Makefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/pkg/nimble/Makefile b/pkg/nimble/Makefile
index f53cc36c43..27899da60c 100644
--- a/pkg/nimble/Makefile
+++ b/pkg/nimble/Makefile
@@ -6,14 +6,17 @@ PKG_LICENSE = Apache-2.0
 TDIR = $(RIOTPKG)/$(PKG_NAME)
 PDIR = $(PKG_BUILDDIR)
 
-# As of now, NimBLE does not build without warnings for -Wextra, so we disable
-# that flag for this package. Will hopefully be fixed some time in the future.
+# NimBLE is not optimized for building with all (extra) warnings enabled. So for
+# now, we disable a number of selected compiler warnings when building NimBLE.
 CFLAGS += -Wno-extra
+ifeq (llvm,$(TOOLCHAIN))
 # the static function `ble_ll_adv_active_chanset_is_sec()` in
 # `nimble/controller/src/ble_ll_adv.c` isn't used in our compilation path, so
 # tell LLVM/clang not to be so pedantic with this.
-ifeq (llvm,$(TOOLCHAIN))
   CFLAGS += -Wno-unused-function
+  CFLAGS += -Wno-sometimes-uninitialized
+else
+  CFLAGS += -Wno-unused-but-set-variable
 endif
 
 .PHONY: all
-- 
GitLab