Skip to content

Commit

Permalink
samples/bpf: fix warnings in xdp_monitor_user
Browse files Browse the repository at this point in the history
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: 3ffab54 ("samples/bpf: xdp_monitor tool based on tracepoints")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Oct 2, 2017
1 parent 45bfbc0 commit 0929567
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/bpf/xdp_monitor_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 0929567

Please sign in to comment.