From d073e82058df58a6678a4445e411201a1712b14f Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 13 Aug 2013 07:29:34 +0200 Subject: Shouldn't ignore these return values under GNU... --- src/Input.cc | 4 ++-- src/Output.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Input.cc b/src/Input.cc index fafa649..481545e 100644 --- a/src/Input.cc +++ b/src/Input.cc @@ -181,8 +181,8 @@ void Balau::Input::close() throw (GeneralException) { case cbResults_t::CLOSE: m_fd = -1; if (cbResults->result < 0) { - char str[4096]; - strerror_r(cbResults->errorno, str, sizeof(str)); + char buf[4096]; + char * str = strerror_r(cbResults->errorno, buf, sizeof(buf)); throw GeneralException(String("Unable to close file ") + m_name + ": " + str); } delete cbResults; diff --git a/src/Output.cc b/src/Output.cc index 3ca97b0..03c0d6e 100644 --- a/src/Output.cc +++ b/src/Output.cc @@ -181,8 +181,8 @@ void Balau::Output::close() throw (GeneralException) { case cbResults_t::CLOSE: m_fd = -1; if (cbResults->result < 0) { - char str[4096]; - strerror_r(cbResults->errorno, str, sizeof(str)); + char buf[4096]; + char * str = strerror_r(cbResults->errorno, buf, sizeof(buf)); throw GeneralException(String("Unable to close file ") + m_name + ": " + str); } delete cbResults; -- cgit v1.2.3