Index: share/mk/bsd.sys.mk =================================================================== --- share/mk/bsd.sys.mk +++ share/mk/bsd.sys.mk @@ -199,6 +199,14 @@ .endif .endif # gcc +# There are currently lots of -Wunused-but-set-variable instances. Downgrade +# the error to a warning until they have all been fixed. +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000 +# TODO: when all warnings have been fixed we should be able to turn this warning +# on for GCC as well. +CWARNFLAGS+= -Wno-error=unused-but-set-variable +.endif + # How to handle FreeBSD custom printf format specifiers. .if ${COMPILER_TYPE} == "clang" FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__