diff options
author | Benoit Foucher <benoit@zeroc.com> | 2018-10-27 10:37:40 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2018-10-27 10:37:40 +0200 |
commit | 9e27de87d9ab37006ff2b9a45128f08d83ab4ba6 (patch) | |
tree | 75d464f2dc7fab4a653a18a6059402f6de41e370 | |
parent | Whitespace cleanup (diff) | |
download | ice-9e27de87d9ab37006ff2b9a45128f08d83ab4ba6.tar.bz2 ice-9e27de87d9ab37006ff2b9a45128f08d83ab4ba6.tar.xz ice-9e27de87d9ab37006ff2b9a45128f08d83ab4ba6.zip |
Fixed iOS and PHP7 shadow warning related build failures
-rw-r--r-- | cpp/src/Ice/ios/StreamEndpointI.cpp | 29 | ||||
-rw-r--r-- | cpp/src/Ice/ios/StreamEndpointI.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/ios/StreamTransceiver.cpp | 8 | ||||
-rw-r--r-- | cpp/src/IceIAP/EndpointI.mm | 2 | ||||
-rw-r--r-- | cpp/src/IceIAP/Transceiver.mm | 10 | ||||
-rw-r--r-- | cpp/src/IceSSL/SecureTransportUtil.cpp | 12 | ||||
-rw-r--r-- | cpp/test/IceSSL/configuration/AllTests.cpp | 4 | ||||
-rw-r--r-- | php/src/php7/Types.cpp | 14 |
8 files changed, 57 insertions, 24 deletions
diff --git a/cpp/src/Ice/ios/StreamEndpointI.cpp b/cpp/src/Ice/ios/StreamEndpointI.cpp index 6c1c492bc17..781c5dae2ad 100644 --- a/cpp/src/Ice/ios/StreamEndpointI.cpp +++ b/cpp/src/Ice/ios/StreamEndpointI.cpp @@ -94,7 +94,7 @@ void IceObjC::Instance::setupStreams(CFReadStreamRef readStream, CFWriteStreamRef writeStream, bool server, - const string& host) const + const string& /*host*/) const { if(_voip) { @@ -126,7 +126,7 @@ IceObjC::Instance::clone(const ProtocolInstancePtr& instance) IceObjC::StreamEndpointI::StreamEndpointI(const InstancePtr& instance, const string& ho, Int po, const Address& sourceAddr, Int ti, const string& conId, bool co) : IceInternal::IPEndpointI(instance, ho, po, sourceAddr, conId), - _instance(instance), + _streamInstance(instance), _timeout(ti), _compress(co) { @@ -134,7 +134,7 @@ IceObjC::StreamEndpointI::StreamEndpointI(const InstancePtr& instance, const str IceObjC::StreamEndpointI::StreamEndpointI(const InstancePtr& instance) : IceInternal::IPEndpointI(instance), - _instance(instance), + _streamInstance(instance), _timeout(instance->defaultTimeout()), _compress(false) { @@ -142,7 +142,7 @@ IceObjC::StreamEndpointI::StreamEndpointI(const InstancePtr& instance) : IceObjC::StreamEndpointI::StreamEndpointI(const InstancePtr& instance, Ice::InputStream* s) : IPEndpointI(instance, s), - _instance(instance), + _streamInstance(instance), _timeout(-1), _compress(false) { @@ -175,7 +175,7 @@ IceObjC::StreamEndpointI::timeout(Int t) const } else { - return ICE_MAKE_SHARED(StreamEndpointI, _instance, _host, _port, _sourceAddr, t, _connectionId, _compress); + return ICE_MAKE_SHARED(StreamEndpointI, _streamInstance, _host, _port, _sourceAddr, t, _connectionId, _compress); } } @@ -194,7 +194,7 @@ IceObjC::StreamEndpointI::compress(bool c) const } else { - return ICE_MAKE_SHARED(StreamEndpointI, _instance, _host, _port, _sourceAddr, _timeout, _connectionId, c); + return ICE_MAKE_SHARED(StreamEndpointI, _streamInstance, _host, _port, _sourceAddr, _timeout, _connectionId, c); } } @@ -207,14 +207,15 @@ IceObjC::StreamEndpointI::datagram() const bool IceObjC::StreamEndpointI::secure() const { - return _instance->secure(); + return _streamInstance->secure(); } void -IceObjC::StreamEndpointI::connectors_async(Ice::EndpointSelectionType selType, const EndpointI_connectorsPtr& cb) const +IceObjC::StreamEndpointI::connectors_async(Ice::EndpointSelectionType /*selType*/, + const EndpointI_connectorsPtr& cb) const { vector<ConnectorPtr> connectors; - connectors.push_back(new StreamConnector(_instance, _host, _port, _timeout, _connectionId)); + connectors.push_back(new StreamConnector(_streamInstance, _host, _port, _timeout, _connectionId)); cb->connectors(connectors); } @@ -227,7 +228,7 @@ IceObjC::StreamEndpointI::transceiver() const AcceptorPtr IceObjC::StreamEndpointI::acceptor(const string&) const { - return new StreamAcceptor(ICE_SHARED_FROM_CONST_THIS(StreamEndpointI), _instance, _host, _port); + return new StreamAcceptor(ICE_SHARED_FROM_CONST_THIS(StreamEndpointI), _streamInstance, _host, _port); } IceObjC::StreamEndpointIPtr @@ -240,7 +241,8 @@ IceObjC::StreamEndpointI::endpoint(const StreamAcceptorPtr& a) const } else { - return ICE_MAKE_SHARED(StreamEndpointI, _instance, _host, port, _sourceAddr, _timeout, _connectionId, _compress); + return ICE_MAKE_SHARED(StreamEndpointI, _streamInstance, _host, port, _sourceAddr, _timeout, _connectionId, + _compress); } } @@ -424,7 +426,7 @@ IceObjC::StreamEndpointI::checkOption(const string& option, const string& argume } ConnectorPtr -IceObjC::StreamEndpointI::createConnector(const Address& address, const NetworkProxyPtr& proxy) const +IceObjC::StreamEndpointI::createConnector(const Address& /*address*/, const NetworkProxyPtr& /*proxy*/) const { assert(false); return 0; @@ -433,7 +435,8 @@ IceObjC::StreamEndpointI::createConnector(const Address& address, const NetworkP IPEndpointIPtr IceObjC::StreamEndpointI::createEndpoint(const string& host, int port, const string& connectionId) const { - return ICE_MAKE_SHARED(StreamEndpointI, _instance, host, port, _sourceAddr, _timeout, connectionId, _compress); + return ICE_MAKE_SHARED(StreamEndpointI, _streamInstance, host, port, _sourceAddr, _timeout, connectionId, + _compress); } IceObjC::StreamEndpointFactory::StreamEndpointFactory(const InstancePtr& instance) : _instance(instance) diff --git a/cpp/src/Ice/ios/StreamEndpointI.h b/cpp/src/Ice/ios/StreamEndpointI.h index a3c1aae7bc0..e56fe2c2d76 100644 --- a/cpp/src/Ice/ios/StreamEndpointI.h +++ b/cpp/src/Ice/ios/StreamEndpointI.h @@ -121,7 +121,7 @@ protected: private: - const InstancePtr _instance; + const InstancePtr _streamInstance; // // All members are const, because endpoints are immutable. diff --git a/cpp/src/Ice/ios/StreamTransceiver.cpp b/cpp/src/Ice/ios/StreamTransceiver.cpp index f4b055bb5d8..44e93185b4d 100644 --- a/cpp/src/Ice/ios/StreamTransceiver.cpp +++ b/cpp/src/Ice/ios/StreamTransceiver.cpp @@ -227,7 +227,7 @@ IceObjC::StreamTransceiver::closeStreams() } SocketOperation -IceObjC::StreamTransceiver::initialize(Buffer& readBuffer, Buffer& writeBuffer) +IceObjC::StreamTransceiver::initialize(Buffer& /*readBuffer*/, Buffer& /*writeBuffer*/) { IceUtil::Mutex::Lock sync(_mutex); if(_state == StateNeedConnect) @@ -344,7 +344,7 @@ IceObjC::StreamTransceiver::write(Buffer& buf) buf.i += ret; - if(packetSize > buf.b.end() - buf.i) + if(packetSize > static_cast<size_t>(buf.b.end() - buf.i)) { packetSize = buf.b.end() - buf.i; } @@ -389,7 +389,7 @@ IceObjC::StreamTransceiver::read(Buffer& buf) buf.i += ret; - if(packetSize > buf.b.end() - buf.i) + if(packetSize > static_cast<size_t>(buf.b.end() - buf.i)) { packetSize = buf.b.end() - buf.i; } @@ -427,7 +427,7 @@ IceObjC::StreamTransceiver::getInfo() const } void -IceObjC::StreamTransceiver::checkSendSize(const Buffer& buf) +IceObjC::StreamTransceiver::checkSendSize(const Buffer& /*buf*/) { } diff --git a/cpp/src/IceIAP/EndpointI.mm b/cpp/src/IceIAP/EndpointI.mm index d44ffec7132..04b62b904b4 100644 --- a/cpp/src/IceIAP/EndpointI.mm +++ b/cpp/src/IceIAP/EndpointI.mm @@ -234,7 +234,7 @@ IceObjC::iAPEndpointI::transceiver() const } void -IceObjC::iAPEndpointI::connectors_async(Ice::EndpointSelectionType selType, +IceObjC::iAPEndpointI::connectors_async(Ice::EndpointSelectionType /*selType*/, const EndpointI_connectorsPtr& callback) const { try diff --git a/cpp/src/IceIAP/Transceiver.mm b/cpp/src/IceIAP/Transceiver.mm index 5874f0caa84..24c2d3d4af7 100644 --- a/cpp/src/IceIAP/Transceiver.mm +++ b/cpp/src/IceIAP/Transceiver.mm @@ -34,7 +34,7 @@ using namespace IceInternal; @end @implementation iAPTransceiverCallback --(id) init:(SelectorReadyCallback*)cb; +-(id) init:(SelectorReadyCallback*)cb { if(![super init]) { @@ -223,7 +223,7 @@ IceObjC::iAPTransceiver::getNativeInfo() } SocketOperation -IceObjC::iAPTransceiver::initialize(Buffer& readBuffer, Buffer& writeBuffer) +IceObjC::iAPTransceiver::initialize(Buffer& /*readBuffer*/, Buffer& /*writeBuffer*/) { IceUtil::Mutex::Lock sync(_mutex); if(_state == StateNeedConnect) @@ -289,7 +289,7 @@ IceObjC::iAPTransceiver::write(Buffer& buf) buf.i += ret; - if(packetSize > buf.b.end() - buf.i) + if(packetSize > static_cast<size_t>(buf.b.end() - buf.i)) { packetSize = buf.b.end() - buf.i; } @@ -334,7 +334,7 @@ IceObjC::iAPTransceiver::read(Buffer& buf) buf.i += ret; - if(packetSize > buf.b.end() - buf.i) + if(packetSize > static_cast<size_t>(buf.b.end() - buf.i)) { packetSize = buf.b.end() - buf.i; } @@ -375,7 +375,7 @@ IceObjC::iAPTransceiver::getInfo() const } void -IceObjC::iAPTransceiver::checkSendSize(const Buffer& buf) +IceObjC::iAPTransceiver::checkSendSize(const Buffer& /*buf*/) { } diff --git a/cpp/src/IceSSL/SecureTransportUtil.cpp b/cpp/src/IceSSL/SecureTransportUtil.cpp index a9c7b1a68ae..54a036bf8d3 100644 --- a/cpp/src/IceSSL/SecureTransportUtil.cpp +++ b/cpp/src/IceSSL/SecureTransportUtil.cpp @@ -524,9 +524,15 @@ loadCerts(const string& file) // CFArrayRef IceSSL::SecureTransport::loadCertificateChain(const string& file, +#if defined(ICE_USE_SECURE_TRANSPORT_IOS) + const string& /*keyFile*/, + const std::string& /*keychainPath*/, + const string& /*keychainPassword*/, +#else const string& keyFile, const std::string& keychainPath, const string& keychainPassword, +#endif const string& password, const PasswordPromptPtr& prompt, int retryMax) @@ -652,9 +658,15 @@ IceSSL::SecureTransport::loadCACertificates(const string& file) } CFArrayRef +#if defined(ICE_USE_SECURE_TRANSPORT_IOS) +IceSSL::SecureTransport::findCertificateChain(const std::string&, + const std::string&, + const string& value) +#else IceSSL::SecureTransport::findCertificateChain(const std::string& keychainPath, const std::string& keychainPassword, const string& value) +#endif { // // Search the keychain using key:value pairs. The following keys are supported: diff --git a/cpp/test/IceSSL/configuration/AllTests.cpp b/cpp/test/IceSSL/configuration/AllTests.cpp index 851f7ffe0c9..6c5cd2c7099 100644 --- a/cpp/test/IceSSL/configuration/AllTests.cpp +++ b/cpp/test/IceSSL/configuration/AllTests.cpp @@ -688,7 +688,11 @@ void verify(const IceSSL::CertificatePtr& cert, const IceSSL::CertificatePtr& ca } Test::ServerFactoryPrxPtr +#if !defined(__APPLE__) || TARGET_OS_IPHONE == 0 allTests(Test::TestHelper* helper, const string& testDir, bool p12) +#else +allTests(Test::TestHelper* helper, const string& /*testDir*/, bool p12) +#endif { Ice::CommunicatorPtr communicator = helper->communicator(); bool elCapitanUpdate2OrLower = false; diff --git a/php/src/php7/Types.cpp b/php/src/php7/Types.cpp index 5ce0c6b6d19..7add23fd1bd 100644 --- a/php/src/php7/Types.cpp +++ b/php/src/php7/Types.cpp @@ -485,6 +485,10 @@ IcePHP::StreamUtil::getSlicedDataMember(zval* obj, ObjectMap* objectMap) zval* e; info->bytes.resize(zend_hash_num_elements(barr)); +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wshadow" +#endif vector<Ice::Byte>::size_type i = 0; ZEND_HASH_FOREACH_VAL(barr, e) { @@ -493,6 +497,9 @@ IcePHP::StreamUtil::getSlicedDataMember(zval* obj, ObjectMap* objectMap) info->bytes[i++] = static_cast<Ice::Byte>(l); } ZEND_HASH_FOREACH_END(); +#if defined(__clang__) +# pragma clang diagnostic pop +#endif zval* instances = zend_hash_str_find(Z_OBJPROP_P(s), STRCAST("instances"), sizeof("instances") - 1); assert(Z_TYPE_P(instances) == IS_INDIRECT); @@ -501,6 +508,10 @@ IcePHP::StreamUtil::getSlicedDataMember(zval* obj, ObjectMap* objectMap) HashTable* oarr = Z_ARRVAL_P(instances); zval* o; +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wshadow" +#endif ZEND_HASH_FOREACH_VAL(oarr, o) { assert(Z_TYPE_P(o) == IS_OBJECT); @@ -521,6 +532,9 @@ IcePHP::StreamUtil::getSlicedDataMember(zval* obj, ObjectMap* objectMap) info->instances.push_back(writer); } ZEND_HASH_FOREACH_END(); +#if defined(__clang__) +# pragma clang diagnostic pop +#endif zval* hasOptionalMembers = zend_hash_str_find(Z_OBJPROP_P(s), STRCAST("hasOptionalMembers"), sizeof("hasOptionalMembers") - 1); |