From 192a5f179ff4d36d75cd9414ab7098a4bd4aa050 Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Tue, 6 Sep 2016 15:49:39 +0200 Subject: [PATCH] fixed some warnings --- Foundation/src/Process.cpp | 2 ++ Net/src/Socket.cpp | 6 ++++-- Net/src/SocketImpl.cpp | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Foundation/src/Process.cpp b/Foundation/src/Process.cpp index 845611166..d3e7a5d5a 100644 --- a/Foundation/src/Process.cpp +++ b/Foundation/src/Process.cpp @@ -47,6 +47,7 @@ namespace return envbuf; } +#if defined(POCO_OS_FAMILY_VMS) void setEnvironmentVariables(const Poco::Process::Env& env) { for (Poco::Process::Env::const_iterator it = env.begin(); it != env.end(); ++it) @@ -54,6 +55,7 @@ namespace Poco::Environment::set(it->first, it->second); } } +#endif } diff --git a/Net/src/Socket.cpp b/Net/src/Socket.cpp index 728890465..1a5bfd934 100644 --- a/Net/src/Socket.cpp +++ b/Net/src/Socket.cpp @@ -151,7 +151,8 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce if (epollfd < 0) { char buf[1024]; - strerror_r(errno, buf, sizeof(buf)); + int rc = strerror_r(errno, buf, sizeof(buf)); + poco_assert (rc == 0); SocketImpl::error(std::string("Can't create epoll queue: ") + buf); } @@ -163,7 +164,8 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce if (epoll_ctl(epollfd, EPOLL_CTL_ADD, sockfd, e) < 0) { char buf[1024]; - strerror_r(errno, buf, sizeof(buf)); + int rc = strerror_r(errno, buf, sizeof(buf)); + poco_assert (rc == 0); ::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 1a98a85ea..e7cb52aa3 100644 --- a/Net/src/SocketImpl.cpp +++ b/Net/src/SocketImpl.cpp @@ -403,7 +403,8 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode) if (epollfd < 0) { char buf[1024]; - strerror_r(errno, buf, sizeof(buf)); + int rc = strerror_r(errno, buf, sizeof(buf)); + poco_assert (rc == 0); error(std::string("Can't create epoll queue: ") + buf); } @@ -420,7 +421,8 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode) if (epoll_ctl(epollfd, EPOLL_CTL_ADD, sockfd, &evin) < 0) { char buf[1024]; - strerror_r(errno, buf, sizeof(buf)); + int rc = strerror_r(errno, buf, sizeof(buf)); + poco_assert (rc == 0); ::close(epollfd); error(std::string("Can't insert socket to epoll queue: ") + buf); }