diff options
author | Jose <jose@zeroc.com> | 2013-01-11 00:37:06 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2013-01-11 00:37:06 +0100 |
commit | 047677f816eb972a75213f3ed62dfc03368c2736 (patch) | |
tree | 93b55e4a0a749515d10b79a911929fef14154fb7 /cpp/src | |
parent | OS X installer relocation issues (diff) | |
download | ice-047677f816eb972a75213f3ed62dfc03368c2736.tar.bz2 ice-047677f816eb972a75213f3ed62dfc03368c2736.tar.xz ice-047677f816eb972a75213f3ed62dfc03368c2736.zip |
Fixed (ICE-5181) - unreferenced formal parameter
Diffstat (limited to 'cpp/src')
77 files changed, 352 insertions, 231 deletions
diff --git a/cpp/src/Freeze/EvictorI.h b/cpp/src/Freeze/EvictorI.h index c2d5d93aa31..020fcd33edb 100644 --- a/cpp/src/Freeze/EvictorI.h +++ b/cpp/src/Freeze/EvictorI.h @@ -232,7 +232,7 @@ protected: } #if (defined(_MSC_VER) && (_MSC_VER >= 1600)) std::pair<typename StoreMap::iterator, bool> ir = - _storeMap.insert(typename StoreMap::value_type(facet, nullptr)); + _storeMap.insert(typename StoreMap::value_type(facet, static_cast<ObjectStore<T>*>(nullptr))); #else std::pair<typename StoreMap::iterator, bool> ir = _storeMap.insert(typename StoreMap::value_type(facet, 0)); diff --git a/cpp/src/Freeze/IndexI.cpp b/cpp/src/Freeze/IndexI.cpp index 11a9bfc4be4..6eb61dd6d49 100644 --- a/cpp/src/Freeze/IndexI.cpp +++ b/cpp/src/Freeze/IndexI.cpp @@ -396,7 +396,7 @@ Freeze::IndexI::associate(ObjectStoreBase* store, DbTxn* txn, } int -Freeze::IndexI::secondaryKeyCreate(Db* secondary, const Dbt* dbKey, +Freeze::IndexI::secondaryKeyCreate(Db* /*secondary*/, const Dbt* /*dbKey*/, const Dbt* dbValue, Dbt* result) { const Ice::CommunicatorPtr& communicator = _store->communicator(); diff --git a/cpp/src/Freeze/MapI.cpp b/cpp/src/Freeze/MapI.cpp index ae21ce3302f..13e1db66950 100644 --- a/cpp/src/Freeze/MapI.cpp +++ b/cpp/src/Freeze/MapI.cpp @@ -1930,7 +1930,7 @@ Freeze::MapIndexI::untypedCount(const Key& k, const ConnectionIPtr& connection) } int -Freeze::MapIndexI::secondaryKeyCreate(Db* secondary, const Dbt* dbKey, +Freeze::MapIndexI::secondaryKeyCreate(Db* /*secondary*/, const Dbt* /*dbKey*/, const Dbt* dbValue, Dbt* result) { Byte* first = static_cast<Byte*>(dbValue->get_data()); diff --git a/cpp/src/Freeze/SharedDbEnv.cpp b/cpp/src/Freeze/SharedDbEnv.cpp index c85bc6e29a3..1a5f7dd6d12 100644 --- a/cpp/src/Freeze/SharedDbEnv.cpp +++ b/cpp/src/Freeze/SharedDbEnv.cpp @@ -77,8 +77,8 @@ operator<(const MapKey& lhs, const MapKey& rhs) void dbErrCallback(const char* prefix, char* msg) #else - void - dbErrCallback(const ::DbEnv* ignored, const char* prefix, const char* msg) +void +dbErrCallback(const ::DbEnv* /*ignored*/, const char* prefix, const char* msg) #endif { const Freeze::SharedDbEnv* env = reinterpret_cast<const Freeze::SharedDbEnv*>(prefix); diff --git a/cpp/src/FreezeScript/Data.cpp b/cpp/src/FreezeScript/Data.cpp index 00389dae18c..6e7f88dcdb0 100644 --- a/cpp/src/FreezeScript/Data.cpp +++ b/cpp/src/FreezeScript/Data.cpp @@ -1189,7 +1189,7 @@ FreezeScript::ProxyData::ProxyData(const Slice::TypePtr& type, const Ice::Commun } FreezeScript::DataPtr -FreezeScript::ProxyData::getMember(const string& member) const +FreezeScript::ProxyData::getMember(const string& /*member*/) const { // TODO: Support members (id, facet, etc.)? @@ -2142,7 +2142,7 @@ FreezeScript::ObjectData::getMember(const string& member) const } FreezeScript::DataPtr -FreezeScript::ObjectData::getElement(const DataPtr& element) const +FreezeScript::ObjectData::getElement(const DataPtr& /*element*/) const { _errorReporter->error("element requested of object value"); return 0; @@ -2155,14 +2155,14 @@ FreezeScript::ObjectData::operator==(const Data& rhs) const } bool -FreezeScript::ObjectData::operator!=(const Data& rhs) const +FreezeScript::ObjectData::operator!=(const Data& /*rhs*/) const { _errorReporter->error("object comparison not supported"); return false; } bool -FreezeScript::ObjectData::operator<(const Data& rhs) const +FreezeScript::ObjectData::operator<(const Data& /*rhs*/) const { _errorReporter->error("object comparison not supported"); return false; @@ -2198,7 +2198,7 @@ FreezeScript::ObjectData::marshal(const Ice::OutputStreamPtr& out) const } void -FreezeScript::ObjectData::unmarshal(const Ice::InputStreamPtr& in) +FreezeScript::ObjectData::unmarshal(const Ice::InputStreamPtr& /*in*/) { // // Unmarshaling is done by ObjectReader. @@ -2242,7 +2242,7 @@ FreezeScript::ObjectData::toString() const } void -FreezeScript::ObjectData::visit(DataVisitor& visitor) +FreezeScript::ObjectData::visit(DataVisitor& /*visitor*/) { assert(false); } @@ -2339,7 +2339,7 @@ FreezeScript::ObjectRef::operator!=(const Data& rhs) const } bool -FreezeScript::ObjectRef::operator<(const Data& rhs) const +FreezeScript::ObjectRef::operator<(const Data& /*rhs*/) const { _errorReporter->error("object comparison not supported"); return false; diff --git a/cpp/src/FreezeScript/DumpDB.cpp b/cpp/src/FreezeScript/DumpDB.cpp index 27aef7b463d..e19a8650528 100644 --- a/cpp/src/FreezeScript/DumpDB.cpp +++ b/cpp/src/FreezeScript/DumpDB.cpp @@ -830,7 +830,7 @@ FreezeScript::DescriptorHandler::DescriptorHandler(const DataFactoryPtr& factory void FreezeScript::DescriptorHandler::startElement(const string& name, const IceXML::Attributes& attributes, int line, - int column) + int /*column*/) { DescriptorPtr d; @@ -956,7 +956,7 @@ FreezeScript::DescriptorHandler::startElement(const string& name, const IceXML:: } void -FreezeScript::DescriptorHandler::endElement(const std::string& name, int, int) +FreezeScript::DescriptorHandler::endElement(const std::string&, int, int) { assert(_current); _current = _current->parent(); @@ -968,7 +968,7 @@ FreezeScript::DescriptorHandler::characters(const std::string&, int, int) } void -FreezeScript::DescriptorHandler::error(const std::string& msg, int line, int col) +FreezeScript::DescriptorHandler::error(const std::string& msg, int line, int) { _errorReporter->descriptorError(msg, line); } diff --git a/cpp/src/FreezeScript/DumpDescriptors.cpp b/cpp/src/FreezeScript/DumpDescriptors.cpp index ca06437d9ab..4b61939857f 100644 --- a/cpp/src/FreezeScript/DumpDescriptors.cpp +++ b/cpp/src/FreezeScript/DumpDescriptors.cpp @@ -1249,7 +1249,7 @@ FreezeScript::RecordDescriptor::RecordDescriptor(const DescriptorPtr& parent, in } void -FreezeScript::RecordDescriptor::execute(const SymbolTablePtr& sym, ExecuteInfo* info) +FreezeScript::RecordDescriptor::execute(const SymbolTablePtr& /*sym*/, ExecuteInfo* info) { // // Temporarily add an object factory. @@ -1398,7 +1398,7 @@ FreezeScript::DatabaseDescriptor::execute(const SymbolTablePtr&, ExecuteInfo* in // FreezeScript::DumpDBDescriptor::DumpDBDescriptor(int line, const DataFactoryPtr& factory, const ErrorReporterPtr& errorReporter, - const IceXML::Attributes& attributes, const Slice::UnitPtr& unit) : + const IceXML::Attributes& /*attributes*/, const Slice::UnitPtr& unit) : Descriptor(0, line, factory, errorReporter), _unit(unit), _info(new ExecuteInfo) { _info->symbolTable = new SymbolTableI(factory, unit, errorReporter, _info); diff --git a/cpp/src/FreezeScript/Parser.cpp b/cpp/src/FreezeScript/Parser.cpp index 0fcf26f067a..ab374d3a19e 100644 --- a/cpp/src/FreezeScript/Parser.cpp +++ b/cpp/src/FreezeScript/Parser.cpp @@ -129,7 +129,7 @@ FreezeScript::parseExpression(const string& expr, const DataFactoryPtr& factory, // getInput supplies characters to the lexical scanner. // int -FreezeScript::getInput(char* buf, int maxSize) +FreezeScript::getInput(char* buf, int /*maxSize*/) { if(_pos < _input.length()) { @@ -544,7 +544,7 @@ FreezeScript::DataNode::evaluate(const SymbolTablePtr&) } void -FreezeScript::DataNode::print(ostream& os) const +FreezeScript::DataNode::print(ostream& /*os*/) const { // TODO //_data->print(os); diff --git a/cpp/src/FreezeScript/TransformVisitor.cpp b/cpp/src/FreezeScript/TransformVisitor.cpp index 4a5d4c6ff98..d54559de04c 100644 --- a/cpp/src/FreezeScript/TransformVisitor.cpp +++ b/cpp/src/FreezeScript/TransformVisitor.cpp @@ -529,7 +529,7 @@ FreezeScript::TransformVisitor::transformObject(const ObjectDataPtr& dest, const objectDataMap.erase(p); #if (defined(_MSC_VER) && (_MSC_VER >= 1600)) - objectDataMap.insert(ObjectDataMap::value_type(src.get(), nullptr)); + objectDataMap.insert(ObjectDataMap::value_type(src.get(), static_cast<ObjectDataPtr>(nullptr))); #else objectDataMap.insert(ObjectDataMap::value_type(src.get(), 0)); #endif diff --git a/cpp/src/FreezeScript/Transformer.cpp b/cpp/src/FreezeScript/Transformer.cpp index 3fda2cf467e..5048e82cffc 100644 --- a/cpp/src/FreezeScript/Transformer.cpp +++ b/cpp/src/FreezeScript/Transformer.cpp @@ -1883,7 +1883,7 @@ FreezeScript::RecordDescriptor::RecordDescriptor(const DescriptorPtr& parent, in } void -FreezeScript::RecordDescriptor::execute(const SymbolTablePtr& sym) +FreezeScript::RecordDescriptor::execute(const SymbolTablePtr& /*sym*/) { // // Temporarily add an object factory. @@ -2650,7 +2650,7 @@ FreezeScript::ObjectVisitor::visitObject(const ObjectRefPtr& data) if(p == _map.end()) { #if (defined(_MSC_VER) && (_MSC_VER >= 1600)) - _map.insert(ObjectDataMap::value_type(value.get(), nullptr)); + _map.insert(ObjectDataMap::value_type(value.get(), static_cast<ObjectDataPtr>(nullptr))); #else _map.insert(ObjectDataMap::value_type(value.get(), 0)); #endif @@ -2814,7 +2814,7 @@ FreezeScript::DescriptorHandler::DescriptorHandler(const TransformInfoIPtr& info void FreezeScript::DescriptorHandler::startElement(const string& name, const IceXML::Attributes& attributes, int line, - int column) + int /*column*/) { DescriptorPtr d; @@ -2958,7 +2958,7 @@ FreezeScript::DescriptorHandler::startElement(const string& name, const IceXML:: } void -FreezeScript::DescriptorHandler::endElement(const string& name, int, int) +FreezeScript::DescriptorHandler::endElement(const string&, int, int) { assert(_current); _current = _current->parent(); @@ -2970,7 +2970,7 @@ FreezeScript::DescriptorHandler::characters(const string&, int, int) } void -FreezeScript::DescriptorHandler::error(const string& msg, int line, int col) +FreezeScript::DescriptorHandler::error(const string& msg, int line, int) { _info->errorReporter->descriptorError(msg, line); } diff --git a/cpp/src/Glacier2/Blobject.cpp b/cpp/src/Glacier2/Blobject.cpp index 3c7098e3968..c405132fe8b 100644 --- a/cpp/src/Glacier2/Blobject.cpp +++ b/cpp/src/Glacier2/Blobject.cpp @@ -91,7 +91,8 @@ Glacier2::Blobject::invokeSent(bool sent, const AMD_Object_ice_invokePtr& amdCB) if(sent) { #if (defined(_MSC_VER) && (_MSC_VER >= 1600)) - amdCB->ice_response(true, pair<const Byte*, const Byte*>(nullptr, nullptr)); + amdCB->ice_response(true, pair<const Byte*, const Byte*>(static_cast<const Byte*>(nullptr), + static_cast<const Byte*>(nullptr))); #else amdCB->ice_response(true, pair<const Byte*, const Byte*>(0, 0)); #endif diff --git a/cpp/src/Glacier2/Glacier2Router.cpp b/cpp/src/Glacier2/Glacier2Router.cpp index 131cfc43ade..9e0a18dd980 100644 --- a/cpp/src/Glacier2/Glacier2Router.cpp +++ b/cpp/src/Glacier2/Glacier2Router.cpp @@ -69,7 +69,7 @@ class NullPermissionsVerifierI : public Glacier2::PermissionsVerifier { public: - bool checkPermissions(const string& userId, const string& password, string&, const Current&) const + bool checkPermissions(const string&, const string&, string&, const Current&) const { return true; } diff --git a/cpp/src/Glacier2/RequestQueue.cpp b/cpp/src/Glacier2/RequestQueue.cpp index 23ab5baaed2..e38b2883644 100644 --- a/cpp/src/Glacier2/RequestQueue.cpp +++ b/cpp/src/Glacier2/RequestQueue.cpp @@ -169,7 +169,8 @@ Glacier2::Request::queued() if(!_proxy->ice_isTwoway()) { #if (defined(_MSC_VER) && (_MSC_VER >= 1600)) - _amdCB->ice_response(true, pair<const Byte*, const Byte*>(nullptr, nullptr)); + _amdCB->ice_response(true, pair<const Byte*, const Byte*>(static_cast<const Byte*>(nullptr), + static_cast<const Byte*>(nullptr))); #else _amdCB->ice_response(true, pair<const Byte*, const Byte*>(0, 0)); #endif diff --git a/cpp/src/Glacier2Lib/Application.cpp b/cpp/src/Glacier2Lib/Application.cpp index 806071206be..46630b88cee 100644 --- a/cpp/src/Glacier2Lib/Application.cpp +++ b/cpp/src/Glacier2Lib/Application.cpp @@ -38,7 +38,7 @@ public: } void - exception(const Ice::Exception& ex) + exception(const Ice::Exception&) { // // Here the session has been destroyed. The thread terminates, diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index d64d99f59a1..46f6e440241 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -2158,8 +2158,12 @@ IceInternal::BasicStream::EncapsDecoder10::throwException(const UserExceptionFac } } -void +void +#ifndef NDEBUG IceInternal::BasicStream::EncapsDecoder10::startInstance(SliceType sliceType) +#else +IceInternal::BasicStream::EncapsDecoder10::startInstance(SliceType) +#endif { assert(_sliceType == sliceType); _skipFirstSlice = true; @@ -2451,8 +2455,12 @@ IceInternal::BasicStream::EncapsDecoder11::throwException(const UserExceptionFac } } -void +void +#ifndef NDEBUG IceInternal::BasicStream::EncapsDecoder11::startInstance(SliceType sliceType) +#else +IceInternal::BasicStream::EncapsDecoder11::startInstance(SliceType) +#endif { assert(_current->sliceType == sliceType); _current->skipFirstSlice = true; @@ -2937,7 +2945,7 @@ IceInternal::BasicStream::EncapsEncoder10::endInstance() } void -IceInternal::BasicStream::EncapsEncoder10::startSlice(const string& typeId, int, bool last) +IceInternal::BasicStream::EncapsEncoder10::startSlice(const string& typeId, int, bool /*last*/) { // // For object slices, encode a boolean to indicate how the type ID diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 78963794398..38bd441a2d9 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -977,7 +977,7 @@ IceInternal::OutgoingConnectionFactory::ConnectCallback::connectionStartComplete } void -IceInternal::OutgoingConnectionFactory::ConnectCallback::connectionStartFailed(const ConnectionIPtr& connection, +IceInternal::OutgoingConnectionFactory::ConnectCallback::connectionStartFailed(const ConnectionIPtr& /*connection*/, const LocalException& ex) { assert(_iter != _connectors.end()); @@ -1544,7 +1544,7 @@ IceInternal::IncomingConnectionFactory::connectionStartCompleted(const Ice::Conn } void -IceInternal::IncomingConnectionFactory::connectionStartFailed(const Ice::ConnectionIPtr& connection, +IceInternal::IncomingConnectionFactory::connectionStartFailed(const Ice::ConnectionIPtr& /*connection*/, const Ice::LocalException& ex) { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); diff --git a/cpp/src/Ice/ConnectionRequestHandler.cpp b/cpp/src/Ice/ConnectionRequestHandler.cpp index d618dfefcf9..8804cc0e804 100644 --- a/cpp/src/Ice/ConnectionRequestHandler.cpp +++ b/cpp/src/Ice/ConnectionRequestHandler.cpp @@ -88,7 +88,7 @@ ConnectionRequestHandler::flushAsyncBatchRequests(const BatchOutgoingAsyncPtr& o } Ice::ConnectionIPtr -ConnectionRequestHandler::getConnection(bool wait) +ConnectionRequestHandler::getConnection(bool /*wait*/) { return _connection; } diff --git a/cpp/src/Ice/DispatchInterceptor.cpp b/cpp/src/Ice/DispatchInterceptor.cpp index be2109e57d8..7469c241d5e 100644 --- a/cpp/src/Ice/DispatchInterceptor.cpp +++ b/cpp/src/Ice/DispatchInterceptor.cpp @@ -16,7 +16,7 @@ using namespace Ice; using namespace IceInternal; DispatchStatus -Ice::DispatchInterceptor::__dispatch(IceInternal::Incoming& in, const Current& current) +Ice::DispatchInterceptor::__dispatch(IceInternal::Incoming& in, const Current& /*current*/) { try { diff --git a/cpp/src/Ice/EndpointI.cpp b/cpp/src/Ice/EndpointI.cpp index 05f75b778d6..3d25afcc7fc 100644 --- a/cpp/src/Ice/EndpointI.cpp +++ b/cpp/src/Ice/EndpointI.cpp @@ -64,7 +64,7 @@ IceInternal::EndpointI::internal_getHash() const } vector<ConnectorPtr> -IceInternal::EndpointI::connectors(const vector<Address>& addrs) const +IceInternal::EndpointI::connectors(const vector<Address>& /*addrs*/) const { // // This method must be extended by endpoints which use the EndpointHostResolver to create diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp index 8531adb9005..30a3a4a1672 100644 --- a/cpp/src/Ice/Initialize.cpp +++ b/cpp/src/Ice/Initialize.cpp @@ -68,7 +68,7 @@ Ice::argsToStringSeq(int argc, wchar_t* argv[]) } StringSeq -Ice::argsToStringSeq(int argc, wchar_t* argv[], const StringConverterPtr& converter) +Ice::argsToStringSeq(int /*argc*/, wchar_t* argv[], const StringConverterPtr& converter) { StringSeq args; for(int i=0; argv[i] != 0; i++) diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 5c4767d533f..31a9b4a7f09 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -95,10 +95,12 @@ setKeepAlive(SOCKET fd) } #endif +#ifdef ICE_OS_WINRT SOCKET -createSocketImpl(bool udp, int family) +createSocketImpl(bool udp, int) { -#ifdef ICE_OS_WINRT + SOCKET fd; + if(udp) { return ref new DatagramSocket(); @@ -110,7 +112,13 @@ createSocketImpl(bool udp, int family) socket->Control->NoDelay = true; return socket; } + + return fd; +} #else +SOCKET +createSocketImpl(bool udp, int family) +{ SOCKET fd; if(udp) @@ -136,14 +144,14 @@ createSocketImpl(bool udp, int family) } return fd; -#endif } +#endif +#ifdef ICE_OS_WINRT Address -getAddressImpl(const string& host, int port, ProtocolSupport protocol, bool server) +getAddressImpl(const string& host, int port, ProtocolSupport, bool server) { Address addr; -#ifdef ICE_OS_WINRT ostringstream os; os << port; addr.port = ref new String(IceUtil::stringToWstring(os.str()).c_str()); @@ -162,7 +170,13 @@ getAddressImpl(const string& host, int port, ProtocolSupport protocol, bool serv { addr.host = ref new HostName(ref new String(IceUtil::stringToWstring(host).c_str())); } + return addr; +} #else +Address +getAddressImpl(const string& host, int port, ProtocolSupport protocol, bool server) +{ + Address addr; memset(&addr.saStorage, 0, sizeof(sockaddr_storage)); // @@ -245,9 +259,9 @@ getAddressImpl(const string& host, int port, ProtocolSupport protocol, bool serv throw ex; } freeaddrinfo(info); -#endif return addr; } +#endif #ifndef ICE_OS_WINRT vector<Address> @@ -613,30 +627,44 @@ IceInternal::noMoreFds(int error) #endif } +#if defined(ICE_OS_WINRT) string -IceInternal::errorToStringDNS(int error) +IceInternal::errorToStringDNS(int) { -#if defined(ICE_OS_WINRT) return "Host not found"; -#elif defined(_WIN32) - return IceUtilInternal::errorToString(error); +} #else +string +IceInternal::errorToStringDNS(int error) +{ +# if defined(_WIN32) + return IceUtilInternal::errorToString(error); +# else return gai_strerror(error); -#endif +# endif } +#endif +#ifdef ICE_OS_WINRT vector<Address> -IceInternal::getAddresses(const string& host, int port, ProtocolSupport protocol, bool blocking) +IceInternal::getAddresses(const string& host, int port, ProtocolSupport, bool) { vector<Address> result; Address addr; -#ifdef ICE_OS_WINRT addr.host = ref new HostName(host.empty() ? "localhost" : ref new String(IceUtil::stringToWstring(host).c_str())); stringstream os; os << port; addr.port = ref new String(IceUtil::stringToWstring(os.str()).c_str()); result.push_back(addr); + return result; +} #else +vector<Address> +IceInternal::getAddresses(const string& host, int port, ProtocolSupport protocol, bool blocking) +{ + vector<Address> result; + Address addr; + memset(&addr.saStorage, 0, sizeof(sockaddr_storage)); // @@ -695,11 +723,11 @@ IceInternal::getAddresses(const string& host, int port, ProtocolSupport protocol // AI_NUMERICHOST is specified and the host name is not a IP // address. However on some platforms (e.g. OS X 10.4.x) // EAI_NODATA is also returned so we also check for it. -#ifdef EAI_NODATA +# ifdef EAI_NODATA if(!blocking && (rs == EAI_NONAME || rs == EAI_NODATA)) -#else +# else if(!blocking && rs == EAI_NONAME) -#endif +# endif { return result; // Empty result indicates that a blocking lookup is necessary. } @@ -746,20 +774,24 @@ IceInternal::getAddresses(const string& host, int port, ProtocolSupport protocol ex.host = host; throw ex; } -#endif return result; } +#endif +#ifdef ICE_OS_WINRT ProtocolSupport -IceInternal::getProtocolSupport(const Address& addr) +IceInternal::getProtocolSupport(const Address&) { -#ifndef ICE_OS_WINRT - return addr.saStorage.ss_family == AF_INET ? EnableIPv4 : EnableIPv6; -#else // For WinRT, there's no distinction between IPv4 and IPv6 adresses. return EnableBoth; -#endif } +#else +ProtocolSupport +IceInternal::getProtocolSupport(const Address& addr) +{ + return addr.saStorage.ss_family == AF_INET ? EnableIPv4 : EnableIPv6; +} +#endif Address IceInternal::getAddressForServer(const string& host, int port, ProtocolSupport protocol) @@ -839,16 +871,19 @@ IceInternal::compareAddress(const Address& addr1, const Address& addr2) #endif } +#ifdef ICE_OS_WINRT SOCKET -IceInternal::createSocket(bool udp, const Address& addr) +IceInternal::createSocket(bool udp, const Address&) { -#ifdef ICE_OS_WINRT return createSocketImpl(udp, 0); +} #else +SOCKET +IceInternal::createSocket(bool udp, const Address& addr) +{ return createSocketImpl(udp, addr.saStorage.ss_family); -#endif } - +#endif void IceInternal::closeSocketNoThrow(SOCKET fd) @@ -1059,12 +1094,21 @@ IceInternal::isAddressValid(const Address& addr) #endif } +#ifdef ICE_OS_WINRT +vector<string> +IceInternal::getHostsForEndpointExpand(const string&, ProtocolSupport, bool) +{ + // + // No support for expanding wildcard addresses on WinRT + // + vector<string> hosts; + return hosts; +} +#else vector<string> IceInternal::getHostsForEndpointExpand(const string& host, ProtocolSupport protocolSupport, bool includeLoopback) { vector<string> hosts; - -#ifndef ICE_OS_WINRT if(host.empty() || isWildcard(host, protocolSupport)) { vector<Address> addrs = getLocalAddresses(protocolSupport); @@ -1092,13 +1136,9 @@ IceInternal::getHostsForEndpointExpand(const string& host, ProtocolSupport proto } } } -#else - // - // No support for expanding wildcard addresses on WinRT - // -#endif return hosts; // An empty host list indicates to just use the given host. } +#endif string IceInternal::inetAddrToString(const Address& ss) @@ -1272,7 +1312,11 @@ IceInternal::setTcpBufSize(SOCKET fd, const Ice::PropertiesPtr& properties, cons } void +#ifndef ICE_OS_WINRT IceInternal::setBlock(SOCKET fd, bool block) +#else +IceInternal::setBlock(SOCKET fd, bool) +#endif { #ifndef ICE_OS_WINRT if(block) @@ -1369,10 +1413,16 @@ IceInternal::getSendBufferSize(SOCKET fd) #endif } +#ifdef ICE_OS_WINRT +void +IceInternal::setRecvBufferSize(SOCKET, int) +{ +} +#else void IceInternal::setRecvBufferSize(SOCKET fd, int sz) { -#ifndef ICE_OS_WINRT + if(setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char*)&sz, int(sizeof(int))) == SOCKET_ERROR) { closeSocketNoThrow(fd); @@ -1380,8 +1430,8 @@ IceInternal::setRecvBufferSize(SOCKET fd, int sz) ex.error = getSocketErrno(); throw ex; } -#endif } +#endif int IceInternal::getRecvBufferSize(SOCKET fd) @@ -1403,10 +1453,10 @@ IceInternal::getRecvBufferSize(SOCKET fd) #endif } +#ifndef ICE_OS_WINRT void IceInternal::setMcastGroup(SOCKET fd, const Address& group, const string& intf) { -#ifndef ICE_OS_WINRT int rc; if(group.saStorage.ss_family == AF_INET) { @@ -1459,7 +1509,11 @@ IceInternal::setMcastGroup(SOCKET fd, const Address& group, const string& intf) ex.error = getSocketErrno(); throw ex; } +} #else +void +IceInternal::setMcastGroup(SOCKET fd, const Address& group, const string&) +{ try { // @@ -1471,13 +1525,18 @@ IceInternal::setMcastGroup(SOCKET fd, const Address& group, const string& intf) { throw SocketException(__FILE__, __LINE__, (int)SocketError::GetStatus(pex->HResult)); } -#endif } +#endif +#ifdef ICE_OS_WINRT +void +IceInternal::setMcastInterface(SOCKET, const string&, const Address&) +{ +} +#else void IceInternal::setMcastInterface(SOCKET fd, const string& intf, const Address& addr) { -#ifndef ICE_OS_WINRT int rc; if(addr.saStorage.ss_family == AF_INET) { @@ -1517,13 +1576,18 @@ IceInternal::setMcastInterface(SOCKET fd, const string& intf, const Address& add ex.error = getSocketErrno(); throw ex; } -#endif } +#endif +#ifdef ICE_OS_WINRT +void +IceInternal::setMcastTtl(SOCKET, int, const Address&) +{ +} +#else void IceInternal::setMcastTtl(SOCKET fd, int ttl, const Address& addr) { -#ifndef ICE_OS_WINRT int rc; if(addr.saStorage.ss_family == AF_INET) { @@ -1540,13 +1604,18 @@ IceInternal::setMcastTtl(SOCKET fd, int ttl, const Address& addr) ex.error = getSocketErrno(); throw ex; } -#endif } +#endif +#ifdef ICE_OS_WINRT +void +IceInternal::setReuseAddress(SOCKET, bool) +{ +} +#else void IceInternal::setReuseAddress(SOCKET fd, bool reuse) { -#ifndef ICE_OS_WINRT int flag = reuse ? 1 : 0; if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&flag, int(sizeof(int))) == SOCKET_ERROR) { @@ -1555,8 +1624,8 @@ IceInternal::setReuseAddress(SOCKET fd, bool reuse) ex.error = getSocketErrno(); throw ex; } -#endif } +#endif Address IceInternal::doBind(SOCKET fd, const Address& addr) diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp index 6f68cb9b6f2..5ffa11d3b41 100644 --- a/cpp/src/Ice/OutgoingAsync.cpp +++ b/cpp/src/Ice/OutgoingAsync.cpp @@ -899,7 +899,7 @@ IceInternal::BatchOutgoingAsync::BatchOutgoingAsync(const CommunicatorPtr& commu } bool -IceInternal::BatchOutgoingAsync::__sent(Ice::ConnectionI* connection) +IceInternal::BatchOutgoingAsync::__sent(Ice::ConnectionI* /*connection*/) { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor); assert(!_exception.get()); diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp index 5d930c0310b..a7528a77511 100644 --- a/cpp/src/Ice/Proxy.cpp +++ b/cpp/src/Ice/Proxy.cpp @@ -1759,7 +1759,7 @@ IceDelegateM::Ice::Object::setup(const ReferencePtr& ref, const ::Ice::ObjectPrx } bool -IceDelegateD::Ice::Object::ice_isA(const string& __id, const Context* context, InvocationObserver& observer) +IceDelegateD::Ice::Object::ice_isA(const string& __id, const Context* context, InvocationObserver& /*observer*/) { class DirectI : public Direct { @@ -2012,7 +2012,7 @@ IceDelegateD::Ice::Object::ice_id(const ::Ice::Context* context, InvocationObser bool IceDelegateD::Ice::Object::ice_invoke(const string&, OperationMode, - const pair<const Byte*, const Byte*>& inEncaps, + const pair<const Byte*, const Byte*>& /*inEncaps*/, vector<Byte>&, const Context*, InvocationObserver&) @@ -2022,7 +2022,7 @@ IceDelegateD::Ice::Object::ice_invoke(const string&, } void -IceDelegateD::Ice::Object::ice_flushBatchRequests(InvocationObserver& observer) +IceDelegateD::Ice::Object::ice_flushBatchRequests(InvocationObserver& /*observer*/) { throw CollocationOptimizationException(__FILE__, __LINE__); } diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp index a3d9f9478ca..4983ac40157 100644 --- a/cpp/src/Ice/Reference.cpp +++ b/cpp/src/Ice/Reference.cpp @@ -599,14 +599,14 @@ IceInternal::FixedReference::getConnectionId() const } ReferencePtr -IceInternal::FixedReference::changeEndpoints(const vector<EndpointIPtr>& newEndpoints) const +IceInternal::FixedReference::changeEndpoints(const vector<EndpointIPtr>& /*newEndpoints*/) const { throw FixedProxyException(__FILE__, __LINE__); return 0; // Keep the compiler happy. } ReferencePtr -IceInternal::FixedReference::changeAdapterId(const string& newAdapterId) const +IceInternal::FixedReference::changeAdapterId(const string& /*newAdapterId*/) const { throw FixedProxyException(__FILE__, __LINE__); return 0; // Keep the compiler happy. @@ -688,7 +688,7 @@ IceInternal::FixedReference::isWellKnown() const } void -IceInternal::FixedReference::streamWrite(BasicStream* s) const +IceInternal::FixedReference::streamWrite(BasicStream*) const { throw FixedProxyException(__FILE__, __LINE__); } diff --git a/cpp/src/Ice/RouterInfo.cpp b/cpp/src/Ice/RouterInfo.cpp index 84feadb9869..5ffdc95ba88 100644 --- a/cpp/src/Ice/RouterInfo.cpp +++ b/cpp/src/Ice/RouterInfo.cpp @@ -353,7 +353,7 @@ IceInternal::RouterInfo::setClientEndpoints(const Ice::ObjectPrx& proxy) vector<EndpointIPtr> -IceInternal::RouterInfo::setServerEndpoints(const Ice::ObjectPrx& serverProxy) +IceInternal::RouterInfo::setServerEndpoints(const Ice::ObjectPrx& /*serverProxy*/) { IceUtil::Mutex::Lock sync(*this); if(_serverEndpoints.empty()) // Lazy initialization. diff --git a/cpp/src/Ice/TcpAcceptor.cpp b/cpp/src/Ice/TcpAcceptor.cpp index 51a26c3d4ae..8d8f4174318 100644 --- a/cpp/src/Ice/TcpAcceptor.cpp +++ b/cpp/src/Ice/TcpAcceptor.cpp @@ -32,7 +32,11 @@ IceInternal::TcpAcceptor::getNativeInfo() #ifdef ICE_USE_IOCP AsyncInfo* +# ifndef NDEBUG IceInternal::TcpAcceptor::getAsyncInfo(SocketOperation op) +# else +IceInternal::TcpAcceptor::getAsyncInfo(SocketOperation) +# endif { assert(op == SocketOperationRead); return &_info; diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp index c5efcf7aa62..b06335bc2f5 100644 --- a/cpp/src/Ice/UdpTransceiver.cpp +++ b/cpp/src/Ice/UdpTransceiver.cpp @@ -151,12 +151,17 @@ IceInternal::UdpTransceiver::close() _fd = INVALID_SOCKET; } + +#ifdef ICE_OS_WINRT bool -IceInternal::UdpTransceiver::write(Buffer& buf) +IceInternal::UdpTransceiver::write(Buffer&) { -#ifdef ICE_OS_WINRT return false; +} #else +bool +IceInternal::UdpTransceiver::write(Buffer& buf) +{ assert(buf.i == buf.b.begin()); assert(_fd != INVALID_SOCKET && _state >= StateConnected); @@ -233,15 +238,19 @@ repeat: assert(ret == static_cast<ssize_t>(buf.b.size())); buf.i = buf.b.end(); return true; -#endif } +#endif +#ifdef ICE_OS_WINRT bool -IceInternal::UdpTransceiver::read(Buffer& buf) +IceInternal::UdpTransceiver::read(Buffer&) { -#ifdef ICE_OS_WINRT return false; +} #else +bool +IceInternal::UdpTransceiver::read(Buffer& buf) +{ assert(buf.i == buf.b.begin()); assert(_fd != INVALID_SOCKET); @@ -345,8 +354,8 @@ repeat: buf.b.resize(ret); buf.i = buf.b.end(); return true; -#endif } +#endif #if defined(ICE_USE_IOCP) || defined(ICE_OS_WINRT) bool @@ -873,8 +882,14 @@ IceInternal::UdpTransceiver::effectivePort() const IceInternal::UdpTransceiver::UdpTransceiver(const InstancePtr& instance, const Address& addr, +#ifdef ICE_OS_WINRT + const string&, + int +#else const string& mcastInterface, - int mcastTtl) : + int mcastTtl +#endif + ) : _traceLevels(instance->traceLevels()), _logger(instance->initializationData().logger), _stats(instance->initializationData().stats), diff --git a/cpp/src/Ice/winrt/StreamTransceiver.cpp b/cpp/src/Ice/winrt/StreamTransceiver.cpp index b9d42409ad6..380e3ef84ec 100644 --- a/cpp/src/Ice/winrt/StreamTransceiver.cpp +++ b/cpp/src/Ice/winrt/StreamTransceiver.cpp @@ -149,13 +149,13 @@ IceInternal::StreamTransceiver::close() } bool -IceInternal::StreamTransceiver::write(Buffer& buf) +IceInternal::StreamTransceiver::write(Buffer&) { return false; } bool -IceInternal::StreamTransceiver::read(Buffer& buf) +IceInternal::StreamTransceiver::read(Buffer&) { return false; } diff --git a/cpp/src/IceGrid/AdapterCache.cpp b/cpp/src/IceGrid/AdapterCache.cpp index e9e42e9024e..eac3ebdcbac 100644 --- a/cpp/src/IceGrid/AdapterCache.cpp +++ b/cpp/src/IceGrid/AdapterCache.cpp @@ -496,7 +496,7 @@ ReplicaGroupEntry::addSyncCallback(const SynchronizationCallbackPtr& callback, c } void -ReplicaGroupEntry::addReplica(const string& replicaId, const ServerAdapterEntryPtr& adapter) +ReplicaGroupEntry::addReplica(const string& /*replicaId*/, const ServerAdapterEntryPtr& adapter) { Lock sync(*this); _replicas.push_back(adapter); diff --git a/cpp/src/IceGrid/AdminI.cpp b/cpp/src/IceGrid/AdminI.cpp index b78f13483df..676466a36fe 100644 --- a/cpp/src/IceGrid/AdminI.cpp +++ b/cpp/src/IceGrid/AdminI.cpp @@ -690,7 +690,7 @@ AdminI::addObject(const Ice::ObjectPrx& proxy, const ::Ice::Current& current) } void -AdminI::updateObject(const Ice::ObjectPrx& proxy, const ::Ice::Current& current) +AdminI::updateObject(const Ice::ObjectPrx& proxy, const ::Ice::Current&) { checkIsReadOnly(); @@ -712,7 +712,7 @@ AdminI::updateObject(const Ice::ObjectPrx& proxy, const ::Ice::Current& current) } void -AdminI::addObjectWithType(const Ice::ObjectPrx& proxy, const string& type, const ::Ice::Current& current) +AdminI::addObjectWithType(const Ice::ObjectPrx& proxy, const string& type, const ::Ice::Current&) { checkIsReadOnly(); @@ -737,7 +737,7 @@ AdminI::addObjectWithType(const Ice::ObjectPrx& proxy, const string& type, const } void -AdminI::removeObject(const Ice::Identity& id, const Ice::Current& current) +AdminI::removeObject(const Ice::Identity& id, const Ice::Current&) { checkIsReadOnly(); if(id.category == _database->getInstanceName()) diff --git a/cpp/src/IceGrid/AdminSessionI.cpp b/cpp/src/IceGrid/AdminSessionI.cpp index 25aeaffe85a..8cabcba8fee 100644 --- a/cpp/src/IceGrid/AdminSessionI.cpp +++ b/cpp/src/IceGrid/AdminSessionI.cpp @@ -34,7 +34,7 @@ FileIteratorI::FileIteratorI(const AdminSessionIPtr& session, } bool -FileIteratorI::read(int size, Ice::StringSeq& lines, const Ice::Current& current) +FileIteratorI::read(int size, Ice::StringSeq& lines, const Ice::Current&) { try { @@ -96,13 +96,13 @@ AdminSessionI::_register(const SessionServantManagerPtr& servantManager, const I } AdminPrx -AdminSessionI::getAdmin(const Ice::Current& current) const +AdminSessionI::getAdmin(const Ice::Current&) const { return _admin; } Ice::ObjectPrx -AdminSessionI::getAdminCallbackTemplate(const Ice::Current& current) const +AdminSessionI::getAdminCallbackTemplate(const Ice::Current&) const { return _adminCallbackTemplate; } @@ -223,7 +223,7 @@ AdminSessionI::finishUpdate(const Ice::Current& current) } string -AdminSessionI::getReplicaName(const Ice::Current& current) const +AdminSessionI::getReplicaName(const Ice::Current&) const { return _replicaName; } @@ -378,7 +378,7 @@ AdminSessionI::addFileIterator(const FileReaderPrx& reader, } void -AdminSessionI::removeFileIterator(const Ice::Identity& id, const Ice::Current& current) +AdminSessionI::removeFileIterator(const Ice::Identity& id, const Ice::Current&) { Lock sync(*this); _servantManager->remove(id); @@ -489,7 +489,7 @@ AdminSessionManagerI::AdminSessionManagerI(const AdminSessionFactoryPtr& factory } Glacier2::SessionPrx -AdminSessionManagerI::create(const string& userId, const Glacier2::SessionControlPrx& ctl, const Ice::Current& current) +AdminSessionManagerI::create(const string& userId, const Glacier2::SessionControlPrx& ctl, const Ice::Current&) { return _factory->createGlacier2Session(userId, ctl); } @@ -501,7 +501,7 @@ AdminSSLSessionManagerI::AdminSSLSessionManagerI(const AdminSessionFactoryPtr& f Glacier2::SessionPrx AdminSSLSessionManagerI::create(const Glacier2::SSLInfo& info, const Glacier2::SessionControlPrx& ctl, - const Ice::Current& current) + const Ice::Current&) { string userDN; if(!info.certs.empty()) // TODO: Require userDN? diff --git a/cpp/src/IceGrid/Allocatable.cpp b/cpp/src/IceGrid/Allocatable.cpp index 37b6eda4ec4..c4bc8ebb400 100644 --- a/cpp/src/IceGrid/Allocatable.cpp +++ b/cpp/src/IceGrid/Allocatable.cpp @@ -52,7 +52,7 @@ AllocationRequest::pending() } bool -AllocationRequest::allocate(const AllocatablePtr& allocatable, const SessionIPtr& session) +AllocationRequest::allocate(const AllocatablePtr& /*allocatable*/, const SessionIPtr& session) { Lock sync(*this); switch(_state) diff --git a/cpp/src/IceGrid/AllocatableObjectCache.h b/cpp/src/IceGrid/AllocatableObjectCache.h index ef304e712ea..fccbe7e1548 100644 --- a/cpp/src/IceGrid/AllocatableObjectCache.h +++ b/cpp/src/IceGrid/AllocatableObjectCache.h @@ -57,7 +57,7 @@ public: private: - virtual void allocated(const AllocatablePtr& allocatable, const SessionIPtr& session) + virtual void allocated(const AllocatablePtr& allocatable, const SessionIPtr& /*session*/) { response(AllocatableObjectEntryPtr::dynamicCast(allocatable)->getProxy()); } diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index b13eb8a2bd0..332b400542a 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -174,7 +174,7 @@ private: }; static void -interruptCallback(int signal) +interruptCallback(int /*signal*/) { IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(_staticMutex); if(_globalClient) diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp index a3e0536c002..bd07c6b457b 100644 --- a/cpp/src/IceGrid/Database.cpp +++ b/cpp/src/IceGrid/Database.cpp @@ -2198,7 +2198,7 @@ Database::finishApplicationUpdate(const ApplicationUpdateInfo& update, const ApplicationInfo& oldApp, const ApplicationHelper& previous, const ApplicationHelper& helper, - AdminSessionI* session, + AdminSessionI* /*session*/, bool noRestart) { const ApplicationDescriptor& newDesc = helper.getDefinition(); diff --git a/cpp/src/IceGrid/DescriptorBuilder.cpp b/cpp/src/IceGrid/DescriptorBuilder.cpp index fbe7d514454..5976f53ba7b 100644 --- a/cpp/src/IceGrid/DescriptorBuilder.cpp +++ b/cpp/src/IceGrid/DescriptorBuilder.cpp @@ -851,14 +851,14 @@ ServerDescriptorBuilder::init(const ServerDescriptorPtr& desc, const XmlAttribut } ServiceDescriptorBuilder* -ServerDescriptorBuilder::createService(const XmlAttributesHelper& attrs) +ServerDescriptorBuilder::createService(const XmlAttributesHelper& /*attrs*/) { throw "<service> element can only be a child of an <icebox> element"; return 0; } ServiceInstanceDescriptorBuilder* -ServerDescriptorBuilder::createServiceInstance(const XmlAttributesHelper& attrs) +ServerDescriptorBuilder::createServiceInstance(const XmlAttributesHelper& /*attrs*/) { throw "<service-instance> element can only be a child of an <icebox> element"; return 0; @@ -877,13 +877,13 @@ ServerDescriptorBuilder::addEnv(const string& v) } void -ServerDescriptorBuilder::addService(const ServiceDescriptorPtr& desc) +ServerDescriptorBuilder::addService(const ServiceDescriptorPtr& /*desc*/) { assert(false); } void -ServerDescriptorBuilder::addServiceInstance(const ServiceInstanceDescriptor& desc) +ServerDescriptorBuilder::addServiceInstance(const ServiceInstanceDescriptor& /*desc*/) { assert(false); } @@ -927,13 +927,13 @@ IceBoxDescriptorBuilder::createServiceInstance(const XmlAttributesHelper& attrs) } void -IceBoxDescriptorBuilder::addAdapter(const XmlAttributesHelper& attrs) +IceBoxDescriptorBuilder::addAdapter(const XmlAttributesHelper& /*attrs*/) { throw "<adapter> element can't be a child of an <icebox> element"; } void -IceBoxDescriptorBuilder::addDbEnv(const XmlAttributesHelper& attrs) +IceBoxDescriptorBuilder::addDbEnv(const XmlAttributesHelper& /*attrs*/) { throw "<dbenv> element can't be a child of an <icebox> element"; } diff --git a/cpp/src/IceGrid/FreezeDB/FreezeDB.cpp b/cpp/src/IceGrid/FreezeDB/FreezeDB.cpp index 72f3f3560fe..a4794f86ffa 100644 --- a/cpp/src/IceGrid/FreezeDB/FreezeDB.cpp +++ b/cpp/src/IceGrid/FreezeDB/FreezeDB.cpp @@ -22,7 +22,7 @@ extern "C" { ICE_DECLSPEC_EXPORT ::Ice::Plugin* -createFreezeDB(const Ice::CommunicatorPtr& communicator, const string& name, const Ice::StringSeq& args) +createFreezeDB(const Ice::CommunicatorPtr& communicator, const string& /*name*/, const Ice::StringSeq& /*args*/) { return new IceGrid::FreezeDBPlugin(communicator); } diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index 51ed870f3de..1bed6270f5e 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -105,7 +105,7 @@ public: { } - virtual ObjectPtr locate(const Current& c, LocalObjectPtr&) + virtual ObjectPtr locate(const Current&, LocalObjectPtr&) { return _servant; } diff --git a/cpp/src/IceGrid/InternalRegistryI.cpp b/cpp/src/IceGrid/InternalRegistryI.cpp index 8d5f7b081ed..af2202edd05 100644 --- a/cpp/src/IceGrid/InternalRegistryI.cpp +++ b/cpp/src/IceGrid/InternalRegistryI.cpp @@ -215,7 +215,7 @@ InternalRegistryI::getReplicas(const Ice::Current&) const } void -InternalRegistryI::shutdown(const Ice::Current& current) const +InternalRegistryI::shutdown(const Ice::Current& /*current*/) const { _registry->shutdown(); } diff --git a/cpp/src/IceGrid/LocatorI.cpp b/cpp/src/IceGrid/LocatorI.cpp index b5c90d5ee87..2ebc6fbc22a 100644 --- a/cpp/src/IceGrid/LocatorI.cpp +++ b/cpp/src/IceGrid/LocatorI.cpp @@ -322,7 +322,7 @@ public: } virtual void - exception(const string& id, const Ice::Exception& ex) + exception(const string& /*id*/, const Ice::Exception& ex) { LocatorAdapterInfo adapter; { @@ -826,7 +826,7 @@ LocatorI::LocatorI(const Ice::CommunicatorPtr& communicator, void LocatorI::findObjectById_async(const Ice::AMD_Locator_findObjectByIdPtr& cb, const Ice::Identity& id, - const Ice::Current& current) const + const Ice::Current&) const { try { diff --git a/cpp/src/IceGrid/NodeI.cpp b/cpp/src/IceGrid/NodeI.cpp index 37ff9089f09..a94993eeb0e 100644 --- a/cpp/src/IceGrid/NodeI.cpp +++ b/cpp/src/IceGrid/NodeI.cpp @@ -103,7 +103,7 @@ public: } virtual bool - fileListProgress(Ice::Int percent) + fileListProgress(Ice::Int /*percent*/) { return true; } @@ -120,7 +120,7 @@ public: } virtual bool - patchStart(const string& path, Ice::Long size, Ice::Long totalProgress, Ice::Long totalSize) + patchStart(const string& /*path*/, Ice::Long /*size*/, Ice::Long totalProgress, Ice::Long totalSize) { if(_traceLevels->patch > 1 && totalSize > (1024 * 1024)) { @@ -158,7 +158,7 @@ public: } virtual bool - patchProgress(Ice::Long progress, Ice::Long size, Ice::Long totalProgress, Ice::Long totalSize) + patchProgress(Ice::Long /*progress*/, Ice::Long /*size*/, Ice::Long /*totalProgress*/, Ice::Long /*totalSize*/) { return true; } diff --git a/cpp/src/IceGrid/NodeSessionI.cpp b/cpp/src/IceGrid/NodeSessionI.cpp index 3d14272846a..3cdcf086862 100644 --- a/cpp/src/IceGrid/NodeSessionI.cpp +++ b/cpp/src/IceGrid/NodeSessionI.cpp @@ -181,7 +181,7 @@ NodeSessionI::NodeSessionI(const DatabasePtr& database, } void -NodeSessionI::keepAlive(const LoadInfo& load, const Ice::Current& current) +NodeSessionI::keepAlive(const LoadInfo& load, const Ice::Current&) { Lock sync(*this); if(_destroy) @@ -219,19 +219,19 @@ NodeSessionI::setReplicaObserver(const ReplicaObserverPrx& observer, const Ice:: } int -NodeSessionI::getTimeout(const Ice::Current& current) const +NodeSessionI::getTimeout(const Ice::Current&) const { return _timeout; } NodeObserverPrx -NodeSessionI::getObserver(const Ice::Current& current) const +NodeSessionI::getObserver(const Ice::Current&) const { return NodeObserverTopicPtr::dynamicCast(_database->getObserverTopic(NodeObserverTopicName))->getPublisher(); } void -NodeSessionI::loadServers_async(const AMD_NodeSession_loadServersPtr& amdCB, const Ice::Current& current) const +NodeSessionI::loadServers_async(const AMD_NodeSession_loadServersPtr& amdCB, const Ice::Current&) const { // // No need to wait for the servers to be loaded. If we were @@ -253,7 +253,7 @@ NodeSessionI::loadServers_async(const AMD_NodeSession_loadServersPtr& amdCB, con } Ice::StringSeq -NodeSessionI::getServers(const Ice::Current& current) const +NodeSessionI::getServers(const Ice::Current&) const { ServerEntrySeq servers = _database->getNode(_info->name)->getServers(); Ice::StringSeq names; diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp index 2a4ea190076..48a769a7f9d 100644 --- a/cpp/src/IceGrid/RegistryI.cpp +++ b/cpp/src/IceGrid/RegistryI.cpp @@ -56,7 +56,7 @@ class NullPermissionsVerifierI : public Glacier2::PermissionsVerifier { public: - bool checkPermissions(const string& userId, const string& password, string&, const Current&) const + bool checkPermissions(const string& /*userId*/, const string& /*password*/, string&, const Current&) const { return true; } @@ -119,7 +119,7 @@ public: { } - virtual ObjectPtr locate(const Current& c, LocalObjectPtr&) + virtual ObjectPtr locate(const Current&, LocalObjectPtr&) { return _servant; } @@ -999,7 +999,7 @@ RegistryI::createAdminSessionFromSecureConnection(const Current& current) } int -RegistryI::getSessionTimeout(const Ice::Current& current) const +RegistryI::getSessionTimeout(const Ice::Current& /*current*/) const { return _sessionTimeout; } @@ -1372,7 +1372,7 @@ RegistryI::registerReplicas(const InternalRegistryPrx& internalRegistry, } void -RegistryI::registerNodes(const InternalRegistryPrx& internalRegistry, const NodePrxSeq& nodes) +RegistryI::registerNodes(const InternalRegistryPrx& /*internalRegistry*/, const NodePrxSeq& nodes) { const string prefix("Node-"); diff --git a/cpp/src/IceGrid/ReplicaSessionI.cpp b/cpp/src/IceGrid/ReplicaSessionI.cpp index a525058c518..69001ec0482 100644 --- a/cpp/src/IceGrid/ReplicaSessionI.cpp +++ b/cpp/src/IceGrid/ReplicaSessionI.cpp @@ -71,7 +71,7 @@ ReplicaSessionI::ReplicaSessionI(const DatabasePtr& database, } void -ReplicaSessionI::keepAlive(const Ice::Current& current) +ReplicaSessionI::keepAlive(const Ice::Current&) { Lock sync(*this); if(_destroy) @@ -89,13 +89,13 @@ ReplicaSessionI::keepAlive(const Ice::Current& current) } int -ReplicaSessionI::getTimeout(const Ice::Current& current) const +ReplicaSessionI::getTimeout(const Ice::Current&) const { return _timeout; } void -ReplicaSessionI::setDatabaseObserver(const DatabaseObserverPrx& observer, const Ice::Current& current) +ReplicaSessionI::setDatabaseObserver(const DatabaseObserverPrx& observer, const Ice::Current&) { // // If it's a read only master, we don't setup the observer to not @@ -133,7 +133,7 @@ ReplicaSessionI::setDatabaseObserver(const DatabaseObserverPrx& observer, const } void -ReplicaSessionI::setEndpoints(const StringObjectProxyDict& endpoints, const Ice::Current& current) +ReplicaSessionI::setEndpoints(const StringObjectProxyDict& endpoints, const Ice::Current&) { { Lock sync(*this); @@ -147,7 +147,7 @@ ReplicaSessionI::setEndpoints(const StringObjectProxyDict& endpoints, const Ice: } void -ReplicaSessionI::registerWellKnownObjects(const ObjectInfoSeq& objects, const Ice::Current& current) +ReplicaSessionI::registerWellKnownObjects(const ObjectInfoSeq& objects, const Ice::Current&) { int serial; { diff --git a/cpp/src/IceGrid/ServerAdapterI.cpp b/cpp/src/IceGrid/ServerAdapterI.cpp index b83ec8fff88..027162ac042 100644 --- a/cpp/src/IceGrid/ServerAdapterI.cpp +++ b/cpp/src/IceGrid/ServerAdapterI.cpp @@ -37,7 +37,7 @@ ServerAdapterI::~ServerAdapterI() } void -ServerAdapterI::activate_async(const AMD_Adapter_activatePtr& cb, const Ice::Current& current) +ServerAdapterI::activate_async(const AMD_Adapter_activatePtr& cb, const Ice::Current&) { { Lock sync(*this); @@ -107,7 +107,7 @@ ServerAdapterI::activate_async(const AMD_Adapter_activatePtr& cb, const Ice::Cur } Ice::ObjectPrx -ServerAdapterI::getDirectProxy(const Ice::Current& current) const +ServerAdapterI::getDirectProxy(const Ice::Current&) const { Lock sync(*this); diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp index 62529899de0..0950f4cf04f 100644 --- a/cpp/src/IceGrid/ServerCache.cpp +++ b/cpp/src/IceGrid/ServerCache.cpp @@ -219,7 +219,7 @@ ServerCache::addCommunicator(const CommunicatorDescriptorPtr& comm, } void -ServerCache::removeCommunicator(const CommunicatorDescriptorPtr& comm, const ServerEntryPtr& entry) +ServerCache::removeCommunicator(const CommunicatorDescriptorPtr& comm, const ServerEntryPtr& /*entry*/) { for(AdapterDescriptorSeq::const_iterator q = comm->adapters.begin() ; q != comm->adapters.end(); ++q) { @@ -1056,7 +1056,7 @@ ServerEntry::allocated(const SessionIPtr& session) } void -ServerEntry::allocatedNoSync(const SessionIPtr& session) +ServerEntry::allocatedNoSync(const SessionIPtr& /*session*/) { { Lock sync(*this); @@ -1150,7 +1150,7 @@ ServerEntry::released(const SessionIPtr& session) } void -ServerEntry::releasedNoSync(const SessionIPtr& session) +ServerEntry::releasedNoSync(const SessionIPtr& /*session*/) { { Lock sync(*this); diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 49b52c3e795..e5cd3a437d4 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -889,13 +889,13 @@ ServerI::stop_async(const AMD_Server_stopPtr& amdCB, const Ice::Current&) } void -ServerI::sendSignal(const string& signal, const Ice::Current& current) +ServerI::sendSignal(const string& signal, const Ice::Current&) { _node->getActivator()->sendSignal(_id, signal); } void -ServerI::writeMessage(const string& message, Ice::Int fd, const Ice::Current& current) +ServerI::writeMessage(const string& message, Ice::Int fd, const Ice::Current&) { Lock sync(*this); checkDestroyed(); @@ -2466,8 +2466,13 @@ ServerI::checkNoRestart(const InternalServerDescriptorPtr& desc) } } +#ifndef _WIN32 void ServerI::checkAndUpdateUser(const InternalServerDescriptorPtr& desc, bool update) +#else +void +ServerI::checkAndUpdateUser(const InternalServerDescriptorPtr& desc, bool /*update*/) +#endif { #ifndef _WIN32 uid_t uid = getuid(); diff --git a/cpp/src/IceGrid/SessionI.cpp b/cpp/src/IceGrid/SessionI.cpp index ed341505b9e..dae39705bf7 100644 --- a/cpp/src/IceGrid/SessionI.cpp +++ b/cpp/src/IceGrid/SessionI.cpp @@ -104,7 +104,7 @@ BaseSessionI::keepAlive(const Ice::Current& current) } void -BaseSessionI::destroyImpl(bool shutdown) +BaseSessionI::destroyImpl(bool /*shutdown*/) { Lock sync(*this); if(_destroyed) @@ -351,7 +351,7 @@ ClientSessionFactory::createGlacier2Session(const string& sessionId, const Glaci } SessionIPtr -ClientSessionFactory::createSessionServant(const string& userId, const Glacier2::SessionControlPrx& ctl) +ClientSessionFactory::createSessionServant(const string& userId, const Glacier2::SessionControlPrx&) { return new SessionI(userId, _database, _timer); } @@ -367,7 +367,7 @@ ClientSessionManagerI::ClientSessionManagerI(const ClientSessionFactoryPtr& fact } Glacier2::SessionPrx -ClientSessionManagerI::create(const string& user, const Glacier2::SessionControlPrx& ctl, const Ice::Current& current) +ClientSessionManagerI::create(const string& user, const Glacier2::SessionControlPrx& ctl, const Ice::Current&) { return _factory->createGlacier2Session(user, ctl); } @@ -379,7 +379,7 @@ ClientSSLSessionManagerI::ClientSSLSessionManagerI(const ClientSessionFactoryPtr Glacier2::SessionPrx ClientSSLSessionManagerI::create(const Glacier2::SSLInfo& info, const Glacier2::SessionControlPrx& ctl, - const Ice::Current& current) + const Ice::Current&) { string userDN; if(!info.certs.empty()) // TODO: Require userDN? diff --git a/cpp/src/IceGrid/Topics.cpp b/cpp/src/IceGrid/Topics.cpp index 389ea08d92c..62c582858ac 100644 --- a/cpp/src/IceGrid/Topics.cpp +++ b/cpp/src/IceGrid/Topics.cpp @@ -324,7 +324,7 @@ NodeObserverTopic::nodeInit(const NodeDynamicInfoSeq&, const Ice::Current&) } void -NodeObserverTopic::nodeUp(const NodeDynamicInfo& info, const Ice::Current& current) +NodeObserverTopic::nodeUp(const NodeDynamicInfo& info, const Ice::Current&) { Lock sync(*this); if(!_topic) @@ -345,7 +345,7 @@ NodeObserverTopic::nodeUp(const NodeDynamicInfo& info, const Ice::Current& curre } void -NodeObserverTopic::nodeDown(const string& name, const Ice::Current&) +NodeObserverTopic::nodeDown(const string& /*name*/, const Ice::Current&) { assert(false); } diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp index 666b8d121de..0c7ca517942 100644 --- a/cpp/src/IcePatch2/FileServerI.cpp +++ b/cpp/src/IcePatch2/FileServerI.cpp @@ -85,7 +85,7 @@ IcePatch2::FileServerI::getFileCompressed_async(const AMD_FileServer_getFileComp } #if (defined(_MSC_VER) && (_MSC_VER >= 1600)) - pair<const Byte*, const Byte*> ret(nullptr, nullptr); + pair<const Byte*, const Byte*> ret(static_cast<const Byte*>(nullptr), static_cast<const Byte*>(nullptr)); #else pair<const Byte*, const Byte*> ret(0, 0); #endif diff --git a/cpp/src/IcePatch2Lib/Util.cpp b/cpp/src/IcePatch2Lib/Util.cpp index 5031718739e..657e31a1048 100644 --- a/cpp/src/IcePatch2Lib/Util.cpp +++ b/cpp/src/IcePatch2Lib/Util.cpp @@ -685,10 +685,10 @@ IcePatch2::decompressFile(const string& pa) fclose(fp); } +#ifndef _WIN32 void IcePatch2::setFileFlags(const string& pa, const FileInfo& info) { -#ifndef _WIN32 // Windows doesn't support the executable flag const string path = simplify(pa); IceUtilInternal::structstat buf; if(IceUtilInternal::stat(path, &buf) == -1) @@ -696,8 +696,13 @@ IcePatch2::setFileFlags(const string& pa, const FileInfo& info) throw "cannot stat `" + path + "':\n" + IceUtilInternal::lastErrorToString(); } chmod(path.c_str(), info.executable ? buf.st_mode | S_IXUSR : buf.st_mode & ~S_IXUSR); -#endif } +#else // Windows doesn't support the executable flag +void +IcePatch2::setFileFlags(const string&, const FileInfo&) +{ +} +#endif static bool getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, GetFileInfoSeqCB* cb, diff --git a/cpp/src/IceSSL/AcceptorI.cpp b/cpp/src/IceSSL/AcceptorI.cpp index 8b80fb0d640..d4bb455241f 100644 --- a/cpp/src/IceSSL/AcceptorI.cpp +++ b/cpp/src/IceSSL/AcceptorI.cpp @@ -36,7 +36,11 @@ IceSSL::AcceptorI::getNativeInfo() #ifdef ICE_USE_IOCP IceInternal::AsyncInfo* +# ifndef NDEBUG IceSSL::AcceptorI::getAsyncInfo(IceInternal::SocketOperation status) +# else +IceSSL::AcceptorI::getAsyncInfo(IceInternal::SocketOperation) +# endif { assert(status == IceInternal::SocketOperationRead); return &_info; diff --git a/cpp/src/IceSSL/Instance.cpp b/cpp/src/IceSSL/Instance.cpp index 7b272b8810d..063ef73956e 100644 --- a/cpp/src/IceSSL/Instance.cpp +++ b/cpp/src/IceSSL/Instance.cpp @@ -80,7 +80,7 @@ extern "C" // OpenSSL mutex callback. // void -IceSSL_opensslLockCallback(int mode, int n, const char* file, int line) +IceSSL_opensslLockCallback(int mode, int n, const char* /*file*/, int /*line*/) { assert(locks); if(mode & CRYPTO_LOCK) @@ -1168,7 +1168,7 @@ IceSSL::Instance::parseProtocols(const StringSeq& protocols) } SSL_METHOD* -IceSSL::Instance::getMethod(int protocols) +IceSSL::Instance::getMethod(int /*protocols*/) { // // Despite its name, the SSLv23 method can negotiate SSL3, TLS1.0, TLS1.1, and TLS1.2. diff --git a/cpp/src/IceSSL/PluginI.cpp b/cpp/src/IceSSL/PluginI.cpp index d1cfada9660..03aecf207e6 100644 --- a/cpp/src/IceSSL/PluginI.cpp +++ b/cpp/src/IceSSL/PluginI.cpp @@ -25,7 +25,7 @@ extern "C" { ICE_DECLSPEC_EXPORT Ice::Plugin* -createIceSSL(const CommunicatorPtr& communicator, const string& name, const StringSeq& args) +createIceSSL(const CommunicatorPtr& communicator, const string& /*name*/, const StringSeq& /*args*/) { PluginI* plugin = new PluginI(communicator); return plugin; diff --git a/cpp/src/IceSSL/TransceiverI.cpp b/cpp/src/IceSSL/TransceiverI.cpp index a4e21e73ceb..d936f279ace 100644 --- a/cpp/src/IceSSL/TransceiverI.cpp +++ b/cpp/src/IceSSL/TransceiverI.cpp @@ -645,7 +645,7 @@ IceSSL::TransceiverI::read(IceInternal::Buffer& buf) #ifdef ICE_USE_IOCP bool -IceSSL::TransceiverI::startWrite(IceInternal::Buffer& buf) +IceSSL::TransceiverI::startWrite(IceInternal::Buffer& /*buf*/) { if(_state < StateConnected) { @@ -686,7 +686,7 @@ IceSSL::TransceiverI::startWrite(IceInternal::Buffer& buf) } void -IceSSL::TransceiverI::finishWrite(IceInternal::Buffer& buf) +IceSSL::TransceiverI::finishWrite(IceInternal::Buffer& /*buf*/) { if(_state < StateConnected) { @@ -765,7 +765,7 @@ IceSSL::TransceiverI::startRead(IceInternal::Buffer& buf) } void -IceSSL::TransceiverI::finishRead(IceInternal::Buffer& buf) +IceSSL::TransceiverI::finishRead(IceInternal::Buffer& /*buf*/) { if(static_cast<int>(_read.count) == SOCKET_ERROR) { diff --git a/cpp/src/IceStorm/FreezeDB/FreezeDB.cpp b/cpp/src/IceStorm/FreezeDB/FreezeDB.cpp index e132a078f2a..7f54904fa4e 100644 --- a/cpp/src/IceStorm/FreezeDB/FreezeDB.cpp +++ b/cpp/src/IceStorm/FreezeDB/FreezeDB.cpp @@ -22,7 +22,7 @@ extern "C" { ICE_DECLSPEC_EXPORT ::Ice::Plugin* -createFreezeDB(const Ice::CommunicatorPtr& communicator, const string& name, const Ice::StringSeq& args) +createFreezeDB(const Ice::CommunicatorPtr& communicator, const string& /*name*/, const Ice::StringSeq& /*args*/) { return new IceStorm::FreezeDBPlugin(communicator); } diff --git a/cpp/src/IceStorm/NodeI.cpp b/cpp/src/IceStorm/NodeI.cpp index cb3b5ba2192..8938aefea80 100644 --- a/cpp/src/IceStorm/NodeI.cpp +++ b/cpp/src/IceStorm/NodeI.cpp @@ -1096,7 +1096,7 @@ NodeI::destroy() // A node should only receive an observer init call if the node is // reorganizing and its not the coordinator. void -NodeI::checkObserverInit(Ice::Long generation) +NodeI::checkObserverInit(Ice::Long /*generation*/) { Lock sync(*this); if(_state != NodeStateReorganization) @@ -1140,7 +1140,7 @@ NodeI::startUpdate(Ice::Long& generation, const char* file, int line) } bool -NodeI::updateMaster(const char* file, int line) +NodeI::updateMaster(const char* /*file*/, int /*line*/) { bool majority = _observers->check(); diff --git a/cpp/src/IceStorm/Service.cpp b/cpp/src/IceStorm/Service.cpp index b60ead9bc5f..6e29cbf2df3 100644 --- a/cpp/src/IceStorm/Service.cpp +++ b/cpp/src/IceStorm/Service.cpp @@ -110,7 +110,7 @@ void ServiceI::start( const string& name, const CommunicatorPtr& communicator, - const StringSeq& args) + const StringSeq& /*args*/) { PropertiesPtr properties = communicator->getProperties(); @@ -422,7 +422,7 @@ ServiceI::start(const CommunicatorPtr& communicator, const ObjectAdapterPtr& publishAdapter, const string& name, const Ice::Identity& id, - const string& dbEnv) + const string& /*dbEnv*/) { // // For IceGrid we don't validate the properties as all sorts of diff --git a/cpp/src/IceStorm/TopicI.cpp b/cpp/src/IceStorm/TopicI.cpp index 460e291c0ef..e51fb62e383 100644 --- a/cpp/src/IceStorm/TopicI.cpp +++ b/cpp/src/IceStorm/TopicI.cpp @@ -104,7 +104,7 @@ public: } virtual void - forward(const EventDataSeq& v, const Ice::Current& current) + forward(const EventDataSeq& v, const Ice::Current& /*current*/) { // The publish call does a cached read. _impl->publish(true, v); @@ -254,7 +254,7 @@ public: return _impl->getLinkProxy(); } - virtual void reap(const Ice::IdentitySeq& ids, const Ice::Current& current) + virtual void reap(const Ice::IdentitySeq& ids, const Ice::Current& /*current*/) { NodeIPtr node = _instance->node(); if(!node->updateMaster(__FILE__, __LINE__)) diff --git a/cpp/src/IceStorm/TransientTopicI.cpp b/cpp/src/IceStorm/TransientTopicI.cpp index fb65e2400d7..cb8529cee04 100644 --- a/cpp/src/IceStorm/TransientTopicI.cpp +++ b/cpp/src/IceStorm/TransientTopicI.cpp @@ -83,7 +83,7 @@ public: } virtual void - forward(const EventDataSeq& v, const Ice::Current& current) + forward(const EventDataSeq& v, const Ice::Current& /*current*/) { _impl->publish(true, v); } diff --git a/cpp/src/IceXML/Parser.cpp b/cpp/src/IceXML/Parser.cpp index bdb53910031..2477ed2c9a1 100644 --- a/cpp/src/IceXML/Parser.cpp +++ b/cpp/src/IceXML/Parser.cpp @@ -280,7 +280,7 @@ IceXML::DocumentBuilder::startElement(const string& name, const Attributes& attr } void -IceXML::DocumentBuilder::endElement(const string& name, int, int) +IceXML::DocumentBuilder::endElement(const string&, int, int) { assert(!_nodeStack.empty()); _nodeStack.pop_front(); diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp index e98b2d8aa05..65cc88f6748 100644 --- a/cpp/src/Slice/JavaUtil.cpp +++ b/cpp/src/Slice/JavaUtil.cpp @@ -31,8 +31,7 @@ using namespace std; using namespace Slice; using namespace IceUtil; using namespace IceUtilInternal; - - + namespace { @@ -2457,7 +2456,7 @@ Slice::JavaGenerator::writeStreamMarshalUnmarshalCode(Output& out, const string& package, const TypePtr& type, bool optional, - int tag, + int /*tag*/, const string& param, bool marshal, int& iter, diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index de9f2bc15ab..9ab5d9acffd 100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -362,7 +362,7 @@ Slice::Python::CodeVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Python::CodeVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Python::CodeVisitor::visitModuleEnd(const ModulePtr&) { assert(!_moduleStack.empty()); _out << sp << nl << "# End of module " << _moduleStack.front(); diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp index a79c0713502..4575457d935 100644 --- a/cpp/src/Slice/RubyUtil.cpp +++ b/cpp/src/Slice/RubyUtil.cpp @@ -177,7 +177,7 @@ Slice::Ruby::CodeVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Ruby::CodeVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Ruby::CodeVisitor::visitModuleEnd(const ModulePtr&) { _out.dec(); _out << nl << "end"; @@ -1431,7 +1431,7 @@ Slice::Ruby::CodeVisitor::getInitializer(const TypePtr& p) } void -Slice::Ruby::CodeVisitor::writeHash(const string& name, const TypePtr& p, int& iter) +Slice::Ruby::CodeVisitor::writeHash(const string& name, const TypePtr&, int&) { _out << nl << "_h = 5 * _h + " << name << ".hash"; } diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 336cd1e6cbe..e0633bcc1be 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -633,7 +633,7 @@ Slice::Gen::TypesVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::TypesVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::TypesVisitor::visitModuleEnd(const ModulePtr&) { H << sp << nl << '}'; @@ -641,7 +641,7 @@ Slice::Gen::TypesVisitor::visitModuleEnd(const ModulePtr& p) } bool -Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) +Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr&) { return false; } @@ -1361,7 +1361,7 @@ Slice::Gen::ProxyDeclVisitor::visitUnitStart(const UnitPtr& p) } void -Slice::Gen::ProxyDeclVisitor::visitUnitEnd(const UnitPtr& p) +Slice::Gen::ProxyDeclVisitor::visitUnitEnd(const UnitPtr&) { H << sp << nl << '}'; } @@ -1382,7 +1382,7 @@ Slice::Gen::ProxyDeclVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::ProxyDeclVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::ProxyDeclVisitor::visitModuleEnd(const ModulePtr&) { H << sp << nl << '}'; } @@ -1423,7 +1423,7 @@ Slice::Gen::ProxyVisitor::visitUnitStart(const UnitPtr& p) } void -Slice::Gen::ProxyVisitor::visitUnitEnd(const UnitPtr& p) +Slice::Gen::ProxyVisitor::visitUnitEnd(const UnitPtr&) { H << sp << nl << '}'; } @@ -1446,7 +1446,7 @@ Slice::Gen::ProxyVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::ProxyVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::ProxyVisitor::visitModuleEnd(const ModulePtr&) { H << sp << nl << '}'; @@ -2461,7 +2461,7 @@ Slice::Gen::DelegateVisitor::visitUnitStart(const UnitPtr& p) } void -Slice::Gen::DelegateVisitor::visitUnitEnd(const UnitPtr& p) +Slice::Gen::DelegateVisitor::visitUnitEnd(const UnitPtr&) { H << sp << nl << '}'; } @@ -2484,7 +2484,7 @@ Slice::Gen::DelegateVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::DelegateVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::DelegateVisitor::visitModuleEnd(const ModulePtr&) { H << sp << nl << '}'; @@ -2532,7 +2532,7 @@ Slice::Gen::DelegateVisitor::visitClassDefStart(const ClassDefPtr& p) } void -Slice::Gen::DelegateVisitor::visitClassDefEnd(const ClassDefPtr& p) +Slice::Gen::DelegateVisitor::visitClassDefEnd(const ClassDefPtr&) { H << eb << ';'; @@ -2590,7 +2590,7 @@ Slice::Gen::DelegateMVisitor::visitUnitStart(const UnitPtr& p) } void -Slice::Gen::DelegateMVisitor::visitUnitEnd(const UnitPtr& p) +Slice::Gen::DelegateMVisitor::visitUnitEnd(const UnitPtr&) { H << sp << nl << '}'; } @@ -2613,7 +2613,7 @@ Slice::Gen::DelegateMVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::DelegateMVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::DelegateMVisitor::visitModuleEnd(const ModulePtr&) { H << sp << nl << '}'; @@ -2663,7 +2663,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) } void -Slice::Gen::DelegateMVisitor::visitClassDefEnd(const ClassDefPtr& p) +Slice::Gen::DelegateMVisitor::visitClassDefEnd(const ClassDefPtr&) { H << eb << ';'; @@ -2861,7 +2861,7 @@ Slice::Gen::DelegateDVisitor::visitUnitStart(const UnitPtr& p) } void -Slice::Gen::DelegateDVisitor::visitUnitEnd(const UnitPtr& p) +Slice::Gen::DelegateDVisitor::visitUnitEnd(const UnitPtr&) { H << sp << nl << '}'; } @@ -2884,7 +2884,7 @@ Slice::Gen::DelegateDVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::DelegateDVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::DelegateDVisitor::visitModuleEnd(const ModulePtr&) { H << sp << nl << '}'; @@ -2934,7 +2934,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) } void -Slice::Gen::DelegateDVisitor::visitClassDefEnd(const ClassDefPtr& p) +Slice::Gen::DelegateDVisitor::visitClassDefEnd(const ClassDefPtr&) { H << eb << ';'; @@ -3209,7 +3209,7 @@ Slice::Gen::ObjectDeclVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::ObjectDeclVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::ObjectDeclVisitor::visitModuleEnd(const ModulePtr&) { H << sp << nl << '}'; C << sp << nl << "}"; @@ -3272,7 +3272,7 @@ Slice::Gen::ObjectVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::ObjectVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::ObjectVisitor::visitModuleEnd(const ModulePtr&) { H << sp; H << nl << '}'; @@ -3942,7 +3942,17 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) C.dec(); C << nl << "public:"; C.inc(); - C << sp << nl << "virtual ::Ice::ObjectPtr" << nl << "create(const ::std::string& type)"; + C.zeroIndent(); + C << nl << "#ifndef NDEBUG"; + C.restoreIndent(); + C << sp << "virtual ::Ice::ObjectPtr" << nl << "create(const ::std::string& type)"; + C.zeroIndent(); + C << nl << "#else"; + C.restoreIndent(); + C << sp << "virtual ::Ice::ObjectPtr" << nl << "create(const ::std::string&)"; + C.zeroIndent(); + C << nl <<"#endif"; + C.restoreIndent(); C << sb; C << nl << "assert(type == " << scoped << "::ice_staticId());"; C << nl << "return new " << scoped << ';'; @@ -4866,7 +4876,7 @@ Slice::Gen::AsyncCallbackVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::AsyncCallbackVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::AsyncCallbackVisitor::visitModuleEnd(const ModulePtr&) { _useWstring = resetUseWstring(_useWstringHist); @@ -4881,7 +4891,7 @@ Slice::Gen::AsyncCallbackVisitor::visitClassDefStart(const ClassDefPtr& p) } void -Slice::Gen::AsyncCallbackVisitor::visitClassDefEnd(const ClassDefPtr& p) +Slice::Gen::AsyncCallbackVisitor::visitClassDefEnd(const ClassDefPtr&) { _useWstring = resetUseWstring(_useWstringHist); } @@ -4937,7 +4947,7 @@ Slice::Gen::AsyncCallbackTemplateVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::AsyncCallbackTemplateVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::AsyncCallbackTemplateVisitor::visitModuleEnd(const ModulePtr&) { _useWstring = resetUseWstring(_useWstringHist); @@ -4952,7 +4962,7 @@ Slice::Gen::AsyncCallbackTemplateVisitor::visitClassDefStart(const ClassDefPtr& } void -Slice::Gen::AsyncCallbackTemplateVisitor::visitClassDefEnd(const ClassDefPtr& p) +Slice::Gen::AsyncCallbackTemplateVisitor::visitClassDefEnd(const ClassDefPtr&) { _useWstring = resetUseWstring(_useWstringHist); } @@ -5390,7 +5400,7 @@ Slice::Gen::ImplVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::ImplVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::ImplVisitor::visitModuleEnd(const ModulePtr&) { H << sp; H << nl << '}'; @@ -5636,7 +5646,7 @@ Slice::Gen::AsyncVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::AsyncVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::AsyncVisitor::visitModuleEnd(const ModulePtr&) { H << sp << nl << '}'; @@ -5792,7 +5802,7 @@ Slice::Gen::AsyncImplVisitor::visitUnitStart(const UnitPtr& p) } void -Slice::Gen::AsyncImplVisitor::visitUnitEnd(const UnitPtr& p) +Slice::Gen::AsyncImplVisitor::visitUnitEnd(const UnitPtr&) { H << sp << nl << '}'; } @@ -5815,7 +5825,7 @@ Slice::Gen::AsyncImplVisitor::visitModuleStart(const ModulePtr& p) } void -Slice::Gen::AsyncImplVisitor::visitModuleEnd(const ModulePtr& p) +Slice::Gen::AsyncImplVisitor::visitModuleEnd(const ModulePtr&) { H << sp << nl << '}'; @@ -6364,7 +6374,7 @@ Slice::Gen::MetaDataVisitor::visitConst(const ConstPtr& p) void Slice::Gen::MetaDataVisitor::validate(const SyntaxTreeBasePtr& cont, const StringList& metaData, - const string& file, const string& line, bool inParam) + const string& file, const string& line, bool /*inParam*/) { static const string prefix = "cpp:"; for(StringList::const_iterator p = metaData.begin(); p != metaData.end(); ++p) diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp index f7c3c0dac99..b3d2704bf8f 100644 --- a/cpp/src/slice2cpp/Main.cpp +++ b/cpp/src/slice2cpp/Main.cpp @@ -46,7 +46,7 @@ Init init; } void -interruptedCallback(int signal) +interruptedCallback(int /*signal*/) { IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(globalMutex); diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index 06852ab44fa..d2d857e7289 100644 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -2612,7 +2612,7 @@ Slice::Gen::CompactIdVisitor::CompactIdVisitor(IceUtilInternal::Output& out) : } bool -Slice::Gen::CompactIdVisitor::visitUnitStart(const UnitPtr& p) +Slice::Gen::CompactIdVisitor::visitUnitStart(const UnitPtr&) { _out << sp << nl << "namespace IceCompactId"; _out << sb; @@ -2620,7 +2620,7 @@ Slice::Gen::CompactIdVisitor::visitUnitStart(const UnitPtr& p) } void -Slice::Gen::CompactIdVisitor::visitUnitEnd(const UnitPtr& p) +Slice::Gen::CompactIdVisitor::visitUnitEnd(const UnitPtr&) { _out << eb; } @@ -6497,7 +6497,7 @@ Slice::Gen::AsyncVisitor::visitModuleEnd(const ModulePtr&) } bool -Slice::Gen::AsyncVisitor::visitClassDefStart(const ClassDefPtr& p) +Slice::Gen::AsyncVisitor::visitClassDefStart(const ClassDefPtr&) { return true; } diff --git a/cpp/src/slice2cs/Main.cpp b/cpp/src/slice2cs/Main.cpp index 051fa4d1539..bc80ce86701 100644 --- a/cpp/src/slice2cs/Main.cpp +++ b/cpp/src/slice2cs/Main.cpp @@ -46,7 +46,7 @@ Init init; } void -interruptedCallback(int signal) +interruptedCallback(int /*signal*/) { IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(globalMutex); diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp index 6b9877582cc..a42d692297c 100644 --- a/cpp/src/slice2freeze/Main.cpp +++ b/cpp/src/slice2freeze/Main.cpp @@ -54,7 +54,7 @@ string ICE_ENCODING_COMPARE = "Freeze::IceEncodingCompare"; } void -interruptedCallback(int signal) +interruptedCallback(int /*signal*/) { IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(globalMutex); @@ -76,7 +76,7 @@ public: return true; } - virtual void visitModuleEnd(const ModulePtr& p) + virtual void visitModuleEnd(const ModulePtr&) { resetUseWstring(); } @@ -1277,7 +1277,7 @@ writeIndexC(const TypePtr& type, const TypePtr& memberType, const string& member } void -writeIndex(const string& n, const UnitPtr& u, const Index& index, Output& H, Output& C, const string& dllExport) +writeIndex(const string& /*n*/, const UnitPtr& u, const Index& index, Output& H, Output& C, const string& dllExport) { string absolute = index.name; if(absolute.find("::") == 0) diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp index 697331084fc..183d262b92e 100644 --- a/cpp/src/slice2freezej/Main.cpp +++ b/cpp/src/slice2freezej/Main.cpp @@ -50,7 +50,7 @@ Init init; } void -interruptedCallback(int signal) +interruptedCallback(int /*signal*/) { IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(globalMutex); diff --git a/cpp/src/slice2html/Gen.cpp b/cpp/src/slice2html/Gen.cpp index 295846612c9..32c948facbf 100644 --- a/cpp/src/slice2html/Gen.cpp +++ b/cpp/src/slice2html/Gen.cpp @@ -208,7 +208,7 @@ Slice::GeneratorBase::~GeneratorBase() // is created if necessary) and write the HTML header into the file. // void -Slice::GeneratorBase::openDoc(const string& file, const string& title, const string& header, const string& footer) +Slice::GeneratorBase::openDoc(const string& file, const string& title, const string& header, const string& /*footer*/) { makeDir(_dir); openStream(_dir + "/" + file); @@ -830,7 +830,7 @@ Slice::GeneratorBase::printSearch() } void -Slice::GeneratorBase::printLogo(const ContainedPtr& c, const ContainerPtr& container, bool forEnum) +Slice::GeneratorBase::printLogo(const ContainedPtr& /*c*/, const ContainerPtr& container, bool forEnum) { string imageDir = getImageDir(); if(!imageDir.empty()) @@ -1294,7 +1294,7 @@ Slice::GeneratorBase::closeStream() } string -Slice::GeneratorBase::containedToId(const ContainedPtr& contained, bool asTarget) +Slice::GeneratorBase::containedToId(const ContainedPtr& contained, bool /*asTarget*/) { assert(contained); @@ -1834,7 +1834,7 @@ Slice::FileVisitor::FileVisitor(Files& files) } bool -Slice::FileVisitor::visitUnitStart(const UnitPtr& u) +Slice::FileVisitor::visitUnitStart(const UnitPtr&) { return true; } @@ -1897,7 +1897,7 @@ Slice::StartPageVisitor::StartPageVisitor(const Files& files) } bool -Slice::StartPageVisitor::visitUnitStart(const UnitPtr& unit) +Slice::StartPageVisitor::visitUnitStart(const UnitPtr&) { return true; } @@ -2999,7 +2999,7 @@ Slice::PageVisitor::PageVisitor(const Files& files) } bool -Slice::PageVisitor::visitUnitStart(const UnitPtr& unit) +Slice::PageVisitor::visitUnitStart(const UnitPtr&) { return true; } diff --git a/cpp/src/slice2html/Main.cpp b/cpp/src/slice2html/Main.cpp index 4d4dba8d0e9..011bdd9ca97 100644 --- a/cpp/src/slice2html/Main.cpp +++ b/cpp/src/slice2html/Main.cpp @@ -48,7 +48,7 @@ Init init; } void -interruptedCallback(int signal) +interruptedCallback(int /*signal*/) { IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(globalMutex); diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 6e7586004c0..61cf44c18fc 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -151,7 +151,7 @@ Slice::JavaVisitor::getParamsProxy(const OperationPtr& op, const string& package } vector<string> -Slice::JavaVisitor::getInOutParams(const OperationPtr& op, const string& package, ParamDir paramType, bool proxy, +Slice::JavaVisitor::getInOutParams(const OperationPtr& op, const string& package, ParamDir paramType, bool /*proxy*/, bool optionalMapping) { vector<string> params; @@ -186,7 +186,7 @@ Slice::JavaVisitor::getParamsAsync(const OperationPtr& op, const string& package } vector<string> -Slice::JavaVisitor::getParamsAsyncCB(const OperationPtr& op, const string& package, bool amd, bool optionalMapping) +Slice::JavaVisitor::getParamsAsyncCB(const OperationPtr& op, const string& package, bool /*amd*/, bool optionalMapping) { vector<string> params; @@ -1995,7 +1995,7 @@ Slice::JavaVisitor::writeDocCommentParam(Output& out, const OperationPtr& p, Par } } -Slice::Gen::Gen(const string& name, const string& base, const vector<string>& includePaths, const string& dir) : +Slice::Gen::Gen(const string& /*name*/, const string& base, const vector<string>& includePaths, const string& dir) : _base(base), _includePaths(includePaths), _dir(dir) @@ -5348,7 +5348,7 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p) } void -Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) +Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr&) { Output& out = output(); out << eb; @@ -5676,7 +5676,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) } void -Slice::Gen::DelegateMVisitor::writeOperation(const ClassDefPtr& p, const string& package, const OperationPtr& op, +Slice::Gen::DelegateMVisitor::writeOperation(const ClassDefPtr& /*p*/, const string& package, const OperationPtr& op, bool optionalMapping) { Output& out = output(); diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp index 030b98d373f..d7b1e9d14fd 100644 --- a/cpp/src/slice2java/Main.cpp +++ b/cpp/src/slice2java/Main.cpp @@ -47,7 +47,7 @@ Init init; } void -interruptedCallback(int signal) +interruptedCallback(int /*signal*/) { IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(globalMutex); diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp index 87cc8e671c7..f6a50fa4f3e 100644 --- a/cpp/src/slice2php/Main.cpp +++ b/cpp/src/slice2php/Main.cpp @@ -1369,7 +1369,7 @@ CodeVisitor::writeConstructorParams(const MemberInfoList& members) } string -CodeVisitor::getOperationMode(Slice::Operation::Mode mode, bool ns) +CodeVisitor::getOperationMode(Slice::Operation::Mode mode, bool /*ns*/) { ostringstream ostr; ostr << static_cast<int>(mode); @@ -1533,7 +1533,7 @@ Init init; } static void -interruptedCallback(int signal) +interruptedCallback(int /*signal*/) { IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(globalMutex); diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp index 4a4ca29b5b5..d09c433dde4 100644 --- a/cpp/src/slice2py/Main.cpp +++ b/cpp/src/slice2py/Main.cpp @@ -64,7 +64,7 @@ Init init; } void -interruptedCallback(int signal) +interruptedCallback(int /*signal*/) { IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(globalMutex); diff --git a/cpp/src/slice2rb/Main.cpp b/cpp/src/slice2rb/Main.cpp index feba75e6967..5b984148bee 100644 --- a/cpp/src/slice2rb/Main.cpp +++ b/cpp/src/slice2rb/Main.cpp @@ -61,7 +61,7 @@ Init init; } void -interruptedCallback(int signal) +interruptedCallback(int /*signal*/) { IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(globalMutex); |