[dia] [scan-build] Assigned value is garbage or undefined



commit 3bc8ebee594e7ead4f7651b6a0819cbc28c81d46
Author: Hans Breuer <hans breuer org>
Date:   Tue Nov 1 13:31:26 2011 +0100

    [scan-build] Assigned value is garbage or undefined
    
    With 'y1' not given on <line /> not only the start point
    was not properly initialized. Additiomally with lacking 'y2'
    also the end point was copying the former, wrong value.

 plug-ins/svg/svg-import.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/svg/svg-import.c b/plug-ins/svg/svg-import.c
index 3130fe0..13e036e 100644
--- a/plug-ins/svg/svg-import.c
+++ b/plug-ins/svg/svg-import.c
@@ -655,7 +655,7 @@ read_line_svg(xmlNodePtr node, DiaSvgStyle *parent_style, GList *list)
     start.y = get_value_as_cm((char *) str, NULL);
     xmlFree(str);
   } else
-    start.y;
+    start.y = 0.0;
   str = xmlGetProp(node, (const xmlChar *)"x2");
   if (str) {
     end.x = get_value_as_cm((char *) str, NULL);



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