]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: qemuDomainObjExitMonitor: do not warn on unused result
authorJán Tomko <jtomko@redhat.com>
Wed, 24 Nov 2021 12:44:56 +0000 (13:44 +0100)
committerJán Tomko <jtomko@redhat.com>
Wed, 1 Dec 2021 09:56:58 +0000 (10:56 +0100)
This wrapper for qemuDomainObjExitMonitorInternal was
extended by my commit dc2fd51fd727bbb6de172e0ca4b7dd307bb99180
to check whether the domain is still alive, because
we were observing crashes if the QEMU process died
while some of our APIs were in the monitor and the thread
processing the EOF event freed the domain definition.

This bug was fixed by:
    commit 81f50cb92d16643bcd749e3ab5b404b8b7cec643
    qemu: Avoid calling qemuProcessStop without a job
but we kept checking for the return value since.

Remove the G_GNUC_WARN_UNUSED_RESULT attribute since
all of the calls that could set def->id to -1 are protected
by qemuProcessBeginStopJob and cannot happen while we have a job
in the monitor.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_domain.h

index 6728ab047ed001c70a6f64169a5b99959fa8bdc9..596add616d641d0bb5b8e6485bea2e7914c0cf20 100644 (file)
@@ -489,8 +489,7 @@ void qemuDomainObjEnterMonitor(virQEMUDriver *driver,
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 int qemuDomainObjExitMonitor(virQEMUDriver *driver,
                              virDomainObj *obj)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    G_GNUC_WARN_UNUSED_RESULT;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 int qemuDomainObjEnterMonitorAsync(virQEMUDriver *driver,
                                    virDomainObj *obj,
                                    qemuDomainAsyncJob asyncJob)