From 9a43207853a3d7a30a8ee76623087018ad0e2b7f Mon Sep 17 00:00:00 2001 From: root Date: Wed, 10 May 2023 12:09:41 +0000 Subject: [PATCH] fix(compile warning): warning: non-void function does not return a value iovisor/gobpf/elf/table.go:63:1: warning: non-void function does not return a value [-Wreturn-type] This function(next_bpf_elem) doesn't need a return value for the call logic, so change the definition of the function to void --- elf/table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elf/table.go b/elf/table.go index 70157564..e46a471b 100644 --- a/elf/table.go +++ b/elf/table.go @@ -53,7 +53,7 @@ static void create_bpf_lookup_elem(int fd, void *key, void *value, void *attr) ptr_bpf_attr->value = ptr_to_u64(value); } -static int next_bpf_elem(int fd, void *key, void *next_key, void *attr) +static void next_bpf_elem(int fd, void *key, void *next_key, void *attr) { union bpf_attr* ptr_bpf_attr; ptr_bpf_attr = (union bpf_attr*)attr;