[PATCH bpf] bpf: syscall_nrs: fix no previous prototype for "syscall_defines"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jason Xing <kernelxing@xxxxxxxxxxx>

In some environments (gcc treated as error in W=1, which is default), if we
make -C samples/bpf/, it will be stopped because of
"no previous prototype" error like this:

  ../samples/bpf/syscall_nrs.c:7:6:
  error: no previous prototype for ‘syscall_defines’ [-Werror=missing-prototypes]
   void syscall_defines(void)
        ^~~~~~~~~~~~~~~

Signed-off-by: Jason Xing <kernelxing@xxxxxxxxxxx>
---
I'm not sure which tree I should target, sorry about that.
---
 samples/bpf/syscall_nrs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/samples/bpf/syscall_nrs.c b/samples/bpf/syscall_nrs.c
index 88f940052450..5f40a29034b6 100644
--- a/samples/bpf/syscall_nrs.c
+++ b/samples/bpf/syscall_nrs.c
@@ -4,6 +4,8 @@
 
 #define SYSNR(_NR) DEFINE(SYS ## _NR, _NR)
 
+void syscall_defines(void);
+
 void syscall_defines(void)
 {
 	COMMENT("Linux system call numbers.");
-- 
2.37.3





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux