Commit e1168f49 authored by Stephen M. Webb's avatar Stephen M. Webb Committed by Peter Hutterer
Browse files

silenced truncation warnings on i386 targets



Code using xorg-gtest and compiling on 32-bit x86 targets using
GCC 4.7 or later get a truncation warning setting timeouts for
sigtimedwait().  If the code sets -Werror this is fatal.

This patch prevents those warnings.
Signed-off-by: default avatarStephen M. Webb <stephen.webb@canonical.com>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 2bc9c835
......@@ -152,8 +152,9 @@ bool xorg::testing::Process::WaitForExit(unsigned int timeout) {
sigaddset(&sig_mask, SIGCHLD);
if (sigprocmask(SIG_BLOCK, &sig_mask, &old_mask) == 0) {
struct timespec sig_timeout = {timeout / 1000,
(timeout % 1000) * 1000000L};
long tv_secs = timeout / 1000;
long tv_usecs = (timeout % 1000) * 1000000L;
struct timespec sig_timeout = { tv_secs, tv_usecs };
if (sigtimedwait(&sig_mask, NULL, &sig_timeout) != SIGCHLD && errno != EAGAIN)
usleep(timeout * 1000);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment