In virLockSpaceProtocolDispatchNew() the returned value of lockspace from virLockDaemonFindLockSpace() is overwritten by the virLockSpaceNew() return. Coverity complains that it's unused. In virLockSpaceProtocolDispatchCreateLockSpace() lockspace is also overwritten in a similar manner resulting in the same Coverity message. --- src/locking/lock_daemon_dispatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/locking/lock_daemon_dispatch.c b/src/locking/lock_daemon_dispatch.c index 45d2cae..4c99088 100644 --- a/src/locking/lock_daemon_dispatch.c +++ b/src/locking/lock_daemon_dispatch.c @@ -227,7 +227,7 @@ virLockSpaceProtocolDispatchNew(virNetServerPtr server ATTRIBUTE_UNUSED, goto cleanup; } - if ((lockspace = virLockDaemonFindLockSpace(lockDaemon, args->path))) { + if (virLockDaemonFindLockSpace(lockDaemon, args->path) != NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Lockspace for path %s already exists"), args->path); @@ -406,7 +406,7 @@ virLockSpaceProtocolDispatchCreateLockSpace(virNetServerPtr server ATTRIBUTE_UNU goto cleanup; } - if ((lockspace = virLockDaemonFindLockSpace(lockDaemon, args->path))) { + if (virLockDaemonFindLockSpace(lockDaemon, args->path) != NULL) { virReportError(VIR_ERR_OPERATION_INVALID, _("Lockspace for path %s already exists"), args->path); -- 1.7.11.7 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list