On 03/29/2018 03:49 AM, Emil Velikov wrote:
Hi Brian,
On 29 March 2018 at 02:48, Brian Paul <[email protected]> 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.
Yeah, that's what I thought too. But if I comment out the unreachable()
statement and put 'return false' in its place, I still get the warning.
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.
I don't think this particular issue is caused by unreachable().
-Brian
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev