From be203f75bc94613690714657058b02e748a41a65 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 10 Dec 2011 14:45:37 +0100 Subject: [PATCH] Add -Wold-style-declaration to the kernel's warning flags. While here, clean up the comments a bit. -Wextra cleanness is not something we're aiming for. What we want are warnings that help catching bugs and/or keeping the code nice, but at the same time don't get on anyone's nerves. --- sys/conf/bsd.kern.mk | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/sys/conf/bsd.kern.mk b/sys/conf/bsd.kern.mk index 35d7f02a35..720c9282eb 100644 --- a/sys/conf/bsd.kern.mk +++ b/sys/conf/bsd.kern.mk @@ -1,22 +1,15 @@ # $FreeBSD: src/share/mk/bsd.kern.mk,v 1.17.2.1 2001/08/01 16:56:56 obrien Exp $ -# # Warning flags for compiling the kernel and components of the kernel. # -# Note that the newly added -Wcast-qual is responsible for generating -# most of the remaining warnings. Warnings introduced with -Wall will -# also pop up, but are easier to fix. +# Note that -Werror is on by default.To turn it off, e.g. when working +# on adding new warning options, NO_WERROR in make.conf (or on make(1)'s +# command line) should be of material assistance. # + CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - -Wold-style-definition -std=c99 -# -# The following flags are next up for working on: -# -W -# -# When working on removing warnings from code, the `-Werror' flag should be -# of material assistance. -# + -Wold-style-declaration -Wold-style-definition -std=c99 CFLAGS+= -finline-limit=${INLINE_LIMIT} CFLAGS+= --param inline-unit-growth=100 -- 2.41.0