softfloat: Silence a warning at -Og
authorAdam Jackson <ajax@redhat.com>
Tue, 26 Jan 2021 18:48:22 +0000 (13:48 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Feb 2021 20:59:43 +0000 (20:59 +0000)
commitf2b3ecb84fc54c571cd8383f7aaefc625797a571
tree3e9cb3ee98cd93f5d6491fbb92ab2b33deae2ba9
parentfad353d7f8a1830f61d8715daff702af35c340f4
softfloat: Silence a warning at -Og

   ../src/util/softfloat.c: In function ‘_mesa_shift_right_jam_m’:
   ../src/util/softfloat.c:432:16: warning: ‘tmp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     432 |         *tmp++ = 0;

You could actually hit this if you called _mesa_shift_right_jam_m with
size_words = 0 and dist < 32. Not that you'd _do_ that, but. In this
case do nothing instead of writing through an uninitialized pointer.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
src/util/softfloat.c