From: Walfred Tedeschi <walfred.tedeschi@intel.com>
To: xdje42@gmail.com
Cc: gdb-patches@sourceware.org,
Walfred Tedeschi <walfred.tedeschi@intel.com>
Subject: [PATCH v1 1/1] Fix pointer conversion.
Date: Tue, 17 Dec 2013 15:08:00 -0000 [thread overview]
Message-ID: <1387292895-21852-1-git-send-email-walfred.tedeschi@intel.com> (raw)
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
next reply other threads:[~2013-12-17 15:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 15:08 Walfred Tedeschi [this message]
2013-12-17 15:23 ` Pedro Alves
2013-12-17 15:34 ` Tedeschi, Walfred
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1387292895-21852-1-git-send-email-walfred.tedeschi@intel.com \
--to=walfred.tedeschi@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=xdje42@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox