[libvirt] [PATCH] virsh: Let the compiler check usage of all fields in vshCmdOptType enum

Eric Blake eblake at redhat.com
Mon Mar 25 18:11:14 UTC 2013


On 03/25/2013 10:31 AM, Peter Krempa wrote:
> On 03/25/13 17:21, Peter Krempa wrote:
>> Get rid of the "default" labels to do so.
>> ---
>>   tools/virsh.c | 4 ----
>>   1 file changed, 4 deletions(-)
>>

>>                   case VSH_OT_ALIAS:
>>                       continue;
>> -                default:
>> -                    assert(0);
>>                   }
>>
>>                   fprintf(stdout, "    %-15s  %s\n", buf, _(opt->help));
>>
> 
> Hum, this patch removes the last two asserts from this file so
> syntax-check would fail with this patch. I squashed the removal of
> 
> #include <assert.h>
> 
> from virsh.c in my private branch.

ACK with that squashed in.  Safe to include in 1.0.4.

-- 
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/20130325/d4beb5fb/attachment-0001.sig>


More information about the libvir-list mailing list