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);
                    ^
This commit is contained in:
Stafford Horne 2017-10-04 00:44:37 +09:00 committed by Mike Frysinger
parent 5f05936d9b
commit 5bc4f5ca15
2 changed files with 9 additions and 3 deletions

View File

@ -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> 2021-01-30 Mike Frysinger <vapier@gentoo.org>
* gennltvals.sh: Replace shell script with ... * gennltvals.sh: Replace shell script with ...

View File

@ -387,7 +387,7 @@ static SI
fixsfsi (CGEN_FPU* fpu, int how UNUSED, SF x) fixsfsi (CGEN_FPU* fpu, int how UNUSED, SF x)
{ {
sim_fpu op1; sim_fpu op1;
unsigned32 res; signed32 res;
sim_fpu_32to (&op1, x); sim_fpu_32to (&op1, x);
sim_fpu_to32i (&res, &op1, sim_fpu_round_near); sim_fpu_to32i (&res, &op1, sim_fpu_round_near);
@ -398,7 +398,7 @@ static SI
fixdfsi (CGEN_FPU* fpu, int how UNUSED, DF x) fixdfsi (CGEN_FPU* fpu, int how UNUSED, DF x)
{ {
sim_fpu op1; sim_fpu op1;
unsigned32 res; signed32 res;
sim_fpu_64to (&op1, x); sim_fpu_64to (&op1, x);
sim_fpu_to32i (&res, &op1, sim_fpu_round_near); sim_fpu_to32i (&res, &op1, sim_fpu_round_near);
@ -409,7 +409,7 @@ static DI
fixdfdi (CGEN_FPU* fpu, int how UNUSED, DF x) fixdfdi (CGEN_FPU* fpu, int how UNUSED, DF x)
{ {
sim_fpu op1; sim_fpu op1;
unsigned64 res; signed64 res;
sim_fpu_64to (&op1, x); sim_fpu_64to (&op1, x);
sim_fpu_to64i (&res, &op1, sim_fpu_round_near); sim_fpu_to64i (&res, &op1, sim_fpu_round_near);