[dia] [warningectomy] 'angle' may be used uninitialized in this function



commit 636003fd40c6be08700938b9fc88a8193ea7494b
Author: Hans Breuer <hans breuer org>
Date:   Sat Dec 3 20:57:59 2011 +0100

    [warningectomy] 'angle' may be used uninitialized in this function

 lib/dia_svg.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lib/dia_svg.c b/lib/dia_svg.c
index 8cb6365..7e7aa7a 100644
--- a/lib/dia_svg.c
+++ b/lib/dia_svg.c
@@ -991,8 +991,10 @@ dia_svg_parse_transform(const gchar *trans, real scale)
     
     if (list[i])
       angle = g_ascii_strtod (list[i], NULL), ++i;
-    else
+    else {
+      angle = 0;
       g_warning ("transform=rotate no angle?");
+    }
     m->xx =  cos(G_PI*angle/180);
     /* FIXME: swapped xy and yx - correct? */
     m->xy = -sin(G_PI*angle/180);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]