[dia] [warningectomy] explicitly assigning a variable to itself



commit 066754d8650c5207d019943301b67998df3f7ebf
Author: Hans Breuer <hans breuer org>
Date:   Fri Oct 3 21:46:21 2014 +0200

    [warningectomy] explicitly assigning a variable to itself
    
    vdx-import.c:2997:15: warning: explicitly assigning a variable of type 'const char *' to itself 
[-Wself-assign]
            for (s=s; *s; s++)
                 ~^~
    vdx-import.c:3008:15: warning: explicitly assigning a variable of type 'const char *' to itself 
[-Wself-assign]
            for (s=s; *s; s++)
                 ~^~

 plug-ins/vdx/vdx-import.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/vdx/vdx-import.c b/plug-ins/vdx/vdx-import.c
index c4e5a75..9b5d1d5 100644
--- a/plug-ins/vdx/vdx-import.c
+++ b/plug-ins/vdx/vdx-import.c
@@ -2994,7 +2994,7 @@ import_vdx(const gchar *filename, DiagramData *dia, DiaContext *ctx, void* user_
     {
         s = debug;
         if (strchr(s, '=')) { s = strchr(debug, '=') + 1; }
-        for (s=s; *s; s++)
+        for (; *s; s++)
         {
             if (*s == ',') debug_shapes++;
         }
@@ -3005,7 +3005,7 @@ import_vdx(const gchar *filename, DiagramData *dia, DiaContext *ctx, void* user_
         s = debug;
         if (strchr(s, '=')) { s = strchr(debug, '=') + 1; }
         theDoc->debug_shape_ids[0] = atoi(s);
-        for (s=s; *s; s++)
+        for (; *s; s++)
         {
             if (*s == ',')
             {


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