operations: Fix set but unused variables which gcc

Most of these are actually valid warnings, thus in total line count reduction,
yay!
parent 745352c4
......@@ -60,5 +60,8 @@ gegl_module_register (GTypeModule *module)
dummy = reflect_get_type ();
dummy = transform_get_type ();
dummy ++; /* silence gcc, having it is required to avoid optimizing
away the _get_type calls themselves */
return TRUE;
}
......@@ -101,10 +101,8 @@ static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
operation_class = GEGL_OPERATION_CLASS (klass);
source_class = GEGL_OPERATION_SOURCE_CLASS (klass);
operation_class->process = process;
operation_class->get_bounding_box = get_bounding_box;
......
......@@ -68,10 +68,8 @@ static void attach (GeglOperation *operation)
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GObjectClass *object_class;
GeglOperationClass *operation_class;
object_class = G_OBJECT_CLASS (klass);
operation_class = GEGL_OPERATION_CLASS (klass);
operation_class->attach = attach;
......
......@@ -144,11 +144,9 @@ gegl_chant_class_init (GeglChantClass *klass)
{
GObjectClass *object_class;
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
object_class = G_OBJECT_CLASS (klass);
operation_class = GEGL_OPERATION_CLASS (klass);
source_class = GEGL_OPERATION_SOURCE_CLASS (klass);
object_class->dispose = gegl_introspect_dispose;
......
......@@ -116,11 +116,9 @@ static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
GObjectClass *object_class;
operation_class = GEGL_OPERATION_CLASS (klass);
source_class = GEGL_OPERATION_SOURCE_CLASS (klass);
object_class = G_OBJECT_CLASS (klass);
object_class->finalize = finalize;
......
......@@ -63,11 +63,9 @@ process (GeglOperation *operation,
GeglBuffer *output,
const GeglRectangle *result)
{
GeglOperationFilter *filter;
GeglChantO *o;
Priv *p;
filter = GEGL_OPERATION_FILTER (operation);
o = GEGL_CHANT_PROPERTIES (operation);
p = (Priv*)o->chant_data;
if (p == NULL)
......
......@@ -114,10 +114,8 @@ static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
operation_class = GEGL_OPERATION_CLASS (klass);
source_class = GEGL_OPERATION_SOURCE_CLASS (klass);
G_OBJECT_CLASS (klass)->dispose = dispose;
......
......@@ -163,11 +163,9 @@ static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
GObjectClass *object_class;
operation_class = GEGL_OPERATION_CLASS (klass);
source_class = GEGL_OPERATION_SOURCE_CLASS (klass);
object_class = G_OBJECT_CLASS (klass);
object_class->finalize = finalize;
......
......@@ -120,10 +120,8 @@ prepare (GeglOperation *operation)
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GObjectClass *object_class;
GeglOperationClass *operation_class;
object_class = G_OBJECT_CLASS (klass);
operation_class = GEGL_OPERATION_CLASS (klass);
operation_class->name = "gegl:rectangle";
......
......@@ -60,10 +60,8 @@ static void attach (GeglOperation *operation)
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GObjectClass *object_class;
GeglOperationClass *operation_class;
object_class = G_OBJECT_CLASS (klass);
operation_class = GEGL_OPERATION_CLASS (klass);
operation_class->attach = attach;
......
......@@ -81,7 +81,6 @@ gegl_buffer_import_png (GeglBuffer *gegl_buffer,
gpointer format)
{
gint width;
gint height;
gint bit_depth;
gint bpp;
gint number_of_passes=1;
......@@ -144,7 +143,6 @@ gegl_buffer_import_png (GeglBuffer *gegl_buffer,
&interlace_type,
NULL, NULL);
width = w;
height = h;
if (ret_width)
*ret_width = w;
if (ret_height)
......
......@@ -157,11 +157,11 @@ main (gint argc,
if (max_diff > 1.5 &&
!strstr (argv[2], "broken"))
{
GeglNode *graph, *sink;
GeglNode *sink;
gchar *debug_path = g_malloc (strlen (argv[2])+16);
memcpy (debug_path, argv[2], strlen (argv[2])+1);
memcpy (debug_path + strlen(argv[2])-4, "-diff.png", 11);
graph = gegl_graph (sink=gegl_node ("gegl:png-save",
gegl_graph (sink=gegl_node ("gegl:png-save",
"path", debug_path, NULL,
gegl_node ("gegl:buffer-source", "buffer", debug_buf, NULL)));
gegl_node_process (sink);
......
......@@ -245,17 +245,15 @@ static void category_menu_index (gpointer key,
gchar *category = key;
GList *operations = value;
GList *iter;
gboolean comma;
if (!strcmp (category, "hidden"))
return;
for (iter=operations, comma=FALSE;iter;iter = g_list_next (iter))
for (iter=operations;iter;iter = g_list_next (iter))
{
GeglOperationClass *klass = iter->data;
if (strstr (klass->categories, "hidden"))
continue;
g_print ("<li><a href='#op_%s'>%s</a></li>\n", klass->name, klass->name);
comma = TRUE;
}
}
......@@ -266,7 +264,6 @@ main (gint argc,
GList *operations;
GList *iter;
GHashTable *categories = NULL;
gboolean comma;
gegl_init (&argc, &argv);
......@@ -274,7 +271,7 @@ main (gint argc,
/* Collect categories */
categories = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
for (iter=operations, comma=FALSE;iter;iter = g_list_next (iter))
for (iter=operations;iter;iter = g_list_next (iter))
{
GeglOperationClass *klass = iter->data;
const gchar *ptr = klass->categories;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment