提交 0929567a 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

samples/bpf: fix warnings in xdp_monitor_user

Make local functions static to fix

  HOSTCC  samples/bpf/xdp_monitor_user.o
samples/bpf/xdp_monitor_user.c:64:7: warning: no previous prototype for ‘gettime’ [-Wmissing-prototypes]
 __u64 gettime(void)
       ^~~~~~~
samples/bpf/xdp_monitor_user.c:209:6: warning: no previous prototype for ‘print_bpf_prog_info’ [-Wmissing-prototypes]
 void print_bpf_prog_info(void)
      ^~~~~~~~~~~~~~~~~~~
Fixes: 3ffab546 ("samples/bpf: xdp_monitor tool based on tracepoints")
Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
Acked-by: NAlexei Starovoitov <ast@kernel.org>
Acked-by: NJesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 45bfbc01
......@@ -61,7 +61,7 @@ static void usage(char *argv[])
}
#define NANOSEC_PER_SEC 1000000000 /* 10^9 */
__u64 gettime(void)
static __u64 gettime(void)
{
struct timespec t;
int res;
......@@ -206,7 +206,7 @@ static void stats_poll(int interval, bool err_only)
}
}
void print_bpf_prog_info(void)
static void print_bpf_prog_info(void)
{
int i;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册