[Libguestfs] [PATCH libguestfs 6/8] suppress a warning from -Wswitch-default
Richard W.M. Jones
rjones at redhat.com
Tue Aug 18 13:55:00 UTC 2009
On Tue, Aug 18, 2009 at 03:49:43PM +0200, Jim Meyering wrote:
> From: Jim Meyering <meyering at redhat.com>
>
> * src/guestfs.c (guestfs_end_busy): Add a "default:" label.
> ---
> src/guestfs.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/src/guestfs.c b/src/guestfs.c
> index 0c007d2..8491205 100644
> --- a/src/guestfs.c
> +++ b/src/guestfs.c
> @@ -1628,8 +1628,10 @@ guestfs_end_busy (guestfs_h *g)
> case CONFIG:
> case READY:
> break;
> +
> case LAUNCHING:
> case NO_HANDLE:
> + default:
> error (g, _("guestfs_end_busy: called when in state %d"), g->state);
> return -1;
> }
> --
> 1.6.4.378.g88f2f
I thought switch would catch that it's an enum? Anyway ACK.
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
More information about the Libguestfs
mailing list