summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch')
-rw-r--r--meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch37
1 files changed, 0 insertions, 37 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch
deleted file mode 100644
index ce15170c75..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From aa09af0fe2ec0737fa04ffd00957532684e257b9 Mon Sep 17 00:00:00 2001
2From: Xiao Ni <xni@redhat.com>
3Date: Fri, 17 Mar 2017 19:55:42 +0800
4Subject: [PATCH 1/5] mdadm: Add Wimplicit-fallthrough=0 in Makefile
5
6There are many errors like 'error: this statement may fall through'.
7But the logic is right. So add the flag Wimplicit-fallthrough=0
8to disable the error messages. The method I use is from
9https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
10#index-Wimplicit-fallthrough-375
11
12Signed-off-by: Xiao Ni <xni@redhat.com>
13Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
14---
15Upstream-Status: Backport
16 Makefile | 5 +++++
17 1 file changed, 5 insertions(+)
18
19diff --git a/Makefile b/Makefile
20index 0f307ec..e1a7058 100644
21--- a/Makefile
22+++ b/Makefile
23@@ -48,6 +48,11 @@ ifdef WARN_UNUSED
24 CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
25 endif
26
27+FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l)
28+ifneq "$(FALLTHROUGH)" "0"
29+CWFLAGS += -Wimplicit-fallthrough=0
30+endif
31+
32 ifdef DEBIAN
33 CPPFLAGS += -DDEBIAN
34 endif
35--
362.12.2
37