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
This commit is contained in:
Jasper St. Pierre 2012-11-30 21:44:00 -05:00
parent 2034f1677d
commit 511e266a85
7 changed files with 3 additions and 19 deletions

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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);