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


To ChangeLog:
	* mi/mi-cmd-env.c (mi_cmd_env_path):  Rename `optind' and `optparse'
	to `oind' and `oparse', respectively(-Wshadow).
	(mi_cmd_env_dir): Ditto.
---
 gdb/mi/mi-cmd-env.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c
index d9e5088..eb9e976 100644
--- a/gdb/mi/mi-cmd-env.c
+++ b/gdb/mi/mi-cmd-env.c
@@ -118,9 +118,9 @@ mi_cmd_env_path (char *command, char **argv, int argc)
   char *exec_path;
   char *env;
   int reset = 0;
-  int optind = 0;
+  int oind = 0;
   int i;
-  char *optarg;
+  char *oarg;
   enum opt
     {
       RESET_OPT
@@ -144,7 +144,7 @@ mi_cmd_env_path (char *command, char **argv, int argc)
   while (1)
     {
       int opt = mi_getopt ("-environment-path", argc, argv, opts,
-                           &optind, &optarg);
+                           &oind, &oarg);
 
       if (opt < 0)
         break;
@@ -155,8 +155,8 @@ mi_cmd_env_path (char *command, char **argv, int argc)
           break;
         }
     }
-  argv += optind;
-  argc -= optind;
+  argv += oind;
+  argc -= oind;
 
 
   if (reset)
@@ -190,9 +190,9 @@ mi_cmd_env_dir (char *command, char **argv, int argc)
 {
   struct ui_out *uiout = current_uiout;
   int i;
-  int optind = 0;
+  int oind = 0;
   int reset = 0;
-  char *optarg;
+  char *oarg;
   enum opt
     {
       RESET_OPT
@@ -216,7 +216,7 @@ mi_cmd_env_dir (char *command, char **argv, int argc)
   while (1)
     {
       int opt = mi_getopt ("-environment-directory", argc, argv, opts,
-                           &optind, &optarg);
+                           &oind, &oarg);
 
       if (opt < 0)
         break;
@@ -227,8 +227,8 @@ mi_cmd_env_dir (char *command, char **argv, int argc)
           break;
         }
     }
-  argv += optind;
-  argc -= optind;
+  argv += oind;
+  argc -= oind;
 
   if (reset)
     {
-- 
1.7.5.4


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