On Mon, Aug 13, 2012 at 12:34:37PM -0700, Matthew Dempsky wrote:
> While I recognize there's some precedence in the tree for it already,
> this seems ugly to me.  Is there a reason different programs/libraries
> need different diagnostic flags?  Why doesn't this belong in
> bsd.own.mk or mk.conf?

How about this then ?

Index: bsd.own.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.own.mk,v
retrieving revision 1.116
diff -d -u -p -r1.116 bsd.own.mk
--- bsd.own.mk  12 Apr 2012 11:22:14 -0000      1.116
+++ bsd.own.mk  13 Aug 2012 19:47:45 -0000
@@ -99,6 +99,18 @@ LOCALEGRP?=  wheel
 LOCALEOWN?=    root
 LOCALEMODE?=   ${NONBINMODE}

# Defaults diagnostic flags for WARNING=Yes.
+.if !defined(CDIAGFLAGS)
+CDIAGFLAGS=     -Wall
+CDIAGFLAGS+=    -Wpointer-arith
+CDIAGFLAGS+=    -Wuninitialized
+CDIAGFLAGS+=    -Wstrict-prototypes
+CDIAGFLAGS+=    -Wmissing-prototypes
+CDIAGFLAGS+=    -Wunused
+CDIAGFLAGS+=    -Wsign-compare
+CDIAGFLAGS+=    -Wbounded
+CDIAGFLAGS+=    -Wshadow
+.endif
+
 # Shared files for system gnu configure, not used yet
 GNUSYSTEM_AUX_DIR?=${BSDSRCDIR}/share/gnu

Reply via email to