freebsd / atf

Libraries to write tests in C, C++ and shell
Other
127 stars 44 forks source link

atf-sh: fix a gcc-8 compile warning in the atf shell #41

Closed ckhardin closed 5 years ago

ckhardin commented 5 years ago

atf-sh/atf-check.cpp: In function ‘int parse_signal(const string&)’: atf-sh/atf-check.cpp:219:23: error: catching polymorphic type ‘class std::runtime_error’ by value [-Werror=catch-value=] } catch (std::runtime_error) { ^~~~~ cc1plus: all warnings being treated as errors

ngie-eign commented 5 years ago

@jmmv: this patch is valid. Could you please merge the change?

jmmv commented 5 years ago

I've fixed this in 5ee0165 because this was missing a const qualifier as well in the catch statement. (And also because @ckhardin hasn't signed the CLA yet and, based on the age of this PR... I felt bad for requesting it now.)

ckhardin commented 5 years ago

fyi? @jmmv the CLA link says I signed it back in June

Agreement Name Date Signed Manage
Google Individual CLA Charles Hardin Jun 28, 2018 14:14 PDT Edit Contact Information