[Mesa-dev] [PATCH] intel/compiler: fix return statement warning in brw_regs_negative_equal()

Emil Velikov emil.l.velikov at gmail.com
Thu Mar 29 09:49:52 UTC 2018


Hi Brian,

On 29 March 2018 at 02:48, Brian Paul <brianp at vmware.com> wrote:
> Silence a gcc warning about missing return value in non-void function.
> For some reason, gcc 5.4.0 (at least) can't deduce that all else/if
> cases return a value.

A small brain dump:

Guessing that's because of the unreachable() cases at the end of the
if (a->file == IMM) branch.
Ideally we'll update the macro to make things more obvious for the
compiler. Otherwise we'll have to update dozens of similar instances
through the code base.

-Emil


More information about the mesa-dev mailing list