From fbcab5f0976589e577f8e41f846803c8e38a618b Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 30 Nov 2012 21:35:58 -0500 Subject: [PATCH] Fix some missing va_ends Found by Coverity. https://bugzilla.gnome.org/show_bug.cgi?id=689496 --- clutter/clutter-list-model.c | 5 +++-- clutter/deprecated/clutter-animator.c | 7 ++++--- clutter/deprecated/clutter-state.c | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/clutter/clutter-list-model.c b/clutter/clutter-list-model.c index a0f9bb34f..49ac9df9d 100644 --- a/clutter/clutter-list-model.c +++ b/clutter/clutter-list-model.c @@ -776,15 +776,16 @@ clutter_list_model_new (guint n_columns, { g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type)); g_object_unref (model); - return NULL; + model = NULL; + goto out; } _clutter_model_set_column_type (model, i, type); _clutter_model_set_column_name (model, i, name); } + out: va_end (args); - return model; } diff --git a/clutter/deprecated/clutter-animator.c b/clutter/deprecated/clutter-animator.c index f9afcecd9..89e4925f4 100644 --- a/clutter/deprecated/clutter-animator.c +++ b/clutter/deprecated/clutter-animator.c @@ -1206,6 +1206,10 @@ clutter_animator_set (ClutterAnimator *animator, object = first_object; property_name = first_property_name; + + g_return_if_fail (object); + g_return_if_fail (property_name); + mode = first_mode; progress = first_progress; @@ -1218,9 +1222,6 @@ clutter_animator_set (ClutterAnimator *animator, GValue value = G_VALUE_INIT; gchar *error = NULL; - g_return_if_fail (object); - g_return_if_fail (property_name); - klass = G_OBJECT_GET_CLASS (object); pspec = g_object_class_find_property (klass, property_name); diff --git a/clutter/deprecated/clutter-state.c b/clutter/deprecated/clutter-state.c index 4f9e39f16..379f20880 100644 --- a/clutter/deprecated/clutter-state.c +++ b/clutter/deprecated/clutter-state.c @@ -1,4 +1,4 @@ -/* +g/* * Clutter. * * An OpenGL based 'interactive canvas' library. @@ -991,11 +991,12 @@ clutter_state_set (ClutterState *state, property_name = first_property_name; mode = first_mode; - va_start (args, first_mode); g_return_if_fail (G_IS_OBJECT (first_object)); g_return_if_fail (first_property_name); + va_start (args, first_mode); + while (object != NULL) { GParamSpec *pspec;