summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/ConnectionI.cpp4
-rw-r--r--cpp/src/Ice/Proxy.cpp2
-rw-r--r--cpp/src/Ice/ProxyFactory.cpp2
-rw-r--r--cpp/src/IceGrid/ServerCache.cpp6
-rw-r--r--cpp/src/IceUtil/Shared.cpp6
5 files changed, 12 insertions, 8 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
index b1638274089..8a548df8a1d 100644
--- a/cpp/src/Ice/ConnectionI.cpp
+++ b/cpp/src/Ice/ConnectionI.cpp
@@ -670,7 +670,7 @@ Ice::ConnectionI::sendAsyncRequest(const OutgoingAsyncPtr& out, bool compress, b
#endif
}
- AsyncStatus status;
+ AsyncStatus status = AsyncStatusQueued;
try
{
OutgoingMessage message(out, os, compress, requestId);
@@ -1044,7 +1044,7 @@ Ice::ConnectionI::flushAsyncBatchRequests(const BatchOutgoingAsyncPtr& outAsync)
//
// Send the batch stream.
//
- AsyncStatus status;
+ AsyncStatus status = AsyncStatusQueued;
try
{
OutgoingMessage message(outAsync, outAsync->__getOs(), _batchRequestCompress, 0);
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index 7b5b6781867..64f8b238d70 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -1302,7 +1302,7 @@ IceProxy::Ice::Object::__handleException(const ::IceInternal::Handle< ::IceDeleg
ex.ice_throw();
}
- int interval;
+ int interval = 0;
try
{
interval = _reference->getInstance()->proxyFactory()->checkRetryAfterException(ex, _reference, sleep, cnt);
diff --git a/cpp/src/Ice/ProxyFactory.cpp b/cpp/src/Ice/ProxyFactory.cpp
index c28520afcd6..239d3e2c18c 100644
--- a/cpp/src/Ice/ProxyFactory.cpp
+++ b/cpp/src/Ice/ProxyFactory.cpp
@@ -217,7 +217,7 @@ IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex,
++cnt;
assert(cnt > 0);
- int interval;
+ int interval = -1;
if(cnt == static_cast<int>(_retryIntervals.size() + 1) &&
dynamic_cast<const CloseConnectionException*>(&ex))
{
diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp
index 8d6cf543a5e..d05fb627dc6 100644
--- a/cpp/src/IceGrid/ServerCache.cpp
+++ b/cpp/src/IceGrid/ServerCache.cpp
@@ -727,7 +727,7 @@ ServerEntry::loadCallback(const ServerPrx& proxy, const AdapterPrxDict& adpts, i
ServerInfo destroy;
int timeout = -1;
bool synced = false;
- bool noRestart;
+ bool noRestart = false;
{
Lock sync(*this);
@@ -804,7 +804,7 @@ void
ServerEntry::destroyCallback()
{
ServerInfo load;
- bool noRestart;
+ bool noRestart = false;
SessionIPtr session;
{
@@ -853,7 +853,7 @@ ServerEntry::exception(const Ice::Exception& ex)
{
ServerInfo load;
SessionIPtr session;
- bool noRestart;
+ bool noRestart = false;
bool remove = false;
int timeout = -1;
diff --git a/cpp/src/IceUtil/Shared.cpp b/cpp/src/IceUtil/Shared.cpp
index 39805cc746e..41ae9db3549 100644
--- a/cpp/src/IceUtil/Shared.cpp
+++ b/cpp/src/IceUtil/Shared.cpp
@@ -115,7 +115,11 @@ IceUtil::Shared::__incRef()
assert(InterlockedExchangeAdd(&_ref, 0) >= 0);
InterlockedIncrement(&_ref);
#elif defined(ICE_HAS_GCC_BUILTINS)
- int c = __sync_fetch_and_add(&_ref, 1);
+
+# ifndef NDEBUG
+ int c =
+# endif
+ __sync_fetch_and_add(&_ref, 1);
assert(c >= 0);
#elif defined(ICE_HAS_ATOMIC_FUNCTIONS)
assert(IceUtilInternal::atomicExchangeAdd(&_ref, 0) >= 0);