[clutter] A bunch of fixes for Coverity
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] A bunch of fixes for Coverity
- Date: Mon, 3 Dec 2012 01:18:05 +0000 (UTC)
commit 511e266a85d4b4c505d7c40db9d856739c874ea5
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Nov 30 21:44:00 2012 -0500
A bunch of fixes for Coverity
None of these are relevant enough for their own fixes.
https://bugzilla.gnome.org/show_bug.cgi?id=689496
clutter/deprecated/clutter-cairo-texture.c | 4 +---
tests/interactive/test-animator.c | 2 +-
tests/interactive/test-cogl-offscreen.c | 2 --
tests/interactive/test-cogl-tex-foreign.c | 2 --
tests/interactive/test-cogl-tex-getset.c | 2 --
tests/interactive/test-devices.c | 8 --------
tests/interactive/test-state-animator.c | 2 +-
7 files changed, 3 insertions(+), 19 deletions(-)
---
diff --git a/clutter/deprecated/clutter-cairo-texture.c b/clutter/deprecated/clutter-cairo-texture.c
index 84ab061..d08b6ea 100644
--- a/clutter/deprecated/clutter-cairo-texture.c
+++ b/clutter/deprecated/clutter-cairo-texture.c
@@ -711,9 +711,7 @@ clutter_cairo_texture_class_init (ClutterCairoTextureClass *klass)
static void
clutter_cairo_texture_init (ClutterCairoTexture *self)
{
- ClutterCairoTexturePrivate *priv;
-
- self->priv = priv = CLUTTER_CAIRO_TEXTURE_GET_PRIVATE (self);
+ self->priv = CLUTTER_CAIRO_TEXTURE_GET_PRIVATE (self);
/* FIXME - we are hardcoding the format; it would be good to have
* a :surface-format construct-only property for creating
diff --git a/tests/interactive/test-animator.c b/tests/interactive/test-animator.c
index dcd64c0..fc9f9f5 100644
--- a/tests/interactive/test-animator.c
+++ b/tests/interactive/test-animator.c
@@ -12,7 +12,7 @@ static ClutterActor *new_rect (gint r,
{
GError *error = NULL;
ClutterColor *color = clutter_color_new (r, g, b, a);
- ClutterActor *rectangle = clutter_rectangle_new_with_color (color);
+ ClutterActor *rectangle;
gchar *file = g_build_filename (TESTS_DATADIR, "redhand.png", NULL);
rectangle = clutter_texture_new_from_file (file, &error);
diff --git a/tests/interactive/test-cogl-offscreen.c b/tests/interactive/test-cogl-offscreen.c
index 4e1c210..72aeb79 100644
--- a/tests/interactive/test-cogl-offscreen.c
+++ b/tests/interactive/test-cogl-offscreen.c
@@ -83,8 +83,6 @@ test_coglbox_paint (ClutterActor *self)
gfloat texcoords[4] = { 0, 0, 1, 1 };
CoglHandle material;
- priv = TEST_COGLBOX_GET_PRIVATE (self);
-
cogl_set_source_color4ub (0x66, 0x66, 0xdd, 0xff);
cogl_rectangle (0, 0, 400, 400);
diff --git a/tests/interactive/test-cogl-tex-foreign.c b/tests/interactive/test-cogl-tex-foreign.c
index 18f4e44..b499abb 100644
--- a/tests/interactive/test-cogl-tex-foreign.c
+++ b/tests/interactive/test-cogl-tex-foreign.c
@@ -125,8 +125,6 @@ test_coglbox_paint(ClutterActor *self)
TestCoglboxPrivate *priv = TEST_COGLBOX_GET_PRIVATE (self);
gfloat texcoords[4] = { 0.3f, 0.3f, 0.7f, 0.7f };
- priv = TEST_COGLBOX_GET_PRIVATE (self);
-
cogl_set_source_color4ub (0x66, 0x66, 0xdd, 0xff);
cogl_rectangle (0,0,400,400);
diff --git a/tests/interactive/test-cogl-tex-getset.c b/tests/interactive/test-cogl-tex-getset.c
index 2697f1a..952947d 100644
--- a/tests/interactive/test-cogl-tex-getset.c
+++ b/tests/interactive/test-cogl-tex-getset.c
@@ -79,8 +79,6 @@ test_coglbox_paint(ClutterActor *self)
{
TestCoglboxPrivate *priv = TEST_COGLBOX_GET_PRIVATE (self);
gfloat texcoords[4] = { 0.0f, 0.0f, 1.0f, 1.0f };
-
- priv = TEST_COGLBOX_GET_PRIVATE (self);
cogl_set_source_color4ub (0x66, 0x66, 0xdd, 0xff);
cogl_rectangle (0, 0, 400, 400);
diff --git a/tests/interactive/test-devices.c b/tests/interactive/test-devices.c
index 498da35..d2c88f4 100644
--- a/tests/interactive/test-devices.c
+++ b/tests/interactive/test-devices.c
@@ -41,10 +41,6 @@ device_type_name (ClutterInputDevice *device)
default:
return "Unknown";
}
-
- g_warn_if_reached ();
-
- return NULL;
}
static const gchar *
@@ -73,10 +69,6 @@ axis_type_name (ClutterInputAxis axis)
default:
return "Unknown";
}
-
- g_warn_if_reached ();
-
- return NULL;
}
static gboolean
diff --git a/tests/interactive/test-state-animator.c b/tests/interactive/test-state-animator.c
index 94d93c2..42ae7d2 100644
--- a/tests/interactive/test-state-animator.c
+++ b/tests/interactive/test-state-animator.c
@@ -32,7 +32,7 @@ static ClutterActor *new_rect (gint r,
{
GError *error = NULL;
ClutterColor *color = clutter_color_new (r, g, b, a);
- ClutterActor *rectangle = clutter_rectangle_new_with_color (color);
+ ClutterActor *rectangle;
gchar *file = g_build_filename (TESTS_DATADIR, "redhand.png", NULL);
rectangle = clutter_texture_new_from_file (file, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]