From: Andre Noll Date: Wed, 3 Jan 2018 17:50:15 +0000 (+0100) Subject: build: Compile with -Wdiscarded-qualifiers. X-Git-Tag: v0.6.2~4^2~27 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=da13797a119f8ce621a67145ca1c7acb8d338a3c build: Compile with -Wdiscarded-qualifiers. This option is unsupported (but warnings are invariably enabled) for old gcc versions including 4.2.2. It is supported but not enabled by default for vanilla gcc-5.5.0, but is enabled for the gcc versions which ship with Ubuntu-14.04 (4.8.4) and Ubuntu-16.04 (5.4.0). This patch enables the warning everywhere. We have to employ the cc-option macro to determine whether the option is supported. --- diff --git a/Makefile.real b/Makefile.real index 76487677..dae48f0e 100644 --- a/Makefile.real +++ b/Makefile.real @@ -144,6 +144,7 @@ cc-option = $(shell \ ) STRICT_CFLAGS += $(call cc-option, -Wformat-signedness) +STRICT_CFLAGS += $(call cc-option, -Wdiscarded-qualifiers) # To put more focus on warnings, be less verbose as default # Use 'make V=1' to see the full commands