Skip to contentSkip to conversation

target-lm32: Remove unused local variables

PATCH Applied Stefan Weil 3 participants 3 messages May 7, 2011 – May 14, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-lm32: Remove unused local variables

cppcheck report:
target-lm32/translate.c:587: style:
Variable 't0' is assigned a value that is never used
target-lm32/translate.c:588: style:
Variable 'l1' is assigned a value that is never used

Remove both variables. Please check whether that is the correct solution.

Cc Michael Walle <[email protected]>
Cc Edgar E. Iglesias <[email protected]>
---
 target-lm32/translate.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
target-lm32/translate.c +0 -6
index bcd52fe..eb21158 100644
@@ -584,9 +584,6 @@ static void dec_orhi(DisasContext *dc)
 
 static void dec_scall(DisasContext *dc)
 {
-    TCGv t0;
-    int l1;
-
     if (dc->imm5 == 7) {
         LOG_DIS("scall\n");
     } else if (dc->imm5 == 2) {
@@ -595,9 +592,6 @@ static void dec_scall(DisasContext *dc)
         cpu_abort(dc->env, "invalid opcode\n");
     }
 
-    t0 = tcg_temp_new();
-    l1 = gen_new_label();
-
     if (dc->imm5 == 7) {
         tcg_gen_movi_tl(cpu_pc, dc->pc);
         t_gen_raise_exception(dc, EXCP_SYSTEMCALL);
Signature · 1 line
1.7.2.5
Acked-by on v1 1/1
#1 lore raw

Am Samstag 07 Mai 2011, 22:49:33 schrieb Stefan Weil:

Quoted 11 lines

cppcheck report:
target-lm32/translate.c:587: style:
Variable 't0' is assigned a value that is never used
target-lm32/translate.c:588: style:
Variable 'l1' is assigned a value that is never used

Remove both variables. Please check whether that is the correct solution.

Cc Michael Walle <[email protected]>
Cc Edgar E. Iglesias <[email protected]>

Leftovers from ecbe1de823 therefore:

Quoted 28 lines
---
 target-lm32/translate.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
target-lm32/translate.c +0 -6
index bcd52fe..eb21158 100644
@@ -584,9 +584,6 @@ static void dec_orhi(DisasContext *dc)
 
 static void dec_scall(DisasContext *dc)
 {
-    TCGv t0;
-    int l1;
-
     if (dc->imm5 == 7) {
         LOG_DIS("scall\n");
     } else if (dc->imm5 == 2) {
@@ -595,9 +592,6 @@ static void dec_scall(DisasContext *dc)
         cpu_abort(dc->env, "invalid opcode\n");
     }
 
-    t0 = tcg_temp_new();
-    l1 = gen_new_label();
-
     if (dc->imm5 == 7) {
         tcg_gen_movi_tl(cpu_pc, dc->pc);
         t_gen_raise_exception(dc, EXCP_SYSTEMCALL);
#2 lore raw
In reply to Stefan Weil
Quoted 6 lines · Stefan Weil

cppcheck report:
target-lm32/translate.c:587: style:
Variable 't0' is assigned a value that is never used
target-lm32/translate.c:588: style:
Variable 'l1' is assigned a value that is never used

Quoted 8 lines

Remove both variables. Please check whether that is the correct solution.

Cc Michael Walle <[email protected]>
Cc Edgar E. Iglesias <[email protected]>
---
 target-lm32/translate.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

Thanks, applied.

Quoted 29 lines
target-lm32/translate.c +0 -6
index bcd52fe..eb21158 100644
@@ -584,9 +584,6 @@ static void dec_orhi(DisasContext *dc)
 
 static void dec_scall(DisasContext *dc)
 {
-    TCGv t0;
-    int l1;
-
     if (dc->imm5 == 7) {
         LOG_DIS("scall\n");
     } else if (dc->imm5 == 2) {
@@ -595,9 +592,6 @@ static void dec_scall(DisasContext *dc)
         cpu_abort(dc->env, "invalid opcode\n");
     }
 
-    t0 = tcg_temp_new();
-    l1 = gen_new_label();
-
     if (dc->imm5 == 7) {
         tcg_gen_movi_tl(cpu_pc, dc->pc);
         t_gen_raise_exception(dc, EXCP_SYSTEMCALL);
Signature · 1 line
1.7.2.5
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net