* mi/mi-cmd-var.c (print_varobj): Rename `optind' and `optarg' to

`oind' and `oarg', respectively(-Wshadow).
This commit is contained in:
Andrey Smirnov 2011-12-17 06:06:49 +00:00
parent 006292124e
commit 54dc829719
2 changed files with 13 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2011-12-16 Andrey Smirnov <andrew.smirnov@gmail.com>
* mi/mi-cmd-var.c (print_varobj): Rename `optind' and `optarg' to
`oind' and `oarg', respectively(-Wshadow).
2011-12-16 Andrey Smirnov <andrew.smirnov@gmail.com>
* mi/mi-cmd-target.c (mi_cmd_target_file_get): Rename `optind' and

View File

@ -554,8 +554,8 @@ mi_cmd_var_evaluate_expression (char *command, char **argv, int argc)
enum varobj_display_formats format;
int formatFound;
int optind;
char *optarg;
int oind;
char *oarg;
enum opt
{
@ -570,11 +570,11 @@ mi_cmd_var_evaluate_expression (char *command, char **argv, int argc)
/* Parse arguments */
format = FORMAT_NATURAL;
formatFound = 0;
optind = 0;
oind = 0;
while (1)
{
int opt = mi_getopt ("-var-evaluate-expression", argc, argv,
opts, &optind, &optarg);
opts, &oind, &oarg);
if (opt < 0)
break;
@ -584,20 +584,20 @@ mi_cmd_var_evaluate_expression (char *command, char **argv, int argc)
if (formatFound)
error (_("Cannot specify format more than once"));
format = mi_parse_format (optarg);
format = mi_parse_format (oarg);
formatFound = 1;
break;
}
}
if (optind >= argc)
if (oind >= argc)
error (_("Usage: [-f FORMAT] NAME"));
if (optind < argc - 1)
if (oind < argc - 1)
error (_("Garbage at end of command"));
/* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[optind]);
var = varobj_get_handle (argv[oind]);
if (formatFound)
{