aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/Makefile
diff options
context:
space:
mode:
authorGravatar John Hubbard <jhubbard@nvidia.com> 2024-05-08 13:41:01 -0700
committerGravatar Shuah Khan <skhan@linuxfoundation.org> 2024-05-08 16:53:19 -0600
commit14d28ec6f821622211aa65b4da156399c9a4a9c6 (patch)
tree449342e6456adc1c1d48f314e5d1aa92fbc42de5 /tools/testing/selftests/Makefile
parentselftests/ftrace: Fix checkbashisms errors (diff)
downloadlinux-14d28ec6f821622211aa65b4da156399c9a4a9c6.tar.gz
linux-14d28ec6f821622211aa65b4da156399c9a4a9c6.tar.bz2
linux-14d28ec6f821622211aa65b4da156399c9a4a9c6.zip
selftests/resctrl: fix clang build warnings related to abs(), labs() calls
When building with clang, via: make LLVM=1 -C tools/testing/selftests ...two types of warnings occur: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value warning: taking the absolute value of unsigned type 'unsigned long' has no effect Fix these by: a) using labs() in place of abs(), when long integers are involved, and b) Change to use signed integer data types, in places where subtraction is used (and could end up with negative values). c) Remove a duplicate abs() call in cmt_test.c. Cc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/Makefile')
0 files changed, 0 insertions, 0 deletions