From: Ilya Tocar Date: Mon, 30 Dec 2013 15:28:41 +0000 (+0000) Subject: * peXXigen.c (rsrc_process_section): Use ptrdiff_t as the type for X-Git-Tag: hjl/linux/release/2.24.51.0.3~1^2~21^2~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f93a6d6f3c7a2fcb9e45eea93a09532178da2ab;p=thirdparty%2Fbinutils-gdb.git * peXXigen.c (rsrc_process_section): Use ptrdiff_t as the type for pointer arithmetic. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bc9e0339ba5..d79acff62cf 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2013-12-30 Ilya Tocar + + * peXXigen.c (rsrc_process_section): Use ptrdiff_t as the type for + pointer arithmetic. + 2013-12-20 Alan Modra * elf-eh-frame.c (cie_eq): Return false when initial_insn_length diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index d50db7397c4..1da5a9a9869 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -3541,7 +3541,7 @@ rsrc_process_section (bfd * abfd, } /* Align the data pointer - we assume 1^2 alignment. */ - data = (bfd_byte *) (((long) (data + 3)) & ~ 3); + data = (bfd_byte *) (((ptrdiff_t) (data + 3)) & ~ 3); rva_bias += data - p; if (data == (dataend - 4)) @@ -3569,7 +3569,7 @@ rsrc_process_section (bfd * abfd, data = rsrc_parse_directory (abfd, type_tables + indx, data, data, dataend, rva_bias, NULL); - data = (bfd_byte *) (((long) (data + 3)) & ~ 3); + data = (bfd_byte *) (((ptrdiff_t) (data + 3)) & ~ 3); rva_bias += data - p; if (data == (dataend - 4)) data = dataend;