From 034d9bd32260ccb534576da39b950dd740ec02df Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Thu, 25 Feb 2021 18:56:35 +0100 Subject: [PATCH] remove obnoxious compiler warning; this will declare VERY LONG timeouts (> 2E6 seconds) on 32-bit builds illegal (EINVAL) --- pthread_delay_np.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pthread_delay_np.c b/pthread_delay_np.c index 76a54b65..c8bcb84c 100644 --- a/pthread_delay_np.c +++ b/pthread_delay_np.c @@ -116,12 +116,8 @@ pthread_delay_np (struct timespec *interval) #pragma disable_message (124) #endif - /* - * Most compilers will issue a warning 'comparison always 0' - * because the variable type is unsigned, but we need to keep this - * for some reason I can't recall now. - */ - if (0 > (wait_time = secs_in_millisecs + millisecs)) + wait_time = secs_in_millisecs + millisecs; + if (0 > (int)wait_time) { return EINVAL; }