selftests: 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While building selftests landlock following warnings / errors noticed on the
Linux next with clang-17 toolchain.

Reported-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>

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



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux