[RFC] sim/sh: Fix compile warnings for 64-bit build hosts
Kevin Buettner
kevinb@redhat.com
Thu Feb 16 04:46:00 GMT 2012
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++;
More information about the Gdb-patches
mailing list