[Intel-gfx] [PATCH] drm/i915: Replace "cc-option -Wno-foo" with "cc-disable-warning foo"

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Tue Oct 31 13:22:46 UTC 2017


On Mon, 2017-10-30 at 17:29 +0000, Chris Wilson wrote:
> To quote kbuild/makefiles.txt:
> 
>     cc-disable-warning checks if gcc supports a given warning and returns
>     the commandline switch to disable it. This special function is needed,
>     because gcc 4.4 and later accept any unknown -Wno-* option and only
>     warn about it if there is another warning in the source file.
> 
> This is exactly what we were trying to achieve with cc-option -Wno-foo and
> failed miserably.
> 
> Reported-by: kbuild-all at 01.org
> Fixes: 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set warnings to full")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Jani Nikula <jani.nikula at intel.com>

Poor person who greps for "-Wno-", should we add comment
"# -Wno-whatever" at the end of each line?

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list