From: Dmitry V. Levin Date: Thu, 15 Mar 2012 20:42:46 +0000 (+0000) Subject: arm: fix compilation warnings X-Git-Tag: v4.7~85 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63e4f86bd7db507e181dd0da467e7a9a2c3b2c1a;p=strace arm: fix compilation warnings * configure.ac: Define SIZEOF_LONG. * signal.c (sys_rt_sigaction) [SUPPORTED_PERSONALITIES > 1]: Help compiler to optimize out unreachable code that is not expected to work on platforms where sizeof(long) <= 4. --- diff --git a/configure.ac b/configure.ac index ee9b8e82..f5118cad 100644 --- a/configure.ac +++ b/configure.ac @@ -251,6 +251,8 @@ AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64], AC_DEFINE([HAVE_BLKGETSIZE64], [1], [Define to 1 if you have BLKGETSIZE64.]) fi) +AC_CHECK_SIZEOF([long]) + AC_PATH_PROG([PERL], [perl]) AC_CONFIG_FILES([Makefile tests/Makefile]) diff --git a/signal.c b/signal.c index 5ff89e43..8bff1465 100644 --- a/signal.c +++ b/signal.c @@ -1339,9 +1339,9 @@ sys_rt_sigaction(struct tcb *tcp) goto after_sa; } #if SUPPORTED_PERSONALITIES > 1 +#if SIZEOF_LONG > 4 if (personality_wordsize[current_personality] != sizeof(sa.sa_flags) - && personality_wordsize[current_personality] == 4 - ) { + && personality_wordsize[current_personality] == 4) { struct new_sigaction32 sa32; r = umove(tcp, addr, &sa32); if (r >= 0) { @@ -1360,6 +1360,7 @@ sys_rt_sigaction(struct tcb *tcp) sa.sa_mask[0] = sa32.sa_mask[0] + ((long)(sa32.sa_mask[1]) << 32); } } else +#endif #endif { r = umove(tcp, addr, &sa);