public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: v850: fix -Wunused-but-set-variable warnings
@ 2023-12-08  5:31 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2023-12-08  5:31 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bbe7b93875b78ae0831b811a2a8ebb114c71dd27

commit bbe7b93875b78ae0831b811a2a8ebb114c71dd27
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Wed Dec 6 20:08:19 2023 -0700

    sim: v850: fix -Wunused-but-set-variable warnings

Diff:
---
 sim/v850/simops.c  | 13 ++++++-------
 sim/v850/v850.igen |  6 ++----
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/sim/v850/simops.c b/sim/v850/simops.c
index 326745efcb2..05770a946ea 100644
--- a/sim/v850/simops.c
+++ b/sim/v850/simops.c
@@ -2106,7 +2106,6 @@ divn
   unsigned int    DBZ = als == 0 ? 1 : 0;
   unsigned int    Q   = ~(SS ^ SD) & 1;
   unsigned int    C;
-  unsigned int    S;
   unsigned int    i;
   unsigned long   alt = Q ? ~als : als;
 
@@ -2118,7 +2117,7 @@ divn
 	 | (((alt >> 31) ^ (ald >> 31)) & (~alo >> 31)));
   Q   = C ^ SS;
   R1  = (alo == 0) ? 0 : (R1 & (Q ^ (SS ^ SD)));
-  S   = alo >> 31;
+  /* S   = alo >> 31; */
   sfi = (sfi << (32-N+1)) | Q;
   ald = (alo << 1) | (sfi >> 31);
   if ((alo >> 31) ^ (ald >> 31))
@@ -2136,7 +2135,7 @@ divn
 	     | (((alt >> 31) ^ (ald >> 31)) & (~alo >> 31)));
       Q   = C ^ SS;
       R1  = (alo == 0) ? 0 : (R1 & (Q ^ (SS ^ SD)));
-      S   = alo >> 31;
+      /* S   = alo >> 31; */
       sfi = (sfi << 1) | Q;
       ald = (alo << 1) | (sfi >> 31);
       if ((alo >> 31) ^ (ald >> 31))
@@ -3034,7 +3033,7 @@ v850_float_compare (SIM_DESC sd, int cmp, sim_fpu wop1, sim_fpu wop2, int double
     }
   else
     {
-      int gt = 0,lt = 0,eq = 0, status;
+      int lt = 0, eq = 0, status;
 
       status = sim_fpu_cmp (&wop1, &wop2);
 
@@ -3049,19 +3048,19 @@ v850_float_compare (SIM_DESC sd, int cmp, sim_fpu wop1, sim_fpu wop2, int double
 	  lt = 1;
 	  break;
 	case SIM_FPU_IS_PINF:
-	  gt = 1;
+	  /* gt = 1; */
 	  break;
 	case SIM_FPU_IS_NNUMBER:
 	  lt = 1;
 	  break;
 	case SIM_FPU_IS_PNUMBER:
-	  gt = 1;
+	  /* gt = 1; */
 	  break;
 	case SIM_FPU_IS_NDENORM:
 	  lt = 1;
 	  break;
 	case SIM_FPU_IS_PDENORM:
-	  gt = 1;
+	  /* gt = 1; */
 	  break;
 	case SIM_FPU_IS_NZERO:
 	case SIM_FPU_IS_PZERO:
diff --git a/sim/v850/v850.igen b/sim/v850/v850.igen
index bd8de8e2790..6b9a8bb4a5c 100644
--- a/sim/v850/v850.igen
+++ b/sim/v850/v850.igen
@@ -3537,12 +3537,11 @@ rrrrr,11111100001 + wwww,010001000100:F_I:::trncf_sl
 {
   int64_t ans;
   sim_fpu wop;
-  sim_fpu_status status;
 
   sim_fpu_32to (&wop, GR[reg2]);
   TRACE_FP_INPUT_FPU1 (&wop);
 
-  status = sim_fpu_to64i (&ans, &wop, sim_fpu_round_zero);
+  sim_fpu_to64i (&ans, &wop, sim_fpu_round_zero);
 
   GR[reg3e] = ans;
   GR[reg3e+1] = ans >> 32L;
@@ -3557,12 +3556,11 @@ rrrrr,11111110001 + wwww,010001000100:F_I:::trncf_sul
 {
   uint64_t ans;
   sim_fpu wop;
-  sim_fpu_status status;
 
   sim_fpu_32to (&wop, GR[reg2]);
   TRACE_FP_INPUT_FPU1 (&wop);
 
-  status = sim_fpu_to64u (&ans, &wop, sim_fpu_round_zero);
+  sim_fpu_to64u (&ans, &wop, sim_fpu_round_zero);
 
   GR[reg3e] = ans;
   GR[reg3e+1] = ans >> 32L;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-08  5:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-08  5:31 [binutils-gdb] sim: v850: fix -Wunused-but-set-variable warnings Michael Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).