From f70db7d9b190ad8d134438d80897309726634e05 Mon Sep 17 00:00:00 2001
From: thomasb81 <thomas.burg@gmail.com>
Date: Sun, 8 Sep 2013 19:28:18 +0200
Subject: [PATCH] Fix compilation warning

---
 lib/arrows.c                    | 1 +
 lib/dia_svg.c                   | 1 -
 lib/diapathrenderer.c           | 2 +-
 lib/diatransformrenderer.c      | 2 +-
 plug-ins/stress/stress-memory.c | 2 +-
 plug-ins/svg/svg-import.c       | 4 ++--
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/arrows.c b/lib/arrows.c
index 043afee..93d2956 100644
--- a/lib/arrows.c
+++ b/lib/arrows.c
@@ -1606,6 +1606,7 @@ draw_rounded(DiaRenderer *renderer, Point *to, Point *from,
   
   len = sqrt(point_dot(&delta, &delta)); /* line length */
   rayon = (length / 2.0);
+  rapport = 0.0;
   if (len > 0.0) {
     /* no length, no direction - but invalid coords */
     rapport = rayon / len;
diff --git a/lib/dia_svg.c b/lib/dia_svg.c
index 49884ca..04cfa31 100644
--- a/lib/dia_svg.c
+++ b/lib/dia_svg.c
@@ -275,7 +275,6 @@ _cmp_color (const void *key, const void *elem)
 static gboolean
 svg_named_color (const char *name, gint32 *color)
 {
-  int i;
   const struct _SvgNamedColor *elem;
 
   g_return_val_if_fail (name != NULL && color != NULL, FALSE);
diff --git a/lib/diapathrenderer.c b/lib/diapathrenderer.c
index 7e2e93e..4d768c6 100644
--- a/lib/diapathrenderer.c
+++ b/lib/diapathrenderer.c
@@ -525,7 +525,7 @@ _bezier (DiaRenderer *self,
     if (distance_point_point(pt, &points[0].p1) < 0.001)
       i = 1;
   }
-  for (i; i < numpoints; ++i)
+  for (; i < numpoints; ++i)
     g_array_append_val (path, points[i]);
   if (fill)
     _path_lineto (path, &points[0].p1);
diff --git a/lib/diatransformrenderer.c b/lib/diatransformrenderer.c
index 2895950..003418c 100644
--- a/lib/diatransformrenderer.c
+++ b/lib/diatransformrenderer.c
@@ -322,7 +322,7 @@ static void
 _ellipse (DiaRenderer *self,
 	  Point *center,
 	  real width, real height,
-	  const Color *stroke, const Color *fill)
+	  Color *stroke, Color *fill)
 {
   GArray *path = g_array_new (FALSE, FALSE, sizeof(BezPoint));
   path_build_ellipse (path, center, width, height);
diff --git a/plug-ins/stress/stress-memory.c b/plug-ins/stress/stress-memory.c
index 46b8d84..8e1750a 100644
--- a/plug-ins/stress/stress-memory.c
+++ b/plug-ins/stress/stress-memory.c
@@ -30,8 +30,8 @@ gboolean
 vmem_avail (guint64 *size)
 {
   guint64 avail = 0;
-  gpointer p = NULL;
 #ifdef G_OS_WIN32
+  gpointer p = NULL;
   MEMORY_BASIC_INFORMATION mbi;
 
   while (VirtualQuery (p, &mbi, sizeof(mbi))) {
diff --git a/plug-ins/svg/svg-import.c b/plug-ins/svg/svg-import.c
index 331fa7a..6b70d2c 100644
--- a/plug-ins/svg/svg-import.c
+++ b/plug-ins/svg/svg-import.c
@@ -1202,7 +1202,7 @@ _node_read_viewbox (xmlNodePtr root, DiaMatrix **mat)
       y1 = g_ascii_strtod (vals[1], NULL);
       x2 = g_ascii_strtod (vals[2], NULL);
       y2 = g_ascii_strtod (vals[3], NULL);
-      g_debug ("viewBox(%d %d %d %d) = (%f,%f)\n", x1, y1, x2, y2, width, height);
+      g_debug ("viewBox(%f %f %f %f) = (%f,%f)\n", x1, y1, x2, y2, width, height);
       /* some basic sanity check */
       if (x2 > x1 && y2 > y1 && width > 0 && height > 0) {
 	if (!percent) {
@@ -1217,7 +1217,7 @@ _node_read_viewbox (xmlNodePtr root, DiaMatrix **mat)
 	 */
 	if (fabs((fabs (xs/ys) - 1.0) < 0.1) && fabs((fabs (ys/xs) - 1.0) < 0.1)) {
 	  user_scale = xs;
-	  g_debug ("viewBox(%d %d %d %d) scaling (%f,%f) -> %f\n", x1, y1, x2, y2, xs, ys, user_scale);
+	  g_debug ("viewBox(%f %f %f %f) scaling (%f,%f) -> %f\n", x1, y1, x2, y2, xs, ys, user_scale);
 	} else {
 	  /* the bigger the scale the smaller the objects */
 	  user_scale = MAX(xs, ys);
-- 
1.8.1.2

