]> xenbits.xensource.com Git - people/pauldu/qemu.git/commitdiff
fpu/softfloat: int_to_float ensure r fully initialised
authorAlex Bennée <alex.bennee@linaro.org>
Tue, 15 May 2018 13:58:42 +0000 (14:58 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 15 May 2018 13:58:42 +0000 (14:58 +0100)
Reported by Coverity (CID1390635). We ensure this for uint_to_float
later on so we might as well mirror that.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
fpu/softfloat.c

index 8401b37bd44343593759c7d412d29551b65ee34a..b39c0c6fbb7145c7559628f4fd986c26ce6ac2b1 100644 (file)
@@ -1525,7 +1525,7 @@ FLOAT_TO_UINT(64, 64)
 
 static FloatParts int_to_float(int64_t a, float_status *status)
 {
-    FloatParts r;
+    FloatParts r = {};
     if (a == 0) {
         r.cls = float_class_zero;
         r.sign = false;