summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_cpp.cpp
diff options
context:
space:
mode:
authorTony Ambardar <tony.ambardar@gmail.com>2024-07-29 02:24:19 -0700
committerAndrii Nakryiko <andrii@kernel.org>2024-07-30 13:45:45 -0700
commitcacf2a5a78cd1f5f616eae043ebc6f024104b721 (patch)
treed30c1d82a319314a8fbd1b284ac0253e3d67f9e6 /tools/testing/selftests/bpf/test_cpp.cpp
parent03bfcda1fbc37ef34aa21d2b9e09138335afc6ee (diff)
downloadlwn-cacf2a5a78cd1f5f616eae043ebc6f024104b721.tar.gz
lwn-cacf2a5a78cd1f5f616eae043ebc6f024104b721.zip
selftests/bpf: Fix error compiling test_lru_map.c
Although the post-increment in macro 'CPU_SET(next++, &cpuset)' seems safe, the sequencing can raise compile errors, so move the increment outside the macro. This avoids an error seen using gcc 12.3.0 for mips64el/musl-libc: In file included from test_lru_map.c:11: test_lru_map.c: In function 'sched_next_online': test_lru_map.c:129:29: error: operation on 'next' may be undefined [-Werror=sequence-point] 129 | CPU_SET(next++, &cpuset); | ^ cc1: all warnings being treated as errors Fixes: 3fbfadce6012 ("bpf: Fix test_lru_sanity5() in test_lru_map.c") Signed-off-by: Tony Ambardar <tony.ambardar@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/22993dfb11ccf27925a626b32672fd3324cb76c4.1722244708.git.tony.ambardar@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/test_cpp.cpp')
0 files changed, 0 insertions, 0 deletions