lkml.org 
[lkml]   [2023]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectselftests: timerfd.c:64:7: error: absolute value function 'abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value
While building selftests landlock following warnings / errors noticed on the
Linux next with clang-17 toolchain.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Build errors:
------------
timens/timerfd
timerfd.c:64:7: error: absolute value function 'abs' given an argument
of type 'long long' but has parameter of type 'int' which may cause
truncation of value [-Werror,-Wabsolute-value]
64 | if (abs(elapsed - 3600) > 60) {
| ^
timerfd.c:64:7: note: use function 'llabs' instead
64 | if (abs(elapsed - 3600) > 60) {
| ^~~
| llabs
1 error generated.
make[4]: Leaving directory 'selftests/timens'


Links:
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2U69ue7AaypfY7eRU4UUygecrDx/

Steps to reproduce:
tuxmake --runtime podman --target-arch arm64 --toolchain clang-17
--kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2U69ue7AaypfY7eRU4UUygecrDx/config
LLVM=1 LLVM_IAS=1 dtbs dtbs-legacy headers kernel kselftest modules

--
Linaro LKFT
https://lkft.linaro.org

\
 
 \ /
  Last update: 2023-08-17 13:02    [W:0.023 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site