GCC was unhappy about comparison between two distinct enum types. Use
the correct value instead.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
Pushed as a build fix.
src/qemu/qemu_process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index afa960a683..855bd9cb14 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -7835,7 +7835,7 @@ qemuProcessRefreshLegacyBlockjob(void *payload,
return 0;
}
- if (jobtype == VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT &&
+ if (jobtype == QEMU_BLOCKJOB_TYPE_COMMIT &&
disk->mirrorJob == VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT)
jobtype = disk->mirrorJob;
--
2.20.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On Fri, Jan 18, 2019 at 08:44:02AM +0100, Peter Krempa wrote: > GCC was unhappy about comparison between two distinct enum types. Use > the correct value instead. It is nice to see that GCC is actually intelligent enough to catch this kind of mistake these days ! > > Signed-off-by: Peter Krempa <pkrempa@redhat.com> > --- > > Pushed as a build fix. > > src/qemu/qemu_process.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c > index afa960a683..855bd9cb14 100644 > --- a/src/qemu/qemu_process.c > +++ b/src/qemu/qemu_process.c > @@ -7835,7 +7835,7 @@ qemuProcessRefreshLegacyBlockjob(void *payload, > return 0; > } > > - if (jobtype == VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT && > + if (jobtype == QEMU_BLOCKJOB_TYPE_COMMIT && > disk->mirrorJob == VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT) > jobtype = disk->mirrorJob; > > -- > 2.20.1 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
On Fri, Jan 18, 2019 at 09:57:19 +0000, Daniel Berrange wrote: > On Fri, Jan 18, 2019 at 08:44:02AM +0100, Peter Krempa wrote: > > GCC was unhappy about comparison between two distinct enum types. Use > > the correct value instead. > > It is nice to see that GCC is actually intelligent enough to catch > this kind of mistake these days ! Yes, I'm surprised as well. It's actually ironic since I started using clang just for this series as it was also finding some problems noted by Jano. Now I've configured vpath for both compilers, just to be sure. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
© 2016 - 2024 Red Hat, Inc.