From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Subject: [RFC] sim/sh: Fix compile warnings for 64-bit build hosts
Date: Thu, 16 Feb 2012 04:46:00 -0000 [thread overview]
Message-ID: <20120215172622.4f377c2b@mesquite.lan> (raw)
Any comments on the following patch?
It fixes a bunch of warnings when building on a 64-bit host. Here
are a few of them:
./code.c:93: warning: cast from pointer to integer of different size
./code.c:215: warning: cast from pointer to integer of different size
./code.c:230: warning: cast from pointer to integer of different size
Kevin
* sh/interp.c (MA): Adjust cast to avoid warning on 64-bit hosts.
Index: interp.c
===================================================================
RCS file: /cvs/src/src/sim/sh/interp.c,v
retrieving revision 1.23
diff -u -p -r1.23 interp.c
--- interp.c 16 Apr 2011 18:16:36 -0000 1.23
+++ interp.c 16 Feb 2012 00:16:15 -0000
@@ -862,7 +862,7 @@ do { \
#else
#define MA(n) \
- do { memstalls += ((((int) PC & 3) != 0) ? (n) : ((n) - 1)); } while (0)
+ do { memstalls += ((((long) PC & 3) != 0) ? (n) : ((n) - 1)); } while (0)
#define L(x) thislock = x;
#define TL(x) if ((x) == prevlock) stalls++;
next reply other threads:[~2012-02-16 0:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 4:46 Kevin Buettner [this message]
2012-02-16 4:54 ` Mike Frysinger
2012-02-16 23:36 ` Kevin Buettner
2012-02-17 1:21 ` Mike Frysinger
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=20120215172622.4f377c2b@mesquite.lan \
--to=kevinb@redhat.com \
--cc=gdb-patches@sourceware.org \
/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