aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-08-10 08:06:23 +0000
committerAlan Modra <amodra@gmail.com>2001-08-10 08:06:23 +0000
commitcc55aec9b76ca04bc0913b94c133b2851ec05224 (patch)
tree59624af42b7579101023e092dfc73f6c92e9adac /bfd/elf.c
parent814fa6ab15c254570c9a4d34e4b24a1a8a72ad02 (diff)
downloadgdb-cc55aec9b76ca04bc0913b94c133b2851ec05224.zip
gdb-cc55aec9b76ca04bc0913b94c133b2851ec05224.tar.gz
gdb-cc55aec9b76ca04bc0913b94c133b2851ec05224.tar.bz2
* elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
warning if not BFD64. Add braces so emacs auto format works. (bfd_elf_fprintf_vma): Likewise.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index b06417c..a6332e2 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -5997,7 +5997,7 @@ bfd_get_elf_phdrs (abfd, phdrs)
void
bfd_elf_sprintf_vma (abfd, buf, value)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
bfd_vma value;
{
@@ -6010,12 +6010,14 @@ bfd_elf_sprintf_vma (abfd, buf, value)
else
{
if (i_ehdrp->e_ident[EI_CLASS] == ELFCLASS64)
+ {
#if BFD_HOST_64BIT_LONG
- sprintf (buf, "%016lx", value);
+ sprintf (buf, "%016lx", value);
#else
- sprintf (buf, "%08lx%08lx", _bfd_int64_high (value),
- _bfd_int64_low (value));
+ sprintf (buf, "%08lx%08lx", _bfd_int64_high (value),
+ _bfd_int64_low (value));
#endif
+ }
else
sprintf (buf, "%08lx", (unsigned long) (value & 0xffffffff));
}
@@ -6026,7 +6028,7 @@ bfd_elf_sprintf_vma (abfd, buf, value)
void
bfd_elf_fprintf_vma (abfd, stream, value)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
PTR stream;
bfd_vma value;
{
@@ -6039,12 +6041,14 @@ bfd_elf_fprintf_vma (abfd, stream, value)
else
{
if (i_ehdrp->e_ident[EI_CLASS] == ELFCLASS64)
+ {
#if BFD_HOST_64BIT_LONG
- fprintf ((FILE *) stream, "%016lx", value);
+ fprintf ((FILE *) stream, "%016lx", value);
#else
- fprintf ((FILE *) stream, "%08lx%08lx",
- _bfd_int64_high (value), _bfd_int64_low (value));
+ fprintf ((FILE *) stream, "%08lx%08lx",
+ _bfd_int64_high (value), _bfd_int64_low (value));
#endif
+ }
else
fprintf ((FILE *) stream, "%08lx",
(unsigned long) (value & 0xffffffff));