On Mon, Nov 14, 2022 at 2:42 PM Christian Göttsche <cgzones@xxxxxxxxxxxxxx> wrote: > > Use the more strict C compiler warnings from the root Makefile. > > Also fail on warnings from the m4 macro processor. > > Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> For these two patches: Acked-by: James Carter <jwcart2@xxxxxxxxx> > --- > libsepol/tests/Makefile | 19 +++++++++++++++++-- > libsepol/tests/test-linker-roles.c | 2 +- > 2 files changed, 18 insertions(+), 3 deletions(-) > > diff --git a/libsepol/tests/Makefile b/libsepol/tests/Makefile > index a72c327d..273373b0 100644 > --- a/libsepol/tests/Makefile > +++ b/libsepol/tests/Makefile > @@ -1,9 +1,24 @@ > ENV ?= env > -M4 ?= m4 > +M4 ?= m4 -E -E > MKDIR ?= mkdir > EXE ?= libsepol-tests > > -CFLAGS += -g3 -gdwarf-2 -O0 -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter -Werror > +CFLAGS += -g3 -gdwarf-2 -O0 \ > + -Werror -Wall -Wextra \ > + -Wfloat-equal \ > + -Wformat=2 \ > + -Winit-self \ > + -Wmissing-format-attribute \ > + -Wmissing-noreturn \ > + -Wmissing-prototypes \ > + -Wnull-dereference \ > + -Wpointer-arith \ > + -Wshadow \ > + -Wstrict-prototypes \ > + -Wundef \ > + -Wunused \ > + -Wwrite-strings \ > + -fno-common > > # Statically link libsepol on the assumption that we are going to > # be testing internal functions. > diff --git a/libsepol/tests/test-linker-roles.c b/libsepol/tests/test-linker-roles.c > index 2b17dffd..b35bdbe6 100644 > --- a/libsepol/tests/test-linker-roles.c > +++ b/libsepol/tests/test-linker-roles.c > @@ -53,7 +53,7 @@ > > /* this simply tests whether the passed in role only has its own > * value in its dominates ebitmap */ > -static void only_dominates_self(policydb_t * p, role_datum_t * role) > +static void only_dominates_self(policydb_t * p __attribute__ ((unused)), role_datum_t * role) > { > ebitmap_node_t *tnode; > unsigned int i; > -- > 2.38.1 >