aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-10-09 10:25:58 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-10-19 23:13:28 +0200
commitb2b5b09045e61798d5454f6b32721172d736c828 (patch)
treeadf034c8825b1954f5b17e3c26c5020f9235b63c /hw
parent49909a0d0336fa682049544f284bbeda6f02c4ac (diff)
downloadqemu-b2b5b09045e61798d5454f6b32721172d736c828.zip
qemu-b2b5b09045e61798d5454f6b32721172d736c828.tar.gz
qemu-b2b5b09045e61798d5454f6b32721172d736c828.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>
Diffstat (limited to 'hw')
-rw-r--r--hw/s390x/sclpquiesce.c8
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;