summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-02-19 17:39:56 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-02-19 17:39:56 +0100
commit2544f988c96a48e48369a767d8886c4282859ed3 (patch)
tree7cc8d1ed374971f113d2fb87336bfed8a61223ab /util.c
parent30c03230a8a5ba41d183279dcd6d0668940267db (diff)
downloadstrace-2544f988c96a48e48369a767d8886c4282859ed3.tar.gz
strace-2544f988c96a48e48369a767d8886c4282859ed3.tar.bz2
strace-2544f988c96a48e48369a767d8886c4282859ed3.tar.xz
Fix compiler warnings
With constant current_wordsize == 4 and 32-bit longs, gcc was spooked by "1ul << (8 * current_wordsize)" = "1ul << 32". Make such places conditional on SIZEOF_LONG > 4. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 9199f26..f0d024d 100644
--- a/util.c
+++ b/util.c
@@ -767,7 +767,7 @@ umoven(struct tcb *tcp, long addr, int len, char *laddr)
char x[sizeof(long)];
} u;
-#if SUPPORTED_PERSONALITIES > 1
+#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4
if (current_wordsize < sizeof(addr))
addr &= (1ul << 8 * current_wordsize) - 1;
#endif
@@ -859,7 +859,7 @@ umovestr(struct tcb *tcp, long addr, int len, char *laddr)
char x[sizeof(long)];
} u;
-#if SUPPORTED_PERSONALITIES > 1
+#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4
if (current_wordsize < sizeof(addr))
addr &= (1ul << 8 * current_wordsize) - 1;
#endif