[RFC] removing broken includes

Alexander Best arundel at freebsd.org
Sat Feb 5 13:10:09 UTC 2011


On Fri Feb  4 11, John Baldwin wrote:
> On Thursday, February 03, 2011 5:12:57 pm Alexander Best wrote:
> > hi everybody,
> > 
> > i've started to check the source for broken includes, such as the one fixed in
> > r218189. so far i've run through arch=amd64 and found only two broken includes,
> > which should be fixed by the attached patch. the commands i'm using are:
> 
> The sys/conf/files fix should definitely go in.

after sys/modules/netgraph/atm/ccatm/Makefile has been fixed, maybe we could
extend the warnings at least for the kernel. that way new commits would need
to make sure that no broken includes are being added to the src.

any thoughts on this patch?

cheers.
alex

ps: -W was renamed to -Werrer. see the gcc(1) manual page.

> 
> -- 
> John Baldwin

-- 
a13x
-------------- next part --------------
Index: sys/conf/kern.mk
===================================================================
--- sys/conf/kern.mk	(revision 218319)
+++ sys/conf/kern.mk	(working copy)
@@ -3,7 +3,7 @@
 #
 # Warning flags for compiling the kernel and components of the kernel.
 #
-# Note that the newly added -Wcast-qual is responsible for generating 
+# 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.
 .if ${CC:T:Micc} == "icc"
@@ -12,17 +12,18 @@
 .else
 CWARNFLAGS?=	-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
 		-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-		-Wundef -Wno-pointer-sign -fformat-extensions
+		-Wundef -Wno-pointer-sign -fformat-extensions \
+		-Wmissing-include-dirs
 .endif
 #
 # The following flags are next up for working on:
-#	-W
+#	-Wextra
 
 #
 # On the i386, do not align the stack to 16-byte boundaries.  Otherwise GCC
 # 2.95 adds code to the entry and exit point of every function to align the
 # stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack
-# per function call.  While the 16-byte alignment may benefit micro benchmarks, 
+# per function call.  While the 16-byte alignment may benefit micro benchmarks,
 # it is probably an overall loss as it makes the code bigger (less efficient
 # use of code cache tag lines) and uses more stack (less efficient use of data
 # cache tag lines).  Explicitly prohibit the use of SSE and other SIMD


More information about the freebsd-current mailing list