aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2018-07-21 22:21:57 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2018-07-21 22:23:33 -0400
commit17cbafdbbef78d7e05ade53d4cc867fa8ac2f432 (patch)
tree38dba452d4deebca5321a41fa7a2f11a2181a1a8 /gdb/rs6000-tdep.c
parentdcc0660f04bb74948299fb33c98620cfd1ceabb2 (diff)
downloadgdb-17cbafdbbef78d7e05ade53d4cc867fa8ac2f432.zip
gdb-17cbafdbbef78d7e05ade53d4cc867fa8ac2f432.tar.gz
gdb-17cbafdbbef78d7e05ade53d4cc867fa8ac2f432.tar.bz2
Fix -Wunused-variable warnings related to conditional compilation
Some variables are not used when !HAVE_ELF, so avoid declaring them in that case. gdb/ChangeLog: * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and attr_profile in HAVE_ELF. * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in HAVE_ELF.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 45bf982..e78de49 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -3558,7 +3558,6 @@ bfd_uses_spe_extensions (bfd *abfd)
bfd_size_type size;
gdb_byte *ptr;
int success = 0;
- int vector_abi;
if (!abfd)
return 0;
@@ -3567,8 +3566,8 @@ bfd_uses_spe_extensions (bfd *abfd)
/* Using Tag_GNU_Power_ABI_Vector here is a bit of a hack, as the user
could be using the SPE vector abi without actually using any spe
bits whatsoever. But it's close enough for now. */
- vector_abi = bfd_elf_get_obj_attr_int (abfd, OBJ_ATTR_GNU,
- Tag_GNU_Power_ABI_Vector);
+ int vector_abi = bfd_elf_get_obj_attr_int (abfd, OBJ_ATTR_GNU,
+ Tag_GNU_Power_ABI_Vector);
if (vector_abi == 3)
return 1;
#endif