summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qmf/PosixEventNotifierImpl.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
commit432918433d1b04e94864c09949dda59bc1454271 (patch)
treea2aca00a530fa5be025a58e2dc2d0dbce76ec495 /qpid/cpp/src/qmf/PosixEventNotifierImpl.cpp
parentf7fb81d90c7f10ea187416883b2699dd6cb25f83 (diff)
downloadqpid-python-432918433d1b04e94864c09949dda59bc1454271.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@1170860 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qmf/PosixEventNotifierImpl.cpp')
-rw-r--r--qpid/cpp/src/qmf/PosixEventNotifierImpl.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/qpid/cpp/src/qmf/PosixEventNotifierImpl.cpp b/qpid/cpp/src/qmf/PosixEventNotifierImpl.cpp
index abc9cadcfa..011dbcc214 100644
--- a/qpid/cpp/src/qmf/PosixEventNotifierImpl.cpp
+++ b/qpid/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);
}
}