diff options
author | Luis Machado <luis.machado@linaro.org> | 2021-04-08 16:49:04 -0300 |
---|---|---|
committer | Luis Machado <luis.machado@linaro.org> | 2021-04-09 09:17:32 -0300 |
commit | ed29efbd172e04b53d1f9ddab64e6e0cf6dceaf2 (patch) | |
tree | fdbe00f567c0db5a742aeae103a4e43c2ba2c65e /sim | |
parent | dd17020328b4ebf45be26eed156fba3d269096f6 (diff) | |
download | fsf-binutils-gdb-ed29efbd172e04b53d1f9ddab64e6e0cf6dceaf2.zip fsf-binutils-gdb-ed29efbd172e04b53d1f9ddab64e6e0cf6dceaf2.tar.gz fsf-binutils-gdb-ed29efbd172e04b53d1f9ddab64e6e0cf6dceaf2.tar.bz2 |
[sim,rx] Silence warning that turns into a build error
On a 32-bit build, I ran into the following:
sim/rx/fpu.c:789:6: error: "*((void *)&a+8)" may be used uninitialized in this function [-Werror=maybe-uninitialized]
rv = fp_implode (&a);
To silence this, just initialize the struct with 0's.
sim/rx/ChangeLog:
2021-04-09 Luis Machado <luis.machado@linaro.org>
* fpu.c (rxfp_itof): Initialize structure.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/rx/fpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/rx/fpu.c b/sim/rx/fpu.c index f9e9007..6c4738c 100644 --- a/sim/rx/fpu.c +++ b/sim/rx/fpu.c @@ -732,7 +732,7 @@ rxfp_itof (long fa, int round_mode) int sign = 0; unsigned int frac_bits; volatile unsigned int whole_bits; - FP_Parts a; + FP_Parts a = {0}; if (fa == 0) return PLUS_ZERO; |