[gegl] Remove unused variables/assignments.
- From: Øyvind Kolås <ok src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gegl] Remove unused variables/assignments.
- Date: Thu, 11 Feb 2010 17:45:38 +0000 (UTC)
commit 182da42ce2a2eec68a4753deb138007190188054
Author: �yvind Kolås <pippin gimp org>
Date: Thu Feb 11 17:48:11 2010 +0000
Remove unused variables/assignments.
gegl/buffer/gegl-tile-handler-cache.c | 5 -----
gegl/buffer/gegl-tile-handler-zoom.c | 5 +----
gegl/gegl-xml.c | 2 --
gegl/graph/gegl-node.c | 2 +-
gegl/operation/gegl-operation-context.c | 6 ------
gegl/operation/gegl-operation-filter.c | 4 +---
gegl/operation/gegl-operation-point-filter.c | 3 ---
gegl/operation/gegl-operation-sink.c | 2 --
gegl/process/gegl-processor.c | 1 -
gegl/property-types/gegl-path.c | 17 -----------------
10 files changed, 3 insertions(+), 44 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-handler-cache.c b/gegl/buffer/gegl-tile-handler-cache.c
index e929e2a..8e99db3 100644
--- a/gegl/buffer/gegl-tile-handler-cache.c
+++ b/gegl/buffer/gegl-tile-handler-cache.c
@@ -154,9 +154,6 @@ static void gegl_tile_handler_cache_invalidate (GeglTileHandlerCache *cac
static void
finalize (GObject *object)
{
- GeglTileHandlerCache *cache;
- cache = (GeglTileHandlerCache *) object;
-
G_OBJECT_CLASS (gegl_tile_handler_cache_parent_class)->finalize (object);
}
@@ -528,7 +525,6 @@ gegl_tile_handler_cache_insert (GeglTileHandlerCache *cache,
gint z)
{
CacheItem *item = g_slice_new (CacheItem);
- guint count;
item->handler = cache;
item->tile = gegl_tile_ref (tile);
@@ -542,7 +538,6 @@ gegl_tile_handler_cache_insert (GeglTileHandlerCache *cache,
cache_total += item->tile->size;
g_queue_push_head (cache_queue, item);
- count = g_queue_get_length (cache_queue);
g_hash_table_insert (cache_ht, item, item);
while (cache_total > gegl_config()->cache_size)
diff --git a/gegl/buffer/gegl-tile-handler-zoom.c b/gegl/buffer/gegl-tile-handler-zoom.c
index 3033458..06814cd 100644
--- a/gegl/buffer/gegl-tile-handler-zoom.c
+++ b/gegl/buffer/gegl-tile-handler-zoom.c
@@ -280,7 +280,7 @@ get_tile (GeglTileSource *gegl_tile_source,
}
}
gegl_tile_lock (tile);
- data = gegl_tile_get_data (tile);
+ data = gegl_tile_get_data (tile); /* XXX: is this needed? */
for (i = 0; i < 2; i++)
for (j = 0; j < 2; j++)
@@ -377,12 +377,9 @@ constructor (GType type,
GObjectConstructParam *params)
{
GObject *object;
- GeglTileHandlerZoom *zoom;
object = G_OBJECT_CLASS (gegl_tile_handler_zoom_parent_class)->constructor (type, n_params, params);
- zoom = GEGL_TILE_HANDLER_ZOOM (object);
-
return object;
}
diff --git a/gegl/gegl-xml.c b/gegl/gegl-xml.c
index b0249c3..dc407a0 100644
--- a/gegl/gegl-xml.c
+++ b/gegl/gegl-xml.c
@@ -778,9 +778,7 @@ serialize_properties (SerializeState *ss,
else if (properties[i]->value_type == GEGL_TYPE_CURVE)
{
GeglCurve *curve;
- guint num_points;
gegl_node_get (node, properties[i]->name, &curve, NULL);
- num_points = gegl_curve_num_points (curve);
xml_param_start (ss, indent + 2, properties[i]->name);
g_string_append (ss->buf, "\n");
xml_curve (ss, indent + 4, curve);
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index 0120d91..32de4c8 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -2181,7 +2181,7 @@ gegl_node_new_child (GeglNode *parent,
name = first_property_name;
va_start (var_args, first_property_name);
- gegl_node_set_valist (node, first_property_name, var_args);
+ gegl_node_set_valist (node, name, var_args);
va_end (var_args);
if (parent)
diff --git a/gegl/operation/gegl-operation-context.c b/gegl/operation/gegl-operation-context.c
index 3e21908..28f0c72 100644
--- a/gegl/operation/gegl-operation-context.c
+++ b/gegl/operation/gegl-operation-context.c
@@ -282,13 +282,10 @@ GObject *
gegl_operation_context_get_object (GeglOperationContext *context,
const gchar *padname)
{
- GeglOperation *operation;
GObject *ret;
GParamSpec *pspec;
GValue value = { 0, };
- operation = context->operation;
-
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (context->operation)), padname);
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
gegl_operation_context_get_property (context, padname, &value);
@@ -309,12 +306,9 @@ GeglBuffer *
gegl_operation_context_get_source (GeglOperationContext *context,
const gchar *padname)
{
- GeglOperation *operation;
GeglBuffer *real_input;
GeglBuffer *input;
- operation = context->operation;
-
real_input = GEGL_BUFFER (gegl_operation_context_get_object (context, padname));
if (!real_input)
return NULL;
diff --git a/gegl/operation/gegl-operation-filter.c b/gegl/operation/gegl-operation-filter.c
index b667fb9..d720fbe 100644
--- a/gegl/operation/gegl-operation-filter.c
+++ b/gegl/operation/gegl-operation-filter.c
@@ -184,14 +184,12 @@ gegl_operation_filter_process (GeglOperation *operation,
const gchar *output_prop,
const GeglRectangle *result)
{
- GeglOperationFilter *gegl_operation_filter;
GeglOperationFilterClass *klass;
GeglBuffer *input;
GeglBuffer *output;
gboolean success = FALSE;
- gegl_operation_filter = GEGL_OPERATION_FILTER (operation);
- klass = GEGL_OPERATION_FILTER_GET_CLASS (operation);
+ klass = GEGL_OPERATION_FILTER_GET_CLASS (operation);
g_assert (klass->process);
diff --git a/gegl/operation/gegl-operation-point-filter.c b/gegl/operation/gegl-operation-point-filter.c
index c04224e..ae78da1 100644
--- a/gegl/operation/gegl-operation-point-filter.c
+++ b/gegl/operation/gegl-operation-point-filter.c
@@ -124,13 +124,10 @@ static gboolean gegl_operation_point_filter_op_process
const gchar *output_pad,
const GeglRectangle *roi)
{
- GeglOperationFilterClass *klass;
GeglBuffer *input;
GeglBuffer *output;
gboolean success = FALSE;
- klass = GEGL_OPERATION_FILTER_GET_CLASS (operation);
-
input = gegl_operation_context_get_source (context, "input");
if (gegl_can_do_inplace_processing (operation, input, roi))
diff --git a/gegl/operation/gegl-operation-sink.c b/gegl/operation/gegl-operation-sink.c
index c588649..5c6dc64 100644
--- a/gegl/operation/gegl-operation-sink.c
+++ b/gegl/operation/gegl-operation-sink.c
@@ -121,12 +121,10 @@ gegl_operation_sink_process (GeglOperation *operation,
const gchar *output_prop,
const GeglRectangle *result)
{
- GeglOperationSink *gegl_operation_sink;
GeglOperationSinkClass *klass;
GeglBuffer *input;
gboolean success = FALSE;
- gegl_operation_sink = GEGL_OPERATION_SINK (operation);
klass = GEGL_OPERATION_SINK_GET_CLASS (operation);
g_assert (klass->process);
diff --git a/gegl/process/gegl-processor.c b/gegl/process/gegl-processor.c
index 8d5e2fb..364a992 100644
--- a/gegl/process/gegl-processor.c
+++ b/gegl/process/gegl-processor.c
@@ -632,7 +632,6 @@ gegl_processor_render (GeglProcessor *processor,
{
*progress = (double) valid / wanted;
}
- wanted = 1;
}
return more_work;
diff --git a/gegl/property-types/gegl-path.c b/gegl/property-types/gegl-path.c
index a187dc5..8df13c9 100644
--- a/gegl/property-types/gegl-path.c
+++ b/gegl/property-types/gegl-path.c
@@ -128,17 +128,12 @@ static void copy_data (const GeglPathItem *src,
GeglPathItem *dst)
{
InstructionInfo *src_info;
- InstructionInfo *dst_info;
gint i;
if (!src)
return;
src_info = lookup_instruction_info(src->type);
- dst_info = lookup_instruction_info(dst->type);
-
-/*
- g_assert (src_info->pairs <= dst_info->pairs);*/
dst->type = src->type;
for (i=0;i<(src_info->n_items+1)/2;i++)
@@ -202,7 +197,6 @@ gegl_path_list_append_item (GeglPathList *head,
g_assert (res);
*res = iter;
- tail = iter;
return head;
}
@@ -323,7 +317,6 @@ gegl_path_list_flatten (GeglMatrix3 matrix,
GeglPathList *original)
{
GeglPathList *iter;
- GeglPathList *prev = NULL;
GeglPathList *self = NULL;
GeglPathList *endp = NULL;
@@ -340,7 +333,6 @@ gegl_path_list_flatten (GeglMatrix3 matrix,
endp = self;
while (endp && endp->next)
endp=endp->next;
- prev = iter;
}
return self;
}
@@ -401,8 +393,6 @@ path_calc (GeglPathList *path,
gfloat need_to_travel = 0;
gfloat x = 0, y = 0;
- gboolean had_move_to = FALSE;
-
while (iter)
{
/*fprintf (stderr, "%c, %i %i\n", iter->d.type, iter->d.point[0].x, iter->d.point[0].y);*/
@@ -413,7 +403,6 @@ path_calc (GeglPathList *path,
y = iter->d.point[0].y;
need_to_travel = 0;
traveled_length = 0;
- had_move_to = TRUE;
break;
case 'L':
@@ -488,7 +477,6 @@ static void path_calc_values (GeglPathList *path,
gfloat traveled_length = 0;
gfloat need_to_travel = 0;
gfloat x = 0,y = 0;
- gboolean had_move_to = FALSE;
GeglPathList *iter;
gfloat spacing = length / num_samples;
@@ -503,7 +491,6 @@ static void path_calc_values (GeglPathList *path,
y = iter->d.point[0].y;
need_to_travel = 0;
traveled_length = 0;
- had_move_to = TRUE;
break;
case 'L':
{
@@ -1668,8 +1655,6 @@ gegl_path_closest_point (GeglPath *path,
GeglPathPrivate *priv = GEGL_PATH_GET_PRIVATE (path);
GeglPathList *iter;
/* what node was the one before us ? */
- iter = priv->path;
- i=0;
for (iter=priv->path,i=0; iter;i++,iter=iter->next)
{
@@ -2060,7 +2045,6 @@ void gegl_path_stroke (GeglBuffer *buffer,
gfloat traveled_length = 0;
gfloat need_to_travel = 0;
gfloat x = 0,y = 0;
- gboolean had_move_to = FALSE;
GeglPathList *iter;
gdouble xmin, xmax, ymin, ymax;
GeglRectangle extent;
@@ -2102,7 +2086,6 @@ void gegl_path_stroke (GeglBuffer *buffer,
y = iter->d.point[0].y;
need_to_travel = 0;
traveled_length = 0;
- had_move_to = TRUE;
break;
case 'L':
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]