diff mbox series

[06/11] hw/ppc/spapr_events: Remove unused variable from check_exception

Message ID 20210712215535.1471256-7-richard.henderson@linaro.org
State Superseded
Headers show
Series Fixes for clang-13 plus tcg/ppc | expand

Commit Message

Richard Henderson July 12, 2021, 9:55 p.m. UTC
From clang-13:
hw/ppc/spapr_events.c:937:14: error: variable 'xinfo' set but not used \
    [-Werror,-Wunused-but-set-variable]

Cc: qemu-ppc@nongnu.org
Cc: Greg Kurz <groug@kaod.org>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 hw/ppc/spapr_events.c | 5 -----
 1 file changed, 5 deletions(-)

-- 
2.25.1

Comments

David Gibson July 13, 2021, 12:05 a.m. UTC | #1
On Mon, Jul 12, 2021 at 02:55:30PM -0700, Richard Henderson wrote:
> >From clang-13:

> hw/ppc/spapr_events.c:937:14: error: variable 'xinfo' set but not used \

>     [-Werror,-Wunused-but-set-variable]

> 

> Cc: qemu-ppc@nongnu.org

> Cc: Greg Kurz <groug@kaod.org>

> Cc: David Gibson <david@gibson.dropbear.id.au>

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Acked-by: David Gibson <david@gibson.dropbear.id.au>


> ---

>  hw/ppc/spapr_events.c | 5 -----

>  1 file changed, 5 deletions(-)

> 

> diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c

> index 0cfc19be19..23e2e2fff1 100644

> --- a/hw/ppc/spapr_events.c

> +++ b/hw/ppc/spapr_events.c

> @@ -934,7 +934,6 @@ static void check_exception(PowerPCCPU *cpu, SpaprMachineState *spapr,

>                              uint32_t nret, target_ulong rets)

>  {

>      uint32_t mask, buf, len, event_len;

> -    uint64_t xinfo;

>      SpaprEventLogEntry *event;

>      struct rtas_error_log header;

>      int i;

> @@ -944,13 +943,9 @@ static void check_exception(PowerPCCPU *cpu, SpaprMachineState *spapr,

>          return;

>      }

>  

> -    xinfo = rtas_ld(args, 1);

>      mask = rtas_ld(args, 2);

>      buf = rtas_ld(args, 4);

>      len = rtas_ld(args, 5);

> -    if (nargs == 7) {

> -        xinfo |= (uint64_t)rtas_ld(args, 6) << 32;

> -    }

>  

>      event = rtas_event_log_dequeue(spapr, mask);

>      if (!event) {


-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
diff mbox series

Patch

diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
index 0cfc19be19..23e2e2fff1 100644
--- a/hw/ppc/spapr_events.c
+++ b/hw/ppc/spapr_events.c
@@ -934,7 +934,6 @@  static void check_exception(PowerPCCPU *cpu, SpaprMachineState *spapr,
                             uint32_t nret, target_ulong rets)
 {
     uint32_t mask, buf, len, event_len;
-    uint64_t xinfo;
     SpaprEventLogEntry *event;
     struct rtas_error_log header;
     int i;
@@ -944,13 +943,9 @@  static void check_exception(PowerPCCPU *cpu, SpaprMachineState *spapr,
         return;
     }
 
-    xinfo = rtas_ld(args, 1);
     mask = rtas_ld(args, 2);
     buf = rtas_ld(args, 4);
     len = rtas_ld(args, 5);
-    if (nargs == 7) {
-        xinfo |= (uint64_t)rtas_ld(args, 6) << 32;
-    }
 
     event = rtas_event_log_dequeue(spapr, mask);
     if (!event) {