Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
* dwarf2.c (concat_filename): Rename dirname with dir_name to void shadowing the dirname function. Rename subdirname with subdir_name to stay consistent with the new dir_name variable name.
This commit is contained in:
parent
619c8a7d09
commit
608fa8d35d
@ -1,3 +1,11 @@
|
|||||||
|
2010-01-04 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
|
||||||
|
* dwarf2.c (concat_filename): Rename dirname with dir_name
|
||||||
|
to void shadowing the dirname function.
|
||||||
|
Rename subdirname with subdir_name to stay consistent with
|
||||||
|
the new dir_name variable name.
|
||||||
|
|
||||||
2010-01-04 Edmar Wienskoski <edmar@freescale.com>
|
2010-01-04 Edmar Wienskoski <edmar@freescale.com>
|
||||||
|
|
||||||
* archures.c: Add bfd_mach_ppc_e500mc64.
|
* archures.c: Add bfd_mach_ppc_e500mc64.
|
||||||
|
28
bfd/dwarf2.c
28
bfd/dwarf2.c
@ -1109,40 +1109,40 @@ concat_filename (struct line_info_table *table, unsigned int file)
|
|||||||
|
|
||||||
if (!IS_ABSOLUTE_PATH (filename))
|
if (!IS_ABSOLUTE_PATH (filename))
|
||||||
{
|
{
|
||||||
char *dirname = NULL;
|
char *dir_name = NULL;
|
||||||
char *subdirname = NULL;
|
char *subdir_name = NULL;
|
||||||
char *name;
|
char *name;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
if (table->files[file - 1].dir)
|
if (table->files[file - 1].dir)
|
||||||
subdirname = table->dirs[table->files[file - 1].dir - 1];
|
subdir_name = table->dirs[table->files[file - 1].dir - 1];
|
||||||
|
|
||||||
if (!subdirname || !IS_ABSOLUTE_PATH (subdirname))
|
if (!subdir_name || !IS_ABSOLUTE_PATH (subdir_name))
|
||||||
dirname = table->comp_dir;
|
dir_name = table->comp_dir;
|
||||||
|
|
||||||
if (!dirname)
|
if (!dir_name)
|
||||||
{
|
{
|
||||||
dirname = subdirname;
|
dir_name = subdir_name;
|
||||||
subdirname = NULL;
|
subdir_name = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dirname)
|
if (!dir_name)
|
||||||
return strdup (filename);
|
return strdup (filename);
|
||||||
|
|
||||||
len = strlen (dirname) + strlen (filename) + 2;
|
len = strlen (dir_name) + strlen (filename) + 2;
|
||||||
|
|
||||||
if (subdirname)
|
if (subdir_name)
|
||||||
{
|
{
|
||||||
len += strlen (subdirname) + 1;
|
len += strlen (subdir_name) + 1;
|
||||||
name = (char *) bfd_malloc (len);
|
name = (char *) bfd_malloc (len);
|
||||||
if (name)
|
if (name)
|
||||||
sprintf (name, "%s/%s/%s", dirname, subdirname, filename);
|
sprintf (name, "%s/%s/%s", dir_name, subdir_name, filename);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
name = (char *) bfd_malloc (len);
|
name = (char *) bfd_malloc (len);
|
||||||
if (name)
|
if (name)
|
||||||
sprintf (name, "%s/%s", dirname, filename);
|
sprintf (name, "%s/%s", dir_name, filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user