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 070/238] [optind, optparse] mi/mi-cmd-break.c: -Wshadow fix


To ChangeLog:
	* mi/mi-cmd-break.c (mi_cmd_break_insert): Rename `optind' and `optparse'
	to `oind' and `oparse', respectively(-Wshadow).
	(mi_cmd_break_watch): Ditto.
---
 gdb/mi/mi-cmd-break.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index b3bd5da..3897f30 100644
--- a/gdb/mi/mi-cmd-break.c
+++ b/gdb/mi/mi-cmd-break.c
@@ -99,13 +99,13 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
 
   /* Parse arguments. It could be -r or -h or -t, <location> or ``--''
      to denote the end of the option list. */
-  int optind = 0;
-  char *optarg;
+  int oind = 0;
+  char *oarg;
 
   while (1)
     {
       int opt = mi_getopt ("-break-insert", argc, argv,
-			   opts, &optind, &optarg);
+			   opts, &oind, &oarg);
       if (opt < 0)
 	break;
       switch ((enum opt) opt)
@@ -117,13 +117,13 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
 	  hardware = 1;
 	  break;
 	case CONDITION_OPT:
-	  condition = optarg;
+	  condition = oarg;
 	  break;
 	case IGNORE_COUNT_OPT:
-	  ignore_count = atol (optarg);
+	  ignore_count = atol (oarg);
 	  break;
 	case THREAD_OPT:
-	  thread = atol (optarg);
+	  thread = atol (oarg);
 	  break;
 	case PENDING_OPT:
 	  pending = 1;
@@ -137,11 +137,11 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
 	}
     }
 
-  if (optind >= argc)
+  if (oind >= argc)
     error (_("-break-insert: Missing <location>"));
-  if (optind < argc - 1)
+  if (oind < argc - 1)
     error (_("-break-insert: Garbage following <location>"));
-  address = argv[optind];
+  address = argv[oind];
 
   /* Now we have what we need, let's insert the breakpoint! */
   if (! mi_breakpoint_observers_installed)
@@ -229,13 +229,13 @@ mi_cmd_break_watch (char *command, char **argv, int argc)
   };
 
   /* Parse arguments. */
-  int optind = 0;
-  char *optarg;
+  int oind = 0;
+  char *oarg;
 
   while (1)
     {
       int opt = mi_getopt ("-break-watch", argc, argv,
-			   opts, &optind, &optarg);
+			   opts, &oind, &oarg);
 
       if (opt < 0)
 	break;
@@ -249,11 +249,11 @@ mi_cmd_break_watch (char *command, char **argv, int argc)
 	  break;
 	}
     }
-  if (optind >= argc)
+  if (oind >= argc)
     error (_("-break-watch: Missing <expression>"));
-  if (optind < argc - 1)
+  if (oind < argc - 1)
     error (_("-break-watch: Garbage following <expression>"));
-  expr = argv[optind];
+  expr = argv[oind];
 
   /* Now we have what we need, let's insert the watchpoint! */
   switch (type)
-- 
1.7.5.4


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