Re: Cleanup of -Wunused-const-variable in drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux