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:
parent
2034f1677d
commit
511e266a85
@ -711,9 +711,7 @@ clutter_cairo_texture_class_init (ClutterCairoTextureClass *klass)
|
|||||||
static void
|
static void
|
||||||
clutter_cairo_texture_init (ClutterCairoTexture *self)
|
clutter_cairo_texture_init (ClutterCairoTexture *self)
|
||||||
{
|
{
|
||||||
ClutterCairoTexturePrivate *priv;
|
self->priv = CLUTTER_CAIRO_TEXTURE_GET_PRIVATE (self);
|
||||||
|
|
||||||
self->priv = priv = CLUTTER_CAIRO_TEXTURE_GET_PRIVATE (self);
|
|
||||||
|
|
||||||
/* FIXME - we are hardcoding the format; it would be good to have
|
/* FIXME - we are hardcoding the format; it would be good to have
|
||||||
* a :surface-format construct-only property for creating
|
* a :surface-format construct-only property for creating
|
||||||
|
@ -12,7 +12,7 @@ static ClutterActor *new_rect (gint r,
|
|||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
ClutterColor *color = clutter_color_new (r, g, b, a);
|
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);
|
gchar *file = g_build_filename (TESTS_DATADIR, "redhand.png", NULL);
|
||||||
rectangle = clutter_texture_new_from_file (file, &error);
|
rectangle = clutter_texture_new_from_file (file, &error);
|
||||||
|
@ -83,8 +83,6 @@ test_coglbox_paint (ClutterActor *self)
|
|||||||
gfloat texcoords[4] = { 0, 0, 1, 1 };
|
gfloat texcoords[4] = { 0, 0, 1, 1 };
|
||||||
CoglHandle material;
|
CoglHandle material;
|
||||||
|
|
||||||
priv = TEST_COGLBOX_GET_PRIVATE (self);
|
|
||||||
|
|
||||||
cogl_set_source_color4ub (0x66, 0x66, 0xdd, 0xff);
|
cogl_set_source_color4ub (0x66, 0x66, 0xdd, 0xff);
|
||||||
cogl_rectangle (0, 0, 400, 400);
|
cogl_rectangle (0, 0, 400, 400);
|
||||||
|
|
||||||
|
@ -125,8 +125,6 @@ test_coglbox_paint(ClutterActor *self)
|
|||||||
TestCoglboxPrivate *priv = TEST_COGLBOX_GET_PRIVATE (self);
|
TestCoglboxPrivate *priv = TEST_COGLBOX_GET_PRIVATE (self);
|
||||||
gfloat texcoords[4] = { 0.3f, 0.3f, 0.7f, 0.7f };
|
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_set_source_color4ub (0x66, 0x66, 0xdd, 0xff);
|
||||||
cogl_rectangle (0,0,400,400);
|
cogl_rectangle (0,0,400,400);
|
||||||
|
|
||||||
|
@ -79,8 +79,6 @@ test_coglbox_paint(ClutterActor *self)
|
|||||||
{
|
{
|
||||||
TestCoglboxPrivate *priv = TEST_COGLBOX_GET_PRIVATE (self);
|
TestCoglboxPrivate *priv = TEST_COGLBOX_GET_PRIVATE (self);
|
||||||
gfloat texcoords[4] = { 0.0f, 0.0f, 1.0f, 1.0f };
|
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_set_source_color4ub (0x66, 0x66, 0xdd, 0xff);
|
||||||
cogl_rectangle (0, 0, 400, 400);
|
cogl_rectangle (0, 0, 400, 400);
|
||||||
|
@ -41,10 +41,6 @@ device_type_name (ClutterInputDevice *device)
|
|||||||
default:
|
default:
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
g_warn_if_reached ();
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const gchar *
|
static const gchar *
|
||||||
@ -73,10 +69,6 @@ axis_type_name (ClutterInputAxis axis)
|
|||||||
default:
|
default:
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
g_warn_if_reached ();
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -32,7 +32,7 @@ static ClutterActor *new_rect (gint r,
|
|||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
ClutterColor *color = clutter_color_new (r, g, b, a);
|
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);
|
gchar *file = g_build_filename (TESTS_DATADIR, "redhand.png", NULL);
|
||||||
rectangle = clutter_texture_new_from_file (file, &error);
|
rectangle = clutter_texture_new_from_file (file, &error);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user