Re: [PATCH seccomp] selftests/seccomp: Fix compile warning when CC=clang

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

 



On Thu, 26 May 2022 22:34:07 +0000, YiFei Zhu wrote:
> clang has -Wconstant-conversion by default, and the constant 0xAAAAAAAAA
> (9 As) being converted to an int, which is generally 32 bits, results
> in the compile warning:
> 
>   clang -Wl,-no-as-needed -Wall -isystem ../../../../usr/include/  -lpthread  seccomp_bpf.c -lcap -o seccomp_bpf
>   seccomp_bpf.c:812:67: warning: implicit conversion from 'long' to 'int' changes value from 45812984490 to -1431655766 [-Wconstant-conversion]
>           int kill = kill_how == KILL_PROCESS ? SECCOMP_RET_KILL_PROCESS : 0xAAAAAAAAA;
>               ~~~~                                                         ^~~~~~~~~~~
>   1 warning generated.
> 
> [...]

Applied to for-next/seccomp, thanks!

[1/1] selftests/seccomp: Fix compile warning when CC=clang
      https://git.kernel.org/kees/c/73a8dbafd31a

-- 
Kees Cook




[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