[Mesa-dev] [PATCH] Android: disable warnings causing errors

Emil Velikov emil.l.velikov at gmail.com
Thu Nov 30 14:20:08 UTC 2017


On 29 November 2017 at 18:12, Rob Herring <robh at kernel.org> wrote:
> On Wed, Nov 29, 2017 at 11:01 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> On 27 November 2017 at 19:36, Rob Herring <robh at kernel.org> wrote:
>>> AOSP master has changed the build default to -Werror making all the
>>> warnings errors. Override that with -Wno-error.
>>>
>> For both Mesa and libdrm patches
>>
>> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
>>
>> Mildly related:
>> Quick grep|sort|unique through your build log shows the following.
>> Some quick ideas, I haven't looked which one comes from where.
>
> I have...
>
>>
>>       4 -Wdeprecated-declarations]
>>      60 -Wdeprecated-register]
>
> These are generated from bison, yacc or something. I'm not sure how to
> fix. That's where I ran the other way.
>
Seems like the toolchain used is pretty ancient.

Flex:
commit 8091dc907663673d9e0295c57fa446bdd38e9fab
Author: Yuri <yuri at tsoft.com>
Date:   Thu Jul 17 14:07:30 2014 -0700

   Removed deprecated 'register' storage class specifier.


Bison:
commit cb530ce9e2687c6b1e51b77a29a9062ad52166b4
Author: Paul Eggert <eggert at cs.ucla.edu>
Date:   Fri Jan 21 19:12:32 2005 +0000

   (YYCOPY, yystpcpy, yyparse): Remove "register".


>>       6 -Wenum-conversion]
>>       3 -Wformat]
>> Should be trivial.
>>
>>      14 -Wmissing-braces]
>> I'm fairly convinced this comes from the universal initializer {0}
>> Just silence it?
>>
>>      44 -Wdelete-non-virtual-dtor]
>
> I posted a patch a while back trying to fix this, but it actually
> broke things at runtime.
>
I think Jonathan and Marc (both CC'd) have patches for OpenBSD [1] and
VcXsrv [2], respectively.
Perhaps one could start a separate thread and bounce off ideas/patches?

[1] https://github.com/jonathangray/mesa/commit/c8f4c68261a0ddf9aaa5c9b9990d8b6e4e4d49a9
[2] quick diff against between local checkouts
https://paste.pound-python.org/show/O8UiZkQtiHMvR9SegVlV/


>>       4 -Wshift-negative-value]
>>      20 -Wsometimes-uninitialized]
>>       4 -Wuninitialized]
>> Potential bugs, or compiler snafu?
>>
>>      52 -Wasm-operand-widths]
>>       4 -Wconstant-logical-operand]
>>      16 -Wgnu-variable-sized-type-not-at-end]
>>       2 -Wmacro-redefined]
>>      56 -Woverloaded-virtual]
>
> Patch posted for these too.
>
>>      26 -Wtautological-constant-out-of-range-compare]
>>       1 -Wuser-defined-warnings]
>> Meh?
>>
>> Addressing the [clang] mismatched-tags and toggling the warning back
>> on shouldn't be too bad?
>
> How many are clang/Android specific? It would be hopeless to re-enable
> Werror if autotools/meson builds are not kept warning free. Maybe
> those builds need to be stricter.
>
Having Werror will backfire IMHO. Although adding a few more toggles
to the Linux builds won't be a bad idea.
I was wondering if we can throw Wextra in the mix, but that will
introduce way too many warnings.

Gert addresses a few of those already, and [IIRC] Eric was pondering
about the -Wunused* in src/egl.
Hope nobody will object to patches that cleanup/delete some code ;-)

-Emil


More information about the mesa-dev mailing list