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.
This commit is contained in:
Дмитрий Левин 2012-03-15 20:42:46 +00:00
parent 84abf70011
commit 63e4f86bd7
2 changed files with 5 additions and 2 deletions

View File

@ -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])

View File

@ -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);