diff options
author | Dmitrii Banshchikov <me@ubique.spb.ru> | 2021-02-23 12:22:11 +0400 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-02-24 16:48:16 +0100 |
commit | c41d81bfbb4579c3e583457e383dd63d026bf947 (patch) | |
tree | 5c6da4ba4f4585cdaed21949a77f60c1ead10531 /certs | |
parent | f4eda8b6e4a5c7897c6bb992ed63a27061b371ef (diff) | |
download | linux-c41d81bfbb4579c3e583457e383dd63d026bf947.tar.gz linux-c41d81bfbb4579c3e583457e383dd63d026bf947.tar.bz2 linux-c41d81bfbb4579c3e583457e383dd63d026bf947.zip |
selftests/bpf: Fix a compiler warning in global func test
Add an explicit 'const void *' cast to pass program ctx pointer type into
a global function that expects pointer to structure.
warning: incompatible pointer types
passing 'struct __sk_buff *' to parameter of type 'const struct S *'
[-Wincompatible-pointer-types]
return foo(skb);
^~~
progs/test_global_func11.c:10:36: note: passing argument to parameter 's' here
__noinline int foo(const struct S *s)
^
Fixes: 8b08807d039a ("selftests/bpf: Add unit tests for pointers in global functions")
Signed-off-by: Dmitrii Banshchikov <me@ubique.spb.ru>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210223082211.302596-1-me@ubique.spb.ru
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions