diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2011-06-07 21:33:46 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2011-06-07 21:33:46 +0000 |
| commit | 8ea1598a13e2344a8733ffe2c79abacfe7f477f4 (patch) | |
| tree | 5e90f3011f801e6b80e4165bd08431ea88498c92 /cpp/src/qpid/sys | |
| parent | dea4bb69afc5f91f523af65580ce4a8d75d3df68 (diff) | |
| download | qpid-python-8ea1598a13e2344a8733ffe2c79abacfe7f477f4.tar.gz | |
QPID-3284: Eliminated warnings from gcc 4.6 compiler
- Removed a bunch of variables set but not further used.
- Rejigged some asserts which would now have unused vars
if compiler -DNDEBUG
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1133166 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys')
| -rw-r--r-- | cpp/src/qpid/sys/RdmaIOPlugin.cpp | 11 | ||||
| -rwxr-xr-x | cpp/src/qpid/sys/posix/LockFile.cpp | 3 |
2 files changed, 2 insertions, 12 deletions
diff --git a/cpp/src/qpid/sys/RdmaIOPlugin.cpp b/cpp/src/qpid/sys/RdmaIOPlugin.cpp index 631d116b41..6769e5383c 100644 --- a/cpp/src/qpid/sys/RdmaIOPlugin.cpp +++ b/cpp/src/qpid/sys/RdmaIOPlugin.cpp @@ -211,10 +211,9 @@ void RdmaIOHandler::readbuff(Rdma::AsynchIO&, Rdma::Buffer* buff) { if (readError) { return; } - size_t decoded = 0; try { if (codec) { - decoded = codec->decode(buff->bytes(), buff->dataCount()); + (void) codec->decode(buff->bytes(), buff->dataCount()); }else{ // Need to start protocol processing initProtocolIn(buff); @@ -229,9 +228,7 @@ void RdmaIOHandler::readbuff(Rdma::AsynchIO&, Rdma::Buffer* buff) { void RdmaIOHandler::initProtocolIn(Rdma::Buffer* buff) { framing::Buffer in(buff->bytes(), buff->dataCount()); framing::ProtocolInitiation protocolInit; - size_t decoded = 0; if (protocolInit.decode(in)) { - decoded = in.getPosition(); QPID_LOG(debug, "Rdma: RECV [" << identifier << "] INIT(" << protocolInit << ")"); codec = factory->create(protocolInit.getVersion(), *this, identifier, SecuritySettings()); @@ -346,12 +343,6 @@ uint16_t RdmaIOProtocolFactory::getPort() const { } void RdmaIOProtocolFactory::accept(Poller::shared_ptr poller, ConnectionCodec::Factory* fact) { - ::sockaddr_in sin; - - sin.sin_family = AF_INET; - sin.sin_port = htons(listeningPort); - sin.sin_addr.s_addr = INADDR_ANY; - listener.reset( new Rdma::Listener( Rdma::ConnectionParams(65536, Rdma::DEFAULT_WR_ENTRIES), diff --git a/cpp/src/qpid/sys/posix/LockFile.cpp b/cpp/src/qpid/sys/posix/LockFile.cpp index 1862ff6ac9..f5a6c292cb 100755 --- a/cpp/src/qpid/sys/posix/LockFile.cpp +++ b/cpp/src/qpid/sys/posix/LockFile.cpp @@ -58,8 +58,7 @@ LockFile::~LockFile() { if (impl) { int f = impl->fd; if (f >= 0) { - int unused_ret; - unused_ret = ::lockf(f, F_ULOCK, 0); // Suppress warnings about ignoring return value. + (void) ::lockf(f, F_ULOCK, 0); // Suppress warnings about ignoring return value. ::close(f); impl->fd = -1; } |
