diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2015-07-08 13:33:41 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2015-07-08 13:33:41 -0230 |
commit | ec106aa0f053b6ea6563b0430b2298c869e0a776 (patch) | |
tree | 215069baaba9c79c366a7a4b6295b00c307c5957 /cpp | |
parent | Fixed download link for Windows third party installer (diff) | |
download | ice-ec106aa0f053b6ea6563b0430b2298c869e0a776.tar.bz2 ice-ec106aa0f053b6ea6563b0430b2298c869e0a776.tar.xz ice-ec106aa0f053b6ea6563b0430b2298c869e0a776.zip |
ICE-6514 Removed uneeded includes of DisableWarnings.h
Diffstat (limited to 'cpp')
48 files changed, 335 insertions, 391 deletions
diff --git a/cpp/include/IceGrid/.headers b/cpp/include/IceGrid/.headers index 973e1bf0a8f..9a7b96a4cbf 100644 --- a/cpp/include/IceGrid/.headers +++ b/cpp/include/IceGrid/.headers @@ -7,6 +7,7 @@ SDK_HEADERS = \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\IceGrid.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Locator.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Observer.h \ + $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\PluginFacade.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Query.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\Registry.h \ $(SDK_INCLUDE_PATH)\$(INCLUDE_DIR)\ReplicaGroupFilter.h \ diff --git a/cpp/src/Freeze/EvictorI.h b/cpp/src/Freeze/EvictorI.h index 8efa59dd14c..163cad210f0 100644 --- a/cpp/src/Freeze/EvictorI.h +++ b/cpp/src/Freeze/EvictorI.h @@ -21,7 +21,6 @@ #include <list> #include <vector> #include <deque> -#include <IceUtil/DisableWarnings.h> class DbTxn; @@ -38,7 +37,7 @@ class DeactivateController : private IceUtil::Monitor<IceUtil::Mutex> public: // - // Prevents deactivation; the constructor raises + // Prevents deactivation; the constructor raises // EvictorDeactivatedException if _deactivated or _deactivating is true. // class Guard @@ -51,8 +50,8 @@ public: DeactivateController& _controller; }; - DeactivateController(EvictorIBase*); - + DeactivateController(EvictorIBase*); + // // Used mostly in asserts // @@ -67,7 +66,7 @@ public: void deactivationComplete(); private: - + friend class Guard; EvictorIBase* _evictor; @@ -85,14 +84,14 @@ public: virtual void setSize(Ice::Int); virtual Ice::Int getSize(); - + virtual Ice::ObjectPrx add(const Ice::ObjectPtr&, const Ice::Identity&); virtual Ice::ObjectPtr remove(const Ice::Identity&); virtual bool hasObject(const Ice::Identity&); virtual Ice::ObjectPtr locate(const Ice::Current&, Ice::LocalObjectPtr&); - + DeactivateController& deactivateController(); const Ice::CommunicatorPtr& communicator() const; const Ice::EncodingVersion& encoding() const; @@ -105,26 +104,26 @@ public: void initialize(const Ice::Identity&, const std::string&, const Ice::ObjectPtr&); - + static void updateStats(Statistics&, IceUtil::Int64); - static std::string defaultDb; - static std::string indexPrefix; + static std::string defaultDb; + static std::string indexPrefix; protected: - - EvictorIBase(const Ice::ObjectAdapterPtr&, const std::string&, DbEnv*, const std::string&, + + EvictorIBase(const Ice::ObjectAdapterPtr&, const std::string&, DbEnv*, const std::string&, const FacetTypeMap&, const ServantInitializerPtr&, bool); virtual bool hasAnotherFacet(const Ice::Identity&, const std::string&) = 0; - + virtual Ice::ObjectPtr locateImpl(const Ice::Current&, Ice::LocalObjectPtr&) = 0; - + virtual void evict() = 0; std::vector<std::string> allDbs() const; - + size_t _evictorSize; FacetTypeMap _facetTypes; @@ -136,7 +135,7 @@ protected: Ice::EncodingVersion _encoding; ServantInitializerPtr _initializer; - + SharedDbEnvPtr _dbEnv; std::string _filename; @@ -160,7 +159,7 @@ class EvictorI : public EvictorIBase { public: - virtual EvictorIteratorPtr + virtual EvictorIteratorPtr getIterator(const std::string& facet, Ice::Int batchSize) { DeactivateController::Guard deactivateGuard(_deactivateController); @@ -170,14 +169,14 @@ public: } protected: - + EvictorI(const Ice::ObjectAdapterPtr& adapter, const std::string& envName, DbEnv* dbEnv, - const std::string& filename, const FacetTypeMap& facetTypes, + const std::string& filename, const FacetTypeMap& facetTypes, const ServantInitializerPtr& initializer, const std::vector<IndexPtr>& indices, bool createDb) : EvictorIBase(adapter, envName, dbEnv, filename, facetTypes, initializer, createDb) { - std::string propertyPrefix = std::string("Freeze.Evictor.") + envName + '.' + filename; - bool populateEmptyIndices = + std::string propertyPrefix = std::string("Freeze.Evictor.") + envName + '.' + filename; + bool populateEmptyIndices = (_communicator->getProperties()-> getPropertyAsIntWithDefault(propertyPrefix + ".PopulateEmptyIndices", 0) != 0); @@ -187,16 +186,16 @@ protected: // (2) open ObjectStores without indices // std::vector<std::string> dbs = allDbs(); - + // // Add default db in case it's not there // dbs.push_back(defaultDb); - + for(std::vector<IndexPtr>::const_iterator i = indices.begin(); i != indices.end(); ++i) { std::string facet = (*i)->facet(); - + typename StoreMap::iterator q = _storeMap.find(facet); if(q == _storeMap.end()) { @@ -204,7 +203,7 @@ protected: // New db // std::vector<IndexPtr> storeIndices; - + for(std::vector<IndexPtr>::const_iterator r = i; r != indices.end(); ++r) { if((*r)->facet() == facet) @@ -222,7 +221,7 @@ protected: _storeMap.insert(typename StoreMap::value_type(facet, store)); } } - + for(std::vector<std::string>::iterator p = dbs.begin(); p != dbs.end(); ++p) { std::string facet = *p; @@ -231,13 +230,13 @@ protected: facet = ""; } #if (defined(_MSC_VER) && (_MSC_VER >= 1600)) - std::pair<typename StoreMap::iterator, bool> ir = + std::pair<typename StoreMap::iterator, bool> ir = _storeMap.insert(typename StoreMap::value_type(facet, static_cast<ObjectStore<T>*>(nullptr))); #else - std::pair<typename StoreMap::iterator, bool> ir = + std::pair<typename StoreMap::iterator, bool> ir = _storeMap.insert(typename StoreMap::value_type(facet, 0)); #endif - + if(ir.second) { std::string facetType; @@ -252,7 +251,7 @@ protected: } } - ObjectStore<T>* + ObjectStore<T>* findStore(const std::string& facet, bool createIt) { Lock sync(*this); @@ -276,7 +275,7 @@ protected: } return os; } - + void closeDbEnv() { @@ -284,7 +283,7 @@ protected: { delete (*p).second; } - + _dbEnv = 0; _initializer = 0; } @@ -306,7 +305,7 @@ EvictorIBase::communicator() const return _communicator; } -inline const Ice::EncodingVersion& +inline const Ice::EncodingVersion& EvictorIBase::encoding() const { return _encoding; diff --git a/cpp/src/Glacier2/RouterI.h b/cpp/src/Glacier2/RouterI.h index 76a2e5c52a2..5c2f7126360 100644 --- a/cpp/src/Glacier2/RouterI.h +++ b/cpp/src/Glacier2/RouterI.h @@ -14,7 +14,6 @@ #include <Glacier2/Router.h> #include <Glacier2/ClientBlobject.h> #include <Glacier2/ServerBlobject.h> -#include <IceUtil/DisableWarnings.h> namespace Glacier2 { @@ -34,7 +33,7 @@ public: RouterI(const InstancePtr&, const Ice::ConnectionPtr&, const std::string&, const SessionPrx&, const Ice::Identity&, const FilterManagerPtr&, const Ice::Context&); - + virtual ~RouterI(); void destroy(const Callback_Session_destroyPtr&); @@ -43,7 +42,7 @@ public: virtual Ice::ObjectPrx getServerProxy(const Ice::Current& = Ice::Current()) const; virtual Ice::ObjectProxySeq addProxies(const Ice::ObjectProxySeq&, const Ice::Current&); virtual std::string getCategoryForClient(const Ice::Current&) const; - virtual void createSession_async(const AMD_Router_createSessionPtr&, const std::string&, const std::string&, + virtual void createSession_async(const AMD_Router_createSessionPtr&, const std::string&, const std::string&, const Ice::Current&); virtual void createSessionFromSecureConnection_async(const AMD_Router_createSessionFromSecureConnectionPtr&, const Ice::Current&); @@ -81,7 +80,7 @@ private: const Ice::Context _context; const IceUtil::Mutex _timestampMutex; mutable IceUtil::Time _timestamp; - + Glacier2::Instrumentation::SessionObserverPtr _observer; }; diff --git a/cpp/src/Glacier2/SessionRouterI.h b/cpp/src/Glacier2/SessionRouterI.h index e630640528e..10b784fdadb 100644 --- a/cpp/src/Glacier2/SessionRouterI.h +++ b/cpp/src/Glacier2/SessionRouterI.h @@ -12,7 +12,6 @@ #include <IceUtil/Thread.h> #include <IceUtil/Monitor.h> -#include <IceUtil/DisableWarnings.h> #include <Ice/Ice.h> @@ -40,7 +39,7 @@ typedef IceUtil::Handle<CreateSession> CreateSessionPtr; class Instance; typedef IceUtil::Handle<Instance> InstancePtr; - + class ClientBlobject; typedef IceUtil::Handle<ClientBlobject> ClientBlobjectPtr; @@ -63,7 +62,7 @@ public: void unexpectedCreateSessionException(const Ice::Exception&); void exception(const Ice::Exception&); - + void createException(const Ice::Exception&); virtual void authorize() = 0; @@ -90,8 +89,8 @@ typedef IceUtil::Handle<UserPasswordCreateSession> UserPasswordCreateSessionPtr; class SSLCreateSession; typedef IceUtil::Handle<SSLCreateSession> SSLCreateSessionPtr; -class SessionRouterI : public Router, - public Glacier2::Instrumentation::ObserverUpdater, +class SessionRouterI : public Router, + public Glacier2::Instrumentation::ObserverUpdater, private IceUtil::Monitor<IceUtil::Mutex> { public: @@ -105,7 +104,7 @@ public: virtual Ice::ObjectPrx getServerProxy(const Ice::Current&) const; virtual Ice::ObjectProxySeq addProxies(const Ice::ObjectProxySeq&, const Ice::Current&); virtual std::string getCategoryForClient(const Ice::Current&) const; - virtual void createSession_async(const AMD_Router_createSessionPtr&, const std::string&, const std::string&, + virtual void createSession_async(const AMD_Router_createSessionPtr&, const std::string&, const std::string&, const Ice::Current&); virtual void createSessionFromSecureConnection_async(const AMD_Router_createSessionFromSecureConnectionPtr&, const Ice::Current&); @@ -127,10 +126,10 @@ public: void destroySession(const ::Ice::ConnectionPtr&); int sessionTraceLevel() const { return _sessionTraceLevel; } - + private: - RouterIPtr getRouterImpl(const Ice::ConnectionPtr&, const Ice::Identity&, bool) const; + RouterIPtr getRouterImpl(const Ice::ConnectionPtr&, const Ice::Identity&, bool) const; void sessionDestroyException(const Ice::Exception&); @@ -176,9 +175,9 @@ private: mutable std::map<std::string, RouterIPtr>::iterator _routersByCategoryHint; std::map<Ice::ConnectionPtr, CreateSessionPtr> _pending; - + Callback_Session_destroyPtr _sessionDestroyCallback; - + bool _destroy; }; diff --git a/cpp/src/Glacier2Lib/SessionHelper.cpp b/cpp/src/Glacier2Lib/SessionHelper.cpp index 68b01fc1cf5..0ebfeaa98aa 100644 --- a/cpp/src/Glacier2Lib/SessionHelper.cpp +++ b/cpp/src/Glacier2Lib/SessionHelper.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Glacier2/SessionHelper.h> #include <IceUtil/IceUtil.h> diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp index 6ddd5544c91..985acb23aa9 100644 --- a/cpp/src/Ice/CommunicatorI.cpp +++ b/cpp/src/Ice/CommunicatorI.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Ice/CommunicatorI.h> #include <Ice/Instance.h> #include <Ice/Properties.h> diff --git a/cpp/src/Ice/DefaultsAndOverrides.cpp b/cpp/src/Ice/DefaultsAndOverrides.cpp index 65f01e05e25..cc9cebfe129 100644 --- a/cpp/src/Ice/DefaultsAndOverrides.cpp +++ b/cpp/src/Ice/DefaultsAndOverrides.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Ice/DefaultsAndOverrides.h> #include <Ice/Properties.h> #include <Ice/LoggerUtil.h> diff --git a/cpp/src/Ice/HttpParser.cpp b/cpp/src/Ice/HttpParser.cpp index 7030d187f0a..ab0ae40bcc4 100644 --- a/cpp/src/Ice/HttpParser.cpp +++ b/cpp/src/Ice/HttpParser.cpp @@ -13,8 +13,6 @@ #include <Ice/LocalException.h> #include <IceUtil/StringUtil.h> -#include <IceUtil/DisableWarnings.h> - using namespace std; using namespace Ice; using namespace IceInternal; diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp index 0e286f99c0c..655a37920de 100644 --- a/cpp/src/Ice/Initialize.cpp +++ b/cpp/src/Ice/Initialize.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceUtil/ArgVector.h> #include <Ice/CommunicatorI.h> #include <Ice/PropertiesI.h> diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index f1c18496a1c..72455275be9 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -7,8 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> - #include <Ice/Instance.h> #include <Ice/TraceLevels.h> #include <Ice/DefaultsAndOverrides.h> diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp index 23cccd2708a..14eb27f7693 100644 --- a/cpp/src/Ice/Outgoing.cpp +++ b/cpp/src/Ice/Outgoing.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Ice/Outgoing.h> #include <Ice/ConnectionI.h> #include <Ice/CollocatedRequestHandler.h> diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp index 5814896e72d..ee1e6d5a437 100644 --- a/cpp/src/Ice/OutgoingAsync.cpp +++ b/cpp/src/Ice/OutgoingAsync.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Ice/OutgoingAsync.h> #include <Ice/ConnectionI.h> #include <Ice/CollocatedRequestHandler.h> diff --git a/cpp/src/Ice/PropertiesAdminI.cpp b/cpp/src/Ice/PropertiesAdminI.cpp index a471989e1aa..58095fbf0dc 100644 --- a/cpp/src/Ice/PropertiesAdminI.cpp +++ b/cpp/src/Ice/PropertiesAdminI.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Ice/PropertiesAdminI.h> #include <Ice/Logger.h> #include <Ice/LoggerUtil.h> @@ -15,7 +14,7 @@ using namespace std; using namespace Ice; -namespace +namespace { const char* traceCategory = "Admin.Properties"; @@ -49,11 +48,11 @@ PropertiesAdminI::setProperties_async(const AMD_PropertiesAdmin_setPropertiesPtr const Current&) { Lock sync(*this); - + PropertyDict old = _properties->getPropertiesForPrefix(""); PropertyDict::const_iterator p; const int traceLevel = _properties->getPropertyAsInt("Ice.Trace.Admin.Properties"); - + // // Compute the difference between the new property set and the existing property set: // @@ -99,13 +98,13 @@ PropertiesAdminI::setProperties_async(const AMD_PropertiesAdmin_setPropertiesPtr } } } - + if(traceLevel > 0 && (!added.empty() || !changed.empty() || !removed.empty())) { Trace out(_logger, traceCategory); - + out << "Summary of property changes"; - + if(!added.empty()) { out << "\nNew properties:"; diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp index ab5cc69a6ef..83c120f5607 100644 --- a/cpp/src/Ice/PropertiesI.cpp +++ b/cpp/src/Ice/PropertiesI.cpp @@ -8,7 +8,6 @@ // ********************************************************************** #include <Ice/PropertiesI.h> -#include <IceUtil/DisableWarnings.h> #include <IceUtil/StringUtil.h> #include <IceUtil/FileUtil.h> #include <Ice/Initialize.h> @@ -66,7 +65,7 @@ Int Ice::PropertiesI::getPropertyAsIntWithDefault(const string& key, Int value) { IceUtil::Mutex::Lock sync(*this); - + map<string, PropertyValue>::iterator p = _properties.find(key); if(p != _properties.end()) { @@ -94,7 +93,7 @@ Ice::StringSeq Ice::PropertiesI::getPropertyAsListWithDefault(const string& key, const StringSeq& value) { IceUtil::Mutex::Lock sync(*this); - + map<string, PropertyValue>::iterator p = _properties.find(key); if(p != _properties.end()) { @@ -160,7 +159,7 @@ Ice::PropertiesI::setProperty(const string& key, const string& value) for(int i = 0 ; IceInternal::PropertyNames::validProps[i].properties != 0; ++i) { string pattern(IceInternal::PropertyNames::validProps[i].properties[0].pattern); - + dotPos = pattern.find('.'); // @@ -169,7 +168,7 @@ Ice::PropertiesI::setProperty(const string& key, const string& value) // dot is an error. // assert(dotPos != string::npos); - + bool mismatchCase = false; string otherKey; string propPrefix = pattern.substr(0, dotPos); @@ -193,8 +192,8 @@ Ice::PropertiesI::setProperty(const string& key, const string& value) currentKey = prop.deprecatedBy; } } - - if(!found && IceUtilInternal::match(IceUtilInternal::toUpper(currentKey), + + if(!found && IceUtilInternal::match(IceUtilInternal::toUpper(currentKey), IceUtilInternal::toUpper(prop.pattern))) { found = true; @@ -258,19 +257,19 @@ Ice::PropertiesI::parseCommandLineOptions(const string& prefix, const StringSeq& pfx += '.'; } pfx = "--" + pfx; - + StringSeq result; for(StringSeq::size_type i = 0; i < options.size(); i++) { string opt = options[i]; - + if(opt.find(pfx) == 0) { if(opt.find('=') == string::npos) { opt += "=1"; } - + parseLine(opt.substr(2), 0); } else @@ -317,7 +316,7 @@ Ice::PropertiesI::load(const std::string& file) DWORD numValues; try { - err = RegQueryInfoKey(iceKey, NULL, NULL, NULL, NULL, NULL, NULL, &numValues, &maxNameSize, &maxDataSize, + err = RegQueryInfoKey(iceKey, NULL, NULL, NULL, NULL, NULL, NULL, &numValues, &maxNameSize, &maxDataSize, NULL, NULL); if(err != ERROR_SUCCESS) { @@ -417,10 +416,10 @@ Ice::PropertiesI::load(const std::string& file) // if(firstLine) { - const unsigned char UTF8_BOM[3] = {0xEF, 0xBB, 0xBF}; + const unsigned char UTF8_BOM[3] = {0xEF, 0xBB, 0xBF}; if(line.size() >= 3 && static_cast<const unsigned char>(line[0]) == UTF8_BOM[0] && - static_cast<const unsigned char>(line[1]) == UTF8_BOM[1] && + static_cast<const unsigned char>(line[1]) == UTF8_BOM[1] && static_cast<const unsigned char>(line[2]) == UTF8_BOM[2]) { line = line.substr(3); @@ -541,7 +540,7 @@ Ice::PropertiesI::parseLine(const string& line, const IceUtil::StringConverterPt { string key; string value; - + enum ParseState { Key , Value }; ParseState state = Key; @@ -568,7 +567,7 @@ Ice::PropertiesI::parseLine(const string& line, const IceUtil::StringConverterPt case '=': key += whitespace; whitespace.clear(); - key += c; + key += c; break; case ' ': @@ -611,7 +610,7 @@ Ice::PropertiesI::parseLine(const string& line, const IceUtil::StringConverterPt case '#': finished = true; break; - + default: key += whitespace; whitespace.clear(); @@ -637,7 +636,7 @@ Ice::PropertiesI::parseLine(const string& line, const IceUtil::StringConverterPt value += value.length() == 0 ? escapedspace : whitespace; whitespace.clear(); escapedspace.clear(); - value += c; + value += c; break; case ' ': @@ -674,7 +673,7 @@ Ice::PropertiesI::parseLine(const string& line, const IceUtil::StringConverterPt case '#': finished = true; break; - + default: value += value.length() == 0 ? escapedspace : whitespace; whitespace.clear(); diff --git a/cpp/src/Ice/TcpTransceiver.cpp b/cpp/src/Ice/TcpTransceiver.cpp index 4fa6d0bce2d..703679df189 100644 --- a/cpp/src/Ice/TcpTransceiver.cpp +++ b/cpp/src/Ice/TcpTransceiver.cpp @@ -14,8 +14,6 @@ #include <Ice/Buffer.h> #include <Ice/LocalException.h> -#include <IceUtil/DisableWarnings.h> - using namespace std; using namespace Ice; using namespace IceInternal; diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index b2e7883c325..f7c25cc20f4 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -8,7 +8,6 @@ // ********************************************************************** #include <Ice/ThreadPool.h> -#include <IceUtil/DisableWarnings.h> #include <Ice/EventHandler.h> #include <Ice/Network.h> #include <Ice/LocalException.h> @@ -40,7 +39,7 @@ public: ShutdownWorkItem(const InstancePtr& instance) : _instance(instance) { } - + virtual void execute(ThreadPoolCurrent& current) { @@ -51,9 +50,9 @@ public: } catch(const CommunicatorDestroyedException&) { - } + } } - + private: const InstancePtr _instance; @@ -66,13 +65,13 @@ public: FinishedWorkItem(const EventHandlerPtr& handler, bool close) : _handler(handler), _close(close) { } - + virtual void execute(ThreadPoolCurrent& current) { _handler->finished(current, _close); } - + private: const EventHandlerPtr _handler; @@ -133,11 +132,11 @@ class ThreadPoolDestroyedException } -IceInternal::DispatchWorkItem::DispatchWorkItem() +IceInternal::DispatchWorkItem::DispatchWorkItem() { } -IceInternal::DispatchWorkItem::DispatchWorkItem(const Ice::ConnectionPtr& connection) : _connection(connection) +IceInternal::DispatchWorkItem::DispatchWorkItem(const Ice::ConnectionPtr& connection) : _connection(connection) { } @@ -152,7 +151,7 @@ IceInternal::ThreadPoolWorkQueue::ThreadPoolWorkQueue(const InstancePtr& instanc _instance(instance), _selector(selector), _destroyed(false) -#ifdef ICE_USE_IOCP +#ifdef ICE_USE_IOCP , _info(SocketOperationRead) #endif { @@ -181,7 +180,7 @@ IceInternal::ThreadPoolWorkQueue::~ThreadPoolWorkQueue() Error out(_instance->initializationData().logger); out << "exception in selector while calling closeSocket():\n" << ex; } - + try { closeSocket(_fdIntrWrite); @@ -242,7 +241,7 @@ void IceInternal::ThreadPoolWorkQueue::message(ThreadPoolCurrent& current) { ThreadPoolWorkItemPtr workItem; - { + { Lock sync(*this); if(!_workItems.empty()) { @@ -267,7 +266,7 @@ IceInternal::ThreadPoolWorkQueue::message(ThreadPoolCurrent& current) { continue; } - + SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; @@ -345,7 +344,7 @@ IceInternal::ThreadPoolWorkQueue::postMessage() { continue; } - + SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; @@ -387,7 +386,7 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p int nProcessors = sysInfo.dwNumberOfProcessors; # else int nProcessors = static_cast<int>(sysconf(_SC_NPROCESSORS_ONLN)); -# endif +# endif #endif // @@ -416,7 +415,7 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p out << _prefix << ".SizeMax < " << _prefix << ".Size; SizeMax adjusted to Size (" << size << ")"; sizeMax = size; } - + int sizeWarn = properties->getPropertyAsInt(_prefix + ".SizeWarn"); if(sizeWarn != 0 && sizeWarn < size) { @@ -461,7 +460,7 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p stackSize = 0; } const_cast<size_t&>(_stackSize) = static_cast<size_t>(stackSize); - + const_cast<bool&>(_hasPriority) = properties->getProperty(_prefix + ".ThreadPriority") != ""; const_cast<int&>(_priority) = properties->getPropertyAsInt(_prefix + ".ThreadPriority"); if(!_hasPriority) @@ -469,7 +468,7 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p const_cast<bool&>(_hasPriority) = properties->getProperty("Ice.ThreadPriority") != ""; const_cast<int&>(_priority) = properties->getPropertyAsInt("Ice.ThreadPriority"); } - + _workQueue = new ThreadPoolWorkQueue(_instance, _selector); if(_instance->traceLevels()->threadPool >= 1) @@ -525,11 +524,11 @@ void IceInternal::ThreadPool::destroy() { Lock sync(*this); - if(_destroyed) + if(_destroyed) { return; } - + _destroyed = true; _workQueue->destroy(); } @@ -568,7 +567,7 @@ IceInternal::ThreadPool::update(const EventHandlerPtr& handler, SocketOperation { return; } - + _selector.update(handler.get(), remove, add); #if !defined(ICE_USE_IOCP) && !defined(ICE_OS_WINRT) if(add & SocketOperationRead && handler->_hasMoreData && !(handler->_disabled & SocketOperationRead)) @@ -640,7 +639,7 @@ IceInternal::ThreadPool::dispatchFromThisThread(const DispatchWorkItemPtr& workI else { workItem->run(); - } + } } void @@ -699,7 +698,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread) catch(const exception& ex) { Error out(_instance->initializationData().logger); - out << "exception in `" << _prefix << "':\n" << ex << "\nevent handler: " + out << "exception in `" << _prefix << "':\n" << ex << "\nevent handler: " << current._handler->toString(); } catch(...) @@ -759,7 +758,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread) if(!current._ioCompleted) { // - // The handler didn't call ioCompleted() so we take care of decreasing + // The handler didn't call ioCompleted() so we take care of decreasing // the IO thread count now. // --_inUseIO; @@ -831,9 +830,9 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread) if(!current._handler) { // - // If there are no more ready handlers and there are still threads busy performing + // If there are no more ready handlers and there are still threads busy performing // IO, we give up leadership and promote another follower (which will perform the - // select() only once all the IOs are completed). Otherwise, if there are no more + // select() only once all the IOs are completed). Otherwise, if there are no more // threads peforming IOs, it's time to do another select(). // if(_inUseIO > 0) @@ -881,7 +880,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread) if(_sizeMax > 1) { Lock sync(*this); - + if(_destroyed) { continue; @@ -904,14 +903,14 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread) _threads.erase(thread); _workQueue->queue(new JoinThreadWorkItem(thread)); return; - } + } else if(_inUse > 0) { // // If this is the last idle thread but there are still other threads // busy dispatching, we go back waiting with _threadIdleTime. We only // wait with _serverIdleTime when there's only one thread left. - // + // continue; } assert(_threads.size() == 1); @@ -964,7 +963,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread) // because the wide string is using the platform default encoding. // Error out(_instance->initializationData().logger); - out << "exception in `" << _prefix << "':\n" + out << "exception in `" << _prefix << "':\n" << IceUtil::wstringToString(ex->Message->Data(), _instance->getStringConverter()) << "\nevent handler: " << current._handler->toString(); } @@ -999,7 +998,7 @@ IceInternal::ThreadPool::ioCompleted(ThreadPoolCurrent& current) if(_sizeMax > 1) { - + #if !defined(ICE_USE_IOCP) && !defined(ICE_OS_WINRT) --_inUseIO; @@ -1039,16 +1038,16 @@ IceInternal::ThreadPool::ioCompleted(ThreadPoolCurrent& current) assert(_inUse >= 0); ++_inUse; - + if(_inUse == _sizeWarn) { Warning out(_instance->initializationData().logger); out << "thread pool `" << _prefix << "' is running low on threads\n" << "Size=" << _size << ", " << "SizeMax=" << _sizeMax << ", " << "SizeWarn=" << _sizeWarn; } - + if(!_destroyed) - { + { assert(_inUse <= static_cast<int>(_threads.size())); if(_inUse < _sizeMax && _inUse == static_cast<int>(_threads.size())) { @@ -1057,7 +1056,7 @@ IceInternal::ThreadPool::ioCompleted(ThreadPoolCurrent& current) Trace out(_instance->initializationData().logger, _instance->traceLevels()->threadPoolCat); out << "growing " << _prefix << ": Size=" << _threads.size() + 1; } - + try { EventHandlerThreadPtr thread = new EventHandlerThread(this, nextThreadId()); @@ -1195,7 +1194,7 @@ bool IceInternal::ThreadPool::followerWait(ThreadPoolCurrent& current) { assert(!current._leader); - + current._thread->setState(ThreadStateIdle); // @@ -1216,7 +1215,7 @@ IceInternal::ThreadPool::followerWait(ThreadPoolCurrent& current) { if(!timedWait(IceUtil::Time::seconds(_threadIdleTime))) { - if(!_destroyed && (!_promote || _inUseIO == _sizeIO || + if(!_destroyed && (!_promote || _inUseIO == _sizeIO || (_nextHandler == _handlers.end() && _inUseIO > 0))) { if(_instance->traceLevels()->threadPool >= 1) @@ -1246,7 +1245,7 @@ string IceInternal::ThreadPool::nextThreadId() { ostringstream os; - os << _prefix << "-" << _nextThreadId++; + os << _prefix << "-" << _nextThreadId++; return os.str(); } @@ -1316,7 +1315,7 @@ IceInternal::ThreadPool::EventHandlerThread::run() catch(...) { Error out(_pool->_instance->initializationData().logger); - out << "unknown exception in `" << _pool->_prefix << "'"; + out << "unknown exception in `" << _pool->_prefix << "'"; } _observer.detach(); @@ -1342,12 +1341,12 @@ IceInternal::ThreadPool::EventHandlerThread::run() _pool = 0; // Break cyclic dependency. } -ThreadPoolCurrent::ThreadPoolCurrent(const InstancePtr& instance, +ThreadPoolCurrent::ThreadPoolCurrent(const InstancePtr& instance, const ThreadPoolPtr& threadPool, const ThreadPool::EventHandlerThreadPtr& thread) : - operation(SocketOperationNone), - stream(instance.get(), Ice::currentProtocolEncoding), - _threadPool(threadPool.get()), + operation(SocketOperationNone), + stream(instance.get(), Ice::currentProtocolEncoding), + _threadPool(threadPool.get()), _thread(thread), _ioCompleted(false) #if !defined(ICE_USE_IOCP) && !defined(ICE_OS_WINRT) diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp index daf1a051456..b0392ad9cfd 100644 --- a/cpp/src/Ice/UdpTransceiver.cpp +++ b/cpp/src/Ice/UdpTransceiver.cpp @@ -17,8 +17,6 @@ #include <Ice/Properties.h> #include <IceUtil/StringUtil.h> -#include <IceUtil/DisableWarnings.h> - #ifdef ICE_OS_WINRT # include <ppltasks.h> // For Concurrency::task #endif diff --git a/cpp/src/Ice/WSTransceiver.cpp b/cpp/src/Ice/WSTransceiver.cpp index a1f27ef48a8..ccb3c6c7ff3 100644 --- a/cpp/src/Ice/WSTransceiver.cpp +++ b/cpp/src/Ice/WSTransceiver.cpp @@ -21,8 +21,6 @@ #include <IceUtil/SHA1.h> #include <IceUtil/StringUtil.h> -#include <IceUtil/DisableWarnings.h> - // Python 2.7 under Windows. #if _MSC_VER == 1500 typedef unsigned short uint16_t; diff --git a/cpp/src/Ice/winrt/StreamTransceiver.cpp b/cpp/src/Ice/winrt/StreamTransceiver.cpp index 76a0f3fb7f0..54a29035feb 100644 --- a/cpp/src/Ice/winrt/StreamTransceiver.cpp +++ b/cpp/src/Ice/winrt/StreamTransceiver.cpp @@ -18,8 +18,6 @@ #include <IceSSL/EndpointInfo.h> #include <IceSSL/ConnectionInfo.h> -#include <IceUtil/DisableWarnings.h> - using namespace std; using namespace Ice; using namespace IceInternal; diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp index 6b06cbc3d5d..57be048b99c 100644 --- a/cpp/src/IceGrid/Activator.cpp +++ b/cpp/src/IceGrid/Activator.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceUtil/ArgVector.h> #include <IceUtil/FileUtil.h> #include <Ice/Ice.h> @@ -62,14 +61,14 @@ public: { } - virtual + virtual void run() { _activator.runTerminationListener(); } private: - + Activator& _activator; }; @@ -336,7 +335,7 @@ Activator::Activator(const TraceLevelsPtr& traceLevels) : Activator::~Activator() { assert(!_thread); - + #ifdef _WIN32 if(_hIntr != NULL) { @@ -352,7 +351,7 @@ int Activator::activate(const string& name, const string& exePath, const string& pwdPath, -#ifndef _WIN32 +#ifndef _WIN32 uid_t uid, gid_t gid, #endif @@ -385,7 +384,7 @@ Activator::activate(const string& name, wchar_t absbuf[_MAX_PATH]; wchar_t* fPart; wstring ext = path.size() <= 4 || path[path.size() - 4] != '.' ? L".exe" : L""; - + // // IceGrid doesn't support to use string converters, so don't need to use // any string converter in wstringToString conversions. @@ -579,7 +578,7 @@ Activator::activate(const string& name, STARTUPINFOW si; ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); - + PROCESS_INFORMATION pi; ZeroMemory(&pi, sizeof(pi)); BOOL b = CreateProcessW( @@ -612,15 +611,15 @@ Activator::activate(const string& name, process.hnd = pi.hProcess; process.server = server; map<string, Process>::iterator it = _processes.insert(make_pair(name, process)).first; - + Process* pp = &it->second; - if(!RegisterWaitForSingleObject(&pp->waithnd, pp->hnd, activatorWaitCallback, pp, INFINITE, + if(!RegisterWaitForSingleObject(&pp->waithnd, pp->hnd, activatorWaitCallback, pp, INFINITE, WT_EXECUTEDEFAULT | WT_EXECUTEONLYONCE)) { throw IceUtilInternal::lastErrorToString(); } - // + // // Don't print the following trace, this might interfer with the // output of the started process if it fails with an error message. // @@ -647,14 +646,14 @@ Activator::activate(const string& name, ex.error = getSystemErrno(); throw ex; } - + // // Convert to standard argc/argv. // IceUtilInternal::ArgVector av(args); IceUtilInternal::ArgVector env(envs); - + // // Current directory // @@ -720,10 +719,10 @@ Activator::activate(const string& name, { ostringstream os; os << pw->pw_name; - reportChildError(getSystemErrno(), errorFds[1], "cannot initialize process supplementary group access list for user", + reportChildError(getSystemErrno(), errorFds[1], "cannot initialize process supplementary group access list for user", os.str().c_str(), _traceLevels); } - + if(setuid(uid) == -1) { ostringstream os; @@ -733,7 +732,7 @@ Activator::activate(const string& name, } // - // Assign a new process group for this process. + // Assign a new process group for this process. // setpgid(0, 0); @@ -758,8 +757,8 @@ Activator::activate(const string& name, // if(putenv(strdup(env.argv[i])) != 0) { - reportChildError(errno, errorFds[1], "cannot set environment variable", env.argv[i], - _traceLevels); + reportChildError(errno, errorFds[1], "cannot set environment variable", env.argv[i], + _traceLevels); } } @@ -820,7 +819,7 @@ Activator::activate(const string& name, if(!message.empty()) { close(fds[0]); - close(errorFds[0]); + close(errorFds[0]); waitPid(pid); throw message; } @@ -836,14 +835,14 @@ Activator::activate(const string& name, process.pipeFd = fds[0]; process.server = server; _processes.insert(make_pair(name, process)); - + int flags = fcntl(process.pipeFd, F_GETFL); flags |= O_NONBLOCK; fcntl(process.pipeFd, F_SETFL, flags); setInterrupt(); - // + // // Don't print the following trace, this might interfere with the // output of the started process if it fails with an error message. // @@ -868,10 +867,10 @@ public: ShutdownCallback(const ActivatorPtr& activator, const string& name, const TraceLevelsPtr& traceLevels) : _activator(activator), _name(name), _traceLevels(traceLevels) { - + } - virtual void + virtual void exception(const Ice::Exception& ex) { Ice::Warning out(_traceLevels->logger); @@ -884,7 +883,7 @@ public: } private: - + const ActivatorPtr _activator; const string _name; const TraceLevelsPtr _traceLevels; @@ -988,16 +987,16 @@ Activator::sendSignal(const string& name, int signal) ex.error = getSystemErrno(); throw ex; } - + TerminateProcess(hnd, 0); // We use 0 for the exit code to make sure it's not considered as a crash. - + CloseHandle(hnd); - + if(_traceLevels->activator > 1) { Ice::Trace out(_traceLevels->logger, _traceLevels->activatorCat); out << "terminated server `" << name << "' (pid = " << pid << ")"; - } + } } else { @@ -1059,7 +1058,7 @@ Activator::shutdown() { IceUtil::Monitor< IceUtil::Mutex>::Lock sync(*this); // - // Deactivation has been initiated. Set _deactivating to true to + // Deactivation has been initiated. Set _deactivating to true to // prevent activation of new processes. This will also cause the // termination listener thread to stop when there are no more // active processes. @@ -1193,7 +1192,7 @@ Activator::terminationListener() _terminated.clear(); deactivated = _deactivating && _processes.empty(); } - + for(vector<Process>::const_iterator p = terminated.begin(); p != terminated.end(); ++p) { UnregisterWait(p->waithnd); @@ -1237,7 +1236,7 @@ Activator::terminationListener() int maxFd = _fdIntrRead; FD_ZERO(&fdSet); FD_SET(_fdIntrRead, &fdSet); - + { IceUtil::Monitor< IceUtil::Mutex>::Lock sync(*this); @@ -1251,11 +1250,11 @@ Activator::terminationListener() } } } - + repeatSelect: int ret = ::select(maxFd + 1, &fdSet, 0, 0, 0); assert(ret != 0); - + if(ret == -1) { #ifdef EPROTO @@ -1269,17 +1268,17 @@ Activator::terminationListener() goto repeatSelect; } #endif - + SyscallException ex(__FILE__, __LINE__); ex.error = getSystemErrno(); throw ex; } - + vector<Process> terminated; bool deactivated = false; { IceUtil::Monitor< IceUtil::Mutex>::Lock sync(*this); - + if(FD_ISSET(_fdIntrRead, &fdSet)) { clearInterrupt(); @@ -1289,12 +1288,12 @@ Activator::terminationListener() return; } } - + map<string, Process>::iterator p = _processes.begin(); while(p != _processes.end()) { int fd = p->second.pipeFd; - if(!FD_ISSET(fd, &fdSet)) + if(!FD_ISSET(fd, &fdSet)) { ++p; continue; @@ -1332,13 +1331,13 @@ Activator::terminationListener() ++p; } else if(rs == 0) - { + { // // If the pipe was closed, the process has terminated. // terminated.push_back(p->second); - + close(p->second.pipeFd); _processes.erase(p++); } @@ -1349,7 +1348,7 @@ Activator::terminationListener() // deactivated = _deactivating && _processes.empty(); } - + for(vector<Process>::const_iterator p = terminated.begin(); p != terminated.end(); ++p) { int status = waitPid(p->pid); @@ -1434,15 +1433,15 @@ Activator::waitPid(pid_t processPid) if(pid < 0) { // - // Some Linux distribution have a bogus waitpid() (e.g.: CentOS 4.x). It doesn't - // block and reports an incorrect ECHILD error on the first call. We sleep a + // Some Linux distribution have a bogus waitpid() (e.g.: CentOS 4.x). It doesn't + // block and reports an incorrect ECHILD error on the first call. We sleep a // little and retry to work around this issue (it appears from testing that a // single retry is enough but to make sure we retry up to 10 times before to throw.) // if(errno == ECHILD && nRetry < 10) { // Wait 1ms, 11ms, 21ms, etc. - IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(nRetry * 10 + 1)); + IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(nRetry * 10 + 1)); ++nRetry; continue; } diff --git a/cpp/src/IceGrid/AdminI.cpp b/cpp/src/IceGrid/AdminI.cpp index 3f095fda06c..3163c2dfcd4 100644 --- a/cpp/src/IceGrid/AdminI.cpp +++ b/cpp/src/IceGrid/AdminI.cpp @@ -14,8 +14,6 @@ #include <Ice/TraceUtil.h> #include <Ice/SliceChecksums.h> -#include <IceUtil/DisableWarnings.h> - #include <IceGrid/AdminI.h> #include <IceGrid/RegistryI.h> #include <IceGrid/Database.h> @@ -49,15 +47,15 @@ public: } } - ServerProxyWrapper(const ServerProxyWrapper& wrapper) : - _id(wrapper._id), - _proxy(wrapper._proxy), + ServerProxyWrapper(const ServerProxyWrapper& wrapper) : + _id(wrapper._id), + _proxy(wrapper._proxy), _activationTimeout(wrapper._activationTimeout), _deactivationTimeout(wrapper._deactivationTimeout), _node(wrapper._node) { } - + void useActivationTimeout() { @@ -70,7 +68,7 @@ public: _proxy = ServerPrx::uncheckedCast(_proxy->ice_invocationTimeout(_deactivationTimeout * 1000)); } - IceProxy::IceGrid::Server* + IceProxy::IceGrid::Server* operator->() const { return _proxy.get(); @@ -118,7 +116,7 @@ public: const TraceLevelsPtr& traceLevels, const string& type, const string& name, - int nodeCount) : + int nodeCount) : PatcherFeedbackAggregator(id, traceLevels, type, name, nodeCount), _cb(cb) { @@ -126,13 +124,13 @@ public: private: - void + void response() { _cb->ice_response(); } - - void + + void exception(const Ice::Exception& ex) { _cb->ice_exception(ex); @@ -143,13 +141,13 @@ private: template<typename AmdCB> PatcherFeedbackAggregatorPtr -static newPatcherFeedback(const AmdCB& cb, +static newPatcherFeedback(const AmdCB& cb, Ice::Identity id, const TraceLevelsPtr& traceLevels, const string& type, const string& name, int nodeCount) -{ +{ return new AMDPatcherFeedbackAggregator<AmdCB>(cb, id, traceLevels, type, name, nodeCount); } @@ -238,9 +236,9 @@ AdminI::instantiateServer(const string& app, const string& node, const ServerIns } void -AdminI::patchApplication_async(const AMD_Admin_patchApplicationPtr& amdCB, - const string& name, - bool shutdown, +AdminI::patchApplication_async(const AMD_Admin_patchApplicationPtr& amdCB, + const string& name, + bool shutdown, const Current& current) { ApplicationHelper helper(current.adapter->getCommunicator(), _database->getApplicationInfo(name).descriptor); @@ -258,7 +256,7 @@ AdminI::patchApplication_async(const AMD_Admin_patchApplicationPtr& amdCB, id.category = current.id.category; id.name = IceUtil::generateUUID(); - PatcherFeedbackAggregatorPtr feedback = + PatcherFeedbackAggregatorPtr feedback = newPatcherFeedback(amdCB, id, _traceLevels, "application", name, static_cast<int>(nodes.size())); for(vector<string>::const_iterator p = nodes.begin(); p != nodes.end(); ++p) @@ -274,7 +272,7 @@ AdminI::patchApplication_async(const AMD_Admin_patchApplicationPtr& amdCB, NodeEntryPtr node = _database->getNode(*p); Resolver resolve(node->getInfo(), _database->getCommunicator()); DistributionDescriptor desc = resolve(appDistrib); - InternalDistributionDescriptorPtr intAppDistrib = new InternalDistributionDescriptor(desc.icepatch, + InternalDistributionDescriptorPtr intAppDistrib = new InternalDistributionDescriptor(desc.icepatch, desc.directories); node->getSession()->patch(feedback, name, "", intAppDistrib, shutdown); } @@ -462,9 +460,9 @@ AdminI::startServer_async(const AMD_Admin_startServerPtr& amdCB, const string& i // // Since the server might take a while to be activated, we use AMI. - // - proxy->begin_start(newCallback_Server_start(new StartCB(proxy, amdCB), - &StartCB::response, + // + proxy->begin_start(newCallback_Server_start(new StartCB(proxy, amdCB), + &StartCB::response, &StartCB::exception)); } @@ -516,12 +514,12 @@ AdminI::stopServer_async(const AMD_Admin_stopServerPtr& amdCB, const string& id, { ServerProxyWrapper proxy(_database, id); proxy.useDeactivationTimeout(); - + // // Since the server might take a while to be deactivated, we use AMI. - // - proxy->begin_stop(newCallback_Server_stop(new StopCB(proxy, amdCB), - &StopCB::response, + // + proxy->begin_stop(newCallback_Server_stop(new StopCB(proxy, amdCB), + &StopCB::response, &StopCB::exception)); } @@ -548,7 +546,7 @@ AdminI::patchServer_async(const AMD_Admin_patchServerPtr& amdCB, const string& i identity.category = current.id.category; identity.name = IceUtil::generateUUID(); - PatcherFeedbackAggregatorPtr feedback = + PatcherFeedbackAggregatorPtr feedback = newPatcherFeedback(amdCB, identity, _traceLevels, "server", id, static_cast<int>(nodes.size())); vector<string>::const_iterator p = nodes.begin(); @@ -563,7 +561,7 @@ AdminI::patchServer_async(const AMD_Admin_patchServerPtr& amdCB, const string& i NodeEntryPtr node = _database->getNode(*p); Resolver resolve(node->getInfo(), _database->getCommunicator()); DistributionDescriptor desc = resolve(appDistrib); - InternalDistributionDescriptorPtr intAppDistrib = new InternalDistributionDescriptor(desc.icepatch, + InternalDistributionDescriptorPtr intAppDistrib = new InternalDistributionDescriptor(desc.icepatch, desc.directories); node->getSession()->patch(feedback, info.application, id, intAppDistrib, shutdown); } @@ -603,7 +601,7 @@ AdminI::getAllServerIds(const Current&) const return _database->getServerCache().getAll(""); } -void +void AdminI::enableServer(const string& id, bool enable, const Ice::Current&) { ServerProxyWrapper proxy(_database, id); @@ -651,7 +649,7 @@ AdminI::getAllAdapterIds(const Current&) const return _database->getAllAdapters(); } -void +void AdminI::addObject(const Ice::ObjectPrx& proxy, const ::Ice::Current& current) { checkIsReadOnly(); @@ -675,7 +673,7 @@ AdminI::addObject(const Ice::ObjectPrx& proxy, const ::Ice::Current& current) } } -void +void AdminI::updateObject(const Ice::ObjectPrx& proxy, const ::Ice::Current&) { checkIsReadOnly(); @@ -697,7 +695,7 @@ AdminI::updateObject(const Ice::ObjectPrx& proxy, const ::Ice::Current&) _database->updateObject(proxy); } -void +void AdminI::addObjectWithType(const Ice::ObjectPrx& proxy, const string& type, const ::Ice::Current&) { checkIsReadOnly(); @@ -722,7 +720,7 @@ AdminI::addObjectWithType(const Ice::ObjectPrx& proxy, const string& type, const _database->addObject(info); } -void +void AdminI::removeObject(const Ice::Identity& id, const Ice::Current&) { checkIsReadOnly(); @@ -767,7 +765,7 @@ AdminI::getNodeAdmin(const string& name, const Current& current) const // Check if the node exists // _database->getNode(name); - + Ice::Identity adminId; adminId.name = name; adminId.category = _registry->getNodeAdminCategory(); @@ -812,7 +810,7 @@ AdminI::getNodeLoad(const string& name, const Current&) const ostringstream os; os << ex; throw NodeUnreachableException(name, os.str()); - } + } return LoadInfo(); // Keep the compiler happy. } diff --git a/cpp/src/IceGrid/AdminSessionI.cpp b/cpp/src/IceGrid/AdminSessionI.cpp index 31a991f2872..82d7a5251a4 100644 --- a/cpp/src/IceGrid/AdminSessionI.cpp +++ b/cpp/src/IceGrid/AdminSessionI.cpp @@ -9,7 +9,6 @@ #include <Ice/Ice.h> #include <IceUtil/UUID.h> -#include <IceUtil/DisableWarnings.h> #include <IceGrid/RegistryI.h> #include <IceGrid/AdminSessionI.h> #include <IceGrid/AdminI.h> diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp index 90e52fc3844..d8a406931f4 100644 --- a/cpp/src/IceGrid/RegistryI.cpp +++ b/cpp/src/IceGrid/RegistryI.cpp @@ -7,14 +7,12 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceUtil/UUID.h> #include <IceUtil/FileUtil.h> #include <Ice/Ice.h> #include <Ice/Network.h> #include <Ice/ProtocolPluginFacade.h> // Just to get the hostname - #include <IceStorm/Service.h> #include <IceSSL/IceSSL.h> #include <Glacier2/PermissionsVerifier.h> @@ -974,7 +972,7 @@ RegistryI::createSession(const string& user, const string& password, const Curre SessionIPtr session = _clientSessionFactory->createSessionServant(user, 0); Ice::ObjectPrx proxy = session->_register(_servantManager, current.con); - _reaper->add(new SessionReapableWithHeartbeat<SessionI>(_traceLevels->logger, session), _sessionTimeout, + _reaper->add(new SessionReapableWithHeartbeat<SessionI>(_traceLevels->logger, session), _sessionTimeout, current.con); return SessionPrx::uncheckedCast(proxy); } @@ -1031,7 +1029,7 @@ RegistryI::createAdminSession(const string& user, const string& password, const AdminSessionIPtr session = _adminSessionFactory->createSessionServant(user); Ice::ObjectPrx proxy = session->_register(_servantManager, current.con); - _reaper->add(new SessionReapableWithHeartbeat<AdminSessionI>(_traceLevels->logger, session), _sessionTimeout, + _reaper->add(new SessionReapableWithHeartbeat<AdminSessionI>(_traceLevels->logger, session), _sessionTimeout, current.con); return AdminSessionPrx::uncheckedCast(proxy); } @@ -1097,7 +1095,7 @@ RegistryI::createSessionFromSecureConnection(const Current& current) SessionIPtr session = _clientSessionFactory->createSessionServant(userDN, 0); Ice::ObjectPrx proxy = session->_register(_servantManager, current.con); - _reaper->add(new SessionReapableWithHeartbeat<SessionI>(_traceLevels->logger, session), _sessionTimeout, + _reaper->add(new SessionReapableWithHeartbeat<SessionI>(_traceLevels->logger, session), _sessionTimeout, current.con); return SessionPrx::uncheckedCast(proxy); } diff --git a/cpp/src/IcePatch2Lib/Util.cpp b/cpp/src/IcePatch2Lib/Util.cpp index a1df441be72..b0512e0b1aa 100644 --- a/cpp/src/IcePatch2Lib/Util.cpp +++ b/cpp/src/IcePatch2Lib/Util.cpp @@ -15,7 +15,6 @@ # include <io.h> #endif -#include <IceUtil/DisableWarnings.h> #include <IceUtil/IceUtil.h> #include <IceUtil/StringUtil.h> #include <IceUtil/FileUtil.h> @@ -59,13 +58,13 @@ IcePatch2Internal::toFileInfo(const LargeFileInfo& largeInfo) os << "cannot encode size `" << largeInfo.size << "' for file `" << largeInfo.path << "' as Ice::Int" << endl; throw FileSizeRangeException(os.str()); } - + FileInfo info; info.path = largeInfo.path; info.checksum = largeInfo.checksum; - info.size = static_cast<Ice::Int>(largeInfo.size), + info.size = static_cast<Ice::Int>(largeInfo.size), info.executable = largeInfo.executable; - + return info; } @@ -83,7 +82,7 @@ IcePatch2Internal::toLargeFileInfo(const FileInfo& info) bool IcePatch2Internal::writeFileInfo(FILE* fp, const LargeFileInfo& info) { - int rc = fprintf(fp, "%s\t%s\t%" ICE_INT64_FORMAT "d\t%d\n", + int rc = fprintf(fp, "%s\t%s\t%" ICE_INT64_FORMAT "d\t%d\n", IceUtilInternal::escapeString(info.path, "").c_str(), bytesToString(info.checksum).c_str(), info.size, @@ -252,7 +251,7 @@ IcePatch2Internal::simplify(const string& path) } if(result == "/." || - (result.size() == 4 && IceUtilInternal::isAlpha(result[0]) && result[1] == ':' && + (result.size() == 4 && IceUtilInternal::isAlpha(result[0]) && result[1] == ':' && result[2] == '/' && result[3] == '.')) { return result.substr(0, result.size() - 1); @@ -263,7 +262,7 @@ IcePatch2Internal::simplify(const string& path) result.erase(result.size() - 2, 2); } - if(result == "/" || (result.size() == 3 && IceUtilInternal::isAlpha(result[0]) && result[1] == ':' && + if(result == "/" || (result.size() == 3 && IceUtilInternal::isAlpha(result[0]) && result[1] == ':' && result[2] == '/')) { return result; @@ -287,7 +286,7 @@ IcePatch2Internal::isRoot(const string& pa) { string path = simplify(pa); #ifdef _WIN32 - return path == "/" || path.size() == 3 && IceUtilInternal::isAlpha(path[0]) && path[1] == ':' && + return path == "/" || path.size() == 3 && IceUtilInternal::isAlpha(path[0]) && path[1] == ':' && path[2] == '/'; #else return path == "/"; @@ -633,7 +632,7 @@ IcePatch2Internal::decompressFile(const string& pa) { const string path = simplify(pa); const string pathBZ2 = path + ".bz2"; - + FILE* fp = 0; FILE* stdioFileBZ2 = 0; int bzError; @@ -646,7 +645,7 @@ IcePatch2Internal::decompressFile(const string& pa) { throw "cannot open `" + path + "' for writing:\n" + IceUtilInternal::lastErrorToString(); } - + stdioFileBZ2 = IceUtilInternal::fopen(pathBZ2, "rb"); if(!stdioFileBZ2) { @@ -663,10 +662,10 @@ IcePatch2Internal::decompressFile(const string& pa) } throw ex; } - + const Int numBZ2 = 64 * 1024; Byte bytesBZ2[numBZ2]; - + while(bzError != BZ_STREAM_END) { int sz = BZ2_bzRead(&bzError, bzFile, bytesBZ2, numBZ2); @@ -679,7 +678,7 @@ IcePatch2Internal::decompressFile(const string& pa) } throw ex; } - + if(sz > 0) { long pos = ftell(stdioFileBZ2); @@ -687,14 +686,14 @@ IcePatch2Internal::decompressFile(const string& pa) { throw "cannot get read position for `" + pathBZ2 + "':\n" + IceUtilInternal::lastErrorToString(); } - + if(fwrite(bytesBZ2, sz, 1, fp) != 1) { throw "cannot write to `" + path + "':\n" + IceUtilInternal::lastErrorToString(); } } } - + BZ2_bzReadClose(&bzError, bzFile); bzFile = 0; if(bzError != BZ_OK) @@ -952,7 +951,7 @@ getFileInfoSeqInternal(const string& basePath, const string& relPath, int compre { fclose(stdioFile); } - + IceUtilInternal::close(fd); throw "cannot read from `" + path + "':\n" + IceUtilInternal::lastErrorToString(); } @@ -1020,7 +1019,7 @@ getFileInfoSeqInternal(const string& basePath, const string& relPath, int compre } bool -IcePatch2Internal::getFileInfoSeq(const string& basePath, int compress, GetFileInfoSeqCB* cb, +IcePatch2Internal::getFileInfoSeq(const string& basePath, int compress, GetFileInfoSeqCB* cb, LargeFileInfoSeq& infoSeq) { return getFileInfoSeqSubDir(basePath, ".", compress, cb, infoSeq); @@ -1123,7 +1122,7 @@ IcePatch2Internal::loadFileInfoSeq(const string& pa, LargeFileInfoSeq& infoSeq) { LargeFileInfoSeq remove; LargeFileInfoSeq update; - + while(true) { int c = fgetc(fp); @@ -1157,16 +1156,16 @@ IcePatch2Internal::loadFileInfoSeq(const string& pa, LargeFileInfoSeq& infoSeq) LargeFileInfoSeq newInfoSeq; newInfoSeq.reserve(infoSeq.size()); - + set_difference(infoSeq.begin(), infoSeq.end(), remove.begin(), remove.end(), back_inserter(newInfoSeq), FileInfoLess()); - + infoSeq.swap(newInfoSeq); - + newInfoSeq.clear(); newInfoSeq.reserve(infoSeq.size()); @@ -1176,7 +1175,7 @@ IcePatch2Internal::loadFileInfoSeq(const string& pa, LargeFileInfoSeq& infoSeq) update.end(), back_inserter(newInfoSeq), FileInfoLess()); - + infoSeq.swap(newInfoSeq); saveFileInfoSeq(pa, infoSeq); @@ -1200,7 +1199,7 @@ IcePatch2Internal::getFileTree0(const LargeFileInfoSeq& infoSeq, FileTree0& tree tree1.files.clear(); tree1.checksum.resize(20); - + for(LargeFileInfoSeq::const_iterator p = infoSeq.begin(); p != infoSeq.end(); ++p) { if(i == static_cast<int>(p->checksum[0])) @@ -1218,7 +1217,7 @@ IcePatch2Internal::getFileTree0(const LargeFileInfoSeq& infoSeq, FileTree0& tree copy(p->checksum.begin(), p->checksum.end(), c1); *(c1 + 20) = p->executable; } - + if(!allChecksums1.empty()) { IceUtilInternal::sha1(reinterpret_cast<unsigned char*>(&allChecksums1[0]), allChecksums1.size(), tree1.checksum); diff --git a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp index 2b40c62a4b6..244a79d4c6e 100644 --- a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +++ b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp @@ -21,8 +21,6 @@ #include <Ice/Buffer.h> #include <Ice/LocalException.h> -#include <IceUtil/DisableWarnings.h> - #ifdef ICE_USE_OPENSSL #include <openssl/err.h> @@ -280,7 +278,7 @@ IceSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::B { _verified = true; } - + _engine->verifyPeer(_stream->fd(), _host, NativeConnectionInfoPtr::dynamicCast(getInfo())); if(_engine->securityTraceLevel() >= 1) diff --git a/cpp/src/IceStorm/Admin.cpp b/cpp/src/IceStorm/Admin.cpp index 801789bd80e..cdadde6d569 100644 --- a/cpp/src/IceStorm/Admin.cpp +++ b/cpp/src/IceStorm/Admin.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceUtil/Options.h> #include <Ice/Application.h> #include <Ice/SliceChecksums.h> @@ -50,7 +49,7 @@ void Client::usage() { cerr << "Usage: " << appName() << " [options]\n"; - cerr << + cerr << "Options:\n" "-h, --help Show this message.\n" "-v, --version Display the Ice version.\n" diff --git a/cpp/src/IceStorm/Migrate.cpp b/cpp/src/IceStorm/Migrate.cpp index 1ca4e4f843b..5ff99c17716 100644 --- a/cpp/src/IceStorm/Migrate.cpp +++ b/cpp/src/IceStorm/Migrate.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Freeze/Freeze.h> #include <IceStorm/IceStormInternal.h> @@ -95,7 +94,7 @@ Client::v32migrate(const Freeze::ConnectionPtr& oldCon, SubscriberMap& subscribe subscriberMap.put(SubscriberMap::value_type(key, rec)); string topicName = identityToTopicName(key.topic); - + // Next each link. for(LinkRecordSeq::const_iterator q = p->second.begin(); q != p->second.end(); ++q) { @@ -135,7 +134,7 @@ Client::v31migrate(const Freeze::ConnectionPtr& oldCon, SubscriberMap& subscribe subscriberMap.put(SubscriberMap::value_type(key, rec)); string topicName = identityToTopicName(key.topic); - + // Next each link. for(LinkRecordDict::const_iterator q = p->second.begin(); q != p->second.end(); ++q) { @@ -164,7 +163,7 @@ Client::run(int argc, char* argv[]) usage(); return EXIT_FAILURE; } - + string oldEnvName = argv[1]; string newEnvName = argv[2]; diff --git a/cpp/src/IceStorm/Service.cpp b/cpp/src/IceStorm/Service.cpp index b6e98a87c05..450f765d9e7 100644 --- a/cpp/src/IceStorm/Service.cpp +++ b/cpp/src/IceStorm/Service.cpp @@ -9,8 +9,6 @@ #define ICE_STORM_SERVICE_API_EXPORTS -#include <IceUtil/DisableWarnings.h> - #include <Ice/PluginManagerI.h> // For loadPlugin #include <IceStorm/TopicI.h> diff --git a/cpp/src/IceStorm/TopicI.cpp b/cpp/src/IceStorm/TopicI.cpp index 877fd671be8..d6929510e37 100644 --- a/cpp/src/IceStorm/TopicI.cpp +++ b/cpp/src/IceStorm/TopicI.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceStorm/TopicI.h> #include <IceStorm/Instance.h> #include <IceStorm/Subscriber.h> diff --git a/cpp/src/IceStorm/TopicManagerI.cpp b/cpp/src/IceStorm/TopicManagerI.cpp index b99a73c6eed..bca2b02e5a3 100644 --- a/cpp/src/IceStorm/TopicManagerI.cpp +++ b/cpp/src/IceStorm/TopicManagerI.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceStorm/TopicManagerI.h> #include <IceStorm/TopicI.h> #include <IceStorm/TraceLevels.h> @@ -321,7 +320,7 @@ TopicManagerImpl::TopicManagerImpl(const InstancePtr& instance) : _sync = _instance->nodeAdapter()->addWithUUID(_syncImpl); } - + // Ensure that the llu counter is present in the log. LogUpdate empty = {0, 0}; @@ -340,14 +339,14 @@ TopicManagerImpl::TopicManagerImpl(const InstancePtr& instance) : // Skip the place holder. ++p; - + SubscriberRecordSeq content; while(p != subscriberMap.end() && p->first.topic == topic) { content.push_back(p->second); ++p; } - + string name = identityToTopicName(topic); installTopic(name, topic, false, content); } @@ -412,7 +411,7 @@ TopicManagerImpl::create(const string& name) catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } _instance->observers()->createTopic(llu, name); @@ -525,7 +524,7 @@ TopicManagerImpl::observerInit(const LogUpdate& llu, const TopicContentSeq& cont catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } // We do this with two scans. The first runs through the topics @@ -618,7 +617,7 @@ TopicManagerImpl::observerCreateTopic(const LogUpdate& llu, const string& name) catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } installTopic(name, id, true); } @@ -679,7 +678,7 @@ TopicManagerImpl::getContent(LogUpdate& llu, TopicContentSeq& content) { { Lock sync(*this); - reap(); + reap(); } for(;;) @@ -743,7 +742,7 @@ TopicManagerImpl::initMaster(const set<GroupNodeInfo>& slaves, const LogUpdate& { Lock sync(*this); - reap(); + reap(); TopicContentSeq content; @@ -782,7 +781,7 @@ TopicManagerImpl::initMaster(const set<GroupNodeInfo>& slaves, const LogUpdate& catch(const DatabaseException& ex) { halt(_instance->communicator(), ex); - } + } } // Now initialize the observers. @@ -870,7 +869,7 @@ TopicManagerImpl::installTopic(const string& name, const Ice::Identity& id, bool const IceStorm::SubscriberRecordSeq& subscribers) { // - // Called by constructor or with 'this' mutex locked. + // Called by constructor or with 'this' mutex locked. // TraceLevelsPtr traceLevels = _instance->traceLevels(); if(traceLevels->topicMgr > 0) diff --git a/cpp/src/IceStorm/TransientTopicI.cpp b/cpp/src/IceStorm/TransientTopicI.cpp index e0b9d857c49..5f52ebe2a2e 100644 --- a/cpp/src/IceStorm/TransientTopicI.cpp +++ b/cpp/src/IceStorm/TransientTopicI.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceStorm/TransientTopicI.h> #include <IceStorm/Instance.h> #include <IceStorm/Subscriber.h> diff --git a/cpp/src/IceStorm/TransientTopicManagerI.cpp b/cpp/src/IceStorm/TransientTopicManagerI.cpp index db12ce602ee..28213fabaab 100644 --- a/cpp/src/IceStorm/TransientTopicManagerI.cpp +++ b/cpp/src/IceStorm/TransientTopicManagerI.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceStorm/TransientTopicManagerI.h> #include <IceStorm/TransientTopicI.h> #include <IceStorm/TraceLevels.h> @@ -56,7 +55,7 @@ TransientTopicManagerImpl::create(const string& name, const Ice::Current&) Ice::Identity id = nameToIdentity(_instance, name); // - // Called by constructor or with 'this' mutex locked. + // Called by constructor or with 'this' mutex locked. // TraceLevelsPtr traceLevels = _instance->traceLevels(); if(traceLevels->topicMgr > 0) diff --git a/cpp/src/IceUtil/ArgVector.cpp b/cpp/src/IceUtil/ArgVector.cpp index 2ef68125ab7..6782bde4931 100644 --- a/cpp/src/IceUtil/ArgVector.cpp +++ b/cpp/src/IceUtil/ArgVector.cpp @@ -8,7 +8,6 @@ // ********************************************************************** #include <IceUtil/ArgVector.h> -#include <IceUtil/DisableWarnings.h> #include <cstring> IceUtilInternal::ArgVector::ArgVector(int argc, char* const argv[]) diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp index adfb6ed9f39..3e27a14e5ee 100644 --- a/cpp/src/Slice/JavaUtil.cpp +++ b/cpp/src/Slice/JavaUtil.cpp @@ -13,7 +13,6 @@ #include <Slice/Util.h> #include <Slice/MD5.h> #include <IceUtil/Functional.h> -#include <IceUtil/DisableWarnings.h> #include <sys/types.h> #include <sys/stat.h> diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index e3764d747cf..300e92b988a 100644 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Slice/Preprocessor.h> #include <Slice/Util.h> #include <IceUtil/StringUtil.h> @@ -123,7 +122,7 @@ Slice::Preprocessor::normalizeIncludePath(const string& path) result.replace(pos, 2, "/"); } - if(result == "/" || (result.size() == 3 && IceUtilInternal::isAlpha(result[0]) && result[1] == ':' && + if(result == "/" || (result.size() == 3 && IceUtilInternal::isAlpha(result[0]) && result[1] == ':' && result[2] == '/')) { return result; @@ -149,7 +148,7 @@ baseArgs(vector<string> args, bool keepComments, const string& extraArgs, const } args.push_back("-e"); args.push_back("en_us.utf8"); - + // // Define version macros __ICE_VERSION__ is preferred. We keep // ICE_VERSION for backward compatibility with 3.5.0. @@ -161,7 +160,7 @@ baseArgs(vector<string> args, bool keepComments, const string& extraArgs, const os << "-D" << version[i] << "=" << ICE_INT_VERSION; args.push_back(os.str()); } - + if(!extraArgs.empty()) { args.push_back(extraArgs); @@ -234,9 +233,9 @@ Slice::Preprocessor::preprocess(bool keepComments, const string& extraArgs) // We use an unique id as the tmp file name prefix to avoid // problems with this code being called concurrently from // several processes, otherwise there is a change that two - // process call _tempnam before any of them call fopen and + // process call _tempnam before any of them call fopen and // they will end up using the same tmp file. - // + // char* name = _tempnam(0, ("slice-" + IceUtil::generateUUID()).c_str()); if(name) { @@ -295,7 +294,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons { return false; } - + string cppHeaderExt; string pyPrefix; if(lang == CPlusPlus) @@ -313,7 +312,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons vector<string> args = _args; args.push_back("-M"); args = baseArgs(args, false, extraArgs, _fileName); - + const char** argv = new const char*[args.size() + 1]; for(unsigned int i = 0; i < args.size(); ++i) { @@ -399,10 +398,10 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons // // Process each dependency. // - + string sourceFile; vector<string> dependencies; - + string::size_type end; while((end = unprocessed.find(".ice", pos)) != string::npos) { @@ -497,7 +496,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons result += ","; } } - + string::size_type pos = 0; while((pos = result.find("\\", pos + 1)) != string::npos) { diff --git a/cpp/src/slice2confluence/Gen.cpp b/cpp/src/slice2confluence/Gen.cpp index 62d9dae23f6..d916bd9b533 100644 --- a/cpp/src/slice2confluence/Gen.cpp +++ b/cpp/src/slice2confluence/Gen.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceUtil/Functional.h> #include <IceUtil/StringUtil.h> #include <Slice/FileTracker.h> @@ -243,7 +242,7 @@ Slice::GeneratorBase::openDoc(const ContainedPtr& c) StringList::size_type num = 0; for(StringList::const_iterator i = components.begin(); i != components.end(); ++i) { - + if (num == components.size()-1 && !components.empty()) { if (path == "." || path == _dir) @@ -267,7 +266,7 @@ Slice::GeneratorBase::openDoc(const ContainedPtr& c) } } ++num; - + // Don't make last directory, instead prepend name if(num < components.size() - 1) { @@ -320,7 +319,7 @@ Slice::GeneratorBase::hasEnding(const std::string& fullString, const std::string } } -std::string +std::string Slice::GeneratorBase::getImageMarkup(const string& url, const string& title) { return _out.getImageMarkup(url, title); @@ -350,7 +349,7 @@ Slice::GeneratorBase::compareSymbolNames(const string& n1, const string& n2) // Uppercase versions for case-insensitive compare string u1 = getUpper(n1); string u2 = getUpper(n2); - + if (_sortOrder.empty()) { return u1 < u2; @@ -360,7 +359,7 @@ Slice::GeneratorBase::compareSymbolNames(const string& n1, const string& n2) // Find indices vector<string>::const_iterator p1; vector<string>::const_iterator p2; - + unsigned int i1 = 0; unsigned int i2 = 0; for (p1 = _sortOrder.begin(); p1 < _sortOrder.end(); ++p1) @@ -379,7 +378,7 @@ Slice::GeneratorBase::compareSymbolNames(const string& n1, const string& n2) } ++i2; } - + if (i1 >= _sortOrder.size() && i2 >= _sortOrder.size()) { // Both unmentioned; natural order @@ -412,7 +411,7 @@ Slice::GeneratorBase::removeNewlines(string str) str.replace(position, 1, " "); position = str.find("\n"); } - + position = str.find("\r"); while (position != string::npos) { @@ -431,7 +430,7 @@ Slice::GeneratorBase::trim(string str) } -string +string Slice::GeneratorBase::getUpper(const std::string& str) { ostringstream oss; @@ -455,18 +454,18 @@ Slice::GeneratorBase::printComment(const ContainedPtr& p, const ContainerPtr& co StringList ret = getTagged("return", comment); StringList throws = getTagged("throws", comment); StringList see = getTagged("see", comment); - + // Strip out any "@userImplemented" doc tags that remain isTagged("userImplemented", comment); - + string::size_type pos = comment.find_last_not_of(" \t\r\n"); if(pos != string::npos) { comment.erase(pos + 1); _out.zeroIndent(); - + _out << comment; - + _out.restoreIndent(); _out << "\n"; } @@ -500,7 +499,7 @@ Slice::GeneratorBase::printComment(const ContainedPtr& p, const ContainerPtr& co { item = removeNewlines(q->substr(pos)); } - + start("dt", "Symbol"); start("tt"); _out << term; @@ -543,7 +542,7 @@ Slice::GeneratorBase::printComment(const ContainedPtr& p, const ContainerPtr& co { item = removeNewlines(q->substr(pos)); } - + start("dt", "Symbol"); _out << toString(toSliceID(term, container->definitionContext()->filename()), container, false, forIndex); end(); @@ -710,9 +709,9 @@ Slice::GeneratorBase::printMetaData(const ContainedPtr& p, bool isUserImplemente if (isUserImplemented) { - + } - + if (!metaData.empty()) { string outString = ""; @@ -740,7 +739,7 @@ Slice::GeneratorBase::printMetaData(const ContainedPtr& p, bool isUserImplemente continue; } } - + string stripped = removeNewlines(*q); if (outString != "") { @@ -772,15 +771,15 @@ Slice::GeneratorBase::getSummary(const ContainedPtr& p, const ContainerPtr& modu { container = p->container(); } - + if(module) { container = module; } - + string summary = getComment(p, container, true, forIndex); oss << removeNewlines(summary); - + if(deprecated) { oss << " _(Deprecated)_ \n"; @@ -793,7 +792,7 @@ compareContained(const ContainedPtr& p1, const ContainedPtr& p2) { ContainedPtr c1 = ContainedPtr::dynamicCast(p1->container()); ContainedPtr c2 = ContainedPtr::dynamicCast(p2->container()); - + if (c1 && c2) { //XXX HACK: since the submodule "Ice::Instumentation" is not seen as a module, add special sorting if (c1->name() == "Ice" && p1->name() == "Instrumentation") { @@ -816,7 +815,7 @@ compareContained(const ContainedPtr& p1, const ContainedPtr& p2) } //XXX --- END HACK } - + if (!c1 && !c2) { @@ -855,15 +854,15 @@ compareContained(const ContainedPtr& p1, const ContainedPtr& p2) if (p1->name() == c2->name()) - { + { // Module index comes before its own contents return true; - } + } if (p2->name() == c1->name()) { // Module index comes before its own contents return false; - } + } // Different containers, compare container names return Slice::GeneratorBase::compareSymbolNames(c1->name(), c2->name()); } @@ -918,7 +917,7 @@ Slice::GeneratorBase::printHeaderFooter(const ContainedPtr& c) // Nav wraps around to last items prev = _symbols.end(); --prev; - } + } prevLink = getLinkPath(*prev, container, ModulePtr::dynamicCast(*prev), onEnumPage); if(ModulePtr::dynamicCast(c)) { @@ -1143,7 +1142,7 @@ Slice::GeneratorBase::toString(const SyntaxTreeBasePtr& p, const ContainerPtr& c } return removeNewlines(s); } - + string ret = ""; if (asTarget) { @@ -1153,7 +1152,7 @@ Slice::GeneratorBase::toString(const SyntaxTreeBasePtr& p, const ContainerPtr& c { ret += getLinkMarkup(linkpath, s, anchor); } - + if(ProxyPtr::dynamicCast(p)) { ret += '*'; @@ -1236,7 +1235,7 @@ Slice::GeneratorBase::getComment(const ContainedPtr& contained, const ContainerP { static const string atLink = "{@link"; string::size_type pos = s.find(atLink, i); - + comment += Confluence::ConfluenceOutput::TEMP_ESCAPER_START; if(pos != i) { @@ -1290,7 +1289,7 @@ Slice::GeneratorBase::getAnchor(const SyntaxTreeBasePtr& p) } anchor += *i; } - + return anchor; } @@ -1307,7 +1306,7 @@ Slice::GeneratorBase::getLinkPath(const SyntaxTreeBasePtr& p, const ContainerPtr string path = ContainedPtr::dynamicCast(ContainedPtr::dynamicCast(p)->container())->name() + MODULE_SUFFIX; return path; } - + // // If we are in a sub-index, we need to "step up" one level, because the links all // point at a section in the same file. @@ -1332,13 +1331,13 @@ Slice::GeneratorBase::getLinkPath(const SyntaxTreeBasePtr& p, const ContainerPtr target = getContainer(p); } StringList from = getContainer(c); - + string parent; if(!from.empty()) { parent = target.front(); } - + while(!target.empty() && !from.empty() && target.front() == from.front()) { target.pop_front(); @@ -1358,7 +1357,7 @@ Slice::GeneratorBase::getLinkPath(const SyntaxTreeBasePtr& p, const ContainerPtr { from.pop_front(); } - + // // For each component in the source path, step up a level. // @@ -1377,12 +1376,12 @@ Slice::GeneratorBase::getLinkPath(const SyntaxTreeBasePtr& p, const ContainerPtr path += "-"; } string name = target.front() == INDEX_NAME ? string("_index") : target.front(); - + path += name; - + target.pop_front(); } - + if((forIndex && path == parent) || (parent.empty() && path.find("-") == string::npos) || DictionaryPtr::dynamicCast(p)) { @@ -1495,18 +1494,18 @@ Slice::GeneratorBase::getTagged(const string& tag, string& comment) { return result; } - + string::size_type pos1 = comment.find_first_not_of(" \t\r\n", begin + tag.size() + 1); if(pos1 == string::npos) { comment.erase(begin); return result; } - + string::size_type pos2 = comment.find('@', pos1); string line = comment.substr(pos1, pos2 - pos1); comment.erase(begin, pos2 - 1 - begin); - + string::size_type pos3 = line.find_last_not_of(" \t\r\n"); if(pos3 != string::npos) { @@ -1514,7 +1513,7 @@ Slice::GeneratorBase::getTagged(const string& tag, string& comment) } result.push_back(line); } - + return result; } @@ -1540,7 +1539,7 @@ Slice::GeneratorBase::getScopedMinimized(const ContainedPtr& contained, const Co } string s = contained->scoped(); - + ContainerPtr p = container; ContainedPtr q = ContainedPtr::dynamicCast(p); @@ -1548,13 +1547,13 @@ Slice::GeneratorBase::getScopedMinimized(const ContainedPtr& contained, const Co { return s.substr(2); } - - + + // do // { // string s2 = q->scoped(); // Containing scope // s2 += "::"; -// +// // if(s.find(s2) == 0) // { // if (q->scoped().find("::", 2) != string::npos) @@ -1563,12 +1562,12 @@ Slice::GeneratorBase::getScopedMinimized(const ContainedPtr& contained, const Co // } // return "MIN2::" + s.substr(2); // } -// +// // p = q->container(); // q = ContainedPtr::dynamicCast(p); // } // while(q); - + string s2 = q->scoped(); // Containing scope s2 += "::"; @@ -1579,7 +1578,7 @@ Slice::GeneratorBase::getScopedMinimized(const ContainedPtr& contained, const Co { return after; } -// +// if (q->scoped().find("::", 2) != string::npos) { // There are at least two components above contained. @@ -1596,7 +1595,7 @@ Slice::GeneratorBase::getScopedMinimized(const ContainedPtr& contained, const Co p = q->container(); q = ContainedPtr::dynamicCast(p); - + return s.substr(2); // s } @@ -1723,7 +1722,7 @@ Slice::GeneratorBase::warnOldStyleIdent(const string& str, const string& fileNam string Slice::GeneratorBase::toSliceID(const string& str, const string& filename) { - + const string s = IceUtilInternal::trim(str); string result; string::size_type pos; @@ -1827,7 +1826,7 @@ Slice::GeneratorBase::readFile(const string& file) result << line << '\n'; getline(in, line); } - + return result.str(); } @@ -1926,7 +1925,7 @@ compareModules(const StringPair& p1, const StringPair& p2) Slice::StartPageGenerator::~StartPageGenerator() { ::std::sort(_modules.begin(), _modules.end(), compareModules); - + start("h2"); _out << "Modules"; end(); @@ -2047,7 +2046,7 @@ TOCGenerator::TOCGenerator(const Files& files, const string& header, const strin : GeneratorBase(_out, files) { _footer = footer; - + start("h1"); _out << "Slice API Index"; end(); @@ -2285,7 +2284,7 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p) start("dt", "Symbol"); _out << toString(*q, p, false, true); end(); - + string metadata; string summary = trim(getSummary(*q, p, (*q)->findMetaData("deprecate", metadata), false)); if (!summary.empty()) @@ -2323,7 +2322,7 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p) start("dt", "Symbol"); _out << toString(*q, p, false, true); end(); - + string metadata; string summary = trim(getSummary(*q, p, (*q)->findMetaData("deprecate", metadata), true)); if (!summary.empty()) @@ -2354,7 +2353,7 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p) start("dt", "Symbol"); _out << toString(*q, p, false, true); end(); - + string metadata; string summary = trim(getSummary(*q, p, (*q)->findMetaData("deprecate", metadata), true)); if (!summary.empty()) @@ -2387,7 +2386,7 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p) start("dt", "Symbol"); _out << toString(*q, p, false, true); end(); - + string metadata; string summary = trim(getSummary(*q, p, (*q)->findMetaData("deprecate", metadata), true)); if (!summary.empty()) @@ -2420,7 +2419,7 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p) start("dt", "Symbol"); _out << toString(*q, p, false, true); end(); - + string metadata; string summary = trim(getSummary(*q, p, (*q)->findMetaData("deprecate", metadata), true)); if (!summary.empty()) @@ -2453,7 +2452,7 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p) start("dt", "Symbol"); _out << toString(*q, p, false, true); end(); - + string metadata; string summary = trim(getSummary(*q, p, (*q)->findMetaData("deprecate", metadata), true)); if (!summary.empty()) @@ -2486,7 +2485,7 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p) start("dt", "Symbol"); _out << toString(*q, p, false, true); end(); - + string metadata; string summary = trim(getSummary(*q, p, (*q)->findMetaData("deprecate", metadata), true)); if (!summary.empty()) @@ -2519,7 +2518,7 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p) start("dt", "Symbol"); _out << toString(*q, p, false, true); end(); - + string metadata; string summary = trim(getSummary(*q, p, (*q)->findMetaData("deprecate", metadata), true)); if (!summary.empty()) @@ -2552,7 +2551,7 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p) start("dt", "Symbol"); _out << toString(*q, p, false, true); end(); - + string metadata; string summary = trim(getSummary(*q, p, (*q)->findMetaData("deprecate", metadata), true)); if (!summary.empty()) @@ -2631,7 +2630,7 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p) _out << "dictionary<" << toString(keyType, p, false, true) << ", " << toString(valueType, p, false, true) << "> " << toString(*q, p); end(); - + string metadata, deprecateReason; if((*q)->findMetaData("deprecate", metadata)) { @@ -2754,7 +2753,7 @@ Slice::ExceptionGenerator::generate(const ExceptionPtr& e) start("dt", "Symbol"); _out << toString(*q, e, false); end(); - + string metadata; string summary = trim(getSummary(*q, e, (*q)->findMetaData("deprecate", metadata), false)); if (!summary.empty()) @@ -2802,7 +2801,7 @@ Slice::ExceptionGenerator::generate(const ExceptionPtr& e) end(); _out << "\n{ztop}\n"; } - + start("hr"); end(); printHeaderFooter(e); @@ -2998,7 +2997,7 @@ Slice::ClassGenerator::generate(const ClassDefPtr& c) } printComment(*q, c, reason); } - + _out << "\n{ztop}\n"; } @@ -3150,7 +3149,7 @@ Slice::StructGenerator::generate(const StructPtr& s) end(); _out << "\n{ztop}\n"; } - + start("hr"); end(); printHeaderFooter(s); @@ -3209,7 +3208,7 @@ Slice::EnumGenerator::generate(const EnumPtr& e) printComment(e, e->container(), deprecateReason, false); EnumeratorList enumerators = e->getEnumerators(); - + if(!enumerators.empty()) { start("h2"); @@ -3235,9 +3234,9 @@ Slice::EnumGenerator::generate(const EnumPtr& e) } end(); _out << "\n{ztop}\n"; - + } - + if(!enumerators.empty()) { start("h2"); @@ -3261,8 +3260,8 @@ Slice::EnumGenerator::generate(const EnumPtr& e) end(); _out << "\n{ztop}\n"; } - - + + closeDoc(); start("hr"); diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 469a8751f5e..6eb2ffdaaf8 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Gen.h> #include <Slice/Checksum.h> #include <Slice/Util.h> @@ -886,7 +885,7 @@ Slice::JavaVisitor::writePatcher(Output& out, const string& package, const DataM { continue; } - + BuiltinPtr b = BuiltinPtr::dynamicCast((*d)->type()); if(b) { @@ -933,15 +932,15 @@ Slice::JavaVisitor::writePatcher(Output& out, const string& package, const DataM memberCount++; } - + for(DataMemberList::const_iterator d = optionalMembers.begin(); d != optionalMembers.end(); ++d) - { + { BuiltinPtr b = BuiltinPtr::dynamicCast((*d)->type()); if(b && b->kind() != Builtin::KindObject) { continue; } - + TypePtr paramType = (*d)->type(); BuiltinPtr builtin = BuiltinPtr::dynamicCast(paramType); if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(paramType)) @@ -961,7 +960,7 @@ Slice::JavaVisitor::writePatcher(Output& out, const string& package, const DataM out << nl << "__typeId = \"" << (*d)->type()->typeId() << "\";"; } } - + string capName = (*d)->name(); capName[0] = toupper(static_cast<unsigned char>(capName[0])); @@ -990,7 +989,7 @@ Slice::JavaVisitor::writePatcher(Output& out, const string& package, const DataM memberCount++; } } - + if(classMembers.size() > 1) { out << eb; @@ -1750,7 +1749,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr& DataMemberList classMembers = p->classDataMembers(); DataMemberList allClassMembers = p->allClassDataMembers(); - + if(classMembers.size() != 0) { writePatcher(out, package, classMembers, optionalMembers, stream); @@ -1759,7 +1758,7 @@ Slice::JavaVisitor::writeDispatchAndMarshalling(Output& out, const ClassDefPtr& out << sp << nl << "protected void __readImpl(IceInternal.BasicStream __is)"; out << sb; out << nl << "__is.startReadSlice();"; - + int classMemberCount = static_cast<int>(allClassMembers.size() - classMembers.size()); const bool needCustomPatcher = classMembers.size() > 1; iter = 0; @@ -3740,7 +3739,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) DataMemberList classMembers = p->classDataMembers(); DataMemberList allClassMembers = p->allClassDataMembers(); - + if(classMembers.size() != 0) { writePatcher(out, package, classMembers, optionalMembers, _stream); diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp index 36cd2c990c2..13494c3b4a6 100644 --- a/cpp/src/slice2objc/Gen.cpp +++ b/cpp/src/slice2objc/Gen.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceUtil/Functional.h> #include "Gen.h" #include <limits> diff --git a/cpp/test/Ice/background/Server.cpp b/cpp/test/Ice/background/Server.cpp index 6ea50160bc0..bb965e7ed96 100644 --- a/cpp/test/Ice/background/Server.cpp +++ b/cpp/test/Ice/background/Server.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Ice/Ice.h> #include <TestI.h> #include <Configuration.h> @@ -21,7 +20,7 @@ using namespace std; class LocatorI : public Ice::Locator { public: - + virtual void findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr& response, const string&, const Ice::Current& current) const @@ -39,17 +38,17 @@ public: Ice::CommunicatorPtr communicator = current.adapter->getCommunicator(); response->ice_response(current.adapter->createDirectProxy(id)); } - + virtual Ice::LocatorRegistryPrx getRegistry(const Ice::Current&) const { return 0; } - + LocatorI(const BackgroundControllerIPtr& controller) : _controller(controller) { } - + private: BackgroundControllerIPtr _controller; @@ -59,33 +58,33 @@ class RouterI : public Ice::Router { public: - virtual Ice::ObjectPrx + virtual Ice::ObjectPrx getClientProxy(const Ice::Current& current) const { _controller->checkCallPause(current); return 0; } - virtual Ice::ObjectPrx + virtual Ice::ObjectPrx getServerProxy(const Ice::Current& current) const { _controller->checkCallPause(current); return 0; } - + virtual Ice::ObjectProxySeq addProxies(const Ice::ObjectProxySeq&, const Ice::Current&) { return Ice::ObjectProxySeq(); } - + RouterI(const BackgroundControllerIPtr& controller) { _controller = controller; } - + private: - + BackgroundControllerIPtr _controller; }; @@ -104,15 +103,15 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) assert(plugin); ConfigurationPtr configuration = plugin->getConfiguration(); BackgroundControllerIPtr backgroundController = new BackgroundControllerI(adapter, configuration); - + adapter->add(new BackgroundI(backgroundController), communicator->stringToIdentity("background")); adapter->add(new LocatorI(backgroundController), communicator->stringToIdentity("locator")); adapter->add(new RouterI(backgroundController), communicator->stringToIdentity("router")); adapter->activate(); - + adapter2->add(backgroundController, communicator->stringToIdentity("backgroundController")); adapter2->activate(); - + communicator->waitForShutdown(); return EXIT_SUCCESS; } @@ -138,7 +137,7 @@ main(int argc, char* argv[]) // This test relies on filling the TCP send/recv buffer, so // we rely on a fixed value for these buffers. initData.properties->setProperty("Ice.TCP.RcvSize", "50000"); - + // // Setup the test transport plug-in. // diff --git a/cpp/test/IceStorm/federation/Subscriber.cpp b/cpp/test/IceStorm/federation/Subscriber.cpp index 5233081e884..421b57ece3f 100644 --- a/cpp/test/IceStorm/federation/Subscriber.cpp +++ b/cpp/test/IceStorm/federation/Subscriber.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Ice/Ice.h> #include <IceStorm/IceStorm.h> #include <Event.h> @@ -81,7 +80,7 @@ void usage(const char* appName) { cerr << "Usage: " << appName << " [options]\n"; - cerr << + cerr << "Options:\n" "-h, --help Show this message.\n" "-b Use batch reliability.\n" diff --git a/cpp/test/IceStorm/federation2/Subscriber.cpp b/cpp/test/IceStorm/federation2/Subscriber.cpp index 657c4284e3a..c2e51fb09d1 100644 --- a/cpp/test/IceStorm/federation2/Subscriber.cpp +++ b/cpp/test/IceStorm/federation2/Subscriber.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Ice/Ice.h> #include <IceStorm/IceStorm.h> #include <Event.h> @@ -89,7 +88,7 @@ void usage(const char* appName) { cerr << "Usage: " << appName << " [options]\n"; - cerr << + cerr << "Options:\n" "-h, --help Show this message.\n" "-b Use batch reliability.\n" diff --git a/cpp/test/IceStorm/rep1/Sub.cpp b/cpp/test/IceStorm/rep1/Sub.cpp index ed94d54590c..cba13cf190f 100644 --- a/cpp/test/IceStorm/rep1/Sub.cpp +++ b/cpp/test/IceStorm/rep1/Sub.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceUtil/IceUtil.h> #include <IceUtil/Options.h> #include <Ice/Ice.h> diff --git a/cpp/test/IceStorm/rep1/Subscriber.cpp b/cpp/test/IceStorm/rep1/Subscriber.cpp index f9c375ee25d..cdcea6f12f8 100644 --- a/cpp/test/IceStorm/rep1/Subscriber.cpp +++ b/cpp/test/IceStorm/rep1/Subscriber.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceUtil/IceUtil.h> #include <IceUtil/Options.h> #include <Ice/Ice.h> diff --git a/cpp/test/IceStorm/repgrid/Client.cpp b/cpp/test/IceStorm/repgrid/Client.cpp index 58ec3e35fef..7f75225871f 100644 --- a/cpp/test/IceStorm/repgrid/Client.cpp +++ b/cpp/test/IceStorm/repgrid/Client.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Ice/Ice.h> #include <IceStorm/IceStorm.h> #include <Single.h> diff --git a/cpp/test/IceStorm/repstress/Subscriber.cpp b/cpp/test/IceStorm/repstress/Subscriber.cpp index 7f52095a4d8..17b304036e9 100644 --- a/cpp/test/IceStorm/repstress/Subscriber.cpp +++ b/cpp/test/IceStorm/repstress/Subscriber.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceUtil/IceUtil.h> #include <Ice/Ice.h> #include <IceStorm/IceStorm.h> diff --git a/cpp/test/IceStorm/single/Subscriber.cpp b/cpp/test/IceStorm/single/Subscriber.cpp index 7a6074f381f..9832cd890be 100644 --- a/cpp/test/IceStorm/single/Subscriber.cpp +++ b/cpp/test/IceStorm/single/Subscriber.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Ice/Ice.h> #include <IceStorm/IceStorm.h> #include <Single.h> @@ -140,7 +139,7 @@ run(int, char* argv[], const CommunicatorPtr& communicator) // vector<SingleIPtr> subscribers; vector<Ice::Identity> subscriberIdentities; - + { subscribers.push_back(new SingleI(communicator, "default")); Ice::ObjectPrx object = adapter->addWithUUID(subscribers.back())->ice_oneway(); @@ -197,7 +196,7 @@ run(int, char* argv[], const CommunicatorPtr& communicator) } adapter->activate(); - + vector<Ice::Identity> ids = topic->getSubscribers(); test(ids.size() == subscriberIdentities.size()); for(vector<Ice::Identity>::const_iterator i = ids.begin(); i != ids.end(); ++i) diff --git a/cpp/test/IceStorm/stress/Subscriber.cpp b/cpp/test/IceStorm/stress/Subscriber.cpp index a99b73e2ffb..0d812f3a3aa 100644 --- a/cpp/test/IceStorm/stress/Subscriber.cpp +++ b/cpp/test/IceStorm/stress/Subscriber.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <Ice/Ice.h> #include <IceStorm/IceStorm.h> #include <IceUtil/Options.h> diff --git a/cpp/test/IceUtil/thread/CreateTest.cpp b/cpp/test/IceUtil/thread/CreateTest.cpp index eefc6b849c0..779875253ec 100644 --- a/cpp/test/IceUtil/thread/CreateTest.cpp +++ b/cpp/test/IceUtil/thread/CreateTest.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include <IceUtil/DisableWarnings.h> #include <IceUtil/IceUtil.h> #include <CreateTest.h> @@ -21,7 +20,7 @@ static const string createTestName("thread create"); class CreateTestThread : public Thread { public: - + CreateTestThread() : threadran(false) { |