[dia] [warningectomy] unused variable
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [warningectomy] unused variable
- Date: Sat, 4 May 2013 18:59:25 +0000 (UTC)
commit 1c1578451633285dafd06dfb2204e6f287e8b5ff
Author: Hans Breuer <hans breuer org>
Date: Sat May 4 11:43:23 2013 +0200
[warningectomy] unused variable
Removed superfluous variables where they were pure noise.
Now every unused variable warning should mark some potentially
unfinished stuff, i.e. deserve a closer look.
app/commands.c | 2 --
app/disp_callbacks.c | 2 --
app/grid.c | 2 +-
app/object_ops.c | 1 -
app/render_gdk.c | 2 --
app/sheets_dialog.c | 2 --
app/sheets_dialog_callbacks.c | 1 -
app/textedit_tool.c | 1 -
lib/diapathrenderer.c | 4 +---
lib/prop_sdarray.c | 1 -
lib/prop_sdarray_widget.c | 3 +--
lib/propobject.c | 1 -
lib/standard-path.c | 2 --
objects/Istar/actor.c | 1 -
objects/flowchart/ellipse.c | 1 -
objects/standard/arc.c | 9 ++++-----
objects/standard/zigzagline.c | 1 -
plug-ins/cairo/diacairo-interactive.c | 21 ++++++++++++++-------
plug-ins/cairo/diacairo-renderer.c | 1 -
plug-ins/postscript/diapsrenderer.c | 2 --
plug-ins/svg/render_svg.c | 1 -
plug-ins/vdx/vdx-import.c | 1 -
22 files changed, 21 insertions(+), 41 deletions(-)
---
diff --git a/app/commands.c b/app/commands.c
index b4571f6..88868eb 100644
--- a/app/commands.c
+++ b/app/commands.c
@@ -268,7 +268,6 @@ received_clipboard_image_handler(GtkClipboard *clipboard,
}
if (!change) {
- gint x, y;
Point pt;
DiaObjectType *type;
Handle *handle1;
@@ -352,7 +351,6 @@ _targets_receive (GtkClipboard *clipboard,
gint n_atoms,
gpointer data)
{
- GdkAtom try_xml = 0;
gint i;
gchar *aname;
diff --git a/app/disp_callbacks.c b/app/disp_callbacks.c
index f800881..b5e25d5 100644
--- a/app/disp_callbacks.c
+++ b/app/disp_callbacks.c
@@ -575,8 +575,6 @@ ddisplay_canvas_events (GtkWidget *canvas,
Point middle;
int return_val;
int key_handled;
- int width, height;
- int new_size;
int im_context_used;
static gboolean moving = FALSE;
diff --git a/app/grid.c b/app/grid.c
index bbb862a..c80eabf 100644
--- a/app/grid.c
+++ b/app/grid.c
@@ -55,7 +55,7 @@ grid_step (DDisplay *ddisp, GtkOrientation orientation,
real *start, int *ipos, gboolean *is_major)
{
real length;
- real pos, tmp;
+ real pos;
guint major_lines = ddisp->diagram->grid.major_lines;
int x, y;
int major_count = 1;
diff --git a/app/object_ops.c b/app/object_ops.c
index fb80612..71b0644 100644
--- a/app/object_ops.c
+++ b/app/object_ops.c
@@ -188,7 +188,6 @@ filter_connected (const GList *objects, GList **connected, GList **unconnected)
for (list = objects; list != NULL; list = g_list_next (list)) {
DiaObject *obj = list->data;
- Handle *handle;
gboolean is_connected = FALSE;
int i;
diff --git a/app/render_gdk.c b/app/render_gdk.c
index e424160..930e36b 100644
--- a/app/render_gdk.c
+++ b/app/render_gdk.c
@@ -100,7 +100,6 @@ dia_gdk_interactive_renderer_class_init(DiaGdkInteractiveRendererClass *klass)
static void
dia_gdk_interactive_renderer_init(DiaGdkInteractiveRenderer *object)
{
- DiaGdkInteractiveRenderer *ia_renderer = DIA_GDK_INTERACTIVE_RENDERER (object);
DiaGdkRenderer *renderer = DIA_GDK_RENDERER(object);
DiaRenderer *dia_renderer = DIA_RENDERER(object);
@@ -115,7 +114,6 @@ DiaRenderer *
new_gdk_renderer(DDisplay *ddisp)
{
DiaGdkRenderer *renderer;
- GType renderer_type = 0;
renderer = g_object_new (DIA_TYPE_GDK_INTERACTIVE_RENDERER, NULL);
renderer->transform = dia_transform_new (&ddisp->visible, &ddisp->zoom_factor);
diff --git a/app/sheets_dialog.c b/app/sheets_dialog.c
index bdf7e9b..18c3634 100644
--- a/app/sheets_dialog.c
+++ b/app/sheets_dialog.c
@@ -185,7 +185,6 @@ GtkWidget*
create_sheets_edit_dialog (void)
{
GtkWidget *sheets_edit_dialog;
- GtkWidget *pixmap_object;
GtkBuilder *builder;
builder = builder_new_from_file ("ui/sheets-edit-dialog.xml");
@@ -218,7 +217,6 @@ GtkWidget*
create_sheets_remove_dialog (void)
{
GtkWidget *sheets_remove_dialog;
- GtkWidget *pixmap_object;
GtkBuilder *builder;
builder = builder_new_from_file ("ui/sheets-remove-dialog.xml");
diff --git a/app/sheets_dialog_callbacks.c b/app/sheets_dialog_callbacks.c
index 50a2cbb..63512b4 100644
--- a/app/sheets_dialog_callbacks.c
+++ b/app/sheets_dialog_callbacks.c
@@ -680,7 +680,6 @@ void
on_sheets_dialog_button_new_clicked (GtkButton *button,
gpointer user_data)
{
- GtkWidget *combo;
GtkWidget *wrapbox;
GList *button_list;
GtkWidget *active_button;
diff --git a/app/textedit_tool.c b/app/textedit_tool.c
index 8623947..657f382 100644
--- a/app/textedit_tool.c
+++ b/app/textedit_tool.c
@@ -100,7 +100,6 @@ textedit_button_release(TexteditTool *tool, GdkEventButton *event,
DDisplay *ddisp)
{
Point clickedpoint;
- Diagram *diagram = ddisp->diagram;
DiaObject *obj = click_select_object (ddisp, &clickedpoint, event);
if (obj) {
diff --git a/lib/diapathrenderer.c b/lib/diapathrenderer.c
index 04331b2..2eea0b9 100644
--- a/lib/diapathrenderer.c
+++ b/lib/diapathrenderer.c
@@ -125,7 +125,7 @@ _get_current_path (DiaPathRenderer *self,
/*!
* \brief Starting a new rendering run
* Could be used to clean the path leftovers from a previous run.
- * Typical export tenderers flush here.
+ * Typical export renderers flush here.
*/
static void
begin_render (DiaRenderer *self, const Rectangle *update)
@@ -138,7 +138,6 @@ begin_render (DiaRenderer *self, const Rectangle *update)
static void
end_render(DiaRenderer *self)
{
- DiaPathRenderer *renderer = DIA_PATH_RENDERER (self);
}
static void
set_linewidth(DiaRenderer *self, real linewidth)
@@ -678,7 +677,6 @@ create_standard_path_from_object (DiaObject *obj)
} else {
/* create a group of pathes */
GList *list = NULL;
- GArray *points;
gsize i;
for (i = 0; i < pr->pathes->len; ++i) {
diff --git a/lib/prop_sdarray.c b/lib/prop_sdarray.c
index 4000f09..fbcb626 100644
--- a/lib/prop_sdarray.c
+++ b/lib/prop_sdarray.c
@@ -90,7 +90,6 @@ arrayprop_load(ArrayProperty *prop, AttributeNode attr, DataNode data, DiaContex
{
const PropDescCommonArrayExtra *extra = prop->common.descr->extra_data;
DataNode composite;
- GError *err = NULL;
arrayprop_freerecords(prop);
g_ptr_array_set_size(prop->records,0);
diff --git a/lib/prop_sdarray_widget.c b/lib/prop_sdarray_widget.c
index 604b691..b1bca60 100644
--- a/lib/prop_sdarray_widget.c
+++ b/lib/prop_sdarray_widget.c
@@ -350,8 +350,7 @@ _arrayprop_get_widget (ArrayProperty *prop, PropDialog *dialog)
{
GtkTreeStore *model;
GtkWidget *view;
- int idx, i, cols, rows;
- const PropDescCommonArrayExtra *extra = prop->common.descr->extra_data;
+ int idx, i, cols;
/* create */
cols = prop->ex_props->len;
diff --git a/lib/propobject.c b/lib/propobject.c
index b9dceba..d8e368d 100644
--- a/lib/propobject.c
+++ b/lib/propobject.c
@@ -333,7 +333,6 @@ void
object_load_props(DiaObject *obj, ObjectNode obj_node, DiaContext *ctx)
{
GPtrArray *props;
- GError *err = NULL;
g_return_if_fail(obj != NULL);
g_return_if_fail(obj_node != NULL);
diff --git a/lib/standard-path.c b/lib/standard-path.c
index 7bfd349..51cbe1b 100644
--- a/lib/standard-path.c
+++ b/lib/standard-path.c
@@ -392,8 +392,6 @@ stdpath_update_data (StdPath *stdpath)
static void
stdpath_draw(StdPath *stdpath, DiaRenderer *renderer)
{
- DiaObject *obj = &stdpath->object;
-
DIA_RENDERER_GET_CLASS (renderer)->set_linewidth (renderer, stdpath->line_width);
DIA_RENDERER_GET_CLASS (renderer)->set_linestyle (renderer, stdpath->line_style);
DIA_RENDERER_GET_CLASS (renderer)->set_linejoin(renderer, stdpath->line_join);
diff --git a/objects/Istar/actor.c b/objects/Istar/actor.c
index 43f8a05..a3e88fe 100644
--- a/objects/Istar/actor.c
+++ b/objects/Istar/actor.c
@@ -188,7 +188,6 @@ actor_distance_from(Actor *actor, Point *point)
{
Element *elem = &actor->element;
Point c;
- real dist, rad;
c.x = elem->corner.x + elem->width / 2;
c.y = elem->corner.y + elem->height/ 2;
diff --git a/objects/flowchart/ellipse.c b/objects/flowchart/ellipse.c
index fbcb790..3d7fe7c 100644
--- a/objects/flowchart/ellipse.c
+++ b/objects/flowchart/ellipse.c
@@ -242,7 +242,6 @@ ellipse_distance_from(Ellipse *ellipse, Point *point)
{
Element *elem = &ellipse->element;
Point c;
- real dist, rad;
c.x = elem->corner.x + elem->width / 2;
c.y = elem->corner.y + elem->height/ 2;
diff --git a/objects/standard/arc.c b/objects/standard/arc.c
index 05c2c59..d72d981 100644
--- a/objects/standard/arc.c
+++ b/objects/standard/arc.c
@@ -327,7 +327,6 @@ point_projection_is_between (const Point *c,
const Point *b)
{
real len = distance_point_point (a, b);
- real r;
if (len > 0) {
real r = ((a->y - c->y) * (a->y - b->y) - (a->x - c->x) * (b->x - a->x)) / (len * len);
@@ -535,12 +534,12 @@ calculate_arc_object_edge(Arc *arc, real ang_start, real ang_end, DiaObject *obj
mid2 = get_middle_arc_angle(ang_start, ang_end, clockwiseness);
mid3 = ang_end;
- TRACE(printf("Find middle angle between %f� and %f�\n",ang_start,ang_end));
+ TRACE(printf("Find middle angle between %f° and %f°\n",ang_start,ang_end));
/* If the other end is inside the object */
arc_get_point_at_angle(arc,target,mid1);
dist = obj->ops->distance_from(obj, target );
if (dist < 0.001){
- TRACE(printf("Point at %f�: %f,%f is very close to object: %f, returning it\n",mid1, target->x,
target->y, dist));
+ TRACE(printf("Point at %f°: %f,%f is very close to object: %f, returning it\n",mid1, target->x,
target->y, dist));
return ;
}
do {
@@ -564,7 +563,7 @@ calculate_arc_object_edge(Arc *arc, real ang_start, real ang_end, DiaObject *obj
#ifdef TRACE_DIST
for (j = 0; j < i; j++) {
arc_get_point_at_angle(arc,target,trace[j]);
- printf("%d: %f � : %f,%f :%f\n", j, trace[j],target->x,target->y, disttrace[j]);
+ printf("%d: %f° : %f,%f :%f\n", j, trace[j],target->x,target->y, disttrace[j]);
}
#endif
arc_get_point_at_angle(arc,target,mid2);
@@ -588,7 +587,7 @@ arc_draw(Arc *arc, DiaRenderer *renderer)
start_cp = arc->connection.endpoint_handles[0].connected_to;
end_cp = arc->connection.endpoint_handles[1].connected_to;
- TRACE(printf("drawing arc:\n start:%f �:%f,%f \tend:%f
�:%f,%f\n",arc->angle1,endpoints[0].x,endpoints[0].y, arc->angle2,endpoints[1].x,endpoints[1].y));
+ TRACE(printf("drawing arc:\n start:%f°:%f,%f \tend:%f°:%f,%f\n",arc->angle1,endpoints[0].x,endpoints[0].y,
arc->angle2,endpoints[1].x,endpoints[1].y));
if (connpoint_is_autogap(start_cp)) {
TRACE(printf("computing start intersection\ncurve_distance: %f\n",arc->curve_distance));
diff --git a/objects/standard/zigzagline.c b/objects/standard/zigzagline.c
index be1cfd2..dff38a1 100644
--- a/objects/standard/zigzagline.c
+++ b/objects/standard/zigzagline.c
@@ -396,7 +396,6 @@ zigzagline_delete_segment_callback(DiaObject *obj, Point *clicked, gpointer data
static ObjectChange *
_convert_to_bezierline_callback (DiaObject *obj, Point *clicked, gpointer data)
{
- DiaObject *poly;
Zigzagline *zigzagline = (Zigzagline *)obj;
OrthConn *orth = &zigzagline->orth;
BezPoint *bp;
diff --git a/plug-ins/cairo/diacairo-interactive.c b/plug-ins/cairo/diacairo-interactive.c
index fad917b..9cd2296 100644
--- a/plug-ins/cairo/diacairo-interactive.c
+++ b/plug-ins/cairo/diacairo-interactive.c
@@ -153,7 +153,9 @@ cairo_interactive_renderer_init (DiaCairoInteractiveRenderer *object, void *p)
static void
cairo_interactive_renderer_finalize (GObject *object)
{
+#if !DIA_CAIRO_WITH_PIXMAP
DiaCairoInteractiveRenderer *renderer = DIA_CAIRO_INTERACTIVE_RENDERER (object);
+#endif
DiaCairoRenderer *base_renderer = DIA_CAIRO_RENDERER (object);
if (base_renderer->cr)
@@ -474,7 +476,6 @@ set_size(DiaRenderer *object, gpointer window,
{
DiaCairoInteractiveRenderer *renderer = DIA_CAIRO_INTERACTIVE_RENDERER (object);
DiaCairoRenderer *base_renderer = DIA_CAIRO_RENDERER (object);
- cairo_rectangle_t extents;
renderer->width = width;
renderer->height = height;
@@ -482,7 +483,9 @@ set_size(DiaRenderer *object, gpointer window,
if (renderer->pixmap != NULL)
g_object_unref(renderer->pixmap);
- /* TODO: we can probably get rid of this extra pixmap and just draw directly to what gdk_cairo_create()
gives us for the window */
+ /* TODO: we can probably get rid of this extra pixmap and just draw directly
+ * to what gdk_cairo_create() gives us for the window
+ */
renderer->pixmap = gdk_pixmap_new(GDK_WINDOW(window), width, height, -1);
#else
# if GTK_CHECK_VERSION(2,22,0)
@@ -490,11 +493,15 @@ set_size(DiaRenderer *object, gpointer window,
CAIRO_CONTENT_COLOR,
width, height);
# else
- extents.x = 0;
- extents.y = 0;
- extents.width = width;
- extents.height = height;
- renderer->pixmap = cairo_recording_surface_create(CAIRO_CONTENT_COLOR_ALPHA, &extents);
+ {
+ cairo_rectangle_t extents;
+
+ extents.x = 0;
+ extents.y = 0;
+ extents.width = width;
+ extents.height = height;
+ renderer->pixmap = cairo_recording_surface_create(CAIRO_CONTENT_COLOR_ALPHA, &extents);
+ }
# endif
#endif
diff --git a/plug-ins/cairo/diacairo-renderer.c b/plug-ins/cairo/diacairo-renderer.c
index 279657d..08863f8 100644
--- a/plug-ins/cairo/diacairo-renderer.c
+++ b/plug-ins/cairo/diacairo-renderer.c
@@ -388,7 +388,6 @@ set_dashlength(DiaRenderer *self, real length)
static void
set_fillstyle(DiaRenderer *self, FillStyle mode)
{
- DiaCairoRenderer *renderer = DIA_CAIRO_RENDERER (self);
DIAG_NOTE(g_message("set_fillstyle %d", mode));
switch(mode) {
diff --git a/plug-ins/postscript/diapsrenderer.c b/plug-ins/postscript/diapsrenderer.c
index 74748e8..c2dd07e 100644
--- a/plug-ins/postscript/diapsrenderer.c
+++ b/plug-ins/postscript/diapsrenderer.c
@@ -266,8 +266,6 @@ set_dashlength(DiaRenderer *self, real length)
static void
set_fillstyle(DiaRenderer *self, FillStyle mode)
{
- DiaPsRenderer *renderer = DIA_PS_RENDERER(self);
-
switch(mode) {
case FILLSTYLE_SOLID:
break;
diff --git a/plug-ins/svg/render_svg.c b/plug-ins/svg/render_svg.c
index 57bf6fd..551f716 100644
--- a/plug-ins/svg/render_svg.c
+++ b/plug-ins/svg/render_svg.c
@@ -228,7 +228,6 @@ static DiaSvgRenderer *
new_svg_renderer(DiagramData *data, const char *filename)
{
DiaSvgRenderer *renderer;
- FILE *file;
gchar buf[512];
Rectangle *extent;
xmlDtdPtr dtd;
diff --git a/plug-ins/vdx/vdx-import.c b/plug-ins/vdx/vdx-import.c
index 6f75f7c..bbc25f8 100644
--- a/plug-ins/vdx/vdx-import.c
+++ b/plug-ins/vdx/vdx-import.c
@@ -610,7 +610,6 @@ vdx_simple_properties(DiaObject *obj,
const VDXDocument* theDoc, DiaContext *ctx)
{
GPtrArray *props = g_ptr_array_new ();
- unsigned int debug_id;
if (Line)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]