[dia] Fix compilation warning
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Fix compilation warning
- Date: Fri, 13 Sep 2013 17:34:41 +0000 (UTC)
commit 8bf959a00fc395acf085934cf0fb7a7501c42cc4
Author: thomasb81 <thomas burg gmail com>
Date: Sun Sep 8 19:28:18 2013 +0200
Fix compilation warning
Signed-off-by: Hans Breuer <hans breuer org>
lib/dia_svg.c | 1 -
lib/diapathrenderer.c | 2 +-
lib/diatransformrenderer.c | 2 +-
plug-ins/svg/svg-import.c | 4 ++--
4 files changed, 4 insertions(+), 5 deletions(-)
---
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 0b62b61..96ea988 100644
--- a/lib/diapathrenderer.c
+++ b/lib/diapathrenderer.c
@@ -533,7 +533,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/svg/svg-import.c b/plug-ins/svg/svg-import.c
index 88e8fce..6b57c56 100644
--- a/plug-ins/svg/svg-import.c
+++ b/plug-ins/svg/svg-import.c
@@ -1217,7 +1217,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) {
@@ -1232,7 +1232,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]