[libvirt] [PATCH] qemu: improve compile-time check of qemuBlockjobState mapping

Peter Krempa pkrempa at redhat.com
Wed Jan 23 20:53:15 UTC 2019


On Wed, Jan 23, 2019 at 13:45:07 -0600, Eric Blake wrote:
> 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 at redhat.com>
> ---

ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190123/4a2b90fb/attachment-0001.sig>


More information about the libvir-list mailing list