UPSTREAM: selftests: timers: Fix abs() warning in posix_timers test
commit ed366de8 upstream. Building with clang results in the following warning: posix_timers.c:69:6: warning: absolute value function 'abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] if (abs(diff - DELAY * USECS_PER_SEC) > USECS_PER_SEC / 2) { ^ So switch to using llabs() instead. Fixes: 0bc4b0cf ("selftests: add basic posix timers selftests") Change-Id: I18359f027ed56a0bcfeabfa4e8145d4d08ee7a7d Signed-off-by:John Stultz <jstultz@google.com> Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240410232637.4135564-3-jstultz@google.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 5c5fb505) Signed-off-by:
Edward Liaw <edliaw@google.com>
Loading
Please sign in to comment