[Mesa-dev] [PATCH 00/23] Silence some warnings that show up when compiling gallium/aux/util
Nicolai Hähnle
nicolai.haehnle at amd.com
Tue Nov 14 13:53:38 UTC 2017
On 14.11.2017 12:55, Emil Velikov wrote:
> On 12 November 2017 at 13:55, Gert Wollny <gw.fossdev at gmail.com> wrote:
>> Hello all,
>>
>> this might be a bit over-zealos, but I usually prefer to compile with
>> -Wall -Wextra, and with mesa this gives many warnings. This series
>> silences most of the warnings that are issued when compiling the
>> C files in gallium/aux/util.
>>
> I wish more projects were using Wall and Wextra :-)
>
> A couple of fly-by suggestions:
> - you are adding the notation at the end - the more common format
> used in Mesa is
> UNUSED [static] [const] $type $variable
>
> - I'm a little confused on the distinction between UNUSED and MAYBE_UNUSED
> Looking at some patches - you're using both in seemingly the same
> scenario. Might be worth using the same one or mentioning why.
Presumably MAYBE_UNUSED is for cases where the variable is only used in
some build configurations, e.g. for debug code.
Cheers,
Nicolai
>
> - some patches have funny looking double-space before UNUSED
>
>
> HTH
> Emil
>
More information about the mesa-dev
mailing list