From: Alan Modra Date: Thu, 12 Dec 2019 03:50:07 +0000 (+1030) Subject: Remove duplicate cast X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=199d46bebbe66a3f60717d3aa3d7b7559680d40b;p=binutils-gdb.git Remove duplicate cast * libbfd.c (bfd_get): Don't cast result of bfd_get_8. * bfd-in2.h: Regenerate. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5933a05e7e8..7c3cf2906fc 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2019-12-12 Alan Modra + + * libbfd.c (bfd_get): Don't cast result of bfd_get_8. + * bfd-in2.h: Regenerate. + 2019-12-11 Alan Modra * elf32-rx.c (elf32_rx_relax_section): Avoid signed overflow. diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 6f3e41da376..ed91ed27ee7 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -700,7 +700,7 @@ bfd_vma bfd_getl24 (const void *p); 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) \ diff --git a/bfd/libbfd.c b/bfd/libbfd.c index 3a3e523bccd..608d80cd40c 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) \