Re: [PATCH v4 7/7] Added default case with error for object event dispatching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 11, 2013 at 11:38:04AM +0100, Cédric Bosdonnat wrote:
> Hitting this should be pretty rare, but at least developers will know
> that they are providing a weird event ID. Otherwise for namespace that
> are added in the normal way, gcc will raise a warning about unhandled
> case in the switch.
> ---
>  src/conf/object_event.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/conf/object_event.c b/src/conf/object_event.c
> index 0f21c37..1e0b33d 100644
> --- a/src/conf/object_event.c
> +++ b/src/conf/object_event.c
> @@ -646,6 +646,8 @@ virObjectEventStateDispatchFunc(virConnectPtr conn,
>          virNetworkEventDispatchDefaultFunc(conn, event,
>                  VIR_NETWORK_EVENT_CALLBACK(cb), cbopaque, NULL);
>          break;
> +    default:
> +        VIR_ERROR(_("Unknown event namespace to dispatch"));
>      }
>      virObjectEventStateLock(state);
>  }

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]