svn commit: r242842 - in head/sys: conf modules/mthca

Bruce Evans brde at optusnet.com.au
Sat Nov 10 08:36:03 UTC 2012


On Sat, 10 Nov 2012, Xin LI wrote:

> Log:
>  Attempt toward a buildable universe by silenting a few warnings for OFED.
>
> Modified:
>  head/sys/conf/kern.pre.mk
>  head/sys/modules/mthca/Makefile

Any chance of not adding style bugs in 1-line changes?

> Modified: head/sys/conf/kern.pre.mk
> ==============================================================================
> --- head/sys/conf/kern.pre.mk	Fri Nov  9 21:41:07 2012	(r242841)
> +++ head/sys/conf/kern.pre.mk	Sat Nov 10 00:32:47 2012	(r242842)
> @@ -156,7 +156,7 @@ NORMAL_LINT=	${LINT} ${LINTFLAGS} ${CFLA
> # Infiniband C flags.  Correct include paths and omit errors that linux
> # does not honor.
> OFEDINCLUDES=	-I$S/ofed/include/
> -OFEDNOERR=	-Wno-cast-qual -Wno-pointer-arith -fms-extensions
> +OFEDNOERR=	-Wno-cast-qual -Wno-pointer-arith -fms-extensions -Wno-switch -Wno-sometimes-uninitialized -Wno-conversion -Wno-initializer-overrides
> OFEDCFLAGS=	${CFLAGS:N-I*} ${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR}
> OFED_C_NOIMP=	${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF}
> OFED_C=		${OFED_C_NOIMP} ${.IMPSRC}

Please don't format source files or output for 150-column terminals,
especially when 'fixing' code formatted for 80 columns.

> Modified: head/sys/modules/mthca/Makefile
> ==============================================================================
> --- head/sys/modules/mthca/Makefile	Fri Nov  9 21:41:07 2012	(r242841)
> +++ head/sys/modules/mthca/Makefile	Sat Nov 10 00:32:47 2012	(r242842)
> @@ -28,4 +28,4 @@ opt_inet6.h:
>
> .include <bsd.kmod.mk>
>
> -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions
> +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions  -Wno-switch -Wno-sometimes-uninitialized -Wno-conversion -Wno-initializer-overrides

This one also misformats the whitespace before the new set of options.

Also, silencing warnings breaks them (unless they are bugs in clang).
In normal development, it is just as easy to fix the bugs as to break the
warnings, but there is a major compiler change lots of warnings are broken
and then the bugs that they report tend to remain unfixed.  The compiler
should not be changed if it causes a single new warning.

Bruce


More information about the svn-src-head mailing list