forked from Imagelibrary/binutils-gdb
gdb/
Fix compilation warning on gcc-3.4. * exec.c (print_section_info): Move the `displacement' variable initialization to its declaration.
This commit is contained in:
10
gdb/exec.c
10
gdb/exec.c
@@ -675,7 +675,8 @@ print_section_info (struct target_section_table *t, bfd *abfd)
|
||||
printf_filtered (_("file type %s.\n"), bfd_get_target (abfd));
|
||||
if (abfd == exec_bfd)
|
||||
{
|
||||
bfd_vma displacement;
|
||||
/* gcc-3.4 does not like the initialization in <p == t->sections_end>. */
|
||||
bfd_vma displacement = 0;
|
||||
|
||||
for (p = t->sections; p < t->sections_end; p++)
|
||||
{
|
||||
@@ -694,11 +695,8 @@ print_section_info (struct target_section_table *t, bfd *abfd)
|
||||
}
|
||||
}
|
||||
if (p == t->sections_end)
|
||||
{
|
||||
warning (_("Cannot find section for the entry point of %s.\n"),
|
||||
bfd_get_filename (abfd));
|
||||
displacement = 0;
|
||||
}
|
||||
warning (_("Cannot find section for the entry point of %s.\n"),
|
||||
bfd_get_filename (abfd));
|
||||
|
||||
printf_filtered (_("\tEntry point: %s\n"),
|
||||
paddress (gdbarch, (bfd_get_start_address (abfd)
|
||||
|
||||
Reference in New Issue
Block a user