On Fri, Jun 14, 2019 at 2:43 AM Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> wrote: > No opinion on the said variables above, but, FWIW, personally I think > it's fine to add the cflags to supress warnings locally where needed in > order to be able to achieve the greater goal of removing the cflags > globally. I think there's on the order of ~10 of these: https://github.com/ClangBuiltLinux/linux/issues?q=is%3Aissue+is%3Aopen+label%3A-Wunused-const-variable Nathan's got a pretty good handle on just fixing them. > In drivers/gpu/drm/i915/Makefile we actually go for much stricter > warnings than the kernel defaults, and disable a more limited and > tailored set of warnings. I like this. > > You can do this both on a subdir and file level with subdir-ccflags-y > and CFLAGS_filename.o, respectively. That said, I have used this trick before, but I feel like the fewer people that know about this trick, the less it can be [ab]used. -- Thanks, ~Nick Desaulniers