[libvirt] [PATCH 5/7] Explicitly cast some switch parameters to enum
Martin Kletzander
mkletzan at redhat.com
Tue Mar 18 11:38:37 UTC 2014
On Tue, Mar 18, 2014 at 11:15:01AM +0100, Pavel Hrdina wrote:
> 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.
> >
Thank you both, I removed that comment and pushed it.
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140318/97f3c5e2/attachment-0001.sig>
More information about the libvir-list
mailing list