提交 a6df0674 编写于 作者: J Jörn-Thorben Hinz 提交者: Andrii Nakryiko

bpftool: Don't try to return value from void function in skeleton

A skeleton generated by bpftool previously contained a return followed
by an expression in OBJ_NAME__detach(), which has return type void. This
did not hurt, the bpf_object__detach_skeleton() called there returns
void itself anyway, but led to a warning when compiling with e.g.
-pedantic.
Signed-off-by: NJörn-Thorben Hinz <jthinz@mailbox.tu-berlin.de>
Signed-off-by: NAndrii Nakryiko <andrii@kernel.org>
Reviewed-by: NQuentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20220726133203.514087-1-jthinz@mailbox.tu-berlin.de
上级 5eff8c18
......@@ -1175,7 +1175,7 @@ static int do_skeleton(int argc, char **argv)
static inline void \n\
%1$s__detach(struct %1$s *obj) \n\
{ \n\
return bpf_object__detach_skeleton(obj->skeleton); \n\
bpf_object__detach_skeleton(obj->skeleton); \n\
} \n\
",
obj_name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册