cvs commit: src/sys/security/mac_mls mac_mls.c

Ruslan Ermilov ru at FreeBSD.org
Fri May 30 13:05:31 PDT 2003


On Fri, May 30, 2003 at 02:25:10PM -0400, John Baldwin wrote:
> 
> On 30-May-2003 Robert Watson wrote:
> > rwatson     2003/05/30 10:02:37 PDT
> > 
> >   FreeBSD src repository
> > 
> >   Modified files:
> >     sys/security/mac_mls mac_mls.c 
> >   Log:
> >   Make sure all character pointers are properly initialized; this was
> >   mismerged from the MAC tree, and didn't get picked up because warnings
> >   are not normally fatal in per-module builds, only when they are linked
> >   into a kernel (such as LINT).
> 
> Can someone make module builds use the same warning flags and
> settings as kernel builds please?  This same scenario has happened
> numerous times now.
> 
This is not easy.  For the kernel build, we have NORMAL_C and
NORMAL_C_NOWERROR (the former includes WERROR?= -Werror).
There are lot of files in sys/conf/files* that are marked with
"nowerror", and I'm sure they will break to compile as modules
with this patch, e.g., the acpi module has lot of files with
warnings:

%%%
Index: kern.mk
===================================================================
RCS file: /home/ncvs/src/sys/conf/kern.mk,v
retrieving revision 1.34
diff -u -r1.34 kern.mk
--- kern.mk	3 May 2003 18:05:56 -0000	1.34
+++ kern.mk	30 May 2003 19:57:00 -0000
@@ -9,6 +9,8 @@
 CWARNFLAGS?=	-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
 		-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
 		-fformat-extensions -std=c99
+WERROR?=	-Werror
+
 #
 # The following flags are next up for working on:
 #	-W
Index: kern.pre.mk
===================================================================
RCS file: /home/ncvs/src/sys/conf/kern.pre.mk,v
retrieving revision 1.24
diff -u -r1.24 kern.pre.mk
--- kern.pre.mk	28 Feb 2003 21:59:14 -0000	1.24
+++ kern.pre.mk	30 May 2003 19:57:15 -0000
@@ -48,7 +48,6 @@
 .endif
 .endif
 DEFINED_PROF=	${PROF}
-WERROR?=	-Werror
 
 # Put configuration-specific C flags last (except for ${PROF}) so that they
 # can override the others.
Index: kmod.mk
===================================================================
RCS file: /home/ncvs/src/sys/conf/kmod.mk,v
retrieving revision 1.137
diff -u -r1.137 kmod.mk
--- kmod.mk	3 Mar 2003 22:51:22 -0000	1.137
+++ kmod.mk	30 May 2003 19:55:07 -0000
@@ -70,7 +70,7 @@
 
 .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S
 
-CFLAGS+=	${COPTS} -D_KERNEL ${CWARNFLAGS}
+CFLAGS+=	${COPTS} -D_KERNEL ${CWARNFLAGS} ${WERROR}
 CFLAGS+=	-DKLD_MODULE
 
 # Don't use any standard or source-relative include directories.
%%%

-- 
Ruslan Ermilov		Sysadmin and DBA,
ru at sunbay.com		Sunbay Software AG,
ru at FreeBSD.org		FreeBSD committer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20030530/bb930968/attachment.bin


More information about the cvs-src mailing list