From d93b67941f7a76c692ffb186637dfa586683a731 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 10 Aug 2001 08:06:23 +0000 Subject: [PATCH] * 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. --- bfd/ChangeLog | 4 ++++ bfd/elf.c | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8a9c11c61..51d3acb9b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,9 @@ 2001-08-10 Alan Modra + * 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. + * libxcoff.h (struct xcoff_backend_data_rec): Constify src param of _xcoff_swap_ld*. * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external diff --git a/bfd/elf.c b/bfd/elf.c index b06417c5e..a6332e241 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)); -- 2.11.4.GIT