diff mbox series

[v2,5/6] libsemanage: ignore missing prototypes in swig generated code

Message ID 20220405133548.51598-5-cgzones@googlemail.com (mailing list archive)
State Accepted
Commit 0ba7e23189b8
Headers show
Series [v2,1/6] libsepol/cil: declare file local functions static | expand

Commit Message

Christian Göttsche April 5, 2022, 1:35 p.m. UTC
The code generated by swig triggers the following warning:

    semanageswig_wrap.c:2759:24: warning: no previous prototype for ‘PyInit__semanage’ [-Wmissing-prototypes]
     2759 | #  define SWIG_init    PyInit__semanage
          |                        ^~~~~~~~~~~~~~~~
    semanageswig_wrap.c:17772:1: note: in expansion of macro ‘SWIG_init’
    17772 | SWIG_init(void) {
          | ^~~~~~~~~

Ignore -Wmissing-prototypes for swig generated source files.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libsemanage/src/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile
index ab6cae51..71c2a1d2 100644
--- a/libsemanage/src/Makefile
+++ b/libsemanage/src/Makefile
@@ -57,7 +57,7 @@  CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-
 	  -fno-semantic-interposition
 
 SWIG_CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow \
-		-Wno-unused-parameter
+		-Wno-unused-parameter -Wno-missing-prototypes
 
 override CFLAGS += -I../include -D_GNU_SOURCE
 RANLIB ?= ranlib