* Re: Re: [patch 7/7] Use -Werror
@ 2008-01-07 20:47 Todd C. Miller
2008-01-08 12:59 ` Stephen Smalley
2008-01-09 13:09 ` Stephen Smalley
0 siblings, 2 replies; 10+ messages in thread
From: Todd C. Miller @ 2008-01-07 20:47 UTC (permalink / raw)
To: selinux; +Cc: method, sds
Stephen Smalley wrote:
> A bit overzealous though - some of them already had -Werror in CFLAGS.
> Also need to make sure that -Werror gets included by make DEBUG=1.
Updated patch without the duplicated -Werror and adds it for
the DEBUG=1 cases.
- todd
---
Makefile | 2 +-
checkpolicy/Makefile | 2 +-
libselinux/src/Makefile | 2 +-
libsemanage/src/Makefile | 2 +-
libsepol/src/Makefile | 2 +-
libsepol/utils/Makefile | 2 +-
policycoreutils/secon/Makefile | 2 +-
policycoreutils/setfiles/Makefile | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
Index: trunk/Makefile
===================================================================
--- trunk.orig/Makefile
+++ trunk/Makefile
@@ -2,7 +2,7 @@ SUBDIRS=libsepol libselinux libsemanage
PYSUBDIRS=libselinux libsemanage
ifeq ($(DEBUG),1)
- export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow
+ export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror
export LDFLAGS = -g
endif
Index: trunk/checkpolicy/Makefile
===================================================================
--- trunk.orig/checkpolicy/Makefile
+++ trunk/checkpolicy/Makefile
@@ -10,7 +10,7 @@ TARGETS = checkpolicy checkmodule
YACC = bison -y
-CFLAGS ?= -g -Wall -O2 -pipe -fno-strict-aliasing
+CFLAGS ?= -g -Wall -Werror -O2 -pipe -fno-strict-aliasing
override CFLAGS += -I. -I${INCLUDEDIR}
Index: trunk/libselinux/src/Makefile
===================================================================
--- trunk.orig/libselinux/src/Makefile
+++ trunk/libselinux/src/Makefile
@@ -32,7 +32,7 @@ SRCS= $(filter-out $(UNUSED_SRCS), $(fil
OBJS= $(patsubst %.c,%.o,$(SRCS))
LOBJS= $(patsubst %.c,%.lo,$(SRCS))
-CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute
+CFLAGS ?= -Werror -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute
override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS)
RANLIB=ranlib
Index: trunk/libsemanage/src/Makefile
===================================================================
--- trunk.orig/libsemanage/src/Makefile
+++ trunk/libsemanage/src/Makefile
@@ -10,7 +10,7 @@ PYLIBDIR ?= $(LIBDIR)/${PYLIBVER}
DEFAULT_SEMANAGE_CONF_LOCATION=$(DESTDIR)/etc/selinux/semanage.conf
ifeq ($(DEBUG),1)
- export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow
+ export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror
export LDFLAGS = -g
endif
Index: trunk/libsepol/src/Makefile
===================================================================
--- trunk.orig/libsepol/src/Makefile
+++ trunk/libsepol/src/Makefile
@@ -10,7 +10,7 @@ TARGET=libsepol.so
LIBSO=$(TARGET).$(LIBVERSION)
OBJS= $(patsubst %.c,%.o,$(wildcard *.c))
LOBJS= $(patsubst %.c,%.lo,$(wildcard *.c))
-CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute
+CFLAGS ?= -Werror -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute
override CFLAGS += -I. -I../include -D_GNU_SOURCE
all: $(LIBA) $(LIBSO)
Index: trunk/libsepol/utils/Makefile
===================================================================
--- trunk.orig/libsepol/utils/Makefile
+++ trunk/libsepol/utils/Makefile
@@ -2,7 +2,7 @@
PREFIX ?= $(DESTDIR)/usr
BINDIR ?= $(PREFIX)/bin
-CFLAGS ?= -Wall
+CFLAGS ?= -Wall -Werror
override CFLAGS += -I../include
LDLIBS += -L../src -lsepol
Index: trunk/policycoreutils/secon/Makefile
===================================================================
--- trunk.orig/policycoreutils/secon/Makefile
+++ trunk/policycoreutils/secon/Makefile
@@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin
MANDIR ?= $(PREFIX)/share/man
LIBDIR ?= ${PREFIX}/lib
-WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal
+WARNS=-Werror -W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal
VERSION = $(shell cat ../VERSION)
CFLAGS ?= $(WARNS) -O1
override CFLAGS += -DVERSION=\"$(VERSION)\" -I$(INCLUDEDIR)
Index: trunk/policycoreutils/setfiles/Makefile
===================================================================
--- trunk.orig/policycoreutils/setfiles/Makefile
+++ trunk/policycoreutils/setfiles/Makefile
@@ -6,7 +6,7 @@ LIBDIR ?= $(PREFIX)/lib
AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)
-CFLAGS = -Werror -Wall -W
+CFLAGS = -Werror -Wall -W
override CFLAGS += -D_FILE_OFFSET_BITS=64 -I$(PREFIX)/include
LDLIBS = -lselinux -lsepol -L$(LIBDIR)
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Re: [patch 7/7] Use -Werror 2008-01-07 20:47 Re: [patch 7/7] Use -Werror Todd C. Miller @ 2008-01-08 12:59 ` Stephen Smalley 2008-01-09 13:09 ` Stephen Smalley 1 sibling, 0 replies; 10+ messages in thread From: Stephen Smalley @ 2008-01-08 12:59 UTC (permalink / raw) To: Todd C. Miller; +Cc: selinux, method On Mon, 2008-01-07 at 15:47 -0500, Todd C. Miller wrote: > Stephen Smalley wrote: > > > A bit overzealous though - some of them already had -Werror in CFLAGS. > > Also need to make sure that -Werror gets included by make DEBUG=1. > > Updated patch without the duplicated -Werror and adds it for > the DEBUG=1 cases. Looks fine, apply the series at will. > > - todd > > --- > Makefile | 2 +- > checkpolicy/Makefile | 2 +- > libselinux/src/Makefile | 2 +- > libsemanage/src/Makefile | 2 +- > libsepol/src/Makefile | 2 +- > libsepol/utils/Makefile | 2 +- > policycoreutils/secon/Makefile | 2 +- > policycoreutils/setfiles/Makefile | 2 +- > 8 files changed, 8 insertions(+), 8 deletions(-) > > Index: trunk/Makefile > =================================================================== > --- trunk.orig/Makefile > +++ trunk/Makefile > @@ -2,7 +2,7 @@ SUBDIRS=libsepol libselinux libsemanage > PYSUBDIRS=libselinux libsemanage > > ifeq ($(DEBUG),1) > - export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow > + export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror > export LDFLAGS = -g > endif > > Index: trunk/checkpolicy/Makefile > =================================================================== > --- trunk.orig/checkpolicy/Makefile > +++ trunk/checkpolicy/Makefile > @@ -10,7 +10,7 @@ TARGETS = checkpolicy checkmodule > > YACC = bison -y > > -CFLAGS ?= -g -Wall -O2 -pipe -fno-strict-aliasing > +CFLAGS ?= -g -Wall -Werror -O2 -pipe -fno-strict-aliasing > > override CFLAGS += -I. -I${INCLUDEDIR} > > Index: trunk/libselinux/src/Makefile > =================================================================== > --- trunk.orig/libselinux/src/Makefile > +++ trunk/libselinux/src/Makefile > @@ -32,7 +32,7 @@ SRCS= $(filter-out $(UNUSED_SRCS), $(fil > > OBJS= $(patsubst %.c,%.o,$(SRCS)) > LOBJS= $(patsubst %.c,%.lo,$(SRCS)) > -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute > +CFLAGS ?= -Werror -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute > override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS) > RANLIB=ranlib > > Index: trunk/libsemanage/src/Makefile > =================================================================== > --- trunk.orig/libsemanage/src/Makefile > +++ trunk/libsemanage/src/Makefile > @@ -10,7 +10,7 @@ PYLIBDIR ?= $(LIBDIR)/${PYLIBVER} > DEFAULT_SEMANAGE_CONF_LOCATION=$(DESTDIR)/etc/selinux/semanage.conf > > ifeq ($(DEBUG),1) > - export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow > + export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror > export LDFLAGS = -g > endif > > Index: trunk/libsepol/src/Makefile > =================================================================== > --- trunk.orig/libsepol/src/Makefile > +++ trunk/libsepol/src/Makefile > @@ -10,7 +10,7 @@ TARGET=libsepol.so > LIBSO=$(TARGET).$(LIBVERSION) > OBJS= $(patsubst %.c,%.o,$(wildcard *.c)) > LOBJS= $(patsubst %.c,%.lo,$(wildcard *.c)) > -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute > +CFLAGS ?= -Werror -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute > override CFLAGS += -I. -I../include -D_GNU_SOURCE > > all: $(LIBA) $(LIBSO) > Index: trunk/libsepol/utils/Makefile > =================================================================== > --- trunk.orig/libsepol/utils/Makefile > +++ trunk/libsepol/utils/Makefile > @@ -2,7 +2,7 @@ > PREFIX ?= $(DESTDIR)/usr > BINDIR ?= $(PREFIX)/bin > > -CFLAGS ?= -Wall > +CFLAGS ?= -Wall -Werror > override CFLAGS += -I../include > LDLIBS += -L../src -lsepol > > Index: trunk/policycoreutils/secon/Makefile > =================================================================== > --- trunk.orig/policycoreutils/secon/Makefile > +++ trunk/policycoreutils/secon/Makefile > @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin > MANDIR ?= $(PREFIX)/share/man > LIBDIR ?= ${PREFIX}/lib > > -WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal > +WARNS=-Werror -W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal > VERSION = $(shell cat ../VERSION) > CFLAGS ?= $(WARNS) -O1 > override CFLAGS += -DVERSION=\"$(VERSION)\" -I$(INCLUDEDIR) > Index: trunk/policycoreutils/setfiles/Makefile > =================================================================== > --- trunk.orig/policycoreutils/setfiles/Makefile > +++ trunk/policycoreutils/setfiles/Makefile > @@ -6,7 +6,7 @@ LIBDIR ?= $(PREFIX)/lib > > AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null) > > -CFLAGS = -Werror -Wall -W > +CFLAGS = -Werror -Wall -W > override CFLAGS += -D_FILE_OFFSET_BITS=64 -I$(PREFIX)/include > LDLIBS = -lselinux -lsepol -L$(LIBDIR) > -- Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: [patch 7/7] Use -Werror 2008-01-07 20:47 Re: [patch 7/7] Use -Werror Todd C. Miller 2008-01-08 12:59 ` Stephen Smalley @ 2008-01-09 13:09 ` Stephen Smalley 2008-01-09 14:19 ` Todd Miller 1 sibling, 1 reply; 10+ messages in thread From: Stephen Smalley @ 2008-01-09 13:09 UTC (permalink / raw) To: Todd C. Miller; +Cc: selinux, method On Mon, 2008-01-07 at 15:47 -0500, Todd C. Miller wrote: > Stephen Smalley wrote: > > > A bit overzealous though - some of them already had -Werror in CFLAGS. > > Also need to make sure that -Werror gets included by make DEBUG=1. > > Updated patch without the duplicated -Werror and adds it for > the DEBUG=1 cases. This breaks make pywrap in libselinux, or install-pywrap from top. > > - todd > > --- > Makefile | 2 +- > checkpolicy/Makefile | 2 +- > libselinux/src/Makefile | 2 +- > libsemanage/src/Makefile | 2 +- > libsepol/src/Makefile | 2 +- > libsepol/utils/Makefile | 2 +- > policycoreutils/secon/Makefile | 2 +- > policycoreutils/setfiles/Makefile | 2 +- > 8 files changed, 8 insertions(+), 8 deletions(-) > > Index: trunk/Makefile > =================================================================== > --- trunk.orig/Makefile > +++ trunk/Makefile > @@ -2,7 +2,7 @@ SUBDIRS=libsepol libselinux libsemanage > PYSUBDIRS=libselinux libsemanage > > ifeq ($(DEBUG),1) > - export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow > + export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror > export LDFLAGS = -g > endif > > Index: trunk/checkpolicy/Makefile > =================================================================== > --- trunk.orig/checkpolicy/Makefile > +++ trunk/checkpolicy/Makefile > @@ -10,7 +10,7 @@ TARGETS = checkpolicy checkmodule > > YACC = bison -y > > -CFLAGS ?= -g -Wall -O2 -pipe -fno-strict-aliasing > +CFLAGS ?= -g -Wall -Werror -O2 -pipe -fno-strict-aliasing > > override CFLAGS += -I. -I${INCLUDEDIR} > > Index: trunk/libselinux/src/Makefile > =================================================================== > --- trunk.orig/libselinux/src/Makefile > +++ trunk/libselinux/src/Makefile > @@ -32,7 +32,7 @@ SRCS= $(filter-out $(UNUSED_SRCS), $(fil > > OBJS= $(patsubst %.c,%.o,$(SRCS)) > LOBJS= $(patsubst %.c,%.lo,$(SRCS)) > -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute > +CFLAGS ?= -Werror -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute > override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS) > RANLIB=ranlib > > Index: trunk/libsemanage/src/Makefile > =================================================================== > --- trunk.orig/libsemanage/src/Makefile > +++ trunk/libsemanage/src/Makefile > @@ -10,7 +10,7 @@ PYLIBDIR ?= $(LIBDIR)/${PYLIBVER} > DEFAULT_SEMANAGE_CONF_LOCATION=$(DESTDIR)/etc/selinux/semanage.conf > > ifeq ($(DEBUG),1) > - export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow > + export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror > export LDFLAGS = -g > endif > > Index: trunk/libsepol/src/Makefile > =================================================================== > --- trunk.orig/libsepol/src/Makefile > +++ trunk/libsepol/src/Makefile > @@ -10,7 +10,7 @@ TARGET=libsepol.so > LIBSO=$(TARGET).$(LIBVERSION) > OBJS= $(patsubst %.c,%.o,$(wildcard *.c)) > LOBJS= $(patsubst %.c,%.lo,$(wildcard *.c)) > -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute > +CFLAGS ?= -Werror -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute > override CFLAGS += -I. -I../include -D_GNU_SOURCE > > all: $(LIBA) $(LIBSO) > Index: trunk/libsepol/utils/Makefile > =================================================================== > --- trunk.orig/libsepol/utils/Makefile > +++ trunk/libsepol/utils/Makefile > @@ -2,7 +2,7 @@ > PREFIX ?= $(DESTDIR)/usr > BINDIR ?= $(PREFIX)/bin > > -CFLAGS ?= -Wall > +CFLAGS ?= -Wall -Werror > override CFLAGS += -I../include > LDLIBS += -L../src -lsepol > > Index: trunk/policycoreutils/secon/Makefile > =================================================================== > --- trunk.orig/policycoreutils/secon/Makefile > +++ trunk/policycoreutils/secon/Makefile > @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin > MANDIR ?= $(PREFIX)/share/man > LIBDIR ?= ${PREFIX}/lib > > -WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal > +WARNS=-Werror -W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal > VERSION = $(shell cat ../VERSION) > CFLAGS ?= $(WARNS) -O1 > override CFLAGS += -DVERSION=\"$(VERSION)\" -I$(INCLUDEDIR) > Index: trunk/policycoreutils/setfiles/Makefile > =================================================================== > --- trunk.orig/policycoreutils/setfiles/Makefile > +++ trunk/policycoreutils/setfiles/Makefile > @@ -6,7 +6,7 @@ LIBDIR ?= $(PREFIX)/lib > > AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null) > > -CFLAGS = -Werror -Wall -W > +CFLAGS = -Werror -Wall -W > override CFLAGS += -D_FILE_OFFSET_BITS=64 -I$(PREFIX)/include > LDLIBS = -lselinux -lsepol -L$(LIBDIR) > -- Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message. ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Re: [patch 7/7] Use -Werror 2008-01-09 13:09 ` Stephen Smalley @ 2008-01-09 14:19 ` Todd Miller 2008-01-09 14:24 ` Joshua Brindle 0 siblings, 1 reply; 10+ messages in thread From: Todd Miller @ 2008-01-09 14:19 UTC (permalink / raw) To: Stephen Smalley; +Cc: selinux, method Stephen Smalley wrote: > On Mon, 2008-01-07 at 15:47 -0500, Todd C. Miller wrote: >> Stephen Smalley wrote: >> >>> A bit overzealous though - some of them already had -Werror in >>> CFLAGS. Also need to make sure that -Werror gets included by make >>> DEBUG=1. >> >> Updated patch without the duplicated -Werror and adds it for >> the DEBUG=1 cases. > > This breaks make pywrap in libselinux, or install-pywrap from top. I always forget that pywrap is not built by the default target. I'll commit a fix to filter out -Werror for pywrap. - todd -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 7/7] Use -Werror 2008-01-09 14:19 ` Todd Miller @ 2008-01-09 14:24 ` Joshua Brindle 2008-01-09 15:33 ` Todd Miller 0 siblings, 1 reply; 10+ messages in thread From: Joshua Brindle @ 2008-01-09 14:24 UTC (permalink / raw) To: Todd Miller; +Cc: Stephen Smalley, selinux Todd Miller wrote: > Stephen Smalley wrote: > >> On Mon, 2008-01-07 at 15:47 -0500, Todd C. Miller wrote: >> >>> Stephen Smalley wrote: >>> >>> >>>> A bit overzealous though - some of them already had -Werror in >>>> CFLAGS. Also need to make sure that -Werror gets included by make >>>> DEBUG=1. >>>> >>> Updated patch without the duplicated -Werror and adds it for >>> the DEBUG=1 cases. >>> >> This breaks make pywrap in libselinux, or install-pywrap from top. >> > > I always forget that pywrap is not built by the default target. > I'll commit a fix to filter out -Werror for pywrap. > Also with DEBUG=1 there is another warning in newrole.c about a shadowed var. -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message. ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [patch 7/7] Use -Werror 2008-01-09 14:24 ` Joshua Brindle @ 2008-01-09 15:33 ` Todd Miller 0 siblings, 0 replies; 10+ messages in thread From: Todd Miller @ 2008-01-09 15:33 UTC (permalink / raw) To: Joshua Brindle; +Cc: Stephen Smalley, selinux Joshua Brindle wrote: > Also with DEBUG=1 there is another warning in newrole.c about a > shadowed var. I didn't have pam-devel installed on my build machine so this wasn't showing up for me. I've fixed the shadowed declaration now. - todd -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message. ^ permalink raw reply [flat|nested] 10+ messages in thread
* [patch 0/7] quiet gcc warnings @ 2008-01-03 18:43 tmiller 2008-01-03 18:43 ` [patch 7/7] Use -Werror tmiller 0 siblings, 1 reply; 10+ messages in thread From: tmiller @ 2008-01-03 18:43 UTC (permalink / raw) To: selinux; +Cc: method, sds These patches fix a number of gcc warnings in the selinux userland build process. They allow everything but libsemanage to build with -Werror. The only thing in the way of libsemanage using -Werror is the flex-generated scanner. We could just drop a few of the -W flags for libsemanage (like -Wundef) to make it pass. -- -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message. ^ permalink raw reply [flat|nested] 10+ messages in thread
* [patch 7/7] Use -Werror 2008-01-03 18:43 [patch 0/7] quiet gcc warnings tmiller @ 2008-01-03 18:43 ` tmiller 2008-01-07 18:06 ` Stephen Smalley 0 siblings, 1 reply; 10+ messages in thread From: tmiller @ 2008-01-03 18:43 UTC (permalink / raw) To: selinux; +Cc: method, sds Add -Werror to Makefiles --- checkpolicy/Makefile | 2 +- libselinux/src/Makefile | 2 +- libsemanage/src/Makefile | 2 +- libsepol/src/Makefile | 2 +- policycoreutils/audit2why/Makefile | 2 +- policycoreutils/load_policy/Makefile | 2 +- policycoreutils/newrole/Makefile | 2 +- policycoreutils/restorecond/Makefile | 2 +- policycoreutils/run_init/Makefile | 2 +- policycoreutils/secon/Makefile | 2 +- policycoreutils/semodule/Makefile | 2 +- policycoreutils/semodule_deps/Makefile | 2 +- policycoreutils/semodule_expand/Makefile | 2 +- policycoreutils/semodule_link/Makefile | 2 +- policycoreutils/semodule_package/Makefile | 2 +- policycoreutils/sestatus/Makefile | 2 +- policycoreutils/setfiles/Makefile | 2 +- policycoreutils/setsebool/Makefile | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) Index: trunk/checkpolicy/Makefile =================================================================== --- trunk.orig/checkpolicy/Makefile +++ trunk/checkpolicy/Makefile @@ -10,7 +10,7 @@ TARGETS = checkpolicy checkmodule YACC = bison -y -CFLAGS ?= -g -Wall -O2 -pipe -fno-strict-aliasing +CFLAGS ?= -g -Wall -Werror -O2 -pipe -fno-strict-aliasing override CFLAGS += -I. -I${INCLUDEDIR} Index: trunk/libselinux/src/Makefile =================================================================== --- trunk.orig/libselinux/src/Makefile +++ trunk/libselinux/src/Makefile @@ -32,7 +32,7 @@ SRCS= $(filter-out $(UNUSED_SRCS), $(fil OBJS= $(patsubst %.c,%.o,$(SRCS)) LOBJS= $(patsubst %.c,%.lo,$(SRCS)) -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute +CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Werror override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS) RANLIB=ranlib Index: trunk/libsemanage/src/Makefile =================================================================== --- trunk.orig/libsemanage/src/Makefile +++ trunk/libsemanage/src/Makefile @@ -31,7 +31,7 @@ SWIGFILES=$(SWIGSO) semanage.py LIBSO=$(TARGET).$(LIBVERSION) OBJS= $(patsubst %.c,%.o,$(filter-out $(SWIGCOUT),$(wildcard *.c))) conf-scan.o conf-parse.o LOBJS= $(patsubst %.c,%.lo,$(filter-out $(SWIGCOUT),$(wildcard *.c))) conf-scan.lo conf-parse.lo -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter +CFLAGS ?= -Wall -W Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE Index: trunk/libsepol/src/Makefile =================================================================== --- trunk.orig/libsepol/src/Makefile +++ trunk/libsepol/src/Makefile @@ -10,7 +10,7 @@ TARGET=libsepol.so LIBSO=$(TARGET).$(LIBVERSION) OBJS= $(patsubst %.c,%.o,$(wildcard *.c)) LOBJS= $(patsubst %.c,%.lo,$(wildcard *.c)) -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute +CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Werror override CFLAGS += -I. -I../include -D_GNU_SOURCE all: $(LIBA) $(LIBSO) Index: trunk/policycoreutils/audit2why/Makefile =================================================================== --- trunk.orig/policycoreutils/audit2why/Makefile +++ trunk/policycoreutils/audit2why/Makefile @@ -7,7 +7,7 @@ LOCALEDIR ?= /usr/share/locale INCLUDEDIR ?= ${PREFIX}/include -CFLAGS ?= -Werror -Wall -W +CFLAGS ?= -Werror -Wall -W -Werror override CFLAGS += -I$(INCLUDEDIR) LDLIBS = ${LIBDIR}/libsepol.a -lselinux -L$(LIBDIR) Index: trunk/policycoreutils/load_policy/Makefile =================================================================== --- trunk.orig/policycoreutils/load_policy/Makefile +++ trunk/policycoreutils/load_policy/Makefile @@ -4,7 +4,7 @@ SBINDIR ?= $(PREFIX)/sbin MANDIR ?= $(PREFIX)/share/man LOCALEDIR ?= /usr/share/locale -CFLAGS ?= -Werror -Wall -W +CFLAGS ?= -Werror -Wall -W -Werror override CFLAGS += $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" LDLIBS += -lsepol -lselinux -L$(PREFIX)/lib Index: trunk/policycoreutils/newrole/Makefile =================================================================== --- trunk.orig/policycoreutils/newrole/Makefile +++ trunk/policycoreutils/newrole/Makefile @@ -20,7 +20,7 @@ NAMESPACE_PRIV ?= n LSPP_PRIV ?= n VERSION = $(shell cat ../VERSION) -CFLAGS ?= -Werror -Wall -W +CFLAGS ?= -Werror -Wall -W -Werror EXTRA_OBJS = override CFLAGS += -DVERSION=\"$(VERSION)\" $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" LDLIBS += -lselinux -L$(PREFIX)/lib Index: trunk/policycoreutils/restorecond/Makefile =================================================================== --- trunk.orig/policycoreutils/restorecond/Makefile +++ trunk/policycoreutils/restorecond/Makefile @@ -5,7 +5,7 @@ MANDIR = $(PREFIX)/share/man INITDIR = $(DESTDIR)/etc/rc.d/init.d SELINUXDIR = $(DESTDIR)/etc/selinux -CFLAGS ?= -g -Werror -Wall -W +CFLAGS ?= -g -Werror -Wall -W -Werror override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64 LDLIBS += -lselinux -L$(PREFIX)/lib Index: trunk/policycoreutils/run_init/Makefile =================================================================== --- trunk.orig/policycoreutils/run_init/Makefile +++ trunk/policycoreutils/run_init/Makefile @@ -8,7 +8,7 @@ LOCALEDIR ?= /usr/share/locale PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null) AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null) -CFLAGS ?= -Werror -Wall -W +CFLAGS ?= -Werror -Wall -W -Werror override CFLAGS += -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" LDLIBS += -lselinux -L$(PREFIX)/lib ifeq (${PAMH}, /usr/include/security/pam_appl.h) Index: trunk/policycoreutils/secon/Makefile =================================================================== --- trunk.orig/policycoreutils/secon/Makefile +++ trunk/policycoreutils/secon/Makefile @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin MANDIR ?= $(PREFIX)/share/man LIBDIR ?= ${PREFIX}/lib -WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal +WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal -Werror VERSION = $(shell cat ../VERSION) CFLAGS ?= $(WARNS) -O1 override CFLAGS += -DVERSION=\"$(VERSION)\" -I$(INCLUDEDIR) Index: trunk/policycoreutils/semodule/Makefile =================================================================== --- trunk.orig/policycoreutils/semodule/Makefile +++ trunk/policycoreutils/semodule/Makefile @@ -5,7 +5,7 @@ SBINDIR ?= $(PREFIX)/sbin MANDIR = $(PREFIX)/share/man LIBDIR ?= ${PREFIX}/lib -CFLAGS ?= -Werror -Wall -W +CFLAGS ?= -Werror -Wall -W -Werror override CFLAGS += -I$(INCLUDEDIR) LDLIBS = -lsepol -lselinux -lsemanage -L$(LIBDIR) SEMODULE_OBJS = semodule.o Index: trunk/policycoreutils/semodule_deps/Makefile =================================================================== --- trunk.orig/policycoreutils/semodule_deps/Makefile +++ trunk/policycoreutils/semodule_deps/Makefile @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin LIBDIR ?= ${PREFIX}/lib MANDIR ?= $(PREFIX)/share/man -CFLAGS ?= -Werror -Wall -W +CFLAGS ?= -Werror -Wall -W -Werror override CFLAGS += -I$(INCLUDEDIR) LDLIBS = $(LIBDIR)/libsepol.a Index: trunk/policycoreutils/semodule_expand/Makefile =================================================================== --- trunk.orig/policycoreutils/semodule_expand/Makefile +++ trunk/policycoreutils/semodule_expand/Makefile @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin LIBDIR ?= ${PREFIX}/lib MANDIR ?= $(PREFIX)/share/man -CFLAGS ?= -Werror -Wall -W +CFLAGS ?= -Werror -Wall -W -Werror override CFLAGS += -I$(INCLUDEDIR) LDLIBS = -lsepol -lselinux -L$(LIBDIR) Index: trunk/policycoreutils/semodule_link/Makefile =================================================================== --- trunk.orig/policycoreutils/semodule_link/Makefile +++ trunk/policycoreutils/semodule_link/Makefile @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin MANDIR ?= $(PREFIX)/share/man LIBDIR ?= ${PREFIX}/lib -CFLAGS ?= -Werror -Wall -W +CFLAGS ?= -Werror -Wall -W -Werror override CFLAGS += -I$(INCLUDEDIR) LDLIBS = -lsepol -lselinux -L$(LIBDIR) Index: trunk/policycoreutils/semodule_package/Makefile =================================================================== --- trunk.orig/policycoreutils/semodule_package/Makefile +++ trunk/policycoreutils/semodule_package/Makefile @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin LIBDIR ?= ${PREFIX}/lib MANDIR ?= $(PREFIX)/share/man -CFLAGS ?= -Werror -Wall -W +CFLAGS ?= -Werror -Wall -W -Werror override CFLAGS += -I$(INCLUDEDIR) LDLIBS = -lsepol -lselinux -L$(LIBDIR) Index: trunk/policycoreutils/sestatus/Makefile =================================================================== --- trunk.orig/policycoreutils/sestatus/Makefile +++ trunk/policycoreutils/sestatus/Makefile @@ -5,7 +5,7 @@ MANDIR = $(PREFIX)/share/man ETCDIR ?= $(DESTDIR)/etc LIBDIR ?= ${PREFIX}/lib -CFLAGS = -Werror -Wall -W +CFLAGS = -Werror -Wall -W -Werror override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64 LDLIBS = -lselinux -L$(LIBDIR) Index: trunk/policycoreutils/setfiles/Makefile =================================================================== --- trunk.orig/policycoreutils/setfiles/Makefile +++ trunk/policycoreutils/setfiles/Makefile @@ -6,7 +6,7 @@ LIBDIR ?= $(PREFIX)/lib AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null) -CFLAGS = -Werror -Wall -W +CFLAGS = -Werror -Wall -W -Werror override CFLAGS += -D_FILE_OFFSET_BITS=64 -I$(PREFIX)/include LDLIBS = -lselinux -lsepol -L$(LIBDIR) Index: trunk/policycoreutils/setsebool/Makefile =================================================================== --- trunk.orig/policycoreutils/setsebool/Makefile +++ trunk/policycoreutils/setsebool/Makefile @@ -5,7 +5,7 @@ SBINDIR ?= $(PREFIX)/sbin MANDIR = $(PREFIX)/share/man LIBDIR ?= ${PREFIX}/lib -CFLAGS ?= -Werror -Wall -W +CFLAGS ?= -Werror -Wall -W -Werror override CFLAGS += -I$(INCLUDEDIR) LDLIBS = -lsepol -lselinux -lsemanage -L$(LIBDIR) SETSEBOOL_OBJS = setsebool.o -- -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 7/7] Use -Werror 2008-01-03 18:43 ` [patch 7/7] Use -Werror tmiller @ 2008-01-07 18:06 ` Stephen Smalley 2008-01-07 18:30 ` Joshua Brindle 0 siblings, 1 reply; 10+ messages in thread From: Stephen Smalley @ 2008-01-07 18:06 UTC (permalink / raw) To: tmiller; +Cc: selinux, method On Thu, 2008-01-03 at 13:43 -0500, tmiller@tresys.com wrote: > plain text document attachment (Werror.patch) > Add -Werror to Makefiles A bit overzealous though - some of them already had -Werror in CFLAGS. Otherwise, looks fine. > > --- > checkpolicy/Makefile | 2 +- > libselinux/src/Makefile | 2 +- > libsemanage/src/Makefile | 2 +- > libsepol/src/Makefile | 2 +- > policycoreutils/audit2why/Makefile | 2 +- > policycoreutils/load_policy/Makefile | 2 +- > policycoreutils/newrole/Makefile | 2 +- > policycoreutils/restorecond/Makefile | 2 +- > policycoreutils/run_init/Makefile | 2 +- > policycoreutils/secon/Makefile | 2 +- > policycoreutils/semodule/Makefile | 2 +- > policycoreutils/semodule_deps/Makefile | 2 +- > policycoreutils/semodule_expand/Makefile | 2 +- > policycoreutils/semodule_link/Makefile | 2 +- > policycoreutils/semodule_package/Makefile | 2 +- > policycoreutils/sestatus/Makefile | 2 +- > policycoreutils/setfiles/Makefile | 2 +- > policycoreutils/setsebool/Makefile | 2 +- > 18 files changed, 18 insertions(+), 18 deletions(-) > > Index: trunk/checkpolicy/Makefile > =================================================================== > --- trunk.orig/checkpolicy/Makefile > +++ trunk/checkpolicy/Makefile > @@ -10,7 +10,7 @@ TARGETS = checkpolicy checkmodule > > YACC = bison -y > > -CFLAGS ?= -g -Wall -O2 -pipe -fno-strict-aliasing > +CFLAGS ?= -g -Wall -Werror -O2 -pipe -fno-strict-aliasing > > override CFLAGS += -I. -I${INCLUDEDIR} > > Index: trunk/libselinux/src/Makefile > =================================================================== > --- trunk.orig/libselinux/src/Makefile > +++ trunk/libselinux/src/Makefile > @@ -32,7 +32,7 @@ SRCS= $(filter-out $(UNUSED_SRCS), $(fil > > OBJS= $(patsubst %.c,%.o,$(SRCS)) > LOBJS= $(patsubst %.c,%.lo,$(SRCS)) > -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute > +CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Werror > override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS) > RANLIB=ranlib > > Index: trunk/libsemanage/src/Makefile > =================================================================== > --- trunk.orig/libsemanage/src/Makefile > +++ trunk/libsemanage/src/Makefile > @@ -31,7 +31,7 @@ SWIGFILES=$(SWIGSO) semanage.py > LIBSO=$(TARGET).$(LIBVERSION) > OBJS= $(patsubst %.c,%.o,$(filter-out $(SWIGCOUT),$(wildcard *.c))) conf-scan.o conf-parse.o > LOBJS= $(patsubst %.c,%.lo,$(filter-out $(SWIGCOUT),$(wildcard *.c))) conf-scan.lo conf-parse.lo > -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter > +CFLAGS ?= -Wall -W Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter > > override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE > > Index: trunk/libsepol/src/Makefile > =================================================================== > --- trunk.orig/libsepol/src/Makefile > +++ trunk/libsepol/src/Makefile > @@ -10,7 +10,7 @@ TARGET=libsepol.so > LIBSO=$(TARGET).$(LIBVERSION) > OBJS= $(patsubst %.c,%.o,$(wildcard *.c)) > LOBJS= $(patsubst %.c,%.lo,$(wildcard *.c)) > -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute > +CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Werror > override CFLAGS += -I. -I../include -D_GNU_SOURCE > > all: $(LIBA) $(LIBSO) > Index: trunk/policycoreutils/audit2why/Makefile > =================================================================== > --- trunk.orig/policycoreutils/audit2why/Makefile > +++ trunk/policycoreutils/audit2why/Makefile > @@ -7,7 +7,7 @@ LOCALEDIR ?= /usr/share/locale > INCLUDEDIR ?= ${PREFIX}/include > > > -CFLAGS ?= -Werror -Wall -W > +CFLAGS ?= -Werror -Wall -W -Werror > override CFLAGS += -I$(INCLUDEDIR) > LDLIBS = ${LIBDIR}/libsepol.a -lselinux -L$(LIBDIR) > > Index: trunk/policycoreutils/load_policy/Makefile > =================================================================== > --- trunk.orig/policycoreutils/load_policy/Makefile > +++ trunk/policycoreutils/load_policy/Makefile > @@ -4,7 +4,7 @@ SBINDIR ?= $(PREFIX)/sbin > MANDIR ?= $(PREFIX)/share/man > LOCALEDIR ?= /usr/share/locale > > -CFLAGS ?= -Werror -Wall -W > +CFLAGS ?= -Werror -Wall -W -Werror > override CFLAGS += $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" > LDLIBS += -lsepol -lselinux -L$(PREFIX)/lib > > Index: trunk/policycoreutils/newrole/Makefile > =================================================================== > --- trunk.orig/policycoreutils/newrole/Makefile > +++ trunk/policycoreutils/newrole/Makefile > @@ -20,7 +20,7 @@ NAMESPACE_PRIV ?= n > LSPP_PRIV ?= n > VERSION = $(shell cat ../VERSION) > > -CFLAGS ?= -Werror -Wall -W > +CFLAGS ?= -Werror -Wall -W -Werror > EXTRA_OBJS = > override CFLAGS += -DVERSION=\"$(VERSION)\" $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" > LDLIBS += -lselinux -L$(PREFIX)/lib > Index: trunk/policycoreutils/restorecond/Makefile > =================================================================== > --- trunk.orig/policycoreutils/restorecond/Makefile > +++ trunk/policycoreutils/restorecond/Makefile > @@ -5,7 +5,7 @@ MANDIR = $(PREFIX)/share/man > INITDIR = $(DESTDIR)/etc/rc.d/init.d > SELINUXDIR = $(DESTDIR)/etc/selinux > > -CFLAGS ?= -g -Werror -Wall -W > +CFLAGS ?= -g -Werror -Wall -W -Werror > override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64 > LDLIBS += -lselinux -L$(PREFIX)/lib > > Index: trunk/policycoreutils/run_init/Makefile > =================================================================== > --- trunk.orig/policycoreutils/run_init/Makefile > +++ trunk/policycoreutils/run_init/Makefile > @@ -8,7 +8,7 @@ LOCALEDIR ?= /usr/share/locale > PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null) > AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null) > > -CFLAGS ?= -Werror -Wall -W > +CFLAGS ?= -Werror -Wall -W -Werror > override CFLAGS += -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" > LDLIBS += -lselinux -L$(PREFIX)/lib > ifeq (${PAMH}, /usr/include/security/pam_appl.h) > Index: trunk/policycoreutils/secon/Makefile > =================================================================== > --- trunk.orig/policycoreutils/secon/Makefile > +++ trunk/policycoreutils/secon/Makefile > @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin > MANDIR ?= $(PREFIX)/share/man > LIBDIR ?= ${PREFIX}/lib > > -WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal > +WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal -Werror > VERSION = $(shell cat ../VERSION) > CFLAGS ?= $(WARNS) -O1 > override CFLAGS += -DVERSION=\"$(VERSION)\" -I$(INCLUDEDIR) > Index: trunk/policycoreutils/semodule/Makefile > =================================================================== > --- trunk.orig/policycoreutils/semodule/Makefile > +++ trunk/policycoreutils/semodule/Makefile > @@ -5,7 +5,7 @@ SBINDIR ?= $(PREFIX)/sbin > MANDIR = $(PREFIX)/share/man > LIBDIR ?= ${PREFIX}/lib > > -CFLAGS ?= -Werror -Wall -W > +CFLAGS ?= -Werror -Wall -W -Werror > override CFLAGS += -I$(INCLUDEDIR) > LDLIBS = -lsepol -lselinux -lsemanage -L$(LIBDIR) > SEMODULE_OBJS = semodule.o > Index: trunk/policycoreutils/semodule_deps/Makefile > =================================================================== > --- trunk.orig/policycoreutils/semodule_deps/Makefile > +++ trunk/policycoreutils/semodule_deps/Makefile > @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin > LIBDIR ?= ${PREFIX}/lib > MANDIR ?= $(PREFIX)/share/man > > -CFLAGS ?= -Werror -Wall -W > +CFLAGS ?= -Werror -Wall -W -Werror > override CFLAGS += -I$(INCLUDEDIR) > LDLIBS = $(LIBDIR)/libsepol.a > > Index: trunk/policycoreutils/semodule_expand/Makefile > =================================================================== > --- trunk.orig/policycoreutils/semodule_expand/Makefile > +++ trunk/policycoreutils/semodule_expand/Makefile > @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin > LIBDIR ?= ${PREFIX}/lib > MANDIR ?= $(PREFIX)/share/man > > -CFLAGS ?= -Werror -Wall -W > +CFLAGS ?= -Werror -Wall -W -Werror > override CFLAGS += -I$(INCLUDEDIR) > LDLIBS = -lsepol -lselinux -L$(LIBDIR) > > Index: trunk/policycoreutils/semodule_link/Makefile > =================================================================== > --- trunk.orig/policycoreutils/semodule_link/Makefile > +++ trunk/policycoreutils/semodule_link/Makefile > @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin > MANDIR ?= $(PREFIX)/share/man > LIBDIR ?= ${PREFIX}/lib > > -CFLAGS ?= -Werror -Wall -W > +CFLAGS ?= -Werror -Wall -W -Werror > override CFLAGS += -I$(INCLUDEDIR) > LDLIBS = -lsepol -lselinux -L$(LIBDIR) > > Index: trunk/policycoreutils/semodule_package/Makefile > =================================================================== > --- trunk.orig/policycoreutils/semodule_package/Makefile > +++ trunk/policycoreutils/semodule_package/Makefile > @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin > LIBDIR ?= ${PREFIX}/lib > MANDIR ?= $(PREFIX)/share/man > > -CFLAGS ?= -Werror -Wall -W > +CFLAGS ?= -Werror -Wall -W -Werror > override CFLAGS += -I$(INCLUDEDIR) > LDLIBS = -lsepol -lselinux -L$(LIBDIR) > > Index: trunk/policycoreutils/sestatus/Makefile > =================================================================== > --- trunk.orig/policycoreutils/sestatus/Makefile > +++ trunk/policycoreutils/sestatus/Makefile > @@ -5,7 +5,7 @@ MANDIR = $(PREFIX)/share/man > ETCDIR ?= $(DESTDIR)/etc > LIBDIR ?= ${PREFIX}/lib > > -CFLAGS = -Werror -Wall -W > +CFLAGS = -Werror -Wall -W -Werror > override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64 > LDLIBS = -lselinux -L$(LIBDIR) > > Index: trunk/policycoreutils/setfiles/Makefile > =================================================================== > --- trunk.orig/policycoreutils/setfiles/Makefile > +++ trunk/policycoreutils/setfiles/Makefile > @@ -6,7 +6,7 @@ LIBDIR ?= $(PREFIX)/lib > > AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null) > > -CFLAGS = -Werror -Wall -W > +CFLAGS = -Werror -Wall -W -Werror > override CFLAGS += -D_FILE_OFFSET_BITS=64 -I$(PREFIX)/include > LDLIBS = -lselinux -lsepol -L$(LIBDIR) > > Index: trunk/policycoreutils/setsebool/Makefile > =================================================================== > --- trunk.orig/policycoreutils/setsebool/Makefile > +++ trunk/policycoreutils/setsebool/Makefile > @@ -5,7 +5,7 @@ SBINDIR ?= $(PREFIX)/sbin > MANDIR = $(PREFIX)/share/man > LIBDIR ?= ${PREFIX}/lib > > -CFLAGS ?= -Werror -Wall -W > +CFLAGS ?= -Werror -Wall -W -Werror > override CFLAGS += -I$(INCLUDEDIR) > LDLIBS = -lsepol -lselinux -lsemanage -L$(LIBDIR) > SETSEBOOL_OBJS = setsebool.o > -- Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 7/7] Use -Werror 2008-01-07 18:06 ` Stephen Smalley @ 2008-01-07 18:30 ` Joshua Brindle 2008-01-07 18:50 ` Stephen Smalley 0 siblings, 1 reply; 10+ messages in thread From: Joshua Brindle @ 2008-01-07 18:30 UTC (permalink / raw) To: Stephen Smalley; +Cc: tmiller, selinux, method Stephen Smalley wrote: > On Thu, 2008-01-03 at 13:43 -0500, tmiller@tresys.com wrote: >> plain text document attachment (Werror.patch) >> Add -Werror to Makefiles > > A bit overzealous though - some of them already had -Werror in CFLAGS. > > Otherwise, looks fine. Is there a good reason we have CFLAGS per Makefile instead of once at the top level? I use DEBUG=1 most of the time and everything builds fine with a common set. > >> --- >> checkpolicy/Makefile | 2 +- >> libselinux/src/Makefile | 2 +- >> libsemanage/src/Makefile | 2 +- >> libsepol/src/Makefile | 2 +- >> policycoreutils/audit2why/Makefile | 2 +- >> policycoreutils/load_policy/Makefile | 2 +- >> policycoreutils/newrole/Makefile | 2 +- >> policycoreutils/restorecond/Makefile | 2 +- >> policycoreutils/run_init/Makefile | 2 +- >> policycoreutils/secon/Makefile | 2 +- >> policycoreutils/semodule/Makefile | 2 +- >> policycoreutils/semodule_deps/Makefile | 2 +- >> policycoreutils/semodule_expand/Makefile | 2 +- >> policycoreutils/semodule_link/Makefile | 2 +- >> policycoreutils/semodule_package/Makefile | 2 +- >> policycoreutils/sestatus/Makefile | 2 +- >> policycoreutils/setfiles/Makefile | 2 +- >> policycoreutils/setsebool/Makefile | 2 +- >> 18 files changed, 18 insertions(+), 18 deletions(-) >> >> Index: trunk/checkpolicy/Makefile >> =================================================================== >> --- trunk.orig/checkpolicy/Makefile >> +++ trunk/checkpolicy/Makefile >> @@ -10,7 +10,7 @@ TARGETS = checkpolicy checkmodule >> >> YACC = bison -y >> >> -CFLAGS ?= -g -Wall -O2 -pipe -fno-strict-aliasing >> +CFLAGS ?= -g -Wall -Werror -O2 -pipe -fno-strict-aliasing >> >> override CFLAGS += -I. -I${INCLUDEDIR} >> >> Index: trunk/libselinux/src/Makefile >> =================================================================== >> --- trunk.orig/libselinux/src/Makefile >> +++ trunk/libselinux/src/Makefile >> @@ -32,7 +32,7 @@ SRCS= $(filter-out $(UNUSED_SRCS), $(fil >> >> OBJS= $(patsubst %.c,%.o,$(SRCS)) >> LOBJS= $(patsubst %.c,%.lo,$(SRCS)) >> -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute >> +CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Werror >> override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS) >> RANLIB=ranlib >> >> Index: trunk/libsemanage/src/Makefile >> =================================================================== >> --- trunk.orig/libsemanage/src/Makefile >> +++ trunk/libsemanage/src/Makefile >> @@ -31,7 +31,7 @@ SWIGFILES=$(SWIGSO) semanage.py >> LIBSO=$(TARGET).$(LIBVERSION) >> OBJS= $(patsubst %.c,%.o,$(filter-out $(SWIGCOUT),$(wildcard *.c))) conf-scan.o conf-parse.o >> LOBJS= $(patsubst %.c,%.lo,$(filter-out $(SWIGCOUT),$(wildcard *.c))) conf-scan.lo conf-parse.lo >> -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter >> +CFLAGS ?= -Wall -W Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter >> >> override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE >> >> Index: trunk/libsepol/src/Makefile >> =================================================================== >> --- trunk.orig/libsepol/src/Makefile >> +++ trunk/libsepol/src/Makefile >> @@ -10,7 +10,7 @@ TARGET=libsepol.so >> LIBSO=$(TARGET).$(LIBVERSION) >> OBJS= $(patsubst %.c,%.o,$(wildcard *.c)) >> LOBJS= $(patsubst %.c,%.lo,$(wildcard *.c)) >> -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute >> +CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Werror >> override CFLAGS += -I. -I../include -D_GNU_SOURCE >> >> all: $(LIBA) $(LIBSO) >> Index: trunk/policycoreutils/audit2why/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/audit2why/Makefile >> +++ trunk/policycoreutils/audit2why/Makefile >> @@ -7,7 +7,7 @@ LOCALEDIR ?= /usr/share/locale >> INCLUDEDIR ?= ${PREFIX}/include >> >> >> -CFLAGS ?= -Werror -Wall -W >> +CFLAGS ?= -Werror -Wall -W -Werror >> override CFLAGS += -I$(INCLUDEDIR) >> LDLIBS = ${LIBDIR}/libsepol.a -lselinux -L$(LIBDIR) >> >> Index: trunk/policycoreutils/load_policy/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/load_policy/Makefile >> +++ trunk/policycoreutils/load_policy/Makefile >> @@ -4,7 +4,7 @@ SBINDIR ?= $(PREFIX)/sbin >> MANDIR ?= $(PREFIX)/share/man >> LOCALEDIR ?= /usr/share/locale >> >> -CFLAGS ?= -Werror -Wall -W >> +CFLAGS ?= -Werror -Wall -W -Werror >> override CFLAGS += $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" >> LDLIBS += -lsepol -lselinux -L$(PREFIX)/lib >> >> Index: trunk/policycoreutils/newrole/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/newrole/Makefile >> +++ trunk/policycoreutils/newrole/Makefile >> @@ -20,7 +20,7 @@ NAMESPACE_PRIV ?= n >> LSPP_PRIV ?= n >> VERSION = $(shell cat ../VERSION) >> >> -CFLAGS ?= -Werror -Wall -W >> +CFLAGS ?= -Werror -Wall -W -Werror >> EXTRA_OBJS = >> override CFLAGS += -DVERSION=\"$(VERSION)\" $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" >> LDLIBS += -lselinux -L$(PREFIX)/lib >> Index: trunk/policycoreutils/restorecond/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/restorecond/Makefile >> +++ trunk/policycoreutils/restorecond/Makefile >> @@ -5,7 +5,7 @@ MANDIR = $(PREFIX)/share/man >> INITDIR = $(DESTDIR)/etc/rc.d/init.d >> SELINUXDIR = $(DESTDIR)/etc/selinux >> >> -CFLAGS ?= -g -Werror -Wall -W >> +CFLAGS ?= -g -Werror -Wall -W -Werror >> override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64 >> LDLIBS += -lselinux -L$(PREFIX)/lib >> >> Index: trunk/policycoreutils/run_init/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/run_init/Makefile >> +++ trunk/policycoreutils/run_init/Makefile >> @@ -8,7 +8,7 @@ LOCALEDIR ?= /usr/share/locale >> PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null) >> AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null) >> >> -CFLAGS ?= -Werror -Wall -W >> +CFLAGS ?= -Werror -Wall -W -Werror >> override CFLAGS += -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" >> LDLIBS += -lselinux -L$(PREFIX)/lib >> ifeq (${PAMH}, /usr/include/security/pam_appl.h) >> Index: trunk/policycoreutils/secon/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/secon/Makefile >> +++ trunk/policycoreutils/secon/Makefile >> @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin >> MANDIR ?= $(PREFIX)/share/man >> LIBDIR ?= ${PREFIX}/lib >> >> -WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal >> +WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal -Werror >> VERSION = $(shell cat ../VERSION) >> CFLAGS ?= $(WARNS) -O1 >> override CFLAGS += -DVERSION=\"$(VERSION)\" -I$(INCLUDEDIR) >> Index: trunk/policycoreutils/semodule/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/semodule/Makefile >> +++ trunk/policycoreutils/semodule/Makefile >> @@ -5,7 +5,7 @@ SBINDIR ?= $(PREFIX)/sbin >> MANDIR = $(PREFIX)/share/man >> LIBDIR ?= ${PREFIX}/lib >> >> -CFLAGS ?= -Werror -Wall -W >> +CFLAGS ?= -Werror -Wall -W -Werror >> override CFLAGS += -I$(INCLUDEDIR) >> LDLIBS = -lsepol -lselinux -lsemanage -L$(LIBDIR) >> SEMODULE_OBJS = semodule.o >> Index: trunk/policycoreutils/semodule_deps/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/semodule_deps/Makefile >> +++ trunk/policycoreutils/semodule_deps/Makefile >> @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin >> LIBDIR ?= ${PREFIX}/lib >> MANDIR ?= $(PREFIX)/share/man >> >> -CFLAGS ?= -Werror -Wall -W >> +CFLAGS ?= -Werror -Wall -W -Werror >> override CFLAGS += -I$(INCLUDEDIR) >> LDLIBS = $(LIBDIR)/libsepol.a >> >> Index: trunk/policycoreutils/semodule_expand/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/semodule_expand/Makefile >> +++ trunk/policycoreutils/semodule_expand/Makefile >> @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin >> LIBDIR ?= ${PREFIX}/lib >> MANDIR ?= $(PREFIX)/share/man >> >> -CFLAGS ?= -Werror -Wall -W >> +CFLAGS ?= -Werror -Wall -W -Werror >> override CFLAGS += -I$(INCLUDEDIR) >> LDLIBS = -lsepol -lselinux -L$(LIBDIR) >> >> Index: trunk/policycoreutils/semodule_link/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/semodule_link/Makefile >> +++ trunk/policycoreutils/semodule_link/Makefile >> @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin >> MANDIR ?= $(PREFIX)/share/man >> LIBDIR ?= ${PREFIX}/lib >> >> -CFLAGS ?= -Werror -Wall -W >> +CFLAGS ?= -Werror -Wall -W -Werror >> override CFLAGS += -I$(INCLUDEDIR) >> LDLIBS = -lsepol -lselinux -L$(LIBDIR) >> >> Index: trunk/policycoreutils/semodule_package/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/semodule_package/Makefile >> +++ trunk/policycoreutils/semodule_package/Makefile >> @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin >> LIBDIR ?= ${PREFIX}/lib >> MANDIR ?= $(PREFIX)/share/man >> >> -CFLAGS ?= -Werror -Wall -W >> +CFLAGS ?= -Werror -Wall -W -Werror >> override CFLAGS += -I$(INCLUDEDIR) >> LDLIBS = -lsepol -lselinux -L$(LIBDIR) >> >> Index: trunk/policycoreutils/sestatus/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/sestatus/Makefile >> +++ trunk/policycoreutils/sestatus/Makefile >> @@ -5,7 +5,7 @@ MANDIR = $(PREFIX)/share/man >> ETCDIR ?= $(DESTDIR)/etc >> LIBDIR ?= ${PREFIX}/lib >> >> -CFLAGS = -Werror -Wall -W >> +CFLAGS = -Werror -Wall -W -Werror >> override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64 >> LDLIBS = -lselinux -L$(LIBDIR) >> >> Index: trunk/policycoreutils/setfiles/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/setfiles/Makefile >> +++ trunk/policycoreutils/setfiles/Makefile >> @@ -6,7 +6,7 @@ LIBDIR ?= $(PREFIX)/lib >> >> AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null) >> >> -CFLAGS = -Werror -Wall -W >> +CFLAGS = -Werror -Wall -W -Werror >> override CFLAGS += -D_FILE_OFFSET_BITS=64 -I$(PREFIX)/include >> LDLIBS = -lselinux -lsepol -L$(LIBDIR) >> >> Index: trunk/policycoreutils/setsebool/Makefile >> =================================================================== >> --- trunk.orig/policycoreutils/setsebool/Makefile >> +++ trunk/policycoreutils/setsebool/Makefile >> @@ -5,7 +5,7 @@ SBINDIR ?= $(PREFIX)/sbin >> MANDIR = $(PREFIX)/share/man >> LIBDIR ?= ${PREFIX}/lib >> >> -CFLAGS ?= -Werror -Wall -W >> +CFLAGS ?= -Werror -Wall -W -Werror >> override CFLAGS += -I$(INCLUDEDIR) >> LDLIBS = -lsepol -lselinux -lsemanage -L$(LIBDIR) >> SETSEBOOL_OBJS = setsebool.o >> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 7/7] Use -Werror 2008-01-07 18:30 ` Joshua Brindle @ 2008-01-07 18:50 ` Stephen Smalley 0 siblings, 0 replies; 10+ messages in thread From: Stephen Smalley @ 2008-01-07 18:50 UTC (permalink / raw) To: Joshua Brindle; +Cc: tmiller, selinux, method On Mon, 2008-01-07 at 13:30 -0500, Joshua Brindle wrote: > Stephen Smalley wrote: > > On Thu, 2008-01-03 at 13:43 -0500, tmiller@tresys.com wrote: > >> plain text document attachment (Werror.patch) > >> Add -Werror to Makefiles > > > > A bit overzealous though - some of them already had -Werror in CFLAGS. > > > > Otherwise, looks fine. > > Is there a good reason we have CFLAGS per Makefile instead of once at > the top level? I use DEBUG=1 most of the time and everything builds fine > with a common set. Mostly because the components are released as individual tar balls and packages, w/o the top level Makefile altogether. Also need to make sure that -Werror gets included by make DEBUG=1 then. > > > >> --- > >> checkpolicy/Makefile | 2 +- > >> libselinux/src/Makefile | 2 +- > >> libsemanage/src/Makefile | 2 +- > >> libsepol/src/Makefile | 2 +- > >> policycoreutils/audit2why/Makefile | 2 +- > >> policycoreutils/load_policy/Makefile | 2 +- > >> policycoreutils/newrole/Makefile | 2 +- > >> policycoreutils/restorecond/Makefile | 2 +- > >> policycoreutils/run_init/Makefile | 2 +- > >> policycoreutils/secon/Makefile | 2 +- > >> policycoreutils/semodule/Makefile | 2 +- > >> policycoreutils/semodule_deps/Makefile | 2 +- > >> policycoreutils/semodule_expand/Makefile | 2 +- > >> policycoreutils/semodule_link/Makefile | 2 +- > >> policycoreutils/semodule_package/Makefile | 2 +- > >> policycoreutils/sestatus/Makefile | 2 +- > >> policycoreutils/setfiles/Makefile | 2 +- > >> policycoreutils/setsebool/Makefile | 2 +- > >> 18 files changed, 18 insertions(+), 18 deletions(-) > >> > >> Index: trunk/checkpolicy/Makefile > >> =================================================================== > >> --- trunk.orig/checkpolicy/Makefile > >> +++ trunk/checkpolicy/Makefile > >> @@ -10,7 +10,7 @@ TARGETS = checkpolicy checkmodule > >> > >> YACC = bison -y > >> > >> -CFLAGS ?= -g -Wall -O2 -pipe -fno-strict-aliasing > >> +CFLAGS ?= -g -Wall -Werror -O2 -pipe -fno-strict-aliasing > >> > >> override CFLAGS += -I. -I${INCLUDEDIR} > >> > >> Index: trunk/libselinux/src/Makefile > >> =================================================================== > >> --- trunk.orig/libselinux/src/Makefile > >> +++ trunk/libselinux/src/Makefile > >> @@ -32,7 +32,7 @@ SRCS= $(filter-out $(UNUSED_SRCS), $(fil > >> > >> OBJS= $(patsubst %.c,%.o,$(SRCS)) > >> LOBJS= $(patsubst %.c,%.lo,$(SRCS)) > >> -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute > >> +CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Werror > >> override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS) > >> RANLIB=ranlib > >> > >> Index: trunk/libsemanage/src/Makefile > >> =================================================================== > >> --- trunk.orig/libsemanage/src/Makefile > >> +++ trunk/libsemanage/src/Makefile > >> @@ -31,7 +31,7 @@ SWIGFILES=$(SWIGSO) semanage.py > >> LIBSO=$(TARGET).$(LIBVERSION) > >> OBJS= $(patsubst %.c,%.o,$(filter-out $(SWIGCOUT),$(wildcard *.c))) conf-scan.o conf-parse.o > >> LOBJS= $(patsubst %.c,%.lo,$(filter-out $(SWIGCOUT),$(wildcard *.c))) conf-scan.lo conf-parse.lo > >> -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter > >> +CFLAGS ?= -Wall -W Wundef -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter > >> > >> override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE > >> > >> Index: trunk/libsepol/src/Makefile > >> =================================================================== > >> --- trunk.orig/libsepol/src/Makefile > >> +++ trunk/libsepol/src/Makefile > >> @@ -10,7 +10,7 @@ TARGET=libsepol.so > >> LIBSO=$(TARGET).$(LIBVERSION) > >> OBJS= $(patsubst %.c,%.o,$(wildcard *.c)) > >> LOBJS= $(patsubst %.c,%.lo,$(wildcard *.c)) > >> -CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute > >> +CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -Werror > >> override CFLAGS += -I. -I../include -D_GNU_SOURCE > >> > >> all: $(LIBA) $(LIBSO) > >> Index: trunk/policycoreutils/audit2why/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/audit2why/Makefile > >> +++ trunk/policycoreutils/audit2why/Makefile > >> @@ -7,7 +7,7 @@ LOCALEDIR ?= /usr/share/locale > >> INCLUDEDIR ?= ${PREFIX}/include > >> > >> > >> -CFLAGS ?= -Werror -Wall -W > >> +CFLAGS ?= -Werror -Wall -W -Werror > >> override CFLAGS += -I$(INCLUDEDIR) > >> LDLIBS = ${LIBDIR}/libsepol.a -lselinux -L$(LIBDIR) > >> > >> Index: trunk/policycoreutils/load_policy/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/load_policy/Makefile > >> +++ trunk/policycoreutils/load_policy/Makefile > >> @@ -4,7 +4,7 @@ SBINDIR ?= $(PREFIX)/sbin > >> MANDIR ?= $(PREFIX)/share/man > >> LOCALEDIR ?= /usr/share/locale > >> > >> -CFLAGS ?= -Werror -Wall -W > >> +CFLAGS ?= -Werror -Wall -W -Werror > >> override CFLAGS += $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" > >> LDLIBS += -lsepol -lselinux -L$(PREFIX)/lib > >> > >> Index: trunk/policycoreutils/newrole/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/newrole/Makefile > >> +++ trunk/policycoreutils/newrole/Makefile > >> @@ -20,7 +20,7 @@ NAMESPACE_PRIV ?= n > >> LSPP_PRIV ?= n > >> VERSION = $(shell cat ../VERSION) > >> > >> -CFLAGS ?= -Werror -Wall -W > >> +CFLAGS ?= -Werror -Wall -W -Werror > >> EXTRA_OBJS = > >> override CFLAGS += -DVERSION=\"$(VERSION)\" $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" > >> LDLIBS += -lselinux -L$(PREFIX)/lib > >> Index: trunk/policycoreutils/restorecond/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/restorecond/Makefile > >> +++ trunk/policycoreutils/restorecond/Makefile > >> @@ -5,7 +5,7 @@ MANDIR = $(PREFIX)/share/man > >> INITDIR = $(DESTDIR)/etc/rc.d/init.d > >> SELINUXDIR = $(DESTDIR)/etc/selinux > >> > >> -CFLAGS ?= -g -Werror -Wall -W > >> +CFLAGS ?= -g -Werror -Wall -W -Werror > >> override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64 > >> LDLIBS += -lselinux -L$(PREFIX)/lib > >> > >> Index: trunk/policycoreutils/run_init/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/run_init/Makefile > >> +++ trunk/policycoreutils/run_init/Makefile > >> @@ -8,7 +8,7 @@ LOCALEDIR ?= /usr/share/locale > >> PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null) > >> AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null) > >> > >> -CFLAGS ?= -Werror -Wall -W > >> +CFLAGS ?= -Werror -Wall -W -Werror > >> override CFLAGS += -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" > >> LDLIBS += -lselinux -L$(PREFIX)/lib > >> ifeq (${PAMH}, /usr/include/security/pam_appl.h) > >> Index: trunk/policycoreutils/secon/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/secon/Makefile > >> +++ trunk/policycoreutils/secon/Makefile > >> @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin > >> MANDIR ?= $(PREFIX)/share/man > >> LIBDIR ?= ${PREFIX}/lib > >> > >> -WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal > >> +WARNS=-W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wfloat-equal -Werror > >> VERSION = $(shell cat ../VERSION) > >> CFLAGS ?= $(WARNS) -O1 > >> override CFLAGS += -DVERSION=\"$(VERSION)\" -I$(INCLUDEDIR) > >> Index: trunk/policycoreutils/semodule/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/semodule/Makefile > >> +++ trunk/policycoreutils/semodule/Makefile > >> @@ -5,7 +5,7 @@ SBINDIR ?= $(PREFIX)/sbin > >> MANDIR = $(PREFIX)/share/man > >> LIBDIR ?= ${PREFIX}/lib > >> > >> -CFLAGS ?= -Werror -Wall -W > >> +CFLAGS ?= -Werror -Wall -W -Werror > >> override CFLAGS += -I$(INCLUDEDIR) > >> LDLIBS = -lsepol -lselinux -lsemanage -L$(LIBDIR) > >> SEMODULE_OBJS = semodule.o > >> Index: trunk/policycoreutils/semodule_deps/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/semodule_deps/Makefile > >> +++ trunk/policycoreutils/semodule_deps/Makefile > >> @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin > >> LIBDIR ?= ${PREFIX}/lib > >> MANDIR ?= $(PREFIX)/share/man > >> > >> -CFLAGS ?= -Werror -Wall -W > >> +CFLAGS ?= -Werror -Wall -W -Werror > >> override CFLAGS += -I$(INCLUDEDIR) > >> LDLIBS = $(LIBDIR)/libsepol.a > >> > >> Index: trunk/policycoreutils/semodule_expand/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/semodule_expand/Makefile > >> +++ trunk/policycoreutils/semodule_expand/Makefile > >> @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin > >> LIBDIR ?= ${PREFIX}/lib > >> MANDIR ?= $(PREFIX)/share/man > >> > >> -CFLAGS ?= -Werror -Wall -W > >> +CFLAGS ?= -Werror -Wall -W -Werror > >> override CFLAGS += -I$(INCLUDEDIR) > >> LDLIBS = -lsepol -lselinux -L$(LIBDIR) > >> > >> Index: trunk/policycoreutils/semodule_link/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/semodule_link/Makefile > >> +++ trunk/policycoreutils/semodule_link/Makefile > >> @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin > >> MANDIR ?= $(PREFIX)/share/man > >> LIBDIR ?= ${PREFIX}/lib > >> > >> -CFLAGS ?= -Werror -Wall -W > >> +CFLAGS ?= -Werror -Wall -W -Werror > >> override CFLAGS += -I$(INCLUDEDIR) > >> LDLIBS = -lsepol -lselinux -L$(LIBDIR) > >> > >> Index: trunk/policycoreutils/semodule_package/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/semodule_package/Makefile > >> +++ trunk/policycoreutils/semodule_package/Makefile > >> @@ -5,7 +5,7 @@ BINDIR ?= $(PREFIX)/bin > >> LIBDIR ?= ${PREFIX}/lib > >> MANDIR ?= $(PREFIX)/share/man > >> > >> -CFLAGS ?= -Werror -Wall -W > >> +CFLAGS ?= -Werror -Wall -W -Werror > >> override CFLAGS += -I$(INCLUDEDIR) > >> LDLIBS = -lsepol -lselinux -L$(LIBDIR) > >> > >> Index: trunk/policycoreutils/sestatus/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/sestatus/Makefile > >> +++ trunk/policycoreutils/sestatus/Makefile > >> @@ -5,7 +5,7 @@ MANDIR = $(PREFIX)/share/man > >> ETCDIR ?= $(DESTDIR)/etc > >> LIBDIR ?= ${PREFIX}/lib > >> > >> -CFLAGS = -Werror -Wall -W > >> +CFLAGS = -Werror -Wall -W -Werror > >> override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64 > >> LDLIBS = -lselinux -L$(LIBDIR) > >> > >> Index: trunk/policycoreutils/setfiles/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/setfiles/Makefile > >> +++ trunk/policycoreutils/setfiles/Makefile > >> @@ -6,7 +6,7 @@ LIBDIR ?= $(PREFIX)/lib > >> > >> AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null) > >> > >> -CFLAGS = -Werror -Wall -W > >> +CFLAGS = -Werror -Wall -W -Werror > >> override CFLAGS += -D_FILE_OFFSET_BITS=64 -I$(PREFIX)/include > >> LDLIBS = -lselinux -lsepol -L$(LIBDIR) > >> > >> Index: trunk/policycoreutils/setsebool/Makefile > >> =================================================================== > >> --- trunk.orig/policycoreutils/setsebool/Makefile > >> +++ trunk/policycoreutils/setsebool/Makefile > >> @@ -5,7 +5,7 @@ SBINDIR ?= $(PREFIX)/sbin > >> MANDIR = $(PREFIX)/share/man > >> LIBDIR ?= ${PREFIX}/lib > >> > >> -CFLAGS ?= -Werror -Wall -W > >> +CFLAGS ?= -Werror -Wall -W -Werror > >> override CFLAGS += -I$(INCLUDEDIR) > >> LDLIBS = -lsepol -lselinux -lsemanage -L$(LIBDIR) > >> SETSEBOOL_OBJS = setsebool.o > >> > -- Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-01-09 15:33 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-01-07 20:47 Re: [patch 7/7] Use -Werror Todd C. Miller 2008-01-08 12:59 ` Stephen Smalley 2008-01-09 13:09 ` Stephen Smalley 2008-01-09 14:19 ` Todd Miller 2008-01-09 14:24 ` Joshua Brindle 2008-01-09 15:33 ` Todd Miller -- strict thread matches above, loose matches on Subject: below -- 2008-01-03 18:43 [patch 0/7] quiet gcc warnings tmiller 2008-01-03 18:43 ` [patch 7/7] Use -Werror tmiller 2008-01-07 18:06 ` Stephen Smalley 2008-01-07 18:30 ` Joshua Brindle 2008-01-07 18:50 ` Stephen Smalley
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.