From 23e2b4d9b18cfe9aa9c50c5a63e922b592f23c4e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 14 Sep 2019 19:16:28 +0000 Subject: [PATCH] Instead of disabling gcc's deprecated declaration warnings about e.g. std::auto_ptr in a whole bunch of individual Makefiles, make the warning globally non-fatal instead. This is similar to what was done to many more non-fatal warnings from newer gcc versions. --- lib/atf/libatf-c++/Makefile | 3 --- lib/libdevdctl/Makefile | 4 ---- libexec/atf/atf-check/Makefile | 3 --- libexec/atf/atf-sh/Makefile | 3 --- share/mk/atf.test.mk | 2 -- share/mk/bsd.sys.mk | 1 + 6 files changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/atf/libatf-c++/Makefile b/lib/atf/libatf-c++/Makefile index c865e6685f1e..03e7d19c4440 100644 --- a/lib/atf/libatf-c++/Makefile +++ b/lib/atf/libatf-c++/Makefile @@ -48,9 +48,6 @@ CFLAGS+= -I. CFLAGS+= -DHAVE_CONFIG_H -# Silence warnings about std::auto_ptr usage -CWARNFLAGS+= -Wno-deprecated-declarations - SRCS= application.cpp \ build.cpp \ check.cpp \ diff --git a/lib/libdevdctl/Makefile b/lib/libdevdctl/Makefile index 06e1892c80d3..5a18a14af622 100644 --- a/lib/libdevdctl/Makefile +++ b/lib/libdevdctl/Makefile @@ -18,8 +18,4 @@ WARNS?= 3 PRIVATELIB= true SHLIB_MAJOR= 0 -# Silence gcc warnings about deprecated std::auto_ptr, and various function -# objects from . -CWARNFLAGS+= -Wno-deprecated-declarations - .include diff --git a/libexec/atf/atf-check/Makefile b/libexec/atf/atf-check/Makefile index 90f6e2a3a0a0..4fe6e4e7dbb9 100644 --- a/libexec/atf/atf-check/Makefile +++ b/libexec/atf/atf-check/Makefile @@ -38,9 +38,6 @@ MAN= atf-check.1 CFLAGS+= -I${ATF} CFLAGS+= -DATF_SHELL='"/bin/sh"' -# Silence warnings about std::auto_ptr usage -CWARNFLAGS+= -Wno-deprecated-declarations - LIBADD= atf_cxx HAS_TESTS= diff --git a/libexec/atf/atf-sh/Makefile b/libexec/atf/atf-sh/Makefile index 8ac0484e3c06..dd8cfaf1775d 100644 --- a/libexec/atf/atf-sh/Makefile +++ b/libexec/atf/atf-sh/Makefile @@ -65,9 +65,6 @@ CFLAGS+= -DATF_PKGDATADIR='"${SHAREDIR}/atf"' CFLAGS+= -DATF_SHELL='"/bin/sh"' CFLAGS+= -I${ATF} -# Silence warnings about std::auto_ptr usage -CWARNFLAGS+= -Wno-deprecated-declarations - LIBADD= atf_cxx FILESGROUPS= SUBR diff --git a/share/mk/atf.test.mk b/share/mk/atf.test.mk index 692b911eecf5..28470f2e080d 100644 --- a/share/mk/atf.test.mk +++ b/share/mk/atf.test.mk @@ -55,8 +55,6 @@ LDADD.${_T}+= ${LIBATF_CXX} ${LIBATF_C} .endif TEST_INTERFACE.${_T}= atf .endfor -# Silence warnings about std::auto_ptr usage -CWARNFLAGS+= -Wno-deprecated-declarations .endif .if !empty(ATF_TESTS_SH) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 75435806d5d0..4b7c426e6dcb 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -137,6 +137,7 @@ CWARNFLAGS+= -Wno-error=address \ -Wno-error=bool-compare \ -Wno-error=cast-align \ -Wno-error=clobbered \ + -Wno-error=deprecated-declarations \ -Wno-error=enum-compare \ -Wno-error=extra \ -Wno-error=inline \