[PATCH] mingw64 build.
Ilya Tocar
tocarip.intel@gmail.com
Fri Dec 27 10:59:00 GMT 2013
Hi,
Even after your patch
https://sourceware.org/ml/binutils/2013-12/msg00225.html
Mingw64 build is still broken for me with
error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
This patch fixes it.
2013-12-27 Ilya Tocar <ilya.tocar@intel.com>
* peXXigen.c (rsrc_process_section): Use ptrdiff_t as the type for
pointer arithmetic.
---
bfd/peXXigen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index d50db73..1da5a9a 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;
--
1.8.3.1
More information about the Binutils
mailing list