summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2013-01-31 16:51:40 +0100
committerJose <jose@zeroc.com>2013-01-31 16:51:40 +0100
commit4d55f11cdf22fbc23e3e7c9f4758566bd05a9471 (patch)
treef5c3071ebb27c18dae2fb2585706bd9af8dd92cf /cpp/src
parentFixed ICE-4870 - optional comparison operators on C++ structs (diff)
downloadice-4d55f11cdf22fbc23e3e7c9f4758566bd05a9471.tar.bz2
ice-4d55f11cdf22fbc23e3e7c9f4758566bd05a9471.tar.xz
ice-4d55f11cdf22fbc23e3e7c9f4758566bd05a9471.zip
Xcode 4.6 - clang 4.2 updates
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Freeze/TransactionalEvictorContext.h2
-rw-r--r--cpp/src/Freeze/TransactionalEvictorI.cpp12
-rw-r--r--cpp/src/Ice/InstrumentationI.cpp18
-rw-r--r--cpp/src/Ice/ThreadPool.cpp6
-rw-r--r--cpp/src/Ice/ThreadPool.h3
-rw-r--r--cpp/src/IceGrid/NodeSessionManager.cpp1
-rw-r--r--cpp/src/IceGrid/NodeSessionManager.h1
-rw-r--r--cpp/src/IceGrid/ObjectCache.cpp5
-rw-r--r--cpp/src/IceGrid/ObjectCache.h3
-rw-r--r--cpp/src/slice2cpp/Gen.cpp10
-rw-r--r--cpp/src/slice2cpp/Gen.h5
-rw-r--r--cpp/src/slice2java/Gen.cpp6
-rw-r--r--cpp/src/slice2java/Gen.h4
13 files changed, 45 insertions, 31 deletions
diff --git a/cpp/src/Freeze/TransactionalEvictorContext.h b/cpp/src/Freeze/TransactionalEvictorContext.h
index d02eb627e88..1b830c3bd11 100644
--- a/cpp/src/Freeze/TransactionalEvictorContext.h
+++ b/cpp/src/Freeze/TransactionalEvictorContext.h
@@ -145,8 +145,6 @@ private:
TransactionIPtr _tx;
IceUtil::ThreadControl _owner;
- bool _rollbackOnly;
-
IceUtil::UniquePtr<DeadlockException> _deadlockException;
IceUtil::UniquePtr<TransactionalEvictorDeadlockException> _nestedCallDeadlockException;
diff --git a/cpp/src/Freeze/TransactionalEvictorI.cpp b/cpp/src/Freeze/TransactionalEvictorI.cpp
index c3d641cf00b..f5788fddfcd 100644
--- a/cpp/src/Freeze/TransactionalEvictorI.cpp
+++ b/cpp/src/Freeze/TransactionalEvictorI.cpp
@@ -344,10 +344,16 @@ Freeze::TransactionalEvictorI::dispatch(Request& request)
{
public:
+#ifndef NDEBUG
CtxHolder(bool ownCtx, const TransactionalEvictorContextPtr& ctx, const SharedDbEnvPtr& dbEnv) :
_ownCtx(ownCtx),
_ctx(ctx),
_dbEnv(dbEnv)
+#else
+ CtxHolder(bool ownCtx, const TransactionalEvictorContextPtr& ctx) :
+ _ownCtx(ownCtx),
+ _ctx(ctx)
+#endif
{
}
@@ -371,7 +377,9 @@ Freeze::TransactionalEvictorI::dispatch(Request& request)
private:
const bool _ownCtx;
const TransactionalEvictorContextPtr _ctx;
+#ifndef NDEBUG
const SharedDbEnvPtr& _dbEnv;
+#endif
};
@@ -517,7 +525,11 @@ Freeze::TransactionalEvictorI::dispatch(Request& request)
ctx = _dbEnv->createCurrent();
}
+#ifndef NDEBUG
CtxHolder ctxHolder(ownCtx, ctx, _dbEnv);
+#else
+ CtxHolder ctxHolder(ownCtx, ctx);
+#endif
tx = ctx->transaction();
try
diff --git a/cpp/src/Ice/InstrumentationI.cpp b/cpp/src/Ice/InstrumentationI.cpp
index c370348120c..e5a15432fd1 100644
--- a/cpp/src/Ice/InstrumentationI.cpp
+++ b/cpp/src/Ice/InstrumentationI.cpp
@@ -559,7 +559,25 @@ private:
const ConnectionInfoPtr& _connectionInfo;
const EndpointPtr& _endpoint;
+
+//
+// Clang 4.2 reports unused-private-field for the _requestId
+// field that is only used in the nested Attributes class.
+//
+#ifdef __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wunused-private-field"
+#endif
+
const int _requestId;
+
+//
+// Restore diagnostic to previous state.
+//
+#ifdef __clang__
+# pragma clang diagnostic pop
+#endif
+
const int _size;
mutable string _id;
mutable EndpointInfoPtr _endpointInfo;
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 055174f3f84..56baebe8541 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -156,10 +156,8 @@ IceInternal::DispatchWorkItem::execute(ThreadPoolCurrent& current)
}
}
-IceInternal::ThreadPoolWorkQueue::ThreadPoolWorkQueue(ThreadPool* threadPool,
- const InstancePtr& instance,
+IceInternal::ThreadPoolWorkQueue::ThreadPoolWorkQueue(const InstancePtr& instance,
Selector& selector) :
- _threadPool(threadPool),
_instance(instance),
_selector(selector),
_destroyed(false)
@@ -480,7 +478,7 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p
const_cast<int&>(_priority) = properties->getPropertyAsInt("Ice.ThreadPriority");
}
- _workQueue = new ThreadPoolWorkQueue(this, _instance, _selector);
+ _workQueue = new ThreadPoolWorkQueue(_instance, _selector);
if(_instance->traceLevels()->threadPool >= 1)
{
diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h
index 626f458b2fc..94dbc35b340 100644
--- a/cpp/src/Ice/ThreadPool.h
+++ b/cpp/src/Ice/ThreadPool.h
@@ -193,7 +193,7 @@ class ThreadPoolWorkQueue : public EventHandler, public IceUtil::Mutex
{
public:
- ThreadPoolWorkQueue(ThreadPool*, const InstancePtr&, Selector&);
+ ThreadPoolWorkQueue(const InstancePtr&, Selector&);
~ThreadPoolWorkQueue();
void destroy();
@@ -212,7 +212,6 @@ public:
private:
- const ThreadPool* _threadPool;
const InstancePtr _instance;
Selector& _selector;
bool _destroyed;
diff --git a/cpp/src/IceGrid/NodeSessionManager.cpp b/cpp/src/IceGrid/NodeSessionManager.cpp
index 9571e9de569..28777503a59 100644
--- a/cpp/src/IceGrid/NodeSessionManager.cpp
+++ b/cpp/src/IceGrid/NodeSessionManager.cpp
@@ -228,7 +228,6 @@ NodeSessionKeepAliveThread::keepAlive(const NodeSessionPrx& session)
}
NodeSessionManager::NodeSessionManager() :
- _serial(1),
_destroyed(false),
_activated(false)
{
diff --git a/cpp/src/IceGrid/NodeSessionManager.h b/cpp/src/IceGrid/NodeSessionManager.h
index 71bd1d032ea..8cda259b0cb 100644
--- a/cpp/src/IceGrid/NodeSessionManager.h
+++ b/cpp/src/IceGrid/NodeSessionManager.h
@@ -127,7 +127,6 @@ private:
ThreadPtr _thread;
std::vector<QueryPrx> _queryObjects;
InternalRegistryPrx _master;
- unsigned long _serial;
bool _destroyed;
bool _activated;
diff --git a/cpp/src/IceGrid/ObjectCache.cpp b/cpp/src/IceGrid/ObjectCache.cpp
index f78b75ed1a1..988fd6dc7a9 100644
--- a/cpp/src/IceGrid/ObjectCache.cpp
+++ b/cpp/src/IceGrid/ObjectCache.cpp
@@ -86,7 +86,7 @@ ObjectCache::add(const ObjectInfo& info, const string& application)
return;
}
- ObjectEntryPtr entry = new ObjectEntry(*this, info, application);
+ ObjectEntryPtr entry = new ObjectEntry(info, application);
addImpl(id, entry);
map<string, TypeEntry>::iterator p = _types.find(entry->getType());
@@ -194,8 +194,7 @@ ObjectCache::getAllByType(const string& type)
return infos;
}
-ObjectEntry::ObjectEntry(ObjectCache& cache, const ObjectInfo& info, const string& application) :
- _cache(cache),
+ObjectEntry::ObjectEntry(const ObjectInfo& info, const string& application) :
_info(info),
_application(application)
{
diff --git a/cpp/src/IceGrid/ObjectCache.h b/cpp/src/IceGrid/ObjectCache.h
index 523b90f231e..7bd7a786357 100644
--- a/cpp/src/IceGrid/ObjectCache.h
+++ b/cpp/src/IceGrid/ObjectCache.h
@@ -24,7 +24,7 @@ class ObjectEntry : public IceUtil::Shared
{
public:
- ObjectEntry(ObjectCache&, const ObjectInfo&, const std::string&);
+ ObjectEntry(const ObjectInfo&, const std::string&);
Ice::ObjectPrx getProxy() const;
std::string getType() const;
std::string getApplication() const;
@@ -34,7 +34,6 @@ public:
private:
- ObjectCache& _cache;
const ObjectInfo _info;
const std::string _application;
};
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 983f933a7d9..3092153c176 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -1347,7 +1347,7 @@ Slice::Gen::TypesVisitor::emitUpcall(const ExceptionPtr& base, const string& cal
}
Slice::Gen::ProxyDeclVisitor::ProxyDeclVisitor(Output& h, Output& c, const string& dllExport) :
- H(h), C(c), _dllExport(dllExport)
+ H(h), _dllExport(dllExport)
{
}
@@ -2447,7 +2447,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
}
Slice::Gen::DelegateVisitor::DelegateVisitor(Output& h, Output& c, const string& dllExport) :
- H(h), C(c), _dllExport(dllExport), _useWstring(false)
+ H(h), _dllExport(dllExport), _useWstring(false)
{
}
@@ -4860,7 +4860,7 @@ Slice::Gen::ObjectVisitor::emitUpcall(const ClassDefPtr& base, const string& cal
}
Slice::Gen::AsyncCallbackVisitor::AsyncCallbackVisitor(Output& h, Output& c, const string& dllExport) :
- H(h), C(c), _dllExport(dllExport), _useWstring(false)
+ H(h), _dllExport(dllExport), _useWstring(false)
{
}
@@ -4921,7 +4921,7 @@ Slice::Gen::AsyncCallbackVisitor::visitOperation(const OperationPtr& p)
Slice::Gen::AsyncCallbackTemplateVisitor::AsyncCallbackTemplateVisitor(Output& h,
Output& c,
const string& dllExport)
- : H(h), C(c), _dllExport(dllExport), _useWstring(false)
+ : H(h), _dllExport(dllExport), _useWstring(false)
{
}
@@ -5628,7 +5628,7 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p)
}
Slice::Gen::AsyncVisitor::AsyncVisitor(Output& h, Output& c, const string& dllExport) :
- H(h), C(c), _dllExport(dllExport), _useWstring(false)
+ H(h), _dllExport(dllExport), _useWstring(false)
{
}
diff --git a/cpp/src/slice2cpp/Gen.h b/cpp/src/slice2cpp/Gen.h
index a8377f6fa35..9bcb600291c 100644
--- a/cpp/src/slice2cpp/Gen.h
+++ b/cpp/src/slice2cpp/Gen.h
@@ -119,7 +119,6 @@ private:
private:
::IceUtilInternal::Output& H;
- ::IceUtilInternal::Output& C;
std::string _dllExport;
};
@@ -165,7 +164,6 @@ private:
private:
::IceUtilInternal::Output& H;
- ::IceUtilInternal::Output& C;
std::string _dllExport;
int _useWstring;
@@ -288,7 +286,6 @@ private:
private:
::IceUtilInternal::Output& H;
- ::IceUtilInternal::Output& C;
std::string _dllExport;
int _useWstring;
@@ -314,7 +311,6 @@ private:
void generateOperation(const OperationPtr&, bool);
::IceUtilInternal::Output& H;
- ::IceUtilInternal::Output& C;
std::string _dllExport;
int _useWstring;
@@ -367,7 +363,6 @@ private:
private:
::IceUtilInternal::Output& H;
- ::IceUtilInternal::Output& C;
std::string _dllExport;
int _useWstring;
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 61cf44c18fc..6731f6ae863 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -2023,7 +2023,7 @@ Slice::Gen::generate(const UnitPtr& p, bool stream)
CompactIdVisitor compactIdVisitor(_dir);
p->visit(&compactIdVisitor, false);
- HolderVisitor holderVisitor(_dir, stream);
+ HolderVisitor holderVisitor(_dir);
p->visit(&holderVisitor, false);
HelperVisitor helperVisitor(_dir, stream);
@@ -4173,8 +4173,8 @@ Slice::Gen::CompactIdVisitor::visitClassDefStart(const ClassDefPtr& p)
return false;
}
-Slice::Gen::HolderVisitor::HolderVisitor(const string& dir, bool stream) :
- JavaVisitor(dir), _stream(stream)
+Slice::Gen::HolderVisitor::HolderVisitor(const string& dir) :
+ JavaVisitor(dir)
{
}
diff --git a/cpp/src/slice2java/Gen.h b/cpp/src/slice2java/Gen.h
index 698cc9a01a6..1f612882062 100644
--- a/cpp/src/slice2java/Gen.h
+++ b/cpp/src/slice2java/Gen.h
@@ -204,7 +204,7 @@ private:
{
public:
- HolderVisitor(const std::string&, bool);
+ HolderVisitor(const std::string&);
virtual bool visitClassDefStart(const ClassDefPtr&);
virtual bool visitStructStart(const StructPtr&);
@@ -215,8 +215,6 @@ private:
private:
void writeHolder(const TypePtr&);
-
- bool _stream;
};
class HelperVisitor : public JavaVisitor