]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: improve compile-time check of qemuBlockjobState mapping
authorEric Blake <eblake@redhat.com>
Wed, 23 Jan 2019 19:38:41 +0000 (13:38 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 23 Jan 2019 22:20:25 +0000 (16:20 -0600)
commit7b6116fb895286f0fad7f2ff5a5cdcdbb57818f0
tree12919be906106fde0d96f1f7c820e87009bdc172
parenta3ab6d42d825499af44b8f19f9299e150d9687bc
qemu: improve compile-time check of qemuBlockjobState mapping

Asserting the value we set four lines earlier in qemuBlockjobState
doesn't buy us any safety (if the public header adds a value, we end
up skipping that value without the compiler warning us of our gap);
what we really want is to assert that the value auto-assigned by the
compiler matches the actual last value in the public headers (as was
done below for qemuBlockJobType).  Add useful comments while at it.

Signed-off-by: Eric Blake <eblake@redhat.com>
ACKed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_blockjob.h