forked from Imagelibrary/binutils-gdb
sim: arm: fix -Wshadow=local warnings
Remove duplicate nested variable declarations, rename some to avoid confusion when the type is different or the original value should be retained, and fix some weirdness with nested enums in structs.
This commit is contained in:
@@ -746,14 +746,14 @@ sim_target_parse_command_line (int argc, char ** argv)
|
||||
|
||||
while (* ptr)
|
||||
{
|
||||
int i;
|
||||
int o;
|
||||
|
||||
for (i = ARRAY_SIZE (options); i--;)
|
||||
if (strncmp (ptr, options[i].swi_option,
|
||||
strlen (options[i].swi_option)) == 0)
|
||||
for (o = ARRAY_SIZE (options); o--;)
|
||||
if (strncmp (ptr, options[o].swi_option,
|
||||
strlen (options[o].swi_option)) == 0)
|
||||
{
|
||||
swi_mask |= options[i].swi_mask;
|
||||
ptr += strlen (options[i].swi_option);
|
||||
swi_mask |= options[o].swi_mask;
|
||||
ptr += strlen (options[o].swi_option);
|
||||
|
||||
if (* ptr == ',')
|
||||
++ ptr;
|
||||
@@ -761,7 +761,7 @@ sim_target_parse_command_line (int argc, char ** argv)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i < 0)
|
||||
if (o < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -884,8 +884,6 @@ sim_open (SIM_OPEN_KIND kind,
|
||||
|
||||
if (argv_copy[1] != NULL)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Scan for memory-size switches. */
|
||||
for (i = 0; (argv_copy[i] != NULL) && (argv_copy[i][0] != 0); i++)
|
||||
if (argv_copy[i][0] == '-' && argv_copy[i][1] == 'm')
|
||||
|
||||
Reference in New Issue
Block a user