qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-lm32: Remove unused local variables
@ 2011-05-07 20:49 Stefan Weil
  2011-05-09 17:53 ` Michael Walle
  2011-05-14 22:28 ` Aurelien Jarno
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Weil @ 2011-05-07 20:49 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Michael Walle, Edgar E. Iglesias

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 <michael@walle.cc>
Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 target-lm32/translate.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/target-lm32/translate.c b/target-lm32/translate.c
index bcd52fe..eb21158 100644
--- a/target-lm32/translate.c
+++ b/target-lm32/translate.c
@@ -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);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] target-lm32: Remove unused local variables
  2011-05-07 20:49 [Qemu-devel] [PATCH] target-lm32: Remove unused local variables Stefan Weil
@ 2011-05-09 17:53 ` Michael Walle
  2011-05-14 22:28 ` Aurelien Jarno
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Walle @ 2011-05-09 17:53 UTC (permalink / raw)
  To: Stefan Weil; +Cc: Edgar E. Iglesias, QEMU Developers

Am Samstag 07 Mai 2011, 22:49:33 schrieb 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
> 
> Remove both variables. Please check whether that is the correct solution.
> 
> Cc: Michael Walle <michael@walle.cc>
> Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>

Leftovers from ecbe1de823 therefore:

Acked-by: Michael Walle <michael@walle.cc>

> ---
>  target-lm32/translate.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
> 
> diff --git a/target-lm32/translate.c b/target-lm32/translate.c
> index bcd52fe..eb21158 100644
> --- a/target-lm32/translate.c
> +++ b/target-lm32/translate.c
> @@ -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);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] target-lm32: Remove unused local variables
  2011-05-07 20:49 [Qemu-devel] [PATCH] target-lm32: Remove unused local variables Stefan Weil
  2011-05-09 17:53 ` Michael Walle
@ 2011-05-14 22:28 ` Aurelien Jarno
  1 sibling, 0 replies; 3+ messages in thread
From: Aurelien Jarno @ 2011-05-14 22:28 UTC (permalink / raw)
  To: Stefan Weil; +Cc: Edgar E. Iglesias, Michael Walle, QEMU Developers

On Sat, May 07, 2011 at 10:49:33PM +0200, Stefan Weil wrote:
> 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 <michael@walle.cc>
> Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
>  target-lm32/translate.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)

Thanks, applied.

> diff --git a/target-lm32/translate.c b/target-lm32/translate.c
> index bcd52fe..eb21158 100644
> --- a/target-lm32/translate.c
> +++ b/target-lm32/translate.c
> @@ -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);
> -- 
> 1.7.2.5
> 
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-14 22:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-07 20:49 [Qemu-devel] [PATCH] target-lm32: Remove unused local variables Stefan Weil
2011-05-09 17:53 ` Michael Walle
2011-05-14 22:28 ` Aurelien Jarno

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 NNTP newsgroup(s).