Skip to content

Commit

Permalink
hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req()
Browse files Browse the repository at this point in the history
Fix:

  hw/s390x/sclpquiesce.c:90:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
      QuiesceNotifier *qn = container_of(n, QuiesceNotifier, notifier);
                       ^
  hw/s390x/sclpquiesce.c:86:3: note: previous declaration is here
  } qn;
    ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20231010115048.11856-7-philmd@linaro.org>
  • Loading branch information
philmd committed Oct 19, 2023
1 parent 49909a0 commit b2b5b09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hw/s390x/sclpquiesce.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,10 @@ static const VMStateDescription vmstate_sclpquiesce = {
}
};

typedef struct QuiesceNotifier QuiesceNotifier;

static struct QuiesceNotifier {
typedef struct QuiesceNotifier {
Notifier notifier;
SCLPEvent *event;
} qn;
} QuiesceNotifier;

static void quiesce_powerdown_req(Notifier *n, void *opaque)
{
Expand All @@ -97,6 +95,8 @@ static void quiesce_powerdown_req(Notifier *n, void *opaque)

static int quiesce_init(SCLPEvent *event)
{
static QuiesceNotifier qn;

qn.notifier.notify = quiesce_powerdown_req;
qn.event = event;

Expand Down

0 comments on commit b2b5b09

Please sign in to comment.