diff options
author | Stafford Horne <shorne@gmail.com> | 2017-10-04 00:44:37 +0900 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-01-31 15:26:58 -0500 |
commit | 5bc4f5ca1554779f4e83702a4d92babd370384cd (patch) | |
tree | 6ba3aa5f159913d6fb1636392d8de6f3d4db6a55 /sim | |
parent | 5f05936d9b14d2a75eaea7cc396052de268f8503 (diff) | |
download | gdb-5bc4f5ca1554779f4e83702a4d92babd370384cd.zip gdb-5bc4f5ca1554779f4e83702a4d92babd370384cd.tar.gz gdb-5bc4f5ca1554779f4e83702a4d92babd370384cd.tar.bz2 |
sim: cgen-accfp: Fix pointer sign warnings
When compiling we get the following warnings:
common/cgen-accfp.c: In function 'fixsfsi':
common/cgen-accfp.c:370:18: warning: pointer targets in passing argument 1 of 'sim_fpu_to32i' differ in signedness [-Wpointer-sign]
sim_fpu_to32i (&res, &op1, sim_fpu_round_near);
^
common/cgen-accfp.c: In function 'fixdfsi':
common/cgen-accfp.c:381:18: warning: pointer targets in passing argument 1 of 'sim_fpu_to32i' differ in signedness [-Wpointer-sign]
sim_fpu_to32i (&res, &op1, sim_fpu_round_near);
^
Diffstat (limited to 'sim')
-rw-r--r-- | sim/common/ChangeLog | 6 | ||||
-rw-r--r-- | sim/common/cgen-accfp.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index a00866d..12c00f0 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,9 @@ +2021-01-31 Stafford Horne <shorne@gmail.com> + + * cgen-accfp.c (fixsfsi): Change res from unsigned32 to signed32. + (fixdfsi): Change res from unsigned32 to signed32. + (fixdfdi): Change res from unsigned64 to signed64. + 2021-01-30 Mike Frysinger <vapier@gentoo.org> * gennltvals.sh: Replace shell script with ... diff --git a/sim/common/cgen-accfp.c b/sim/common/cgen-accfp.c index b898de3..d6cd751 100644 --- a/sim/common/cgen-accfp.c +++ b/sim/common/cgen-accfp.c @@ -387,7 +387,7 @@ static SI fixsfsi (CGEN_FPU* fpu, int how UNUSED, SF x) { sim_fpu op1; - unsigned32 res; + signed32 res; sim_fpu_32to (&op1, x); sim_fpu_to32i (&res, &op1, sim_fpu_round_near); @@ -398,7 +398,7 @@ static SI fixdfsi (CGEN_FPU* fpu, int how UNUSED, DF x) { sim_fpu op1; - unsigned32 res; + signed32 res; sim_fpu_64to (&op1, x); sim_fpu_to32i (&res, &op1, sim_fpu_round_near); @@ -409,7 +409,7 @@ static DI fixdfdi (CGEN_FPU* fpu, int how UNUSED, DF x) { sim_fpu op1; - unsigned64 res; + signed64 res; sim_fpu_64to (&op1, x); sim_fpu_to64i (&res, &op1, sim_fpu_round_near); |