Nobody's interested in the return value of any of struct _qemuMonitorCallbacks callbacks. They are all void, but domainMemoryDeviceSizeChange. Change it to void. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/qemu/qemu_monitor.h | 10 +++++----- src/qemu/qemu_process.c | 5 +---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 8214c2fd9f..b54c1cf87a 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -413,11 +413,11 @@ typedef void (*qemuMonitorDomainMemoryFailureCallback)(qemuMonitor *mon, qemuMonitorEventMemoryFailure *mfp, void *opaque); -typedef int (*qemuMonitorDomainMemoryDeviceSizeChange)(qemuMonitor *mon, - virDomainObj *vm, - const char *alias, - unsigned long long size, - void *opaque); +typedef void (*qemuMonitorDomainMemoryDeviceSizeChange)(qemuMonitor *mon, + virDomainObj *vm, + const char *alias, + unsigned long long size, + void *opaque); typedef struct _qemuMonitorCallbacks qemuMonitorCallbacks; struct _qemuMonitorCallbacks { diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 6027b30405..2a1fcad1ee 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1845,7 +1845,7 @@ qemuProcessHandleMemoryFailure(qemuMonitor *mon G_GNUC_UNUSED, } -static int +static void qemuProcessHandleMemoryDeviceSizeChange(qemuMonitor *mon G_GNUC_UNUSED, virDomainObj *vm, const char *devAlias, @@ -1855,7 +1855,6 @@ qemuProcessHandleMemoryDeviceSizeChange(qemuMonitor *mon G_GNUC_UNUSED, virQEMUDriver *driver = opaque; struct qemuProcessEvent *processEvent = NULL; qemuMonitorMemoryDeviceSizeChange *info = NULL; - int ret = -1; virObjectLock(vm); @@ -1878,11 +1877,9 @@ qemuProcessHandleMemoryDeviceSizeChange(qemuMonitor *mon G_GNUC_UNUSED, } processEvent = NULL; - ret = 0; cleanup: qemuProcessEventFree(processEvent); virObjectUnlock(vm); - return ret; } -- 2.32.0