mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-24 14:20:10 +01:00
fix warning regarding unused return value
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Error.cpp
|
// Error.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.4/Foundation/src/Error.cpp#3 $
|
// $Id: //poco/1.7/Foundation/src/Error.cpp#3 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@@ -66,10 +66,10 @@ namespace Poco {
|
|||||||
without -D_GNU_SOURCE is needed, otherwise the GNU version is
|
without -D_GNU_SOURCE is needed, otherwise the GNU version is
|
||||||
preferred.
|
preferred.
|
||||||
*/
|
*/
|
||||||
#if (_XOPEN_SOURCE >= 600) || POCO_ANDROID
|
#if ((_XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || POCO_ANDROID
|
||||||
char errmsg[256] = "";
|
char errmsg[256] = "";
|
||||||
strerror_r(errorCode, errmsg, 256);
|
int rc = strerror_r(errorCode, errmsg, 256);
|
||||||
return errmsg;
|
return rc == 0 ? std::string(errmsg) : std::string();
|
||||||
#elif defined _GNU_SOURCE
|
#elif defined _GNU_SOURCE
|
||||||
char errmsg[256] = "";
|
char errmsg[256] = "";
|
||||||
return std::string(strerror_r(errorCode, errmsg, 256));
|
return std::string(strerror_r(errorCode, errmsg, 256));
|
||||||
|
|||||||
Reference in New Issue
Block a user