selftests/seccomp: Fixed type mismatch warning
Subsystems (2)
PATCH 1/1 selftests/seccomp: Fixed type mismatch warning
Forced cast of the variable passed to the get_uprobe_offset() function either probed_uretprobe or probed_uprobe.
The solved warning is as follows:
CC seccomp_bpfseccomp_bpf.c: In function ‘UPROBE_setup’:
seccomp_bpf.c:5175:74: warning: pointer type mismatch in conditional expression
5175 | offset = get_uprobe_offset(variant->uretprobe ? probed_uretprobe : probed_uprobe);
|Command to test it:
make -C tools/testing/selftests TARGETS=seccomp
Signed-off-by Alessandro Zanni <[email protected]>
--- tools/testing/selftests/seccomp/seccomp_bpf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/seccomp/seccomp_bpf.c +2 -1
@@ -5172,7 +5172,8 @@ FIXTURE_SETUP(UPROBE)ASSERT_GE (bit,0 ); } - offset =get_uprobe_offset (variant->uretprobe ? probed_uretprobe : probed_uprobe); + offset =get_uprobe_offset (variant->uretprobe + ? (void *)probed_uretprobe : (void *)probed_uprobe);ASSERT_GE (offset,0 );if (variant->uretprobe)
Signature · 1 line
2.43.0