There's a Macro that checks if gcc supports a warning before
disabling it. Use it, in order to avoid warnings when building
with older gcc versions.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
# HACK! While this driver is in bad shape, don't enable several warnings
# that would be otherwise enabled with W=1
# HACK! While this driver is in bad shape, don't enable several warnings
# that would be otherwise enabled with W=1
-ccflags-y += -Wno-unused-but-set-variable -Wno-missing-prototypes \
- -Wno-unused-const-variable -Wno-missing-declarations
+ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
+ccflags-y += $(call cc-disable-warning, unused-const-variable)
+ccflags-y += $(call cc-disable-warning, missing-prototypes)
+ccflags-y += $(call cc-disable-warning, missing-declarations)
# HACK! While this driver is in bad shape, don't enable several warnings
# that would be otherwise enabled with W=1
# HACK! While this driver is in bad shape, don't enable several warnings
# that would be otherwise enabled with W=1
-ccflags-y += -Wno-unused-but-set-variable -Wno-missing-prototypes \
- -Wno-unused-const-variable -Wno-missing-declarations
+ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
+ccflags-y += $(call cc-disable-warning, unused-const-variable)
+ccflags-y += $(call cc-disable-warning, missing-prototypes)
+ccflags-y += $(call cc-disable-warning, missing-declarations)
# HACK! While this driver is in bad shape, don't enable several warnings
# that would be otherwise enabled with W=1
# HACK! While this driver is in bad shape, don't enable several warnings
# that would be otherwise enabled with W=1
-ccflags-y += -Wno-unused-but-set-variable -Wno-missing-prototypes \
- -Wno-unused-const-variable -Wno-missing-declarations
+ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
+ccflags-y += $(call cc-disable-warning, unused-const-variable)
+ccflags-y += $(call cc-disable-warning, missing-prototypes)
+ccflags-y += $(call cc-disable-warning, missing-declarations)