[libvirt PATCH] qemu: correctly pass qemuBuildVHostUserFsDevProps

Ján Tomko posted 1 patch 2 years, 5 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/daa8d3220d7700c9f3755011405b305359066de6.1634045687.git.jtomko@redhat.com
src/qemu/qemu_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt PATCH] qemu: correctly pass qemuBuildVHostUserFsDevProps
Posted by Ján Tomko 2 years, 5 months ago
../../work/libvirt/src/qemu/qemu_hotplug.c: In function ‘qemuDomainAttachFSDevice’:
../../work/libvirt/src/qemu/qemu_hotplug.c:3458:68: error: ordered comparison of pointer with integer zero [-Werror=extra]
 3458 |     if (qemuBuildVHostUserFsDevProps(fs, vm->def, charAlias, priv) < 0)
      |                                                                    ^
cc1: all warnings being treated as errors

Fixes: b98787303498cfb8426ab27ee62247b164101242
Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
Pushed as a build-breaker fix.

Surprisingly, clang does not seem to mind the comparison.

 src/qemu/qemu_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index b113a5bc1e..af49e58f8e 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3455,7 +3455,7 @@ qemuDomainAttachFSDevice(virQEMUDriver *driver,
 
     charAlias = qemuDomainGetVhostUserChrAlias(fs->info.alias);
 
-    if (qemuBuildVHostUserFsDevProps(fs, vm->def, charAlias, priv) < 0)
+    if (!(devprops = qemuBuildVHostUserFsDevProps(fs, vm->def, charAlias, priv)))
         goto cleanup;
 
     if (!fs->sock) {
-- 
2.31.1