Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/atf/dist/atf-sh give a catch() a variable. gcc...



details:   https://anonhg.NetBSD.org/src/rev/a33e7c0c3b69
branches:  trunk
changeset: 455000:a33e7c0c3b69
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Oct 04 09:19:18 2019 +0000

description:
give a catch() a variable.  gcc 8 is picky:

atf-check.cpp:221:23: error: catching polymorphic type 'class std::runtime_error' by value [-Werror=catch-value=]

diffstat:

 external/bsd/atf/dist/atf-sh/atf-check.cpp |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r abab3aa22bf9 -r a33e7c0c3b69 external/bsd/atf/dist/atf-sh/atf-check.cpp
--- a/external/bsd/atf/dist/atf-sh/atf-check.cpp        Fri Oct 04 09:16:38 2019 +0000
+++ b/external/bsd/atf/dist/atf-sh/atf-check.cpp        Fri Oct 04 09:19:18 2019 +0000
@@ -218,7 +218,7 @@
     if (signo == INT_MIN) {
         try {
             return atf::text::to_type< int >(str);
-        } catch (std::runtime_error) {
+        } catch (std::runtime_error &e) {
             throw atf::application::usage_error("Invalid signal name or number "
                 "in -s option");
         }



Home | Main Index | Thread Index | Old Index