diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-10-09 10:25:58 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-10-20 14:46:07 +0200 |
commit | ea08e72eb0288c40816c4b3a14688345d2eb0707 (patch) | |
tree | 302cc28de38762f4307b260f7ce0c69e807ed0f1 | |
parent | a7e6186810f9389bb3aaa9209f548052651bc11d (diff) | |
download | qemu-ea08e72eb0288c40816c4b3a14688345d2eb0707.zip qemu-ea08e72eb0288c40816c4b3a14688345d2eb0707.tar.gz qemu-ea08e72eb0288c40816c4b3a14688345d2eb0707.tar.bz2 |
hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req()
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>
-rw-r--r-- | hw/s390x/sclpquiesce.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/s390x/sclpquiesce.c b/hw/s390x/sclpquiesce.c index ce07b16..a641089 100644 --- a/hw/s390x/sclpquiesce.c +++ b/hw/s390x/sclpquiesce.c @@ -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) { @@ -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; |