mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
bpf: syscall_nrs: Disable no previous prototype warnning
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)
^~~~~~~~~~~~~~~
Actually, this file meets our expectatations because it will be converted to
a .h file. In this way, it's correct. Considering the warnning stopping us
compiling, we can remove the warnning directly.
Signed-off-by: Jason Xing <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/all/[email protected]/
Link: https://lore.kernel.org/all/CAEf4BzaVdr_0kQo=+jPLN++PvcU6pwTjaPVEA880kgDN94TZYw@mail.gmail.com/
Link: https://lore.kernel.org/bpf/[email protected]
This commit is contained in:
1 parent
4236f114a3
commit
c50fc1cbfd
1 file changed
+5
@@ -2,6 +2,9 @@
|
||||
#include <uapi/linux/unistd.h>
|
||||
#include <linux/kbuild.h>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
|
||||
|
||||
#define SYSNR(_NR) DEFINE(SYS ## _NR, _NR)
|
||||
|
||||
void syscall_defines(void)
|
||||
@@ -17,3 +20,5 @@ void syscall_defines(void)
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
Reference in new issue
Block a user