libselinux: audit2why: remove unused module_state structure
PATCH 1/1 libselinux: audit2why: remove unused module_state structure
This structure has been empty since its introduction and makes clang complain when $(filter-out -Werror, $(CFLAGS)) is removed in the Makefile target for audit2why.lo:
audit2why.c:443:1: error: empty struct has size 0 in C, size 1 in
C++ [-Werror,-Wc++-compat]
struct module_state {
^
1 error generated.Signed-off-by Nicolas Iooss <[email protected]>
--- libselinux/src/audit2why.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
libselinux/src/audit2why.c +1 -4
@@ -440,14 +440,11 @@ static PyMethodDef audit2whyMethods[] = {#if PY_MAJOR_VERSION >=3 /* Module-initialization logic specific to Python 3 */ -struct module_state { -/* empty for now */ -};static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT,"audit2why" ,NULL , -sizeof (struct module_state ), +0 , audit2whyMethods,NULL , NULL,
Signature · 1 line
2.10.2
Stephen Smalley
AppliedQuoted 11 lines · Nicolas Iooss
This structure has been empty since its introduction and makes clang complain when $(filter-out -Werror, $(CFLAGS)) is removed in the
Makefiletarget for audit2why.lo:audit2why.c:443:1: error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wc++-compat] struct module_state { ^ 1 error generated.Signed-off-by Nicolas Iooss <[email protected]>
Thanks, applied.
Quoted 25 lines
--- libselinux/src/audit2why.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)libselinux/src/audit2why.c +1
-4@@ -440,14 +440,11 @@ static PyMethodDef audit2whyMethods[] = {#if PY_MAJOR_VERSION >=3 /* Module-initialization logic specific to Python 3 */ -struct module_state { -/* empty for now */ -};static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT,"audit2why" ,NULL , -sizeof (struct module_state ), +0 , audit2whyMethods,NULL , NULL,