diff options
author | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
---|---|---|
committer | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/poky/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'external/poky/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch')
-rw-r--r-- | external/poky/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/external/poky/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch b/external/poky/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch new file mode 100644 index 00000000..ce15170c --- /dev/null +++ b/external/poky/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch @@ -0,0 +1,37 @@ +From aa09af0fe2ec0737fa04ffd00957532684e257b9 Mon Sep 17 00:00:00 2001 +From: Xiao Ni <xni@redhat.com> +Date: Fri, 17 Mar 2017 19:55:42 +0800 +Subject: [PATCH 1/5] mdadm: Add Wimplicit-fallthrough=0 in Makefile + +There are many errors like 'error: this statement may fall through'. +But the logic is right. So add the flag Wimplicit-fallthrough=0 +to disable the error messages. The method I use is from +https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html +#index-Wimplicit-fallthrough-375 + +Signed-off-by: Xiao Ni <xni@redhat.com> +Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com> +--- +Upstream-Status: Backport + Makefile | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Makefile b/Makefile +index 0f307ec..e1a7058 100644 +--- a/Makefile ++++ b/Makefile +@@ -48,6 +48,11 @@ ifdef WARN_UNUSED + CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 + endif + ++FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) ++ifneq "$(FALLTHROUGH)" "0" ++CWFLAGS += -Wimplicit-fallthrough=0 ++endif ++ + ifdef DEBIAN + CPPFLAGS += -DDEBIAN + endif +-- +2.12.2 + |