This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 040/238] [index] f-valprint.c -Wshadow fix


To ChangeLog:
	* f-valprint.c (f_val_print): Rename `index' to `idx'(-Wshadow).
---
 gdb/f-valprint.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index b800d89..f7fbeac 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -258,7 +258,7 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
   struct type *elttype;
   LONGEST val;
   CORE_ADDR addr;
-  int index;
+  int idx;
 
   CHECK_TYPEDEF (type);
   switch (TYPE_CODE (type))
@@ -496,15 +496,15 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
       /* Starting from the Fortran 90 standard, Fortran supports derived
          types.  */
       fprintf_filtered (stream, "( ");
-      for (index = 0; index < TYPE_NFIELDS (type); index++)
+      for (idx = 0; idx < TYPE_NFIELDS (type); idx++)
         {
-          int offset = TYPE_FIELD_BITPOS (type, index) / 8;
+          int offset = TYPE_FIELD_BITPOS (type, idx) / 8;
 
-          val_print (TYPE_FIELD_TYPE (type, index), valaddr,
+          val_print (TYPE_FIELD_TYPE (type, idx), valaddr,
 		     embedded_offset + offset,
 		     address, stream, recurse + 1,
 		     original_value, options, current_language);
-          if (index != TYPE_NFIELDS (type) - 1)
+          if (idx != TYPE_NFIELDS (type) - 1)
             fputs_filtered (", ", stream);
         }
       fprintf_filtered (stream, " )");
-- 
1.7.5.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]