• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Révision1c1578451633285dafd06dfb2204e6f287e8b5ff (tree)
l'heure2013-05-04 18:43:23
AuteurHans Breuer <hans@breu...>
CommiterHans Breuer

Message de Log

[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.

Change Summary

Modification

--- a/app/commands.c
+++ b/app/commands.c
@@ -268,7 +268,6 @@ received_clipboard_image_handler(GtkClipboard *clipboard,
268268 }
269269
270270 if (!change) {
271- gint x, y;
272271 Point pt;
273272 DiaObjectType *type;
274273 Handle *handle1;
@@ -352,7 +351,6 @@ _targets_receive (GtkClipboard *clipboard,
352351 gint n_atoms,
353352 gpointer data)
354353 {
355- GdkAtom try_xml = 0;
356354 gint i;
357355 gchar *aname;
358356
--- a/app/disp_callbacks.c
+++ b/app/disp_callbacks.c
@@ -575,8 +575,6 @@ ddisplay_canvas_events (GtkWidget *canvas,
575575 Point middle;
576576 int return_val;
577577 int key_handled;
578- int width, height;
579- int new_size;
580578 int im_context_used;
581579 static gboolean moving = FALSE;
582580
--- a/app/grid.c
+++ b/app/grid.c
@@ -55,7 +55,7 @@ grid_step (DDisplay *ddisp, GtkOrientation orientation,
5555 real *start, int *ipos, gboolean *is_major)
5656 {
5757 real length;
58- real pos, tmp;
58+ real pos;
5959 guint major_lines = ddisp->diagram->grid.major_lines;
6060 int x, y;
6161 int major_count = 1;
--- a/app/object_ops.c
+++ b/app/object_ops.c
@@ -188,7 +188,6 @@ filter_connected (const GList *objects, GList **connected, GList **unconnected)
188188
189189 for (list = objects; list != NULL; list = g_list_next (list)) {
190190 DiaObject *obj = list->data;
191- Handle *handle;
192191 gboolean is_connected = FALSE;
193192 int i;
194193
--- a/app/render_gdk.c
+++ b/app/render_gdk.c
@@ -100,7 +100,6 @@ dia_gdk_interactive_renderer_class_init(DiaGdkInteractiveRendererClass *klass)
100100 static void
101101 dia_gdk_interactive_renderer_init(DiaGdkInteractiveRenderer *object)
102102 {
103- DiaGdkInteractiveRenderer *ia_renderer = DIA_GDK_INTERACTIVE_RENDERER (object);
104103 DiaGdkRenderer *renderer = DIA_GDK_RENDERER(object);
105104 DiaRenderer *dia_renderer = DIA_RENDERER(object);
106105
@@ -115,7 +114,6 @@ DiaRenderer *
115114 new_gdk_renderer(DDisplay *ddisp)
116115 {
117116 DiaGdkRenderer *renderer;
118- GType renderer_type = 0;
119117
120118 renderer = g_object_new (DIA_TYPE_GDK_INTERACTIVE_RENDERER, NULL);
121119 renderer->transform = dia_transform_new (&ddisp->visible, &ddisp->zoom_factor);
--- a/app/sheets_dialog.c
+++ b/app/sheets_dialog.c
@@ -185,7 +185,6 @@ GtkWidget*
185185 create_sheets_edit_dialog (void)
186186 {
187187 GtkWidget *sheets_edit_dialog;
188- GtkWidget *pixmap_object;
189188 GtkBuilder *builder;
190189
191190 builder = builder_new_from_file ("ui/sheets-edit-dialog.xml");
@@ -218,7 +217,6 @@ GtkWidget*
218217 create_sheets_remove_dialog (void)
219218 {
220219 GtkWidget *sheets_remove_dialog;
221- GtkWidget *pixmap_object;
222220 GtkBuilder *builder;
223221
224222 builder = builder_new_from_file ("ui/sheets-remove-dialog.xml");
--- a/app/sheets_dialog_callbacks.c
+++ b/app/sheets_dialog_callbacks.c
@@ -680,7 +680,6 @@ void
680680 on_sheets_dialog_button_new_clicked (GtkButton *button,
681681 gpointer user_data)
682682 {
683- GtkWidget *combo;
684683 GtkWidget *wrapbox;
685684 GList *button_list;
686685 GtkWidget *active_button;
--- a/app/textedit_tool.c
+++ b/app/textedit_tool.c
@@ -100,7 +100,6 @@ textedit_button_release(TexteditTool *tool, GdkEventButton *event,
100100 DDisplay *ddisp)
101101 {
102102 Point clickedpoint;
103- Diagram *diagram = ddisp->diagram;
104103 DiaObject *obj = click_select_object (ddisp, &clickedpoint, event);
105104
106105 if (obj) {
--- a/lib/diapathrenderer.c
+++ b/lib/diapathrenderer.c
@@ -125,7 +125,7 @@ _get_current_path (DiaPathRenderer *self,
125125 /*!
126126 * \brief Starting a new rendering run
127127 * Could be used to clean the path leftovers from a previous run.
128- * Typical export tenderers flush here.
128+ * Typical export renderers flush here.
129129 */
130130 static void
131131 begin_render (DiaRenderer *self, const Rectangle *update)
@@ -138,7 +138,6 @@ begin_render (DiaRenderer *self, const Rectangle *update)
138138 static void
139139 end_render(DiaRenderer *self)
140140 {
141- DiaPathRenderer *renderer = DIA_PATH_RENDERER (self);
142141 }
143142 static void
144143 set_linewidth(DiaRenderer *self, real linewidth)
@@ -678,7 +677,6 @@ create_standard_path_from_object (DiaObject *obj)
678677 } else {
679678 /* create a group of pathes */
680679 GList *list = NULL;
681- GArray *points;
682680 gsize i;
683681
684682 for (i = 0; i < pr->pathes->len; ++i) {
--- a/lib/prop_sdarray.c
+++ b/lib/prop_sdarray.c
@@ -90,7 +90,6 @@ arrayprop_load(ArrayProperty *prop, AttributeNode attr, DataNode data, DiaContex
9090 {
9191 const PropDescCommonArrayExtra *extra = prop->common.descr->extra_data;
9292 DataNode composite;
93- GError *err = NULL;
9493
9594 arrayprop_freerecords(prop);
9695 g_ptr_array_set_size(prop->records,0);
--- a/lib/prop_sdarray_widget.c
+++ b/lib/prop_sdarray_widget.c
@@ -350,8 +350,7 @@ _arrayprop_get_widget (ArrayProperty *prop, PropDialog *dialog)
350350 {
351351 GtkTreeStore *model;
352352 GtkWidget *view;
353- int idx, i, cols, rows;
354- const PropDescCommonArrayExtra *extra = prop->common.descr->extra_data;
353+ int idx, i, cols;
355354
356355 /* create */
357356 cols = prop->ex_props->len;
--- a/lib/propobject.c
+++ b/lib/propobject.c
@@ -333,7 +333,6 @@ void
333333 object_load_props(DiaObject *obj, ObjectNode obj_node, DiaContext *ctx)
334334 {
335335 GPtrArray *props;
336- GError *err = NULL;
337336
338337 g_return_if_fail(obj != NULL);
339338 g_return_if_fail(obj_node != NULL);
--- a/lib/standard-path.c
+++ b/lib/standard-path.c
@@ -392,8 +392,6 @@ stdpath_update_data (StdPath *stdpath)
392392 static void
393393 stdpath_draw(StdPath *stdpath, DiaRenderer *renderer)
394394 {
395- DiaObject *obj = &stdpath->object;
396-
397395 DIA_RENDERER_GET_CLASS (renderer)->set_linewidth (renderer, stdpath->line_width);
398396 DIA_RENDERER_GET_CLASS (renderer)->set_linestyle (renderer, stdpath->line_style);
399397 DIA_RENDERER_GET_CLASS (renderer)->set_linejoin(renderer, stdpath->line_join);
--- a/objects/Istar/actor.c
+++ b/objects/Istar/actor.c
@@ -188,7 +188,6 @@ actor_distance_from(Actor *actor, Point *point)
188188 {
189189 Element *elem = &actor->element;
190190 Point c;
191- real dist, rad;
192191
193192 c.x = elem->corner.x + elem->width / 2;
194193 c.y = elem->corner.y + elem->height/ 2;
--- a/objects/flowchart/ellipse.c
+++ b/objects/flowchart/ellipse.c
@@ -242,7 +242,6 @@ ellipse_distance_from(Ellipse *ellipse, Point *point)
242242 {
243243 Element *elem = &ellipse->element;
244244 Point c;
245- real dist, rad;
246245
247246 c.x = elem->corner.x + elem->width / 2;
248247 c.y = elem->corner.y + elem->height/ 2;
--- a/objects/standard/arc.c
+++ b/objects/standard/arc.c
@@ -327,7 +327,6 @@ point_projection_is_between (const Point *c,
327327 const Point *b)
328328 {
329329 real len = distance_point_point (a, b);
330- real r;
331330
332331 if (len > 0) {
333332 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
535534 mid2 = get_middle_arc_angle(ang_start, ang_end, clockwiseness);
536535 mid3 = ang_end;
537536
538- TRACE(printf("Find middle angle between %fー and %fー\n",ang_start,ang_end));
537+ TRACE(printf("Find middle angle between %fツー and %fツー\n",ang_start,ang_end));
539538 /* If the other end is inside the object */
540539 arc_get_point_at_angle(arc,target,mid1);
541540 dist = obj->ops->distance_from(obj, target );
542541 if (dist < 0.001){
543- TRACE(printf("Point at %fー: %f,%f is very close to object: %f, returning it\n",mid1, target->x, target->y, dist));
542+ TRACE(printf("Point at %fツー: %f,%f is very close to object: %f, returning it\n",mid1, target->x, target->y, dist));
544543 return ;
545544 }
546545 do {
@@ -564,7 +563,7 @@ calculate_arc_object_edge(Arc *arc, real ang_start, real ang_end, DiaObject *obj
564563 #ifdef TRACE_DIST
565564 for (j = 0; j < i; j++) {
566565 arc_get_point_at_angle(arc,target,trace[j]);
567- printf("%d: %f ー : %f,%f :%f\n", j, trace[j],target->x,target->y, disttrace[j]);
566+ printf("%d: %fツー : %f,%f :%f\n", j, trace[j],target->x,target->y, disttrace[j]);
568567 }
569568 #endif
570569 arc_get_point_at_angle(arc,target,mid2);
@@ -588,7 +587,7 @@ arc_draw(Arc *arc, DiaRenderer *renderer)
588587 start_cp = arc->connection.endpoint_handles[0].connected_to;
589588 end_cp = arc->connection.endpoint_handles[1].connected_to;
590589
591- 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));
590+ 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));
592591
593592 if (connpoint_is_autogap(start_cp)) {
594593 TRACE(printf("computing start intersection\ncurve_distance: %f\n",arc->curve_distance));
--- a/objects/standard/zigzagline.c
+++ b/objects/standard/zigzagline.c
@@ -396,7 +396,6 @@ zigzagline_delete_segment_callback(DiaObject *obj, Point *clicked, gpointer data
396396 static ObjectChange *
397397 _convert_to_bezierline_callback (DiaObject *obj, Point *clicked, gpointer data)
398398 {
399- DiaObject *poly;
400399 Zigzagline *zigzagline = (Zigzagline *)obj;
401400 OrthConn *orth = &zigzagline->orth;
402401 BezPoint *bp;
--- 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)
153153 static void
154154 cairo_interactive_renderer_finalize (GObject *object)
155155 {
156+#if !DIA_CAIRO_WITH_PIXMAP
156157 DiaCairoInteractiveRenderer *renderer = DIA_CAIRO_INTERACTIVE_RENDERER (object);
158+#endif
157159 DiaCairoRenderer *base_renderer = DIA_CAIRO_RENDERER (object);
158160
159161 if (base_renderer->cr)
@@ -474,7 +476,6 @@ set_size(DiaRenderer *object, gpointer window,
474476 {
475477 DiaCairoInteractiveRenderer *renderer = DIA_CAIRO_INTERACTIVE_RENDERER (object);
476478 DiaCairoRenderer *base_renderer = DIA_CAIRO_RENDERER (object);
477- cairo_rectangle_t extents;
478479
479480 renderer->width = width;
480481 renderer->height = height;
@@ -482,7 +483,9 @@ set_size(DiaRenderer *object, gpointer window,
482483 if (renderer->pixmap != NULL)
483484 g_object_unref(renderer->pixmap);
484485
485- /* TODO: we can probably get rid of this extra pixmap and just draw directly to what gdk_cairo_create() gives us for the window */
486+ /* TODO: we can probably get rid of this extra pixmap and just draw directly
487+ * to what gdk_cairo_create() gives us for the window
488+ */
486489 renderer->pixmap = gdk_pixmap_new(GDK_WINDOW(window), width, height, -1);
487490 #else
488491 # if GTK_CHECK_VERSION(2,22,0)
@@ -490,11 +493,15 @@ set_size(DiaRenderer *object, gpointer window,
490493 CAIRO_CONTENT_COLOR,
491494 width, height);
492495 # else
493- extents.x = 0;
494- extents.y = 0;
495- extents.width = width;
496- extents.height = height;
497- renderer->pixmap = cairo_recording_surface_create(CAIRO_CONTENT_COLOR_ALPHA, &extents);
496+ {
497+ cairo_rectangle_t extents;
498+
499+ extents.x = 0;
500+ extents.y = 0;
501+ extents.width = width;
502+ extents.height = height;
503+ renderer->pixmap = cairo_recording_surface_create(CAIRO_CONTENT_COLOR_ALPHA, &extents);
504+ }
498505 # endif
499506 #endif
500507
--- a/plug-ins/cairo/diacairo-renderer.c
+++ b/plug-ins/cairo/diacairo-renderer.c
@@ -388,7 +388,6 @@ set_dashlength(DiaRenderer *self, real length)
388388 static void
389389 set_fillstyle(DiaRenderer *self, FillStyle mode)
390390 {
391- DiaCairoRenderer *renderer = DIA_CAIRO_RENDERER (self);
392391 DIAG_NOTE(g_message("set_fillstyle %d", mode));
393392
394393 switch(mode) {
--- a/plug-ins/postscript/diapsrenderer.c
+++ b/plug-ins/postscript/diapsrenderer.c
@@ -266,8 +266,6 @@ set_dashlength(DiaRenderer *self, real length)
266266 static void
267267 set_fillstyle(DiaRenderer *self, FillStyle mode)
268268 {
269- DiaPsRenderer *renderer = DIA_PS_RENDERER(self);
270-
271269 switch(mode) {
272270 case FILLSTYLE_SOLID:
273271 break;
--- a/plug-ins/svg/render_svg.c
+++ b/plug-ins/svg/render_svg.c
@@ -228,7 +228,6 @@ static DiaSvgRenderer *
228228 new_svg_renderer(DiagramData *data, const char *filename)
229229 {
230230 DiaSvgRenderer *renderer;
231- FILE *file;
232231 gchar buf[512];
233232 Rectangle *extent;
234233 xmlDtdPtr dtd;
--- a/plug-ins/vdx/vdx-import.c
+++ b/plug-ins/vdx/vdx-import.c
@@ -610,7 +610,6 @@ vdx_simple_properties(DiaObject *obj,
610610 const VDXDocument* theDoc, DiaContext *ctx)
611611 {
612612 GPtrArray *props = g_ptr_array_new ();
613- unsigned int debug_id;
614613
615614 if (Line)
616615 {