Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/atf/lib/tools with GCC 7, apply -Wno-error=mayb...



details:   https://anonhg.NetBSD.org/src/rev/7089fd96136d
branches:  trunk
changeset: 448509:7089fd96136d
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Feb 04 09:40:54 2019 +0000

description:
with GCC 7, apply -Wno-error=maybe-uninitialized to parser.cpp.

i don't really understand how to remove this warning, someone else
could though, so feel free to :-)

In file included from /usr/src/external/bsd/atf/dist/tools/parser.cpp:33:0:
/usr/src/external/bsd/atf/dist/tools/parser.hpp: In member function 'tools::parser::token tools::parser::tokenizer<IS>::next() [with IS = std::basic_istream<char>]':
/usr/src/external/bsd/atf/dist/tools/parser.hpp:98:8: warning: '<anonymous>.tools::parser::token::m_line' may be used uninitialized in this function [-Wmaybe-uninitialized]
 struct token {
        ^~~~~

diffstat:

 external/bsd/atf/lib/tools/Makefile |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 318baa6c2cd3 -r 7089fd96136d external/bsd/atf/lib/tools/Makefile
--- a/external/bsd/atf/lib/tools/Makefile       Mon Feb 04 09:35:11 2019 +0000
+++ b/external/bsd/atf/lib/tools/Makefile       Mon Feb 04 09:40:54 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2014/02/12 04:08:31 jmmv Exp $
+# $NetBSD: Makefile,v 1.6 2019/02/04 09:40:54 mrg Exp $
 
 NOLINT=                # defined
 
@@ -36,4 +36,8 @@
                ui.cpp \
                user.cpp
 
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
+COPTS.parser.cpp += -Wno-error=maybe-uninitialized
+.endif
+
 .include <bsd.lib.mk>



Home | Main Index | Thread Index | Old Index