[dia] [scan-build] Dead nested assignment



commit 3202e5637484d5925e71d9b8f55005cd52d51cac
Author: Hans Breuer <hans breuer org>
Date:   Tue Dec 29 13:43:58 2009 +0100

    [scan-build] Dead nested assignment
    
    Although the value stored to 'val' is used in the enclosing expression,
    the value is never actually read from 'val'

 plug-ins/drs/dia-render-script-import.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/drs/dia-render-script-import.c b/plug-ins/drs/dia-render-script-import.c
index 6c88908..1e7b7ff 100644
--- a/plug-ins/drs/dia-render-script-import.c
+++ b/plug-ins/drs/dia-render-script-import.c
@@ -71,7 +71,7 @@ _parse_points (xmlNodePtr node, const char *attrib)
     gint i;
     gchar **split = g_strsplit ((gchar *)str, " ", -1);
     gchar *val, *ep = NULL;
-    for (i = 0, val = split[i]; split[i] != NULL; ++i)
+    for (i = 0; split[i] != NULL; ++i)
       /* count them */;
     g_array_set_size (arr, i);
     for (i = 0, val = split[i]; split[i] != 0; ++i) {
@@ -96,7 +96,7 @@ _parse_bezpoints (xmlNodePtr node, const char *attrib)
     gint i;
     gchar **split = g_strsplit ((gchar *)str, " ", -1);
     gchar *val, *ep = NULL;
-    for (i = 0, val = split[i]; split[i] != NULL; ++i)
+    for (i = 0; split[i] != NULL; ++i)
       /* count them */;
     g_array_set_size (arr, i);
     for (i = 0, val = split[i]; split[i] != 0; ++i) {



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