[Mesa-dev] [PATCH] intel/compiler: fix return statement warning in brw_regs_negative_equal()
Ian Romanick
idr at freedesktop.org
Thu Mar 29 18:23:01 UTC 2018
I have a theory about this warning... I'll either have a patch or an R-b
today.
On 03/28/2018 06:48 PM, Brian Paul 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.
> ---
> src/intel/compiler/brw_reg.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/intel/compiler/brw_reg.h b/src/intel/compiler/brw_reg.h
> index 68158cc..0d2900a 100644
> --- a/src/intel/compiler/brw_reg.h
> +++ b/src/intel/compiler/brw_reg.h
> @@ -302,6 +302,8 @@ brw_regs_negative_equal(const struct brw_reg *a, const struct brw_reg *b)
>
> return brw_regs_equal(&tmp, b);
> }
> +
> + return false; /* silence compiler warning */
> }
>
> struct brw_indirect {
>
More information about the mesa-dev
mailing list