]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] atomisp: use correct dialect to disable warnings
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 8 Jun 2017 16:29:21 +0000 (13:29 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 8 Jun 2017 17:51:58 +0000 (14:51 -0300)
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>
drivers/staging/media/atomisp/i2c/Makefile
drivers/staging/media/atomisp/i2c/imx/Makefile
drivers/staging/media/atomisp/i2c/ov5693/Makefile

index a1afca6ec31fc7b791e447f74e970a32a9256e9a..be13fab921753f3ad4abeb67e1571b835654daca 100644 (file)
@@ -21,5 +21,7 @@ obj-$(CONFIG_VIDEO_LM3554) += lm3554.o
 
 # 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)
index 0eceb7374bec94a9d983bff53fe2a4f57f1104e6..b6578f09546ee32ec20f9c060434962396e0f64a 100644 (file)
@@ -7,5 +7,7 @@ obj-$(CONFIG_VIDEO_OV8858)     += ov8858_driver.o
 
 # 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)
index fd2ef2e3c31eefaf0df25c36b26de13f2e670691..4e3833aaec05fa5b3d9a0f83bb7ed4905b38584e 100644 (file)
@@ -2,5 +2,7 @@ obj-$(CONFIG_VIDEO_OV5693) += ov5693.o
 
 # 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)