public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] Fix pointer conversion.
@ 2013-12-17 15:08 Walfred Tedeschi
  2013-12-17 15:23 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Walfred Tedeschi @ 2013-12-17 15:08 UTC (permalink / raw)
  To: xdje42; +Cc: gdb-patches, Walfred Tedeschi

Pointer conversion from and to "long" is not correct. Issue was
verified while building gdb for windows under MinGW.

2013-12-17  Walfred Tedeschi  <walfred.tedeschi@intel.com>

bfd/
	* peXXigen.c (pe_print_rsrc): Use bfd_hostptr_t instead of long.

---
 bfd/peXXigen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index b720668..cca2b46 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -2182,7 +2182,7 @@ pe_print_rsrc (bfd * abfd, void * vfile)
 	{
 	  /* Align data before continuing.  */
 	  int align = (1 << section->alignment_power) - 1;
-	  data = (bfd_byte *) (((long) (data + align)) & ~ align);
+	  data = (bfd_byte *) (((bfd_hostptr_t) (data + align)) & ~ align);
 	  rva_bias += data - datastart;
 
 	  /* For reasons that are unclear .rsrc sections are sometimes created
-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-17 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-17 15:08 [PATCH v1 1/1] Fix pointer conversion Walfred Tedeschi
2013-12-17 15:23 ` Pedro Alves
2013-12-17 15:34   ` Tedeschi, Walfred

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).