summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2011-09-14 21:41:11 +0000
committerTed Ross <tross@apache.org>2011-09-14 21:41:11 +0000
commitca63176da28dd4b045bd8a0d5cfc43f235d01a23 (patch)
tree58cead5400d81ef626ca2a7fbdae38def9b5f277 /cpp
parenta316488ce71a2ae521f4c62017e2c693414e0257 (diff)
downloadqpid-python-ca63176da28dd4b045bd8a0d5cfc43f235d01a23.tar.gz
QPID-3484 - Fixed handling of unused return values to prevent compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1170860 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qmf/PosixEventNotifierImpl.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/qmf/PosixEventNotifierImpl.cpp b/cpp/src/qmf/PosixEventNotifierImpl.cpp
index abc9cadcfa..011dbcc214 100644
--- a/cpp/src/qmf/PosixEventNotifierImpl.cpp
+++ b/cpp/src/qmf/PosixEventNotifierImpl.cpp
@@ -18,9 +18,11 @@
*/
#include "PosixEventNotifierImpl.h"
+#include "qpid/log/Statement.h"
#include <fcntl.h>
#include <unistd.h>
+#include <errno.h>
#define BUFFER_SIZE 10
@@ -51,10 +53,12 @@ void PosixEventNotifierImpl::update(bool readable)
char buffer[BUFFER_SIZE];
if(readable && !this->isReadable()) {
- (void) ::write(myHandle, "1", 1);
+ if (::write(myHandle, "1", 1) == -1)
+ QPID_LOG(error, "PosixEventNotifierImpl::update write failed: " << errno);
}
else if(!readable && this->isReadable()) {
- (void) ::read(yourHandle, buffer, BUFFER_SIZE);
+ if (::read(yourHandle, buffer, BUFFER_SIZE) == -1)
+ QPID_LOG(error, "PosixEventNotifierImpl::update read failed: " << errno);
}
}