Author: cazfi
Date: Sat Sep  5 23:07:49 2015
New Revision: 29784

URL: http://svn.gna.org/viewcvs/freeciv?rev=29784&view=rev
Log:
Fixed -WShadow warnings from rulesave.c

See patch #6314

Modified:
    branches/S2_6/tools/ruledit/rulesave.c

Modified: branches/S2_6/tools/ruledit/rulesave.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/rulesave.c?rev=29784&r1=29783&r2=29784&view=diff
==============================================================================
--- branches/S2_6/tools/ruledit/rulesave.c      (original)
+++ branches/S2_6/tools/ruledit/rulesave.c      Sat Sep  5 23:07:49 2015
@@ -1589,7 +1589,7 @@
   terrain_type_iterate(pterr) {
     char path[512];
     char identifier[2];
-    int i;
+    int r;
     const char *flag_names[TER_USER_LAST];
     const char *puc_names[UCL_LAST];
     int flagi;
@@ -1619,18 +1619,18 @@
     } output_type_iterate_end;
 
     /* Check resource count */
-    for (i = 0; pterr->resources[i] != NULL; i++) {
-      /* Just increasing i as long as there is resources */
+    for (r = 0; pterr->resources[r] != NULL; r++) {
+      /* Just increasing r as long as there is resources */
     }
 
     {
-      const char *resource_names[i];
-
-      for (i = 0; pterr->resources[i] != NULL; i++) {
-        resource_names[i] = resource_rule_name(pterr->resources[i]);
-      }
-
-      secfile_insert_str_vec(sfile, resource_names, i,
+      const char *resource_names[r];
+
+      for (r = 0; pterr->resources[r] != NULL; r++) {
+        resource_names[r] = resource_rule_name(pterr->resources[r]);
+      }
+
+      secfile_insert_str_vec(sfile, resource_names, r,
                              "%s.resources", path);
     }
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to