From: Matthias Kaehlcke Date: Fri, 21 Apr 2017 21:04:28 +0000 (-0700) Subject: CHROMIUM: kbuild: clang: Disable the 'duplicate-decl-specifier' warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4cd9453d6ac3febdc73907582e7fdd6d5349d0e3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git CHROMIUM: kbuild: clang: Disable the 'duplicate-decl-specifier' warning clang generates plenty of these warnings in different parts of the code. They are mostly caused by container_of() and other macros which declare a "const *" variable for their internal use which triggers a "duplicate 'const' specifier" warning if the is already const qualified. Change-Id: I3ad9d33e31b7b40f926554eed2afeea1ebb7e961 Wording-mostly-from: Michael Davidson Signed-off-by: Matthias Kaehlcke --- diff --git a/Makefile b/Makefile index ccd981892ef2..0d42e9d16812 100644 --- a/Makefile +++ b/Makefile @@ -711,6 +711,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