This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make bfd_get_8 return a bfd_vma like other bfd_get_* functions


On Wed, Dec 11, 2019 at 12:22:47PM +0100, Andreas Schwab wrote:
> There is now a redundant cast in the bfd_get macro.

	* libbfd.c (bfd_get): Don't cast result of bfd_get_8.
	* bfd-in2.h: Regenerate.

diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index 3a3e523bcc..608d80cd40 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -495,7 +495,7 @@ DESCRIPTION
 .  BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
 .
 .#define bfd_get(bits, abfd, ptr)			\
-.  ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr)	\
+.  ((bits) == 8 ? bfd_get_8 (abfd, ptr)			\
 .   : (bits) == 16 ? bfd_get_16 (abfd, ptr)		\
 .   : (bits) == 32 ? bfd_get_32 (abfd, ptr)		\
 .   : (bits) == 64 ? bfd_get_64 (abfd, ptr)		\

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]