avoid new GCC 9 warnings.

This commit is contained in:
mrg 2020-09-07 00:29:14 +00:00
parent 45092b0582
commit 8820a04cbb
2 changed files with 9 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.14 2020/06/01 14:42:03 christos Exp $
# $NetBSD: Makefile,v 1.15 2020/09/07 00:29:14 mrg Exp $
#
.include <bsd.own.mk>
@ -40,6 +40,7 @@ CPPFLAGS+= -DMOUNT_NOMAIN -DMOUNTNFS_RETRYRPC=1
CPPFLAGS+= -DUSE_RUMP -DLFS_CLEANER_AS_LIB
CWARNFLAGS.clang+= -Wno-error=absolute-value
CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
COPTS.fstest_nfs.c+= ${GCC_NO_FORMAT_TRUNCATION}
COPTS.clnt_bcast.c+= ${GCC_NO_CAST_FUNCTION_TYPE}
COPTS.clnt_generic.c+= ${GCC_NO_CAST_FUNCTION_TYPE}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.6 2020/01/30 00:42:58 christos Exp $
# $NetBSD: Makefile,v 1.7 2020/09/07 00:29:14 mrg Exp $
.include <bsd.own.mk>
@ -28,12 +28,14 @@ CWARNFLAGS.clang+= -Wno-nullability-completeness
.endif
COPTS.t_ubsan.c += -Wno-stack-protector
COPTS.t_ubsanxx.cpp += -Wno-stack-protector
COPTS.ubsan.c+= ${${ACTIVE_CC} == "clang" && ${MACHINE_ARCH} == "powerpc":? -O0 :}
COPTS.ubsan.c+= ${${ACTIVE_CC} == "clang" && ${MACHINE_ARCH} == "powerpc":? -O0 :}
.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
COPTS.t_ubsan.c+= -Wno-int-in-bool-context
COPTS.t_ubsanxx.cpp+= -Wno-int-in-bool-context
COPTS.t_ubsan.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-int-in-bool-context :}
COPTS.t_ubsanxx.cpp+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-int-in-bool-context :}
.endif
# XXX
COPTS.ubsan.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-error=builtin-declaration-mismatch :}
.include <bsd.test.mk>