public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 16/17] sim: v850: fix -Wunused-but-set-variable warnings
Date: Wed,  6 Dec 2023 20:59:36 -0700	[thread overview]
Message-ID: <20231207035937.14920-16-vapier@gentoo.org> (raw)
In-Reply-To: <20231207035937.14920-1-vapier@gentoo.org>

---
 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 326745efcb26..05770a946ea1 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 bd8de8e2790d..6b9a8bb4a5c5 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;
-- 
2.43.0


  parent reply	other threads:[~2023-12-07  4:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07  3:59 [PATCH 01/17] sim: arm: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 02/17] sim: bfin: gui: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 03/17] sim: bfin: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 04/17] sim: cris: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 05/17] sim: d10v: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 06/17] sim: erc32: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 07/17] sim: frv: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 08/17] sim: ft32: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 09/17] sim: h8300: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 10/17] sim: m68hc11: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 11/17] sim: mcore: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 12/17] sim: mips: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 13/17] sim: mn10300: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 14/17] sim: msp430: " Mike Frysinger
2023-12-07  3:59 ` [PATCH 15/17] sim: sh: " Mike Frysinger
2023-12-07  3:59 ` Mike Frysinger [this message]
2023-12-07  3:59 ` [PATCH 17/17] sim: warnings: enable -Wunused-but-set-variable Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231207035937.14920-16-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).