diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2013-02-19 17:39:56 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-02-19 17:39:56 +0100 |
commit | 2544f988c96a48e48369a767d8886c4282859ed3 (patch) | |
tree | 7cc8d1ed374971f113d2fb87336bfed8a61223ab /util.c | |
parent | 30c03230a8a5ba41d183279dcd6d0668940267db (diff) | |
download | strace-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |