From: Andrey Smirnov Date: Sat, 17 Dec 2011 05:49:34 +0000 (+0000) Subject: * mi/mi-cmd-break.c (mi_cmd_break_insert): Rename `optind' and X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f8c000a26caef48c7ffe3f09b4f8a622d6fa7206;p=binutils-gdb.git * mi/mi-cmd-break.c (mi_cmd_break_insert): Rename `optind' and `optparg' to `oind' and `oparg', respectively(-Wshadow). (mi_cmd_break_watch): Ditto. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1b94ffd3172..9780c024e6a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2011-12-16 Andrey Smirnov + + * mi/mi-cmd-break.c (mi_cmd_break_insert): Rename `optind' and + `optparg' to `oind' and `oparg', respectively(-Wshadow). + (mi_cmd_break_watch): Ditto. + 2011-12-16 Tom Tromey * linespec.c (collect_symbols): Call maybe_add_address after diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c index b3bd5da4db9..3897f309b8f 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, 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 ")); - if (optind < argc - 1) + if (oind < argc - 1) error (_("-break-insert: Garbage following ")); - 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 ")); - if (optind < argc - 1) + if (oind < argc - 1) error (_("-break-watch: Garbage following ")); - expr = argv[optind]; + expr = argv[oind]; /* Now we have what we need, let's insert the watchpoint! */ switch (type)