[libvirt] [PATCHv2 1/8] conf: Add fake switch statement to warn for new device types

Eric Blake eblake at redhat.com
Fri Feb 22 18:13:45 UTC 2013


On 02/21/2013 07:47 AM, Peter Krempa wrote:
> This patch adds a fake switch statement to force the compiler to warn
> after a new device type was added. This should remind the contributor to
> add the new device also to this iterator function.
> ---
> 
> Notes:
>     Version 2:
>     - NEW in series, kind of RFC
> 
>  src/conf/domain_conf.c | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)

Interesting idea - but any time we can make the compiler help us be
better maintainers, I'm in favor of it.

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130222/15a51b97/attachment-0001.sig>


More information about the libvir-list mailing list