From ed88e8d46daac21c276460fb2b6299899a613a1a Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Thu, 8 Sep 2016 09:38:06 +0200 Subject: [PATCH] fixed strerror_r issue --- Net/src/Socket.cpp | 6 ++---- Net/src/SocketImpl.cpp | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Net/src/Socket.cpp b/Net/src/Socket.cpp index 1a5bfd934..f317c18ba 100644 --- a/Net/src/Socket.cpp +++ b/Net/src/Socket.cpp @@ -151,8 +151,7 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce if (epollfd < 0) { char buf[1024]; - int rc = strerror_r(errno, buf, sizeof(buf)); - poco_assert (rc == 0); + (void) strerror_r(errno, buf, sizeof(buf)); SocketImpl::error(std::string("Can't create epoll queue: ") + buf); } @@ -164,8 +163,7 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce if (epoll_ctl(epollfd, EPOLL_CTL_ADD, sockfd, e) < 0) { char buf[1024]; - int rc = strerror_r(errno, buf, sizeof(buf)); - poco_assert (rc == 0); + (void) strerror_r(errno, buf, sizeof(buf)); ::close(epollfd); SocketImpl::error(std::string("Can't insert socket to epoll queue: ") + buf); } diff --git a/Net/src/SocketImpl.cpp b/Net/src/SocketImpl.cpp index 943044e82..4b8bf5c49 100644 --- a/Net/src/SocketImpl.cpp +++ b/Net/src/SocketImpl.cpp @@ -403,8 +403,7 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode) if (epollfd < 0) { char buf[1024]; - int rc = strerror_r(errno, buf, sizeof(buf)); - poco_assert (rc == 0); + (void) strerror_r(errno, buf, sizeof(buf)); error(std::string("Can't create epoll queue: ") + buf); } @@ -421,9 +420,8 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode) if (epoll_ctl(epollfd, EPOLL_CTL_ADD, sockfd, &evin) < 0) { char buf[1024]; - int rc = strerror_r(errno, buf, sizeof(buf)); + (void) strerror_r(errno, buf, sizeof(buf)); ::close(epollfd); - poco_assert (rc == 0); error(std::string("Can't insert socket to epoll queue: ") + buf); }