* [PATCH] selftests/seccomp: Fixed type mismatch warning
@ 2025-10-29 17:42 Alessandro Zanni
0 siblings, 0 replies; only message in thread
From: Alessandro Zanni @ 2025-10-29 17:42 UTC (permalink / raw)
To: kees, luto, wad, shuah; +Cc: Alessandro Zanni, linux-kselftest, linux-kernel
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_bpf
seccomp_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 <alessandro.zanni87@gmail.com>
---
tools/testing/selftests/seccomp/seccomp_bpf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index 874f17763536..cd745a8a5b7e 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -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)
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-10-29 17:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-29 17:42 [PATCH] selftests/seccomp: Fixed type mismatch warning Alessandro Zanni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox