diff mbox series

[RFC,for,2.11,06/23] softfloat3c: silence compiler warning

Message ID 20170720150426.12393-7-alex.bennee@linaro.org
State New
Headers show
Series Implementing FP16 for ARMv8.2 using SoftFloat2a and 3c | expand

Commit Message

Alex Bennée July 20, 2017, 3:04 p.m. UTC
While you could pass a 0 size_words to the function it would be a bug.
At least by ensuring the leg is followed it stops the compiler
complaining about a potential uninitialised access.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 fpu/softfloat3c/s_shiftRightJamM.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.13.0
diff mbox series

Patch

diff --git a/fpu/softfloat3c/s_shiftRightJamM.c b/fpu/softfloat3c/s_shiftRightJamM.c
index 47ba5ddaf9..035d5d3c1f 100644
--- a/fpu/softfloat3c/s_shiftRightJamM.c
+++ b/fpu/softfloat3c/s_shiftRightJamM.c
@@ -66,7 +66,7 @@  void
         } while ( i );
         ptr = zPtr;
     }
-    if ( wordDist < size_words ) {
+    if ( wordDist <= size_words ) {
         aPtr += indexMultiwordHiBut( size_words, wordDist );
         innerDist = dist & 31;
         if ( innerDist ) {