diff options
author | Ted Ross <tross@apache.org> | 2011-11-22 21:32:48 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2011-11-22 21:32:48 +0000 |
commit | 855ed72a8d8fbe7fe2ae3533d753ccd4eaec978c (patch) | |
tree | 94ab4cc824d4956553bafeaafecdc689e6ca571c /cpp | |
parent | e793d1e216e9c1c5127d64d167df72352ccbef5c (diff) | |
download | qpid-python-855ed72a8d8fbe7fe2ae3533d753ccd4eaec978c.tar.gz |
NO-JIRA - Fixed the handling of functions with ignored return values.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1205183 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qmf/engine/ResilientConnection.cpp | 4 | ||||
-rw-r--r-- | cpp/src/qpid/broker/Daemon.cpp | 10 | ||||
-rwxr-xr-x | cpp/src/qpid/sys/posix/LockFile.cpp | 2 | ||||
-rw-r--r-- | cpp/src/tests/BrokerMgmtAgent.cpp | 2 | ||||
-rw-r--r-- | cpp/src/tests/ForkedBroker.cpp | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/cpp/src/qmf/engine/ResilientConnection.cpp b/cpp/src/qmf/engine/ResilientConnection.cpp index 41dd9ff00c..851193ccc1 100644 --- a/cpp/src/qmf/engine/ResilientConnection.cpp +++ b/cpp/src/qmf/engine/ResilientConnection.cpp @@ -334,7 +334,7 @@ void ResilientConnectionImpl::notify() { if (notifyFd != -1) { - (void) ::write(notifyFd, ".", 1); + if (::write(notifyFd, ".", 1)) {} } } @@ -431,7 +431,7 @@ void ResilientConnectionImpl::EnqueueEvent(ResilientConnectionEvent::EventKind k if (notifyFd != -1) { - (void) ::write(notifyFd, ".", 1); + if (::write(notifyFd, ".", 1)) {} } } diff --git a/cpp/src/qpid/broker/Daemon.cpp b/cpp/src/qpid/broker/Daemon.cpp index c36538beb7..281345bc95 100644 --- a/cpp/src/qpid/broker/Daemon.cpp +++ b/cpp/src/qpid/broker/Daemon.cpp @@ -93,13 +93,13 @@ void Daemon::fork() catch (const exception& e) { QPID_LOG(critical, "Unexpected error: " << e.what()); uint16_t port = 0; - (void) write(pipeFds[1], &port, sizeof(uint16_t)); + if (write(pipeFds[1], &port, sizeof(uint16_t))) {}; std::string pipeFailureMessage = e.what(); - (void) write ( pipeFds[1], - pipeFailureMessage.c_str(), - strlen(pipeFailureMessage.c_str()) - ); + if (write(pipeFds[1], + pipeFailureMessage.c_str(), + strlen(pipeFailureMessage.c_str()) + )) {}; } } else { // Parent diff --git a/cpp/src/qpid/sys/posix/LockFile.cpp b/cpp/src/qpid/sys/posix/LockFile.cpp index f5a6c292cb..c1f1c37b47 100755 --- a/cpp/src/qpid/sys/posix/LockFile.cpp +++ b/cpp/src/qpid/sys/posix/LockFile.cpp @@ -58,7 +58,7 @@ LockFile::~LockFile() { if (impl) { int f = impl->fd; if (f >= 0) { - (void) ::lockf(f, F_ULOCK, 0); // Suppress warnings about ignoring return value. + if(::lockf(f, F_ULOCK, 0)) {} // Suppress warnings about ignoring return value. ::close(f); impl->fd = -1; } diff --git a/cpp/src/tests/BrokerMgmtAgent.cpp b/cpp/src/tests/BrokerMgmtAgent.cpp index 1d5289dc90..02aa87f876 100644 --- a/cpp/src/tests/BrokerMgmtAgent.cpp +++ b/cpp/src/tests/BrokerMgmtAgent.cpp @@ -604,7 +604,7 @@ namespace qpid { std::stringstream key; key << "testobj-" << i; TestManageable *tm = new TestManageable(agent, key.str()); - (void) tm->GetManagementObject()->writePropertiesSize(); + if (tm->GetManagementObject()->writePropertiesSize()) {} agent->addObject(tm->GetManagementObject(), key.str()); tmv.push_back(tm); } diff --git a/cpp/src/tests/ForkedBroker.cpp b/cpp/src/tests/ForkedBroker.cpp index 10674b5175..de1b42d40f 100644 --- a/cpp/src/tests/ForkedBroker.cpp +++ b/cpp/src/tests/ForkedBroker.cpp @@ -68,7 +68,7 @@ ForkedBroker::~ForkedBroker() { } if (!dataDir.empty()) { - (void) ::system(("rm -rf "+dataDir).c_str()); + if(::system(("rm -rf "+dataDir).c_str())) {} } } |