2017-06-16 14:54 GMT+02:00 Emil Velikov <emil.l.veli...@gmail.com>: > On 15 June 2017 at 21:47, Robert Foss <robert.f...@collabora.com> wrote: >> From: Tomeu Vizoso <tomeu.viz...@collabora.com> >> >> Signed-off-by: Robert Foss <robert.f...@collabora.com> >> --- >> src/gallium/drivers/etnaviv/etnaviv_compiler.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler.c >> b/src/gallium/drivers/etnaviv/etnaviv_compiler.c >> index eafb511bb8..8f73113059 100644 >> --- a/src/gallium/drivers/etnaviv/etnaviv_compiler.c >> +++ b/src/gallium/drivers/etnaviv/etnaviv_compiler.c >> @@ -885,6 +885,8 @@ etna_amode(struct tgsi_ind_register indirect) >> default: >> assert(!"Invalid swizzle"); >> } >> + >> + return 0; > All the cases are handled correctly and even the default one will > never be reached. > Guess the compiler isn't smart enough, since we're using int:2 while > in reality we're storing an enum and using enum:2 might not always > work. > > Alternative solutions is s/assert/unreachable/. The call will be up-to > the etna devs, but including something like the above (in the commit > summary or elsewhere) will be a good idea, IMHO. >
I really like Emil's idea of s/assert/unreachable/ greets -- Christian Gmeiner, MSc https://www.youtube.com/user/AloryOFFICIAL https://soundcloud.com/christian-gmeiner _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev