kbuild: disable clangs duplicate decl specifier warning
authorStefan Agner <stefan@agner.ch>
Sun, 6 Aug 2017 18:43:01 +0000 (11:43 -0700)
committerStefan Agner <stefan@agner.ch>
Mon, 7 Aug 2017 06:21:11 +0000 (23:21 -0700)
Disable the duplicate-decl-specifier warning. The warning is
triggered by every include of include/asm-generic/termios.h.

There is no easy way to get rid of this duplicate specifier:
One const specifier is generated by the typeof() call. The
type passed to the get_user macro is defined as const. But the
__get_user_check defines the type as const too. Since get_user
as well as the passed type is used in other contexts too, we
can not get rid of either const specifier easily...

Signed-off-by: Stefan Agner <stefan@agner.ch>
Makefile

index 125d4dcf0d2189205a5d3ce67a031116cf4caf1c..daf1ba8215d4d007e91ae82cb16e63ee8f1be012 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -713,6 +713,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable)
 KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
 KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
 KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
+KBUILD_CFLAGS += $(call cc-disable-warning, duplicate-decl-specifier)
 # Quiet clang warning: comparison of unsigned expression < 0 is always false
 KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
 # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the