aboutsummaryrefslogtreecommitdiff
path: root/net/unix/sysctl_net_unix.c
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2024-03-28 15:30:42 +0100
committerAndrew Morton <[email protected]>2024-04-25 21:07:04 -0700
commit56fd61628b7a5c1ff474619580796f11d5c8973a (patch)
treecc141225da764b8e35afbb6554ff152c5b3dc555 /net/unix/sysctl_net_unix.c
parentb0f970c50d439df46ade159950201faba36da10b (diff)
kcov: avoid clang out-of-range warning
The area_size is never larger than the maximum on 64-bit architectutes: kernel/kcov.c:634:29: error: result of comparison of constant 1152921504606846975 with expression of type '__u32' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (remote_arg->area_size > LONG_MAX / sizeof(unsigned long)) ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The compiler can correctly optimize the check away and the code appears correct to me, so just add a cast to avoid the warning. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Justin Stitt <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: Bill Wendling <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nick Desaulniers <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions