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