Skip to content

Commit

Permalink
hw/intc/arm_gicv3_its: Avoid shadowing variable in do_process_its_cmd()
Browse files Browse the repository at this point in the history
Avoid shadowing a local variable in do_process_its_cmd():

../../hw/intc/arm_gicv3_its.c:548:17: warning: declaration of ‘ite’ shadows a previous local [-Wshadow=compatible-local]
  548 |         ITEntry ite = {};
      |                 ^~~
../../hw/intc/arm_gicv3_its.c:518:13: note: shadowed declaration is here
  518 |     ITEntry ite;
      |             ^~~

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20230922152944.3583438-2-peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
  • Loading branch information
pm215 authored and Markus Armbruster committed Sep 29, 2023
1 parent 7b393b7 commit 33b3b4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw/intc/arm_gicv3_its.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,10 +545,10 @@ static ItsCmdResult do_process_its_cmd(GICv3ITSState *s, uint32_t devid,
}

if (cmdres == CMD_CONTINUE_OK && cmd == DISCARD) {
ITEntry ite = {};
ITEntry i = {};
/* remove mapping from interrupt translation table */
ite.valid = false;
return update_ite(s, eventid, &dte, &ite) ? CMD_CONTINUE_OK : CMD_STALL;
i.valid = false;
return update_ite(s, eventid, &dte, &i) ? CMD_CONTINUE_OK : CMD_STALL;
}
return CMD_CONTINUE_OK;
}
Expand Down

0 comments on commit 33b3b4a

Please sign in to comment.