summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/Shared.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2012-11-30 20:38:55 +0000
committerBernard Normier <bernard@zeroc.com>2012-11-30 20:38:55 +0000
commit4671f4029b7dff91be9e9b2d04aa8d604320a9c6 (patch)
tree7aec1718ee63f51b8dbd29f42fd7bf7b18a3f414 /cpp/src/IceUtil/Shared.cpp
parentFixed (ICE-5064) - Batch Oneway does not appear to work with Silverlight hell... (diff)
downloadice-4671f4029b7dff91be9e9b2d04aa8d604320a9c6.tar.bz2
ice-4671f4029b7dff91be9e9b2d04aa8d604320a9c6.tar.xz
ice-4671f4029b7dff91be9e9b2d04aa8d604320a9c6.zip
Fixed GCC release warnings and set QT_HOME to /usr in Make.rules
Diffstat (limited to 'cpp/src/IceUtil/Shared.cpp')
-rw-r--r--cpp/src/IceUtil/Shared.cpp6
1 files changed, 5 insertions, 1 deletions
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);