diff options
| author | Björn Töpel <[email protected]> | 2023-11-02 10:35:37 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2023-11-02 14:57:21 +0000 |
| commit | d84b139f53e8fa8048f16814c6b2a53d7bc15c3d (patch) | |
| tree | 7a2fe59a181f0c1ac1070327cc757bbbfbbdeb51 /tools/testing/selftests/bpf/prog_tests/recursion.c | |
| parent | Merge branch 'bpf-fix-precision-tracking-for-bpf_alu-bpf_to_be-bpf_end' (diff) | |
| download | kernel-d84b139f53e8fa8048f16814c6b2a53d7bc15c3d.tar.gz kernel-d84b139f53e8fa8048f16814c6b2a53d7bc15c3d.zip | |
selftests/bpf: Fix broken build where char is unsigned
There are architectures where char is not signed. If so, the following
error is triggered:
| xdp_hw_metadata.c:435:42: error: result of comparison of constant -1 \
| with expression of type 'char' is always true \
| [-Werror,-Wtautological-constant-out-of-range-compare]
| 435 | while ((opt = getopt(argc, argv, "mh")) != -1) {
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~
| 1 error generated.
Correct by changing the char to int.
Fixes: bb6a88885fde ("selftests/bpf: Add options and frags to xdp_hw_metadata")
Signed-off-by: Björn Töpel <[email protected]>
Acked-by: Larysa Zaremba <[email protected]>
Tested-by: Anders Roxell <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/recursion.c')
0 files changed, 0 insertions, 0 deletions
