From 70778fc76803fd416f0bb898773811f12baa0714 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 7 May 2011 13:48:50 +0000 Subject: [PATCH] PR 12739 * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast. * bfd-in2.h: Regenerate. --- bfd/ChangeLog | 6 ++++++ bfd/bfd-in2.h | 4 ++-- bfd/libbfd.c | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ee2bfb4d044..73b15f2907a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2011-05-07 Anders Kaseorg + + PR 12739 + * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast. + * bfd-in2.h: Regenerate. + 2011-05-06 Tristan Gingold * vms-alpha.c (evax_section_flags): Remove SEC_IN_MEMORY. diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 76836b15c82..aa12c8a168a 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1029,9 +1029,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(unsigned char *) (ptr) & 0xff) + (*(const unsigned char *) (ptr) & 0xff) #define bfd_get_signed_8(abfd, ptr) \ - (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) + (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) diff --git a/bfd/libbfd.c b/bfd/libbfd.c index cec13d95132..44651cf9c3e 100644 --- a/bfd/libbfd.c +++ b/bfd/libbfd.c @@ -431,9 +431,9 @@ DESCRIPTION .#define bfd_put_signed_8 \ . bfd_put_8 .#define bfd_get_8(abfd, ptr) \ -. (*(unsigned char *) (ptr) & 0xff) +. (*(const unsigned char *) (ptr) & 0xff) .#define bfd_get_signed_8(abfd, ptr) \ -. (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) +. (((*(const unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80) . .#define bfd_put_16(abfd, val, ptr) \ . BFD_SEND (abfd, bfd_putx16, ((val),(ptr))) -- 2.30.2