[libvirt] [PATCH 5/7] Explicitly cast some switch parameters to enum

Pavel Hrdina phrdina at redhat.com
Tue Mar 18 10:15:01 UTC 2014


On 17.3.2014 16:38, Eric Blake wrote:
> On 03/17/2014 08:39 AM, Martin Kletzander wrote:
>> This patch is not trying to fix every switch, just the ones I worked
>> with last time, because some of these were especially unreadable.
>> Covers enums virDomainGraphicsType and virDomainChrType (where
>> applicable).
>>
>> Also sort it's cases by their value.
>
> s/it's/its/ (remember, "it's" is usable only if you could say "it is"
> and still make sense; in all other usage you want "its")
>
>>
>> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
>> ---
>>   src/conf/domain_conf.c  | 22 +++++++++++++---------
>>   src/qemu/qemu_command.c |  4 +++-
>>   2 files changed, 16 insertions(+), 10 deletions(-)
>>
>> @@ -1201,6 +1201,10 @@ void virDomainGraphicsDefFree(virDomainGraphicsDefPtr def)
>>           VIR_FREE(def->data.spice.keymap);
>>           virDomainGraphicsAuthDefClear(&def->data.spice.auth);
>>           break;
>> +
>> +    case VIR_DOMAIN_GRAPHICS_TYPE_LAST:
>> +        /* coverity[dead_error_begin] */
>> +        break;
>
> This Coverity comment is probably not necessary (but John can confirm
> faster than me).
>

I've tested it and Coverity is happy also without the comment.

ACK

Pavel

> ACK once we figure out if we can drop that comment.
>
>
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
>




More information about the libvir-list mailing list