summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2018-10-26 17:17:11 -0400
committerBernard Normier <bernard@zeroc.com>2018-10-26 17:17:11 -0400
commit42c905a3ca29a1e911e7def9c2d9d9b8e95383cd (patch)
tree1b704d084e39c0acd15859f2dd258eff7aaa7fc6
parentDo not use time.clock() with Python >= 3.3 as it is deprecated (diff)
downloadice-42c905a3ca29a1e911e7def9c2d9d9b8e95383cd.tar.bz2
ice-42c905a3ca29a1e911e7def9c2d9d9b8e95383cd.tar.xz
ice-42c905a3ca29a1e911e7def9c2d9d9b8e95383cd.zip
Extra C++ warning flags with clang and g++.
Fixes 223.
-rw-r--r--config/Make.rules.Darwin8
-rw-r--r--config/Make.rules.Linux9
-rw-r--r--cpp/include/Ice/MetricsAdminI.h9
-rw-r--r--cpp/include/Ice/Proxy.h2
-rw-r--r--cpp/include/IceUtil/Config.h6
-rw-r--r--cpp/include/IceUtil/PushDisableWarnings.h1
-rw-r--r--cpp/src/Glacier2/InstrumentationI.cpp2
-rw-r--r--cpp/src/Glacier2/ProxyVerifier.cpp8
-rw-r--r--cpp/src/Glacier2/SessionRouterI.cpp4
-rw-r--r--cpp/src/Ice/ACM.cpp22
-rw-r--r--cpp/src/Ice/ArgVector.cpp10
-rw-r--r--cpp/src/Ice/CollocatedRequestHandler.cpp2
-rw-r--r--cpp/src/Ice/CommunicatorI.cpp6
-rw-r--r--cpp/src/Ice/ConnectionFactory.cpp2
-rw-r--r--cpp/src/Ice/ConnectionI.cpp4
-rw-r--r--cpp/src/Ice/GCObject.cpp2
-rw-r--r--cpp/src/Ice/Incoming.cpp15
-rw-r--r--cpp/src/Ice/InputStream.cpp12
-rw-r--r--cpp/src/Ice/Instance.cpp4
-rw-r--r--cpp/src/Ice/InstrumentationI.cpp2
-rw-r--r--cpp/src/Ice/LocatorInfo.cpp32
-rw-r--r--cpp/src/Ice/LocatorInfo.h4
-rw-r--r--cpp/src/Ice/LoggerAdminI.cpp10
-rw-r--r--cpp/src/Ice/LoggerI.cpp12
-rw-r--r--cpp/src/Ice/MetricsAdminI.cpp11
-rwxr-xr-xcpp/src/Ice/Network.cpp6
-rw-r--r--cpp/src/Ice/OpaqueEndpointI.cpp8
-rw-r--r--cpp/src/Ice/OutgoingAsync.cpp2
-rw-r--r--cpp/src/Ice/OutputStream.cpp8
-rw-r--r--cpp/src/Ice/PropertiesAdminI.cpp4
-rw-r--r--cpp/src/Ice/Proxy.cpp2
-rw-r--r--cpp/src/Ice/Reference.cpp1
-rw-r--r--cpp/src/Ice/RetryQueue.cpp2
-rw-r--r--cpp/src/Ice/RouterInfo.cpp4
-rw-r--r--cpp/src/Ice/Selector.cpp30
-rw-r--r--cpp/src/Ice/ServantManager.cpp12
-rw-r--r--cpp/src/Ice/Thread.cpp4
-rw-r--r--cpp/src/Ice/TransceiverF.h4
-rw-r--r--cpp/src/Ice/WSTransceiver.h1
-rw-r--r--cpp/src/IceBT/DBus.cpp4
-rw-r--r--cpp/src/IceBT/EndpointI.cpp2
-rw-r--r--cpp/src/IceBT/TransceiverI.cpp2
-rw-r--r--cpp/src/IceBox/ServiceManagerI.cpp11
-rw-r--r--cpp/src/IceDiscovery/LookupI.cpp8
-rw-r--r--cpp/src/IceGrid/AdapterCache.cpp2
-rw-r--r--cpp/src/IceGrid/AdminI.cpp8
-rw-r--r--cpp/src/IceGrid/Client.cpp8
-rw-r--r--cpp/src/IceGrid/Database.cpp28
-rw-r--r--cpp/src/IceGrid/DescriptorHelper.cpp8
-rw-r--r--cpp/src/IceGrid/IceGridNode.cpp10
-rw-r--r--cpp/src/IceGrid/LocatorI.cpp8
-rw-r--r--cpp/src/IceGrid/LocatorRegistryI.cpp8
-rw-r--r--cpp/src/IceGrid/NodeCache.cpp14
-rw-r--r--cpp/src/IceGrid/NodeI.cpp3
-rw-r--r--cpp/src/IceGrid/NodeSessionManager.cpp27
-rw-r--r--cpp/src/IceGrid/NodeSessionManager.h2
-rw-r--r--cpp/src/IceGrid/Parser.cpp26
-rw-r--r--cpp/src/IceGrid/Parser.h1
-rw-r--r--cpp/src/IceGrid/RegistryAdminRouter.cpp4
-rw-r--r--cpp/src/IceGrid/ReplicaCache.cpp8
-rw-r--r--cpp/src/IceGrid/ServerCache.cpp29
-rw-r--r--cpp/src/IceGrid/ServerCache.h3
-rw-r--r--cpp/src/IceGrid/ServerI.cpp8
-rw-r--r--cpp/src/IceGrid/Topics.cpp22
-rw-r--r--cpp/src/IceLocatorDiscovery/PluginI.cpp4
-rw-r--r--cpp/src/IceSSL/EndpointI.cpp14
-rw-r--r--cpp/src/IceSSL/EndpointI.h2
-rw-r--r--cpp/src/IceSSL/OpenSSLEngine.cpp14
-rw-r--r--cpp/src/IceSSL/SSLEngine.cpp2
-rw-r--r--cpp/src/IceSSL/SecureTransportCertificateI.cpp6
-rw-r--r--cpp/src/IceSSL/SecureTransportEngine.cpp24
-rw-r--r--cpp/src/IceSSL/SecureTransportTransceiverI.cpp32
-rw-r--r--cpp/src/IceSSL/SecureTransportTransceiverI.h2
-rw-r--r--cpp/src/IceSSL/SecureTransportUtil.cpp6
-rw-r--r--cpp/src/IceStorm/InstrumentationI.cpp6
-rw-r--r--cpp/src/IceStorm/Parser.cpp10
-rw-r--r--cpp/src/IceStorm/Parser.h1
-rw-r--r--cpp/src/IceStorm/Service.cpp10
-rw-r--r--cpp/src/IceStorm/TopicI.cpp7
-rw-r--r--cpp/src/IceStorm/TopicManagerI.cpp12
-rw-r--r--cpp/src/IceUtil/RecMutex.cpp2
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp14
-rw-r--r--cpp/src/Slice/GrammarUtil.h1
-rw-r--r--cpp/src/Slice/JavaUtil.cpp24
-rw-r--r--cpp/src/Slice/Parser.cpp44
-rw-r--r--cpp/src/Slice/Preprocessor.cpp20
-rw-r--r--cpp/src/Slice/Python.cpp30
-rw-r--r--cpp/src/Slice/PythonUtil.cpp32
-rw-r--r--cpp/src/Slice/Ruby.cpp6
-rw-r--r--cpp/src/Slice/RubyUtil.cpp1
-rw-r--r--cpp/src/Slice/Scanner.cpp2
-rw-r--r--cpp/src/Slice/Scanner.l2
-rw-r--r--cpp/src/slice2confluence/ConfluenceOutput.cpp9
-rw-r--r--cpp/src/slice2confluence/Gen.cpp9
-rw-r--r--cpp/src/slice2confluence/Gen.h5
-rw-r--r--cpp/src/slice2confluence/Main.cpp2
-rw-r--r--cpp/src/slice2cpp/Gen.cpp40
-rw-r--r--cpp/src/slice2cs/CsUtil.cpp23
-rw-r--r--cpp/src/slice2cs/Gen.cpp39
-rw-r--r--cpp/src/slice2cs/Main.cpp4
-rw-r--r--cpp/src/slice2html/Gen.cpp9
-rw-r--r--cpp/src/slice2html/Gen.h5
-rw-r--r--cpp/src/slice2java/Gen.cpp7
-rw-r--r--cpp/src/slice2java/GenCompat.cpp9
-rw-r--r--cpp/src/slice2java/Main.cpp7
-rw-r--r--cpp/src/slice2js/Gen.cpp25
-rw-r--r--cpp/src/slice2js/JsUtil.cpp7
-rw-r--r--cpp/src/slice2matlab/Main.cpp7
-rw-r--r--cpp/src/slice2objc/Gen.cpp19
-rw-r--r--cpp/src/slice2objc/Main.cpp2
-rw-r--r--cpp/src/slice2objc/ObjCUtil.cpp8
-rw-r--r--cpp/src/slice2php/Main.cpp7
-rw-r--r--cpp/test/Ice/acm/AllTests.cpp28
-rw-r--r--cpp/test/Ice/acm/TestI.cpp4
-rw-r--r--cpp/test/Ice/ami/AllTests.cpp44
-rw-r--r--cpp/test/Ice/ami/TestI.cpp6
-rw-r--r--cpp/test/Ice/background/AllTests.cpp72
-rw-r--r--cpp/test/Ice/background/Transceiver.cpp5
-rw-r--r--cpp/test/Ice/binding/AllTests.cpp4
-rw-r--r--cpp/test/Ice/binding/TestI.cpp2
-rw-r--r--cpp/test/Ice/custom/AllTests.cpp24
-rw-r--r--cpp/test/Ice/defaultValue/Client.cpp2
-rw-r--r--cpp/test/Ice/exceptions/TestAMDI.cpp2
-rw-r--r--cpp/test/Ice/faultTolerance/AllTests.cpp4
-rw-r--r--cpp/test/Ice/gc/Client.cpp2
-rw-r--r--cpp/test/Ice/hold/AllTests.cpp21
-rw-r--r--cpp/test/Ice/impl/Makefile.mk2
-rw-r--r--cpp/test/Ice/info/AllTests.cpp8
-rw-r--r--cpp/test/Ice/interceptor/AMDInterceptorI.cpp4
-rw-r--r--cpp/test/Ice/invoke/AllTests.cpp51
-rw-r--r--cpp/test/Ice/invoke/Server.cpp7
-rw-r--r--cpp/test/Ice/location/AllTests.cpp2
-rw-r--r--cpp/test/Ice/logger/Client5.cpp2
-rw-r--r--cpp/test/Ice/metrics/AllTests.cpp4
-rw-r--r--cpp/test/Ice/metrics/InstrumentationI.h2
-rw-r--r--cpp/test/Ice/objects/AllTests.cpp45
-rw-r--r--cpp/test/Ice/objects/Client.cpp2
-rw-r--r--cpp/test/Ice/objects/Collocated.cpp2
-rw-r--r--cpp/test/Ice/operations/BatchOneways.cpp49
-rw-r--r--cpp/test/Ice/operations/TestI.cpp2
-rw-r--r--cpp/test/Ice/operations/Twoways.cpp124
-rw-r--r--cpp/test/Ice/operations/TwowaysAMI.cpp348
-rw-r--r--cpp/test/Ice/optional/AllTests.cpp34
-rw-r--r--cpp/test/Ice/optional/TestI.cpp2
-rw-r--r--cpp/test/Ice/plugin/Plugin.cpp2
-rw-r--r--cpp/test/Ice/proxy/AllTests.cpp30
-rw-r--r--cpp/test/Ice/retry/TestI.cpp4
-rw-r--r--cpp/test/Ice/scope/AllTests.cpp8
-rw-r--r--cpp/test/Ice/servantLocator/TestAMDI.cpp4
-rw-r--r--cpp/test/Ice/services/AllTests.cpp6
-rw-r--r--cpp/test/Ice/slicing/objects/AllTests.cpp3
-rw-r--r--cpp/test/Ice/slicing/objects/TestI.cpp10
-rw-r--r--cpp/test/Ice/stream/Client.cpp16
-rw-r--r--cpp/test/Ice/timeout/AllTests.cpp6
-rw-r--r--cpp/test/Ice/timeout/TestI.cpp2
-rw-r--r--cpp/test/IceBridge/simple/AllTests.cpp8
-rw-r--r--cpp/test/IceBridge/simple/TestI.cpp2
-rw-r--r--cpp/test/IceDiscovery/simple/TestI.cpp2
-rw-r--r--cpp/test/IceGrid/activation/AllTests.cpp8
-rw-r--r--cpp/test/IceGrid/allocation/AllTests.cpp5
-rw-r--r--cpp/test/IceGrid/deployer/Service.cpp2
-rw-r--r--cpp/test/IceGrid/noRestartUpdate/Service.cpp2
-rw-r--r--cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp16
-rw-r--r--cpp/test/IceGrid/replicaGroup/Service.cpp2
-rw-r--r--cpp/test/IceGrid/replication/AllTests.cpp44
-rw-r--r--cpp/test/IceGrid/session/AllTests.cpp52
-rw-r--r--cpp/test/IceSSL/configuration/AllTests.cpp282
-rw-r--r--cpp/test/IceStorm/stress/Subscriber.cpp2
-rw-r--r--cpp/test/IceUtil/ctrlCHandler/Client.cpp2
-rw-r--r--cpp/test/IceUtil/priority/Client.cpp2
-rw-r--r--cpp/test/IceUtil/sha1/Client.cpp2
-rw-r--r--cpp/test/IceUtil/stacktrace/Client.cpp2
-rw-r--r--cpp/test/IceUtil/thread/Client.cpp2
-rw-r--r--cpp/test/IceUtil/thread/StartTest.cpp4
-rw-r--r--cpp/test/IceUtil/timer/Client.cpp2
-rw-r--r--cpp/test/Slice/macros/Client.cpp2
-rw-r--r--objective-c/src/Ice/CommunicatorI.mm4
-rw-r--r--objective-c/src/Ice/ConnectionI.mm10
-rw-r--r--objective-c/src/Ice/EndpointI.mm10
-rw-r--r--objective-c/src/Ice/Exception.mm10
-rw-r--r--objective-c/src/Ice/Initialize.mm12
-rw-r--r--objective-c/src/Ice/Object.mm36
-rw-r--r--objective-c/src/Ice/Proxy.mm6
-rw-r--r--objective-c/src/Ice/Stream.mm20
-rw-r--r--objective-c/src/Ice/StreamI.h10
-rw-r--r--objective-c/test/Common/TestCommon.m2
-rw-r--r--objective-c/test/Ice/acm/AllTests.m42
-rw-r--r--objective-c/test/Ice/acm/TestI.m18
-rw-r--r--objective-c/test/Ice/admin/AllTests.m4
-rw-r--r--objective-c/test/Ice/admin/TestI.m30
-rw-r--r--objective-c/test/Ice/ami/AllTests.m58
-rw-r--r--objective-c/test/Ice/ami/TestI.m30
-rw-r--r--objective-c/test/Ice/binding/AllTests.m2
-rw-r--r--objective-c/test/Ice/binding/TestI.m6
-rw-r--r--objective-c/test/Ice/defaultServant/Client.m4
-rw-r--r--objective-c/test/Ice/defaultValue/Client.m2
-rw-r--r--objective-c/test/Ice/dispatcher/Client.m2
-rw-r--r--objective-c/test/Ice/dispatcher/Collocated.m2
-rw-r--r--objective-c/test/Ice/dispatcher/Server.m2
-rw-r--r--objective-c/test/Ice/dispatcher/TestI.m10
-rw-r--r--objective-c/test/Ice/enums/TestI.m16
-rw-r--r--objective-c/test/Ice/exceptions/TestI.m40
-rw-r--r--objective-c/test/Ice/facets/TestI.m30
-rw-r--r--objective-c/test/Ice/faultTolerance/AllTests.m4
-rw-r--r--objective-c/test/Ice/faultTolerance/TestI.m6
-rw-r--r--objective-c/test/Ice/hash/Client.m2
-rw-r--r--objective-c/test/Ice/hold/AllTests.m20
-rw-r--r--objective-c/test/Ice/hold/TestI.m4
-rw-r--r--objective-c/test/Ice/inheritance/TestI.m60
-rw-r--r--objective-c/test/Ice/interceptor/MyObjectI.m8
-rw-r--r--objective-c/test/Ice/invoke/AllTests.m6
-rw-r--r--objective-c/test/Ice/location/AllTests.m2
-rw-r--r--objective-c/test/Ice/location/ServerLocator.m14
-rw-r--r--objective-c/test/Ice/location/TestI.m12
-rw-r--r--objective-c/test/Ice/metrics/AllTests.m20
-rw-r--r--objective-c/test/Ice/metrics/TestI.m16
-rw-r--r--objective-c/test/Ice/objects/AllTests.m28
-rw-r--r--objective-c/test/Ice/objects/Client.m2
-rw-r--r--objective-c/test/Ice/objects/Collocated.m2
-rw-r--r--objective-c/test/Ice/objects/TestI.m80
-rw-r--r--objective-c/test/Ice/objects/TestIntfI.m4
-rw-r--r--objective-c/test/Ice/operations/BatchOneways.m6
-rw-r--r--objective-c/test/Ice/operations/Oneways.m2
-rw-r--r--objective-c/test/Ice/operations/OnewaysAMI.m8
-rw-r--r--objective-c/test/Ice/operations/TestI.m187
-rw-r--r--objective-c/test/Ice/operations/Twoways.m299
-rw-r--r--objective-c/test/Ice/operations/TwowaysAMI.m133
-rw-r--r--objective-c/test/Ice/optional/AllTests.m16
-rw-r--r--objective-c/test/Ice/optional/TestI.m106
-rw-r--r--objective-c/test/Ice/proxy/AllTests.m18
-rw-r--r--objective-c/test/Ice/proxy/TestI.m8
-rw-r--r--objective-c/test/Ice/retry/AllTests.m2
-rw-r--r--objective-c/test/Ice/retry/TestI.m4
-rw-r--r--objective-c/test/Ice/servantLocator/Collocated.m2
-rw-r--r--objective-c/test/Ice/servantLocator/ServantLocatorI.m8
-rw-r--r--objective-c/test/Ice/servantLocator/Server.m2
-rw-r--r--objective-c/test/Ice/servantLocator/TestI.m26
-rw-r--r--objective-c/test/Ice/services/AllTests.m2
-rw-r--r--objective-c/test/Ice/slicing/exceptions/AllTests.m8
-rw-r--r--objective-c/test/Ice/slicing/exceptions/TestI.m44
-rw-r--r--objective-c/test/Ice/slicing/objects/AllTests.m50
-rw-r--r--objective-c/test/Ice/slicing/objects/TestI.m72
-rw-r--r--objective-c/test/Ice/stream/Client.m4
-rw-r--r--objective-c/test/Ice/timeout/AllTests.m6
-rw-r--r--objective-c/test/Ice/timeout/TestI.m10
-rw-r--r--objective-c/test/Slice/escape/Client.m2
-rw-r--r--php/config/Make.rules4
-rw-r--r--python/config/Make.rules2
-rw-r--r--python/modules/IcePy/Communicator.cpp4
-rw-r--r--python/modules/IcePy/Connection.cpp38
-rw-r--r--python/modules/IcePy/ConnectionInfo.cpp2
-rw-r--r--python/modules/IcePy/ObjectAdapter.cpp2
-rw-r--r--python/modules/IcePy/Operation.cpp21
-rw-r--r--python/modules/IcePy/Proxy.cpp8
-rw-r--r--python/modules/IcePy/Types.cpp38
-rw-r--r--python/modules/IcePy/Util.cpp20
-rw-r--r--ruby/config/Make.rules4
-rw-r--r--ruby/src/IceRuby/Communicator.cpp6
-rw-r--r--ruby/src/IceRuby/Properties.cpp2
-rw-r--r--ruby/src/IceRuby/Proxy.cpp8
-rw-r--r--ruby/src/IceRuby/Slice.cpp4
-rw-r--r--ruby/src/IceRuby/Types.cpp20
-rw-r--r--ruby/src/IceRuby/Util.cpp23
263 files changed, 2314 insertions, 2185 deletions
diff --git a/config/Make.rules.Darwin b/config/Make.rules.Darwin
index 02a10db6bbc..669deb3c68c 100644
--- a/config/Make.rules.Darwin
+++ b/config/Make.rules.Darwin
@@ -33,12 +33,16 @@ iphonesimulator_targetdir = $(if $(filter %/build,$5),/iphonesimulator)
# If building objects for a shared library, enable fPIC
shared_cppflags = $(if $(filter-out program,$($1_target)),-fPIC) -fvisibility=hidden
-cppflags = -Wall -Wdeprecated -Wstrict-prototypes -Werror -pthread $(if $(filter yes,$(OPTIMIZE)),-O2 -DNDEBUG,-g)
+cppflags = -Wall -Wextra -Wshadow -Wshadow-all -Wredundant-decls \
+ -Wdeprecated -Wstrict-prototypes -Werror -pthread \
+ $(if $(filter yes,$(OPTIMIZE)),-O2 -DNDEBUG,-g)
+
ifeq ($(MAXWARN),yes)
- cppflags += -Wextra -Wshadow -Wredundant-decls -Wweak-vtables
+ cppflags += -Wweak-vtables
endif
nodeprecatedwarnings-cppflags := -Wno-deprecated-declarations
+nounusedparameter-cppflags := -Wno-unused-parameter
loader_path = @loader_path
diff --git a/config/Make.rules.Linux b/config/Make.rules.Linux
index 1b0051d21d1..7ab5986243d 100644
--- a/config/Make.rules.Linux
+++ b/config/Make.rules.Linux
@@ -150,13 +150,16 @@ shared_ldflags = $(if $(filter-out program,$($1_target)),\
-pie $(if $(filter yes,$(new_dtags)),-Wl$(comma)--enable-new-dtags,-Wl$(comma)--disable-new-dtags) \
$$(call unique,$$(foreach d,$($4_dependencies),$$(call make-rpath-link-ldflags,$$d,$($4_dependencies)))))
-cppflags = -Wall -Wdeprecated -Werror -pthread $(if $(filter yes,$(OPTIMIZE)),-DNDEBUG,-g)
+cppflags = -Wall -Wextra -Wredundant-decls -Wshadow -Wdeprecated -Werror -pthread $(if $(filter yes,$(OPTIMIZE)),-DNDEBUG,-g)
ldflags = -pthread
-ifeq ($(MAXWARN),yes)
- cppflags += -Wextra -Wshadow -Wredundant-decls
+
+# -Wshadow is too strict with gcc 4
+ifeq ($(shell $(CXX) -dumpversion | cut -f1 -d\.),4)
+ cppflags := $(filter-out -Wshadow,$(cppflags))
endif
nodeprecatedwarnings-cppflags := -Wno-deprecated-declarations
+nounusedparameter-cppflags := -Wno-unused-parameter
loader_path = \$$ORIGIN
diff --git a/cpp/include/Ice/MetricsAdminI.h b/cpp/include/Ice/MetricsAdminI.h
index 46beb043200..cad066d3670 100644
--- a/cpp/include/Ice/MetricsAdminI.h
+++ b/cpp/include/Ice/MetricsAdminI.h
@@ -325,7 +325,14 @@ public:
}
}
- MetricsMapT(const MetricsMapT& other) : MetricsMapI(other), _destroyed(false)
+ MetricsMapT(const MetricsMapT& other)
+ :
+#ifndef ICE_CPP11_MAPPING
+ IceUtil::Shared(),
+#endif
+ MetricsMapI(other),
+ IceUtil::Mutex(),
+ _destroyed(false)
{
}
diff --git a/cpp/include/Ice/Proxy.h b/cpp/include/Ice/Proxy.h
index dc1c073c04b..cea157c6863 100644
--- a/cpp/include/Ice/Proxy.h
+++ b/cpp/include/Ice/Proxy.h
@@ -1620,8 +1620,6 @@ checkedCast(const ::std::shared_ptr<T>& b, const std::string& f, const ::Ice::Co
return r;
}
-ICE_API ::std::ostream& operator<<(::std::ostream&, const Ice::ObjectPrx&);
-
}
#else // C++98 mapping
diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h
index be1ab674324..4f40c912047 100644
--- a/cpp/include/IceUtil/Config.h
+++ b/cpp/include/IceUtil/Config.h
@@ -227,6 +227,12 @@
# define ICE_DEPRECATED_API(msg) /**/
#endif
+#if defined(__clang__) || defined(__GNUC__)
+# define ICE_MAYBE_UNUSED __attribute__((unused))
+#else
+# define ICE_MAYBE_UNUSED /**/
+#endif
+
#ifdef _WIN32
# include <windows.h>
diff --git a/cpp/include/IceUtil/PushDisableWarnings.h b/cpp/include/IceUtil/PushDisableWarnings.h
index 9bc7c0fb863..c66654e5144 100644
--- a/cpp/include/IceUtil/PushDisableWarnings.h
+++ b/cpp/include/IceUtil/PushDisableWarnings.h
@@ -24,6 +24,7 @@
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wredundant-decls" // expected when using forward Slice declarations
# pragma clang diagnostic ignored "-Wdocumentation-deprecated-sync" // see zeroc-ice/ice issue #211
+# pragma clang diagnostic ignored "-Wshadow-field-in-constructor" // expected in some generated header files
#elif defined(__GNUC__)
# pragma GCC diagnostic push
diff --git a/cpp/src/Glacier2/InstrumentationI.cpp b/cpp/src/Glacier2/InstrumentationI.cpp
index 304d86615f9..77b3017cc6c 100644
--- a/cpp/src/Glacier2/InstrumentationI.cpp
+++ b/cpp/src/Glacier2/InstrumentationI.cpp
@@ -109,7 +109,7 @@ namespace
struct ForwardedUpdate
{
- ForwardedUpdate(bool client) : client(client)
+ ForwardedUpdate(bool clientP) : client(clientP)
{
}
diff --git a/cpp/src/Glacier2/ProxyVerifier.cpp b/cpp/src/Glacier2/ProxyVerifier.cpp
index 21740ec2e56..ec7d2f8b3b6 100644
--- a/cpp/src/Glacier2/ProxyVerifier.cpp
+++ b/cpp/src/Glacier2/ProxyVerifier.cpp
@@ -577,21 +577,21 @@ public:
}
pos = 0;
- for(vector<AddressMatcher*>::const_iterator i = _addressRules.begin(); i != _addressRules.end(); ++i)
+ for(vector<AddressMatcher*>::const_iterator j = _addressRules.begin(); j != _addressRules.end(); ++j)
{
- if(!(*i)->match(host, pos))
+ if(!(*j)->match(host, pos))
{
if(_traceLevel >= 3)
{
Trace out(_communicator->getLogger(), "Glacier2");
- out << (*i)->toString() << " failed to match " << host << " at pos=" << pos << "\n";
+ out << (*j)->toString() << " failed to match " << host << " at pos=" << pos << "\n";
}
return false;
}
if(_traceLevel >= 3)
{
Trace out(_communicator->getLogger(), "Glacier2");
- out << (*i)->toString() << " matched " << host << " at pos=" << pos << "\n";
+ out << (*j)->toString() << " matched " << host << " at pos=" << pos << "\n";
}
}
}
diff --git a/cpp/src/Glacier2/SessionRouterI.cpp b/cpp/src/Glacier2/SessionRouterI.cpp
index 958bbc5e649..3a4b613002b 100644
--- a/cpp/src/Glacier2/SessionRouterI.cpp
+++ b/cpp/src/Glacier2/SessionRouterI.cpp
@@ -553,11 +553,11 @@ CreateSession::unexpectedAuthorizeException(const Ice::Exception& ex)
}
void
-CreateSession::createException(const Ice::Exception& ex)
+CreateSession::createException(const Ice::Exception& sex)
{
try
{
- ex.ice_throw();
+ sex.ice_throw();
}
catch(const CannotCreateSessionException& ex)
{
diff --git a/cpp/src/Ice/ACM.cpp b/cpp/src/Ice/ACM.cpp
index cc20ccc070d..4048d17ab82 100644
--- a/cpp/src/Ice/ACM.cpp
+++ b/cpp/src/Ice/ACM.cpp
@@ -43,41 +43,41 @@ IceInternal::ACMConfig::ACMConfig(const Ice::PropertiesPtr& p,
else
{
timeoutProperty = prefix + ".Timeout";
- };
+ }
- int timeout = p->getPropertyAsIntWithDefault(timeoutProperty, static_cast<int>(dflt.timeout.toSeconds()));
- if(timeout >= 0)
+ int timeoutVal = p->getPropertyAsIntWithDefault(timeoutProperty, static_cast<int>(dflt.timeout.toSeconds()));
+ if(timeoutVal >= 0)
{
- this->timeout = IceUtil::Time::seconds(timeout);
+ timeout = IceUtil::Time::seconds(timeoutVal);
}
else
{
l->warning("invalid value for property `" + timeoutProperty + "', default value will be used instead");
- this->timeout = dflt.timeout;
+ timeout = dflt.timeout;
}
int hb = p->getPropertyAsIntWithDefault(prefix + ".Heartbeat", static_cast<int>(dflt.heartbeat));
if(hb >= static_cast<int>(ICE_ENUM(ACMHeartbeat, HeartbeatOff)) &&
hb <= static_cast<int>(ICE_ENUM(ACMHeartbeat, HeartbeatAlways)))
{
- this->heartbeat = static_cast<Ice::ACMHeartbeat>(hb);
+ heartbeat = static_cast<Ice::ACMHeartbeat>(hb);
}
else
{
l->warning("invalid value for property `" + prefix + ".Heartbeat" + "', default value will be used instead");
- this->heartbeat = dflt.heartbeat;
+ heartbeat = dflt.heartbeat;
}
int cl = p->getPropertyAsIntWithDefault(prefix + ".Close", static_cast<int>(dflt.close));
if(cl >= static_cast<int>(ICE_ENUM(ACMClose, CloseOff)) &&
cl <= static_cast<int>(ICE_ENUM(ACMClose, CloseOnIdleForceful)))
{
- this->close = static_cast<Ice::ACMClose>(cl);
+ close = static_cast<Ice::ACMClose>(cl);
}
else
{
l->warning("invalid value for property `" + prefix + ".Close" + "', default value will be used instead");
- this->close = dflt.close;
+ close = dflt.close;
}
}
@@ -307,7 +307,7 @@ IceInternal::ConnectionACMMonitor::~ConnectionACMMonitor()
}
void
-IceInternal::ConnectionACMMonitor::add(const ConnectionIPtr& connection)
+IceInternal::ConnectionACMMonitor::add(ICE_MAYBE_UNUSED const ConnectionIPtr& connection)
{
Lock sync(*this);
assert(!_connection && connection);
@@ -319,7 +319,7 @@ IceInternal::ConnectionACMMonitor::add(const ConnectionIPtr& connection)
}
void
-IceInternal::ConnectionACMMonitor::remove(const ConnectionIPtr& connection)
+IceInternal::ConnectionACMMonitor::remove(ICE_MAYBE_UNUSED const ConnectionIPtr& connection)
{
Lock sync(*this);
assert(_connection == connection);
diff --git a/cpp/src/Ice/ArgVector.cpp b/cpp/src/Ice/ArgVector.cpp
index 29628f2341d..71140916c2f 100644
--- a/cpp/src/Ice/ArgVector.cpp
+++ b/cpp/src/Ice/ArgVector.cpp
@@ -10,13 +10,13 @@
#include <Ice/ArgVector.h>
#include <cstring>
-IceInternal::ArgVector::ArgVector(int argc, const char* const argv[])
+IceInternal::ArgVector::ArgVector(int argcP, const char* const argvP[])
{
- assert(argc >= 0);
- _args.resize(argc);
- for(int i = 0; i < argc; ++i)
+ assert(argcP >= 0);
+ _args.resize(argcP);
+ for(int i = 0; i < argcP; ++i)
{
- _args[i] = argv[i];
+ _args[i] = argvP[i];
}
setupArgcArgv();
}
diff --git a/cpp/src/Ice/CollocatedRequestHandler.cpp b/cpp/src/Ice/CollocatedRequestHandler.cpp
index 6a46dfb5efc..0c66da35e8e 100644
--- a/cpp/src/Ice/CollocatedRequestHandler.cpp
+++ b/cpp/src/Ice/CollocatedRequestHandler.cpp
@@ -270,7 +270,7 @@ CollocatedRequestHandler::systemException(Int requestId, const SystemException&
}
void
-CollocatedRequestHandler::invokeException(Int requestId, const LocalException& ex, int invokeNum, bool amd)
+CollocatedRequestHandler::invokeException(Int requestId, const LocalException& ex, int /*invokeNum*/, bool amd)
{
handleException(requestId, ex, amd);
_adapter->decDirectCount();
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp
index 2df1fe56f52..5215a4f122c 100644
--- a/cpp/src/Ice/CommunicatorI.cpp
+++ b/cpp/src/Ice/CommunicatorI.cpp
@@ -58,7 +58,7 @@ CommunicatorFlushBatchAsync::flushConnection(const ConnectionIPtr& con, Ice::Com
FlushBatch(const CommunicatorFlushBatchAsyncPtr& outAsync,
const InstancePtr& instance,
InvocationObserver& observer) :
- OutgoingAsyncBase(instance), _outAsync(outAsync), _observer(observer)
+ OutgoingAsyncBase(instance), _outAsync(outAsync), _parentObserver(observer)
{
}
@@ -82,7 +82,7 @@ CommunicatorFlushBatchAsync::flushConnection(const ConnectionIPtr& con, Ice::Com
virtual InvocationObserver&
getObserver()
{
- return _observer;
+ return _parentObserver;
}
virtual bool handleSent(bool, bool)
@@ -118,7 +118,7 @@ CommunicatorFlushBatchAsync::flushConnection(const ConnectionIPtr& con, Ice::Com
private:
const CommunicatorFlushBatchAsyncPtr _outAsync;
- InvocationObserver& _observer;
+ InvocationObserver& _parentObserver;
};
{
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp
index cc81ec65f12..e61c0ac6f35 100644
--- a/cpp/src/Ice/ConnectionFactory.cpp
+++ b/cpp/src/Ice/ConnectionFactory.cpp
@@ -1635,7 +1635,7 @@ IceInternal::IncomingConnectionFactory::connectionStartCompleted(const Ice::Conn
void
IceInternal::IncomingConnectionFactory::connectionStartFailed(const Ice::ConnectionIPtr& /*connection*/,
- const Ice::LocalException& ex)
+ const Ice::LocalException&)
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
if(_state >= StateClosed)
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
index 1f3bb85464c..b2dcbfb97eb 100644
--- a/cpp/src/Ice/ConnectionI.cpp
+++ b/cpp/src/Ice/ConnectionI.cpp
@@ -1680,8 +1680,8 @@ Ice::ConnectionI::message(ThreadPoolCurrent& current)
Byte messageType;
_readStream.read(messageType);
- Byte compress;
- _readStream.read(compress);
+ Byte compressByte;
+ _readStream.read(compressByte);
Int size;
_readStream.read(size);
if(size < headerSize)
diff --git a/cpp/src/Ice/GCObject.cpp b/cpp/src/Ice/GCObject.cpp
index 1d365fb6813..8cbdedcd958 100644
--- a/cpp/src/Ice/GCObject.cpp
+++ b/cpp/src/Ice/GCObject.cpp
@@ -118,7 +118,7 @@ public:
}
bool
-ClearMembers::visit(GCObject* obj)
+ClearMembers::visit(GCObject*)
{
return true;
}
diff --git a/cpp/src/Ice/Incoming.cpp b/cpp/src/Ice/Incoming.cpp
index 8a64b7eabe7..dc22aa009a5 100644
--- a/cpp/src/Ice/Incoming.cpp
+++ b/cpp/src/Ice/Incoming.cpp
@@ -67,6 +67,7 @@ IceInternal::IncomingBase::IncomingBase(Instance* instance, ResponseHandler* res
}
IceInternal::IncomingBase::IncomingBase(IncomingBase& other) :
+ IceUtil::noncopyable(), // TODO, remove noncopyable base class
_current(other._current),
_servant(other._servant),
_locator(other._locator),
@@ -389,7 +390,7 @@ IceInternal::IncomingBase::handleException(const std::exception& exc, bool amd)
_responseHandler->sendNoResponse();
}
}
- else if(const UserException* ex = dynamic_cast<const UserException*>(&exc))
+ else if(const UserException* uex = dynamic_cast<const UserException*>(&exc))
{
_observer.userException();
@@ -402,7 +403,7 @@ IceInternal::IncomingBase::handleException(const std::exception& exc, bool amd)
_os.write(_current.requestId);
_os.write(replyUserException);
_os.startEncapsulation(_current.encoding, _format);
- _os.write(*ex);
+ _os.write(*uex);
_os.endEncapsulation();
_observer.reply(static_cast<Int>(_os.b.size() - headerSize - 4));
_responseHandler->sendResponse(_current.requestId, &_os, _compress, amd);
@@ -454,11 +455,11 @@ IceInternal::IncomingBase::handleException(const std::exception& exc, bool amd)
}
_os.write(str.str(), false);
}
- else if(const UserException* ue = dynamic_cast<const UserException*>(&exc))
+ else if(const UserException* use = dynamic_cast<const UserException*>(&exc))
{
_os.write(replyUnknownUserException);
ostringstream str;
- str << *ue;
+ str << *use;
if(IceUtilInternal::printStackTraces)
{
str << '\n' << ex->ice_stackTrace();
@@ -659,11 +660,11 @@ IceInternal::Incoming::invoke(const ServantManagerPtr& servantManager, InputStre
if(obsv)
{
// Read the parameter encapsulation size.
- Ice::Int sz;
- _is->read(sz);
+ Ice::Int encapsSize;
+ _is->read(encapsSize);
_is->i -= 4;
- _observer.attach(obsv->getDispatchObserver(_current, static_cast<Int>(_is->i - start + sz)));
+ _observer.attach(obsv->getDispatchObserver(_current, static_cast<Int>(_is->i - start + encapsSize)));
}
//
diff --git a/cpp/src/Ice/InputStream.cpp b/cpp/src/Ice/InputStream.cpp
index 5b70f30b864..1427aea6ee7 100644
--- a/cpp/src/Ice/InputStream.cpp
+++ b/cpp/src/Ice/InputStream.cpp
@@ -224,22 +224,22 @@ Ice::InputStream::setCompactIdResolver(const CompactIdResolverPtr& r)
#ifndef ICE_CPP11_MAPPING
void
-Ice::InputStream::setCollectObjects(bool b)
+Ice::InputStream::setCollectObjects(bool on)
{
- _collectObjects = b;
+ _collectObjects = on;
}
#endif
void
-Ice::InputStream::setSliceValues(bool b)
+Ice::InputStream::setSliceValues(bool on)
{
- _sliceValues = b;
+ _sliceValues = on;
}
void
-Ice::InputStream::setTraceSlicing(bool b)
+Ice::InputStream::setTraceSlicing(bool on)
{
- _traceSlicing = b;
+ _traceSlicing = on;
}
void
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 734823cdc06..45dad54ca6e 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -1845,9 +1845,9 @@ IceInternal::Instance::addObjectFactory(const Ice::ObjectFactoryPtr& factory, co
// with the value factory manager. This may raise AlreadyRegisteredException.
//
#ifdef ICE_CPP11_MAPPING
- _initData.valueFactoryManager->add([factory](const string& id)
+ _initData.valueFactoryManager->add([factory](const string& ident)
{
- return factory->create(id);
+ return factory->create(ident);
},
id);
#else
diff --git a/cpp/src/Ice/InstrumentationI.cpp b/cpp/src/Ice/InstrumentationI.cpp
index c1c1742da07..6099c3f89eb 100644
--- a/cpp/src/Ice/InstrumentationI.cpp
+++ b/cpp/src/Ice/InstrumentationI.cpp
@@ -52,7 +52,7 @@ getThreadStateMetric(ThreadState s)
struct ThreadStateChanged
{
- ThreadStateChanged(ThreadState oldState, ThreadState newState) : oldState(oldState), newState(newState)
+ ThreadStateChanged(ThreadState oldStateP, ThreadState newStateP) : oldState(oldStateP), newState(newStateP)
{
}
diff --git a/cpp/src/Ice/LocatorInfo.cpp b/cpp/src/Ice/LocatorInfo.cpp
index 126e6a1e808..7fa023a8c9c 100644
--- a/cpp/src/Ice/LocatorInfo.cpp
+++ b/cpp/src/Ice/LocatorInfo.cpp
@@ -48,7 +48,7 @@ public:
#ifdef ICE_CPP11_MAPPING
LocatorInfo::RequestPtr request = this;
_locatorInfo->getLocator()->findObjectByIdAsync(
- _ref->getIdentity(),
+ _reference->getIdentity(),
[request](const ObjectPrxPtr& object)
{
request->response(object);
@@ -66,7 +66,7 @@ public:
});
#else
_locatorInfo->getLocator()->begin_findObjectById(
- _ref->getIdentity(),
+ _reference->getIdentity(),
newCallback_Locator_findObjectById(static_cast<LocatorInfo::Request*>(this),
&LocatorInfo::Request::response,
&LocatorInfo::Request::exception));
@@ -94,7 +94,7 @@ public:
{
#ifdef ICE_CPP11_MAPPING
LocatorInfo::RequestPtr request = this;
- _locatorInfo->getLocator()->findAdapterByIdAsync(_ref->getAdapterId(),
+ _locatorInfo->getLocator()->findAdapterByIdAsync(_reference->getAdapterId(),
[request](const shared_ptr<Ice::ObjectPrx>& object)
{
request->response(object);
@@ -112,7 +112,7 @@ public:
});
#else
_locatorInfo->getLocator()->begin_findAdapterById(
- _ref->getAdapterId(),
+ _reference->getAdapterId(),
newCallback_Locator_findAdapterById(static_cast<LocatorInfo::Request*>(this),
&LocatorInfo::Request::response,
&LocatorInfo::Request::exception));
@@ -352,7 +352,7 @@ IceInternal::LocatorInfo::RequestCallback::response(const LocatorInfoPtr& locato
if(proxy)
{
ReferencePtr r = proxy->_getReference();
- if(_ref->isWellKnown() && !isSupported(_ref->getEncoding(), r->getEncoding()))
+ if(_reference->isWellKnown() && !isSupported(_reference->getEncoding(), r->getEncoding()))
{
//
// If a well-known proxy and the returned proxy encoding
@@ -364,26 +364,26 @@ IceInternal::LocatorInfo::RequestCallback::response(const LocatorInfoPtr& locato
{
endpoints = r->getEndpoints();
}
- else if(_ref->isWellKnown() && !r->isWellKnown())
+ else if(_reference->isWellKnown() && !r->isWellKnown())
{
//
// We're resolving the endpoints of a well-known object and the proxy returned
// by the locator is an indirect proxy. We now need to resolve the endpoints
// of this indirect proxy.
//
- if(_ref->getInstance()->traceLevels()->location >= 1)
+ if(_reference->getInstance()->traceLevels()->location >= 1)
{
locatorInfo->trace("retrieved adapter for well-known object from locator, adding to locator cache",
- _ref, r);
+ _reference, r);
}
- locatorInfo->getEndpoints(r, _ref, _ttl, _callback);
+ locatorInfo->getEndpoints(r, _reference, _ttl, _callback);
return;
}
}
- if(_ref->getInstance()->traceLevels()->location >= 1)
+ if(_reference->getInstance()->traceLevels()->location >= 1)
{
- locatorInfo->getEndpointsTrace(_ref, endpoints, false);
+ locatorInfo->getEndpointsTrace(_reference, endpoints, false);
}
if(_callback)
{
@@ -396,7 +396,7 @@ IceInternal::LocatorInfo::RequestCallback::exception(const LocatorInfoPtr& locat
{
try
{
- locatorInfo->getEndpointsException(_ref, exc); // This throws.
+ locatorInfo->getEndpointsException(_reference, exc); // This throws.
}
catch(const Ice::LocalException& ex)
{
@@ -410,7 +410,7 @@ IceInternal::LocatorInfo::RequestCallback::exception(const LocatorInfoPtr& locat
IceInternal::LocatorInfo::RequestCallback::RequestCallback(const ReferencePtr& ref,
int ttl,
const GetEndpointsCallbackPtr& cb) :
- _ref(ref), _ttl(ttl), _callback(cb)
+ _reference(ref), _ttl(ttl), _callback(cb)
{
}
@@ -452,7 +452,7 @@ IceInternal::LocatorInfo::Request::addCallback(const ReferencePtr& ref,
}
IceInternal::LocatorInfo::Request::Request(const LocatorInfoPtr& locatorInfo, const ReferencePtr& ref) :
- _locatorInfo(locatorInfo), _ref(ref), _sent(false), _response(false)
+ _locatorInfo(locatorInfo), _reference(ref), _sent(false), _response(false)
{
}
@@ -461,7 +461,7 @@ IceInternal::LocatorInfo::Request::response(const Ice::ObjectPrxPtr& proxy)
{
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor);
- _locatorInfo->finishRequest(_ref, _wellKnownRefs, proxy, false);
+ _locatorInfo->finishRequest(_reference, _wellKnownRefs, proxy, false);
_response = true;
_proxy = proxy;
_monitor.notifyAll();
@@ -477,7 +477,7 @@ IceInternal::LocatorInfo::Request::exception(const Ice::Exception& ex)
{
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor);
- _locatorInfo->finishRequest(_ref, _wellKnownRefs, 0, dynamic_cast<const Ice::UserException*>(&ex));
+ _locatorInfo->finishRequest(_reference, _wellKnownRefs, 0, dynamic_cast<const Ice::UserException*>(&ex));
ICE_SET_EXCEPTION_FROM_CLONE(_exception, ex.ice_clone());
_monitor.notifyAll();
diff --git a/cpp/src/Ice/LocatorInfo.h b/cpp/src/Ice/LocatorInfo.h
index f381134c803..51ae4993425 100644
--- a/cpp/src/Ice/LocatorInfo.h
+++ b/cpp/src/Ice/LocatorInfo.h
@@ -106,7 +106,7 @@ public:
private:
- const ReferencePtr _ref;
+ const ReferencePtr _reference;
const int _ttl;
const GetEndpointsCallbackPtr _callback;
};
@@ -128,7 +128,7 @@ public:
virtual void send() = 0;
const LocatorInfoPtr _locatorInfo;
- const ReferencePtr _ref;
+ const ReferencePtr _reference;
private:
diff --git a/cpp/src/Ice/LoggerAdminI.cpp b/cpp/src/Ice/LoggerAdminI.cpp
index 29d7f6d847c..4c9e12502a0 100644
--- a/cpp/src/Ice/LoggerAdminI.cpp
+++ b/cpp/src/Ice/LoggerAdminI.cpp
@@ -434,9 +434,9 @@ LoggerAdminI::attachRemoteLogger(const RemoteLoggerPrx& prx,
{
rethrow_exception(e);
}
- catch(const Ice::LocalException& e)
+ catch(const Ice::LocalException& le)
{
- self->deadRemoteLogger(remoteLogger, logger, e, "init");
+ self->deadRemoteLogger(remoteLogger, logger, le, "init");
}
});
}
@@ -618,16 +618,16 @@ LoggerAdminI::log(const LogMessage& logMessage)
//
// Queue updated, now find which remote loggers want this message
//
- for(RemoteLoggerMap::const_iterator p = _remoteLoggerMap.begin(); p != _remoteLoggerMap.end(); ++p)
+ for(RemoteLoggerMap::const_iterator q = _remoteLoggerMap.begin(); q != _remoteLoggerMap.end(); ++q)
{
- const Filters& filters = p->second;
+ const Filters& filters = q->second;
if(filters.messageTypes.empty() || filters.messageTypes.count(logMessage.type) != 0)
{
if(logMessage.type != ICE_ENUM(LogMessageType, TraceMessage) || filters.traceCategories.empty() ||
filters.traceCategories.count(logMessage.traceCategory) != 0)
{
- remoteLoggers.push_back(p->first);
+ remoteLoggers.push_back(q->first);
}
}
}
diff --git a/cpp/src/Ice/LoggerI.cpp b/cpp/src/Ice/LoggerI.cpp
index 11dd325abdb..34402e695c3 100644
--- a/cpp/src/Ice/LoggerI.cpp
+++ b/cpp/src/Ice/LoggerI.cpp
@@ -176,22 +176,22 @@ Ice::LoggerI::write(const string& message, bool indent)
string date = IceUtil::Time::now().toString("%Y%m%d-%H%M%S");
while(true)
{
- ostringstream s;
- s << basename << "-" << date;
+ ostringstream oss;
+ oss << basename << "-" << date;
if(id > 0)
{
- s << "-" << id;
+ oss << "-" << id;
}
if(!ext.empty())
{
- s << "." << ext;
+ oss << "." << ext;
}
- if(IceUtilInternal::fileExists(s.str()))
+ if(IceUtilInternal::fileExists(oss.str()))
{
id++;
continue;
}
- archive = s.str();
+ archive = oss.str();
break;
}
diff --git a/cpp/src/Ice/MetricsAdminI.cpp b/cpp/src/Ice/MetricsAdminI.cpp
index a6b43e38411..8f0efd735fa 100644
--- a/cpp/src/Ice/MetricsAdminI.cpp
+++ b/cpp/src/Ice/MetricsAdminI.cpp
@@ -203,6 +203,11 @@ MetricsMapI::MetricsMapI(const std::string& mapPrefix, const PropertiesPtr& prop
}
MetricsMapI::MetricsMapI(const MetricsMapI& map) :
+#ifdef ICE_CPP11_MAPPING
+ std::enable_shared_from_this<MetricsMapI>(),
+#else
+ IceUtil::Shared(),
+#endif
_properties(map._properties),
_groupByAttributes(map._groupByAttributes),
_groupBySeparators(map._groupBySeparators),
@@ -451,11 +456,11 @@ MetricsAdminI::updateViews()
q = views.insert(make_pair(viewName, q->second)).first;
}
- for(map<string, MetricsMapFactoryPtr>::const_iterator p = _factories.begin(); p != _factories.end(); ++p)
+ for(map<string, MetricsMapFactoryPtr>::const_iterator r = _factories.begin(); r != _factories.end(); ++r)
{
- if(q->second->addOrUpdateMap(_properties, p->first, p->second, _logger))
+ if(q->second->addOrUpdateMap(_properties, r->first, r->second, _logger))
{
- updatedMaps.insert(p->second);
+ updatedMaps.insert(r->second);
}
}
}
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index f4629771ac6..1a943d09271 100755
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -52,6 +52,10 @@
# include <sys/sockio.h>
#endif
+#if defined(__GNUC__) && (__GNUC__ < 5)
+# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
+
#if defined(_WIN32)
# ifndef SIO_LOOPBACK_FAST_PATH
# define SIO_LOOPBACK_FAST_PATH _WSAIOW(IOC_VENDOR,16)
@@ -1156,7 +1160,7 @@ IceInternal::getAddresses(const string& host, int port, ProtocolSupport protocol
struct addrinfo* info = 0;
int retry = 5;
- struct addrinfo hints = { 0 };
+ struct addrinfo hints = {};
if(protocol == EnableIPv4)
{
hints.ai_family = PF_INET;
diff --git a/cpp/src/Ice/OpaqueEndpointI.cpp b/cpp/src/Ice/OpaqueEndpointI.cpp
index 9a5de0c1db9..d294dbde7b3 100644
--- a/cpp/src/Ice/OpaqueEndpointI.cpp
+++ b/cpp/src/Ice/OpaqueEndpointI.cpp
@@ -57,7 +57,7 @@ class OpaqueEndpointInfoI : public Ice::OpaqueEndpointInfo
{
public:
- OpaqueEndpointInfoI(Ice::Short type, const Ice::EncodingVersion& rawEncoding, const Ice::ByteSeq& rawByes);
+ OpaqueEndpointInfoI(Ice::Short type, const Ice::EncodingVersion& rawEncoding, const Ice::ByteSeq& rawBytes);
virtual Ice::Short
type() const ICE_NOEXCEPT
@@ -86,9 +86,9 @@ private:
//
// COMPILERFIX: inlining this constructor causes crashes with gcc 4.0.1.
//
-OpaqueEndpointInfoI::OpaqueEndpointInfoI(Ice::Short type, const Ice::EncodingVersion& rawEncoding,
- const Ice::ByteSeq& rawBytes) :
- Ice::OpaqueEndpointInfo(ICE_NULLPTR, -1, false, rawEncoding, rawBytes),
+OpaqueEndpointInfoI::OpaqueEndpointInfoI(Ice::Short type, const Ice::EncodingVersion& rawEncodingP,
+ const Ice::ByteSeq& rawBytesP) :
+ Ice::OpaqueEndpointInfo(ICE_NULLPTR, -1, false, rawEncodingP, rawBytesP),
_type(type)
{
}
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp
index d91288630d8..5883ec11a5a 100644
--- a/cpp/src/Ice/OutgoingAsync.cpp
+++ b/cpp/src/Ice/OutgoingAsync.cpp
@@ -643,7 +643,7 @@ ProxyOutgoingAsyncBase::cancelable(const CancellationHandlerPtr& handler)
}
void
-ProxyOutgoingAsyncBase::retryException(const Exception& ex)
+ProxyOutgoingAsyncBase::retryException(const Exception&)
{
try
{
diff --git a/cpp/src/Ice/OutputStream.cpp b/cpp/src/Ice/OutputStream.cpp
index 74295648081..8adf90577ad 100644
--- a/cpp/src/Ice/OutputStream.cpp
+++ b/cpp/src/Ice/OutputStream.cpp
@@ -662,9 +662,9 @@ Ice::OutputStream::write(const string* begin, const string* end, bool convert)
writeSize(sz);
if(sz > 0)
{
- for(int i = 0; i < sz; ++i)
+ for(int j = 0; j < sz; ++j)
{
- write(begin[i], convert);
+ write(begin[j], convert);
}
}
}
@@ -757,9 +757,9 @@ Ice::OutputStream::write(const wstring* begin, const wstring* end)
writeSize(sz);
if(sz > 0)
{
- for(int i = 0; i < sz; ++i)
+ for(int j = 0; j < sz; ++j)
{
- write(begin[i]);
+ write(begin[j]);
}
}
}
diff --git a/cpp/src/Ice/PropertiesAdminI.cpp b/cpp/src/Ice/PropertiesAdminI.cpp
index 131830fa17d..fca4132d3b4 100644
--- a/cpp/src/Ice/PropertiesAdminI.cpp
+++ b/cpp/src/Ice/PropertiesAdminI.cpp
@@ -198,7 +198,7 @@ PropertiesAdminI::setProperties(const PropertyDict& props, const Current&)
for(const auto& cb : callbacks)
#else
vector<PropertiesAdminUpdateCallbackPtr> callbacks = _updateCallbacks;
- for(vector<PropertiesAdminUpdateCallbackPtr>::const_iterator p = callbacks.begin(); p != callbacks.end(); ++p)
+ for(vector<PropertiesAdminUpdateCallbackPtr>::const_iterator q = callbacks.begin(); q != callbacks.end(); ++q)
#endif
{
try
@@ -206,7 +206,7 @@ PropertiesAdminI::setProperties(const PropertyDict& props, const Current&)
#ifdef ICE_CPP11_MAPPING
cb(changes);
#else
- (*p)->updated(changes);
+ (*q)->updated(changes);
#endif
}
catch(const std::exception& ex)
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index c655f08e46b..128e02727ce 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -483,7 +483,7 @@ IceProxy::Ice::Object::_iceI_begin_ice_invoke(const string& operation,
const Context& ctx,
const ::IceInternal::CallbackBasePtr& del,
const ::Ice::LocalObjectPtr& cookie,
- bool sync)
+ bool /*sync*/)
{
pair<const Byte*, const Byte*> inPair;
if(inEncaps.empty())
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp
index f4b295f6b23..6e35deb5fb1 100644
--- a/cpp/src/Ice/Reference.cpp
+++ b/cpp/src/Ice/Reference.cpp
@@ -550,6 +550,7 @@ IceInternal::Reference::Reference(const InstancePtr& instance,
}
IceInternal::Reference::Reference(const Reference& r) :
+ IceUtil::Shared(),
_hashInitialized(false),
_instance(r._instance),
_communicator(r._communicator),
diff --git a/cpp/src/Ice/RetryQueue.cpp b/cpp/src/Ice/RetryQueue.cpp
index 1f382b268a6..a73921cc8a3 100644
--- a/cpp/src/Ice/RetryQueue.cpp
+++ b/cpp/src/Ice/RetryQueue.cpp
@@ -44,7 +44,7 @@ IceInternal::RetryTask::runTimerTask()
}
void
-IceInternal::RetryTask::asyncRequestCanceled(const OutgoingAsyncBasePtr& outAsync, const Ice::LocalException& ex)
+IceInternal::RetryTask::asyncRequestCanceled(const OutgoingAsyncBasePtr& /*outAsync*/, const Ice::LocalException& ex)
{
if(_queue->cancel(ICE_SHARED_FROM_THIS))
{
diff --git a/cpp/src/Ice/RouterInfo.cpp b/cpp/src/Ice/RouterInfo.cpp
index 18d56ccb201..cbc2cf12b6a 100644
--- a/cpp/src/Ice/RouterInfo.cpp
+++ b/cpp/src/Ice/RouterInfo.cpp
@@ -259,9 +259,9 @@ IceInternal::RouterInfo::addProxy(const Ice::ObjectPrxPtr& proxy, const AddProxy
#ifdef ICE_CPP11_MAPPING
RouterInfoPtr self = this;
_router->addProxiesAsync(proxies,
- [self, cookie](const Ice::ObjectProxySeq& proxies)
+ [self, cookie](const Ice::ObjectProxySeq& p)
{
- self->addProxyResponse(proxies, cookie);
+ self->addProxyResponse(p, cookie);
},
[self, cookie](exception_ptr e)
{
diff --git a/cpp/src/Ice/Selector.cpp b/cpp/src/Ice/Selector.cpp
index 52de030b469..8f16bdd3a12 100644
--- a/cpp/src/Ice/Selector.cpp
+++ b/cpp/src/Ice/Selector.cpp
@@ -379,8 +379,14 @@ Selector::enable(EventHandler* handler, SocketOperation status)
epoll_event event;
memset(&event, 0, sizeof(epoll_event));
event.data.ptr = handler;
- event.events |= newStatus & SocketOperationRead ? EPOLLIN : 0;
- event.events |= newStatus & SocketOperationWrite ? EPOLLOUT : 0;
+ if(newStatus & SocketOperationRead)
+ {
+ event.events |= EPOLLIN;
+ }
+ if(newStatus & SocketOperationWrite)
+ {
+ event.events |= EPOLLOUT;
+ }
if(epoll_ctl(_queueFd, previous ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, fd, &event) != 0)
{
Ice::Error out(_instance->initializationData().logger);
@@ -426,8 +432,14 @@ Selector::disable(EventHandler* handler, SocketOperation status)
epoll_event event;
memset(&event, 0, sizeof(epoll_event));
event.data.ptr = handler;
- event.events |= newStatus & SocketOperationRead ? EPOLLIN : 0;
- event.events |= newStatus & SocketOperationWrite ? EPOLLOUT : 0;
+ if(newStatus & SocketOperationRead)
+ {
+ event.events |= EPOLLIN;
+ }
+ if(newStatus & SocketOperationWrite)
+ {
+ event.events |= EPOLLOUT;
+ }
if(epoll_ctl(_queueFd, newStatus ? EPOLL_CTL_MOD : EPOLL_CTL_DEL, fd, &event) != 0)
{
Ice::Error out(_instance->initializationData().logger);
@@ -929,8 +941,14 @@ Selector::updateSelectorForEventHandler(EventHandler* handler, SocketOperation r
status = static_cast<SocketOperation>(status & ~handler->_disabled);
previous = static_cast<SocketOperation>(previous & ~handler->_disabled);
}
- event.events |= status & SocketOperationRead ? EPOLLIN : 0;
- event.events |= status & SocketOperationWrite ? EPOLLOUT : 0;
+ if(status & SocketOperationRead)
+ {
+ event.events |= EPOLLIN;
+ }
+ if(status & SocketOperationWrite)
+ {
+ event.events |= EPOLLOUT;
+ }
int op;
if(!previous && status)
{
diff --git a/cpp/src/Ice/ServantManager.cpp b/cpp/src/Ice/ServantManager.cpp
index 91d1578a487..ca990f2d33a 100644
--- a/cpp/src/Ice/ServantManager.cpp
+++ b/cpp/src/Ice/ServantManager.cpp
@@ -212,22 +212,22 @@ IceInternal::ServantManager::findServant(const Identity& ident, const string& fa
if(p == servantMapMap.end() || (q = p->second.find(facet)) == p->second.end())
{
- DefaultServantMap::const_iterator p = _defaultServantMap.find(ident.category);
- if(p == _defaultServantMap.end())
+ DefaultServantMap::const_iterator d = _defaultServantMap.find(ident.category);
+ if(d == _defaultServantMap.end())
{
- p = _defaultServantMap.find("");
- if(p == _defaultServantMap.end())
+ d = _defaultServantMap.find("");
+ if(d == _defaultServantMap.end())
{
return 0;
}
else
{
- return p->second;
+ return d->second;
}
}
else
{
- return p->second;
+ return d->second;
}
}
else
diff --git a/cpp/src/Ice/Thread.cpp b/cpp/src/Ice/Thread.cpp
index dc10ed825e2..4186303e0ea 100644
--- a/cpp/src/Ice/Thread.cpp
+++ b/cpp/src/Ice/Thread.cpp
@@ -567,8 +567,8 @@ IceUtil::ThreadControl::join()
throw BadThreadControlException(__FILE__, __LINE__);
}
- void* ignore = 0;
- int rc = pthread_join(_thread, &ignore);
+ void* status = 0;
+ int rc = pthread_join(_thread, &status);
if(rc != 0)
{
throw ThreadSyscallException(__FILE__, __LINE__, rc);
diff --git a/cpp/src/Ice/TransceiverF.h b/cpp/src/Ice/TransceiverF.h
index 69ce222eca0..e28b124e8b2 100644
--- a/cpp/src/Ice/TransceiverF.h
+++ b/cpp/src/Ice/TransceiverF.h
@@ -30,8 +30,8 @@ ICE_API IceUtil::Shared* upCast(UdpTransceiver*);
typedef Handle<UdpTransceiver> UdpTransceiverPtr;
class WSTransceiver;
-ICE_API IceUtil::Shared* upCast(Transceiver*);
-typedef Handle<Transceiver> TransceiverPtr;
+ICE_API IceUtil::Shared* upCast(WSTransceiver*);
+typedef Handle<WSTransceiver> WSTransceiverPtr;
}
diff --git a/cpp/src/Ice/WSTransceiver.h b/cpp/src/Ice/WSTransceiver.h
index cb1533d8a25..caf06a96d69 100644
--- a/cpp/src/Ice/WSTransceiver.h
+++ b/cpp/src/Ice/WSTransceiver.h
@@ -140,7 +140,6 @@ private:
std::vector<Ice::Byte> _pingPayload;
};
-typedef IceUtil::Handle<WSTransceiver> WSTransceiverPtr;
}
diff --git a/cpp/src/IceBT/DBus.cpp b/cpp/src/IceBT/DBus.cpp
index 927d8299249..97c19935767 100644
--- a/cpp/src/IceBT/DBus.cpp
+++ b/cpp/src/IceBT/DBus.cpp
@@ -751,9 +751,9 @@ private:
//
string sig = ::dbus_message_iter_get_signature(_iter);
string::iterator p = sig.begin();
- TypePtr t = buildType(p);
+ TypePtr vt = buildType(p);
VariantValuePtr v = new VariantValue;
- v->v = readValue(t);
+ v->v = readValue(vt);
popIter();
return v;
}
diff --git a/cpp/src/IceBT/EndpointI.cpp b/cpp/src/IceBT/EndpointI.cpp
index 281ed56ad8a..3c6b26a3c20 100644
--- a/cpp/src/IceBT/EndpointI.cpp
+++ b/cpp/src/IceBT/EndpointI.cpp
@@ -171,7 +171,7 @@ IceBT::EndpointI::transceiver() const
}
void
-IceBT::EndpointI::connectors_async(EndpointSelectionType selType, const IceInternal::EndpointI_connectorsPtr& cb) const
+IceBT::EndpointI::connectors_async(EndpointSelectionType /*selType*/, const IceInternal::EndpointI_connectorsPtr& cb) const
{
vector<IceInternal::ConnectorPtr> connectors;
connectors.push_back(new ConnectorI(_instance, _addr, _uuid, _timeout, _connectionId));
diff --git a/cpp/src/IceBT/TransceiverI.cpp b/cpp/src/IceBT/TransceiverI.cpp
index d9ac8fd9aef..35bc5d54a30 100644
--- a/cpp/src/IceBT/TransceiverI.cpp
+++ b/cpp/src/IceBT/TransceiverI.cpp
@@ -31,7 +31,7 @@ IceBT::TransceiverI::getNativeInfo()
}
IceInternal::SocketOperation
-IceBT::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::Buffer& writeBuffer)
+IceBT::TransceiverI::initialize(IceInternal::Buffer& /*readBuffer*/, IceInternal::Buffer& /*writeBuffer*/)
{
IceUtil::Monitor<IceUtil::Mutex>::Lock lock(_lock);
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp
index 7c730f1d26d..d0c82984777 100644
--- a/cpp/src/IceBox/ServiceManagerI.cpp
+++ b/cpp/src/IceBox/ServiceManagerI.cpp
@@ -361,12 +361,11 @@ IceBox::ServiceManagerI::start()
throw FailureException(__FILE__, __LINE__, "ServiceManager: configuration must include at least one IceBox service");
}
- PropertyDict::iterator p;
StringSeq loadOrder = properties->getPropertyAsList("IceBox.LoadOrder");
vector<StartServiceInfo> servicesInfo;
for(StringSeq::const_iterator q = loadOrder.begin(); q != loadOrder.end(); ++q)
{
- p = services.find(prefix + *q);
+ PropertyDict::iterator p = services.find(prefix + *q);
if(p == services.end())
{
throw FailureException(__FILE__, __LINE__, "ServiceManager: no service definition for `" +
@@ -375,7 +374,7 @@ IceBox::ServiceManagerI::start()
servicesInfo.push_back(StartServiceInfo(*q, p->second, _argv));
services.erase(p);
}
- for(p = services.begin(); p != services.end(); ++p)
+ for(PropertyDict::iterator p = services.begin(); p != services.end(); ++p)
{
servicesInfo.push_back(StartServiceInfo(p->first.substr(prefix.size()), p->second, _argv));
}
@@ -1060,9 +1059,9 @@ ServiceManagerI::observerCompleted(const shared_ptr<ServiceObserverPrx>& observe
auto p = _observers.find(observer);
if(p != _observers.end())
{
- auto observer = *p;
+ auto found = *p;
_observers.erase(p);
- observerRemoved(observer, ex);
+ observerRemoved(found, ex);
}
}
#else
@@ -1085,7 +1084,7 @@ ServiceManagerI::observerCompleted(const Ice::AsyncResultPtr& result)
set<ServiceObserverPrx>::iterator p = _observers.find(observer);
if(p != _observers.end())
{
- ServiceObserverPrx observer = *p;
+ observer = *p;
_observers.erase(p);
observerRemoved(observer, ex);
}
diff --git a/cpp/src/IceDiscovery/LookupI.cpp b/cpp/src/IceDiscovery/LookupI.cpp
index d4f2669ba5b..593fbe9f2b1 100644
--- a/cpp/src/IceDiscovery/LookupI.cpp
+++ b/cpp/src/IceDiscovery/LookupI.cpp
@@ -196,9 +196,9 @@ AdapterRequest::invokeWithLookup(const string& domainId, const LookupPrxPtr& loo
{
rethrow_exception(ex);
}
- catch(const Ice::LocalException& ex)
+ catch(const Ice::LocalException& e)
{
- self->_lookup->adapterRequestException(self, ex);
+ self->_lookup->adapterRequestException(self, e);
}
});
#else
@@ -235,9 +235,9 @@ ObjectRequest::invokeWithLookup(const string& domainId, const LookupPrxPtr& look
{
rethrow_exception(ex);
}
- catch(const Ice::LocalException& ex)
+ catch(const Ice::LocalException& e)
{
- self->_lookup->objectRequestException(self, ex);
+ self->_lookup->objectRequestException(self, e);
}
});
#else
diff --git a/cpp/src/IceGrid/AdapterCache.cpp b/cpp/src/IceGrid/AdapterCache.cpp
index cb3593bd874..bce7a41f485 100644
--- a/cpp/src/IceGrid/AdapterCache.cpp
+++ b/cpp/src/IceGrid/AdapterCache.cpp
@@ -375,7 +375,7 @@ ServerAdapterEntry::addSyncCallback(const SynchronizationCallbackPtr& callback,
void
ServerAdapterEntry::getLocatorAdapterInfo(LocatorAdapterInfoSeq& adapters, int& nReplicas, bool& replicaGroup,
- bool& roundRobin, string& filter, const set<string>&)
+ bool& roundRobin, string&, const set<string>&)
{
nReplicas = 1;
replicaGroup = false;
diff --git a/cpp/src/IceGrid/AdminI.cpp b/cpp/src/IceGrid/AdminI.cpp
index 473f05310bc..22184a46f4c 100644
--- a/cpp/src/IceGrid/AdminI.cpp
+++ b/cpp/src/IceGrid/AdminI.cpp
@@ -434,9 +434,9 @@ public:
_proxy.handleException(ex);
assert(false);
}
- catch(const Ice::Exception& ex)
+ catch(const Ice::Exception& e)
{
- _amdCB->ice_exception(ex);
+ _amdCB->ice_exception(e);
}
}
@@ -491,9 +491,9 @@ public:
{
_amdCB->ice_response();
}
- catch(const Ice::Exception& ex)
+ catch(const Ice::Exception& e)
{
- _amdCB->ice_exception(ex);
+ _amdCB->ice_exception(e);
}
}
diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp
index 36f7c502716..c25c84d690b 100644
--- a/cpp/src/IceGrid/Client.cpp
+++ b/cpp/src/IceGrid/Client.cpp
@@ -387,8 +387,8 @@ run(const Ice::StringSeq& args)
// to lookup for locator proxies. We destroy the plugin, once we have selected a
// locator.
//
- Ice::PluginPtr p = createIceLocatorDiscovery(communicator, "IceGridAdmin.Discovery", Ice::StringSeq());
- IceLocatorDiscovery::PluginPtr plugin = IceLocatorDiscovery::PluginPtr::dynamicCast(p);
+ Ice::PluginPtr pluginObj = createIceLocatorDiscovery(communicator, "IceGridAdmin.Discovery", Ice::StringSeq());
+ IceLocatorDiscovery::PluginPtr plugin = IceLocatorDiscovery::PluginPtr::dynamicCast(pluginObj);
plugin->initialize();
vector<Ice::LocatorPrx> locators = plugin->getLocators(instanceName, IceUtil::Time::milliSeconds(300));
@@ -610,8 +610,8 @@ run(const Ice::StringSeq& args)
if(registry->ice_getIdentity() == localRegistry->ice_getIdentity())
{
Ice::ObjectAdapterPtr colloc = communicator->createObjectAdapter(""); // colloc-only adapter
- Ice::ObjectPrx router = colloc->addWithUUID(new ReuseConnectionRouter(locator));
- communicator->setDefaultRouter(Ice::RouterPrx::uncheckedCast(router));
+ communicator->setDefaultRouter(Ice::RouterPrx::uncheckedCast(
+ colloc->addWithUUID(new ReuseConnectionRouter(locator))));
registry = registry->ice_router(communicator->getDefaultRouter());
}
diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp
index cc903e5df9c..aaa34ddde23 100644
--- a/cpp/src/IceGrid/Database.cpp
+++ b/cpp/src/IceGrid/Database.cpp
@@ -2454,9 +2454,9 @@ Database::checkUpdate(const ApplicationHelper& oldApp,
{
#if defined(__SUNPRO_CC) && defined(_RWSTD_NO_MEMBER_TEMPLATES)
Ice::StringSeq nodes;
- for(set<string>::const_iterator p = unreachableNodes.begin(); p != unreachableNodes.end(); ++p)
+ for(set<string>::const_iterator r = unreachableNodes.begin(); r != unreachableNodes.end(); ++r)
{
- nodes.push_back(*p);
+ nodes.push_back(*r);
}
#else
Ice::StringSeq nodes(unreachableNodes.begin(), unreachableNodes.end());
@@ -2472,9 +2472,9 @@ Database::checkUpdate(const ApplicationHelper& oldApp,
}
if(!reasons.empty())
{
- for(vector<string>::const_iterator p = reasons.begin(); p != reasons.end(); ++p)
+ for(vector<string>::const_iterator r = reasons.begin(); r != reasons.end(); ++r)
{
- out << "\n" << *p;
+ out << "\n" << *r;
}
}
}
@@ -2496,9 +2496,9 @@ Database::checkUpdate(const ApplicationHelper& oldApp,
{
#if defined(__SUNPRO_CC) && defined(_RWSTD_NO_MEMBER_TEMPLATES)
Ice::StringSeq nodes;
- for(set<string>::const_iterator p = unreachableNodes.begin(); p != unreachableNodes.end(); ++p)
+ for(set<string>::const_iterator r = unreachableNodes.begin(); r != unreachableNodes.end(); ++r)
{
- nodes.push_back(*p);
+ nodes.push_back(*r);
}
#else
Ice::StringSeq nodes(unreachableNodes.begin(), unreachableNodes.end());
@@ -2519,9 +2519,9 @@ Database::checkUpdate(const ApplicationHelper& oldApp,
{
ostringstream os;
os << "check for application `" << application << "' update failed:";
- for(vector<string>::const_iterator p = reasons.begin(); p != reasons.end(); ++p)
+ for(vector<string>::const_iterator r = reasons.begin(); r != reasons.end(); ++r)
{
- os << "\n" << *p;
+ os << "\n" << *r;
}
throw DeploymentException(os.str());
}
@@ -2530,13 +2530,13 @@ Database::checkUpdate(const ApplicationHelper& oldApp,
void
Database::finishApplicationUpdate(const ApplicationUpdateInfo& update,
const ApplicationInfo& oldApp,
- const ApplicationHelper& previous,
- const ApplicationHelper& helper,
+ const ApplicationHelper& previousAppHelper,
+ const ApplicationHelper& appHelper,
AdminSessionI* /*session*/,
bool noRestart,
Ice::Long dbSerial)
{
- const ApplicationDescriptor& newDesc = helper.getDefinition();
+ const ApplicationDescriptor& newDesc = appHelper.getDefinition();
ServerEntrySeq entries;
int serial = 0;
@@ -2544,15 +2544,15 @@ Database::finishApplicationUpdate(const ApplicationUpdateInfo& update,
{
if(_master)
{
- checkUpdate(previous, helper, oldApp.uuid, oldApp.revision, noRestart);
+ checkUpdate(previousAppHelper, appHelper, oldApp.uuid, oldApp.revision, noRestart);
}
Lock sync(*this);
IceDB::ReadWriteTxn txn(_env);
- checkForUpdate(previous, helper, txn);
- reload(previous, helper, entries, oldApp.uuid, oldApp.revision + 1, noRestart);
+ checkForUpdate(previousAppHelper, appHelper, txn);
+ reload(previousAppHelper, appHelper, entries, oldApp.uuid, oldApp.revision + 1, noRestart);
for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::sync));
diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp
index 569fa6ff3a2..d4302c6fad4 100644
--- a/cpp/src/IceGrid/DescriptorHelper.cpp
+++ b/cpp/src/IceGrid/DescriptorHelper.cpp
@@ -995,8 +995,8 @@ Resolver::getProperties(const Ice::StringSeq& references, set<string>& resolved)
if(!desc.references.empty())
{
resolved.insert(*p);
- PropertyDescriptorSeq p = getProperties(desc.references, resolved);
- properties.insert(properties.end(), p.begin(), p.end());
+ PropertyDescriptorSeq q = getProperties(desc.references, resolved);
+ properties.insert(properties.end(), q.begin(), q.end());
}
PropertyDescriptorSeq pds = operator()(desc.properties);
@@ -2655,11 +2655,11 @@ NodeHelper::printDiff(Output& out, const NodeHelper& helper) const
}
ApplicationHelper::ApplicationHelper(const Ice::CommunicatorPtr& communicator,
- const ApplicationDescriptor& desc,
+ const ApplicationDescriptor& appDesc,
bool enableWarning,
bool instantiate) :
_communicator(communicator),
- _def(desc)
+ _def(appDesc)
{
if(_def.name.empty())
{
diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp
index 87b0c97422d..e7177a60c7d 100644
--- a/cpp/src/IceGrid/IceGridNode.cpp
+++ b/cpp/src/IceGrid/IceGridNode.cpp
@@ -562,13 +562,13 @@ NodeService::startImpl(int argc, char* argv[], int& status)
}
else
{
- string id = communicator()->getProperties()->getProperty("IceGridAdmin.Username");
+ string username = communicator()->getProperties()->getProperty("IceGridAdmin.Username");
string password = communicator()->getProperties()->getProperty("IceGridAdmin.Password");
- while(id.empty())
+ while(username.empty())
{
consoleOut << "user id: " << flush;
- getline(cin, id);
- id = IceUtilInternal::trim(id);
+ getline(cin, username);
+ username = IceUtilInternal::trim(username);
}
if(password.empty())
@@ -578,7 +578,7 @@ NodeService::startImpl(int argc, char* argv[], int& status)
password = IceUtilInternal::trim(password);
}
- session = registry->createAdminSession(id, password);
+ session = registry->createAdminSession(username, password);
}
assert(session);
diff --git a/cpp/src/IceGrid/LocatorI.cpp b/cpp/src/IceGrid/LocatorI.cpp
index 3d962fe7e8c..9dbfbf71aff 100644
--- a/cpp/src/IceGrid/LocatorI.cpp
+++ b/cpp/src/IceGrid/LocatorI.cpp
@@ -123,12 +123,12 @@ public:
_cb->ice_response(_obj);
return;
}
- catch(const Ice::Exception& ex)
+ catch(const Ice::Exception& e)
{
//
// Rethrow unexpected exception.
//
- _cb->ice_exception(ex);
+ _cb->ice_exception(e);
return;
}
@@ -779,11 +779,11 @@ public:
}
virtual void
- synchronized(const Ice::Exception& ex)
+ synchronized(const Ice::Exception& sex)
{
try
{
- ex.ice_throw();
+ sex.ice_throw();
}
catch(const AdapterNotExistException&)
{
diff --git a/cpp/src/IceGrid/LocatorRegistryI.cpp b/cpp/src/IceGrid/LocatorRegistryI.cpp
index b541b5dcb81..1bceb964c89 100644
--- a/cpp/src/IceGrid/LocatorRegistryI.cpp
+++ b/cpp/src/IceGrid/LocatorRegistryI.cpp
@@ -180,9 +180,9 @@ public:
{
ex.ice_throw();
}
- catch(const Ice::Exception& ex)
+ catch(const Ice::Exception& e)
{
- _amiCB->exception(ex);
+ _amiCB->exception(e);
}
}
@@ -221,11 +221,11 @@ public:
}
virtual void
- synchronized(const Ice::Exception& ex)
+ synchronized(const Ice::Exception& sex)
{
try
{
- ex.ice_throw();
+ sex.ice_throw();
}
catch(const ServerNotExistException&)
{
diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp
index cfefc48eedd..023f677d1a1 100644
--- a/cpp/src/IceGrid/NodeCache.cpp
+++ b/cpp/src/IceGrid/NodeCache.cpp
@@ -204,11 +204,11 @@ public:
}
void
- exception(const Ice::Exception& ex)
+ exception(const Ice::Exception& lex)
{
try
{
- ex.ice_throw();
+ lex.ice_throw();
}
catch(const DeploymentException& ex)
{
@@ -266,11 +266,11 @@ public:
}
void
- exception(const Ice::Exception& ex)
+ exception(const Ice::Exception& dex)
{
try
{
- ex.ice_throw();
+ dex.ice_throw();
}
catch(const DeploymentException& ex)
{
@@ -389,18 +389,18 @@ NodeEntry::setSession(const NodeSessionIPtr& session)
}
else
{
- NodeSessionIPtr session = _session;
+ NodeSessionIPtr s = _session;
sync.release();
try
{
- session->getNode()->ice_ping();
+ s->getNode()->ice_ping();
throw NodeActiveException();
}
catch(const Ice::LocalException&)
{
try
{
- session->destroy(Ice::emptyCurrent);
+ s->destroy(Ice::emptyCurrent);
}
catch(const Ice::ObjectNotExistException&)
{
diff --git a/cpp/src/IceGrid/NodeI.cpp b/cpp/src/IceGrid/NodeI.cpp
index 4a5ea265533..21e84cfa6a9 100644
--- a/cpp/src/IceGrid/NodeI.cpp
+++ b/cpp/src/IceGrid/NodeI.cpp
@@ -535,8 +535,7 @@ NodeI::patch_async(const AMD_Node_patchPtr& amdCB,
}
}
- set<ServerIPtr>::iterator s = servers.begin();
- while(s != servers.end())
+ for(set<ServerIPtr>::iterator s = servers.begin(); s != servers.end();)
{
if(!appDistrib->icepatch.empty() && (*s)->dependsOnApplicationDistrib())
{
diff --git a/cpp/src/IceGrid/NodeSessionManager.cpp b/cpp/src/IceGrid/NodeSessionManager.cpp
index f438c1dd2b2..9f2bb50e7e3 100644
--- a/cpp/src/IceGrid/NodeSessionManager.cpp
+++ b/cpp/src/IceGrid/NodeSessionManager.cpp
@@ -28,7 +28,7 @@ NodeSessionKeepAliveThread::NodeSessionKeepAliveThread(const InternalRegistryPrx
{
name = name.substr(prefix.size());
}
- const_cast<string&>(_name) = name;
+ const_cast<string&>(_replicaName) = name;
}
NodeSessionPrx
@@ -42,7 +42,7 @@ NodeSessionKeepAliveThread::createSession(InternalRegistryPrx& registry, IceUtil
if(traceLevels && traceLevels->replica > 1)
{
Ice::Trace out(traceLevels->logger, traceLevels->replicaCat);
- out << "trying to establish session with replica `" << _name << "'";
+ out << "trying to establish session with replica `" << _replicaName << "'";
}
set<InternalRegistryPrx> used;
@@ -104,7 +104,8 @@ NodeSessionKeepAliveThread::createSession(InternalRegistryPrx& registry, IceUtil
{
if(traceLevels)
{
- traceLevels->logger->error("a node with the same name is already active with the replica `" + _name + "'");
+ traceLevels->logger->error("a node with the same name is already active with the replica `" +
+ _replicaName + "'");
}
exception.reset(ex.ice_clone());
}
@@ -112,7 +113,7 @@ NodeSessionKeepAliveThread::createSession(InternalRegistryPrx& registry, IceUtil
{
if(traceLevels)
{
- traceLevels->logger->error("connection to the registry `" + _name + "' was denied:\n" + ex.reason);
+ traceLevels->logger->error("connection to the registry `" + _replicaName + "' was denied:\n" + ex.reason);
}
exception.reset(ex.ice_clone());
}
@@ -126,7 +127,7 @@ NodeSessionKeepAliveThread::createSession(InternalRegistryPrx& registry, IceUtil
if(traceLevels && traceLevels->replica > 0)
{
Ice::Trace out(traceLevels->logger, traceLevels->replicaCat);
- out << "established session with replica `" << _name << "'";
+ out << "established session with replica `" << _replicaName << "'";
}
}
else
@@ -134,7 +135,7 @@ NodeSessionKeepAliveThread::createSession(InternalRegistryPrx& registry, IceUtil
if(traceLevels && traceLevels->replica > 1)
{
Ice::Trace out(traceLevels->logger, traceLevels->replicaCat);
- out << "failed to establish session with replica `" << _name << "':\n";
+ out << "failed to establish session with replica `" << _replicaName << "':\n";
if(exception.get())
{
out << *exception.get();
@@ -185,7 +186,7 @@ NodeSessionKeepAliveThread::destroySession(const NodeSessionPrx& session)
if(_node->getTraceLevels() && _node->getTraceLevels()->replica > 0)
{
Ice::Trace out(_node->getTraceLevels()->logger, _node->getTraceLevels()->replicaCat);
- out << "destroyed replica `" << _name << "' session";
+ out << "destroyed replica `" << _replicaName << "' session";
}
}
catch(const Ice::LocalException& ex)
@@ -193,7 +194,7 @@ NodeSessionKeepAliveThread::destroySession(const NodeSessionPrx& session)
if(_node->getTraceLevels() && _node->getTraceLevels()->replica > 1)
{
Ice::Trace out(_node->getTraceLevels()->logger, _node->getTraceLevels()->replicaCat);
- out << "couldn't destroy replica `" << _name << "' session:\n" << ex;
+ out << "couldn't destroy replica `" << _replicaName << "' session:\n" << ex;
}
}
}
@@ -205,7 +206,7 @@ NodeSessionKeepAliveThread::keepAlive(const NodeSessionPrx& session)
if(_node->getTraceLevels() && _node->getTraceLevels()->replica > 2)
{
Ice::Trace out(_node->getTraceLevels()->logger, _node->getTraceLevels()->replicaCat);
- out << "sending keep alive message to replica `" << _name << "'";
+ out << "sending keep alive message to replica `" << _replicaName << "'";
}
try
@@ -219,7 +220,7 @@ NodeSessionKeepAliveThread::keepAlive(const NodeSessionPrx& session)
if(_node->getTraceLevels() && _node->getTraceLevels()->replica > 0)
{
Ice::Trace out(_node->getTraceLevels()->logger, _node->getTraceLevels()->replicaCat);
- out << "lost session with replica `" << _name << "':\n" << ex;
+ out << "lost session with replica `" << _replicaName << "':\n" << ex;
}
return false;
}
@@ -641,9 +642,9 @@ NodeSessionManager::createdSession(const NodeSessionPrx& session)
if(_sessions.find((*p)->ice_getIdentity()) == _sessions.end())
{
- NodeSessionKeepAliveThreadPtr session = addReplicaSession(*p);
- session->tryCreateSession();
- sessions.push_back(session);
+ NodeSessionKeepAliveThreadPtr thread = addReplicaSession(*p);
+ thread->tryCreateSession();
+ sessions.push_back(thread);
}
else
{
diff --git a/cpp/src/IceGrid/NodeSessionManager.h b/cpp/src/IceGrid/NodeSessionManager.h
index f2a994d1e04..37a1c2e282d 100644
--- a/cpp/src/IceGrid/NodeSessionManager.h
+++ b/cpp/src/IceGrid/NodeSessionManager.h
@@ -44,7 +44,7 @@ protected:
virtual NodeSessionPrx createSessionImpl(const InternalRegistryPrx&, IceUtil::Time&);
const NodeIPtr _node;
- const std::string _name;
+ const std::string _replicaName;
NodeSessionManager& _manager;
};
typedef IceUtil::Handle<NodeSessionKeepAliveThread> NodeSessionKeepAliveThreadPtr;
diff --git a/cpp/src/IceGrid/Parser.cpp b/cpp/src/IceGrid/Parser.cpp
index 41f5743e024..ed7d4840d2f 100644
--- a/cpp/src/IceGrid/Parser.cpp
+++ b/cpp/src/IceGrid/Parser.cpp
@@ -29,6 +29,8 @@
extern FILE* yyin;
extern int yydebug;
+int yyparse();
+
using namespace std;
using namespace IceUtil;
using namespace IceUtilInternal;
@@ -666,19 +668,19 @@ Parser::diffApplication(const list<string>& origArgs)
StringSeq targets;
map<string, string> vars;
- vector<string>::const_iterator p = args.begin();
- string desc = *p++;
+ vector<string>::const_iterator arg = args.begin();
+ string desc = *arg++;
- for(; p != args.end(); ++p)
+ for(; arg != args.end(); ++arg)
{
- string::size_type pos = p->find('=');
+ string::size_type pos = arg->find('=');
if(pos != string::npos)
{
- vars[p->substr(0, pos)] = p->substr(pos + 1);
+ vars[arg->substr(0, pos)] = arg->substr(pos + 1);
}
else
{
- targets.push_back(*p);
+ targets.push_back(*arg);
}
}
@@ -2476,15 +2478,15 @@ Parser::showLog(const string& id, const string& reader, bool tail, bool follow,
_session->ice_getConnection()->setAdapter(adapter);
- Ice::Identity id;
+ Ice::Identity ident;
ostringstream name;
name << "RemoteLogger-" << loggerCallbackCount++;
- id.name = name.str();
- id.category = adminCallbackTemplate->ice_getIdentity().category;
+ ident.name = name.str();
+ ident.category = adminCallbackTemplate->ice_getIdentity().category;
RemoteLoggerIPtr servant = new RemoteLoggerI;
Ice::RemoteLoggerPrx prx =
- Ice::RemoteLoggerPrx::uncheckedCast(adapter->add(servant, id));
+ Ice::RemoteLoggerPrx::uncheckedCast(adapter->add(servant, ident));
adapter->activate();
loggerAdmin->attachRemoteLogger(prx, Ice::LogMessageTypeSeq(), Ice::StringSeq(), tail ? lineCount : -1);
@@ -2871,11 +2873,11 @@ Parser::Parser(const CommunicatorPtr& communicator,
}
void
-Parser::exception(const Ice::Exception& ex)
+Parser::exception(const Ice::Exception& pex)
{
try
{
- ex.ice_throw();
+ pex.ice_throw();
}
catch(const ApplicationNotExistException& ex)
{
diff --git a/cpp/src/IceGrid/Parser.h b/cpp/src/IceGrid/Parser.h
index d98edaf8fe6..e2c06ad33f2 100644
--- a/cpp/src/IceGrid/Parser.h
+++ b/cpp/src/IceGrid/Parser.h
@@ -23,7 +23,6 @@
#define YYSTYPE std::list<std::string>
#define YY_DECL int yylex(YYSTYPE* yylvalp)
YY_DECL;
-int yyparse();
//
// I must set the initial stack depth to the maximum stack depth to
diff --git a/cpp/src/IceGrid/RegistryAdminRouter.cpp b/cpp/src/IceGrid/RegistryAdminRouter.cpp
index 0f8cb2f1426..36c11d39b6f 100644
--- a/cpp/src/IceGrid/RegistryAdminRouter.cpp
+++ b/cpp/src/IceGrid/RegistryAdminRouter.cpp
@@ -25,7 +25,7 @@ public:
const AMD_Object_ice_invokePtr& cb,
const pair<const Byte*, const Byte*>& inParams,
const Current& current) :
- _callback(cb), _inParams(inParams.first, inParams.second), _current(current)
+ _adminRouter(adminRouter), _callback(cb), _inParams(inParams.first, inParams.second), _current(current)
{
}
@@ -37,7 +37,7 @@ public:
_adminRouter->ice_invoke_async(_callback, make_pair(&_inParams[0], &_inParams[0] + _inParams.size()), _current);
}
- void synchronized(const Ice::Exception& ex)
+ void synchronized(const Ice::Exception&)
{
_callback->ice_exception(Ice::ObjectNotExistException(__FILE__, __LINE__));
}
diff --git a/cpp/src/IceGrid/ReplicaCache.cpp b/cpp/src/IceGrid/ReplicaCache.cpp
index a964755cc93..5bd4794edef 100644
--- a/cpp/src/IceGrid/ReplicaCache.cpp
+++ b/cpp/src/IceGrid/ReplicaCache.cpp
@@ -42,8 +42,8 @@ ReplicaCache::add(const string& name, const ReplicaSessionIPtr& session)
ReplicaEntryPtr entry;
while((entry = getImpl(name)))
{
- ReplicaSessionIPtr session = entry->getSession();
- if(session->isDestroyed())
+ ReplicaSessionIPtr s = entry->getSession();
+ if(s->isDestroyed())
{
wait(); // Wait for the session to be removed.
}
@@ -56,14 +56,14 @@ ReplicaCache::add(const string& name, const ReplicaSessionIPtr& session)
sync.release();
try
{
- session->getInternalRegistry()->ice_ping();
+ s->getInternalRegistry()->ice_ping();
throw ReplicaActiveException();
}
catch(const Ice::LocalException&)
{
try
{
- session->destroy(Ice::emptyCurrent);
+ s->destroy(Ice::emptyCurrent);
}
catch(const Ice::LocalException&)
{
diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp
index 933d204722c..fdceb9c6748 100644
--- a/cpp/src/IceGrid/ServerCache.cpp
+++ b/cpp/src/IceGrid/ServerCache.cpp
@@ -80,7 +80,7 @@ CheckUpdateResult::CheckUpdateResult(const string& server,
bool noRestart,
bool remove,
const Ice::AsyncResultPtr& result) :
- _server(server), _node(node), _noRestart(noRestart), _result(result)
+ _server(server), _node(node), _remove(remove), _noRestart(noRestart), _result(result)
{
}
@@ -94,7 +94,14 @@ CheckUpdateResult::getResult()
catch(const DeploymentException& ex)
{
ostringstream os;
- os << "check for server `" << _server << "' update failed: " << ex.reason;
+ if(_remove)
+ {
+ os << "check for server `" << _server << "' remove failed: " << ex.reason;
+ }
+ else
+ {
+ os << "check for server `" << _server << "' update failed: " << ex.reason;
+ }
throw DeploymentException(os.str());
}
catch(const Ice::OperationNotExistException&)
@@ -449,7 +456,7 @@ ServerEntry::update(const ServerInfo& info, bool noRestart)
if(info.descriptor->activation == "session")
{
_allocatable = true;
- _load->sessionId = _session ? _session->getId() : string("");
+ _load->sessionId = _allocationSession ? _allocationSession->getId() : string("");
}
}
@@ -493,7 +500,7 @@ ServerEntry::getInfo(bool resolve) const
throw ServerNotExistException();
}
info = _loaded.get() ? *_loaded : *_load;
- session = _session;
+ session = _allocationSession;
}
assert(info.descriptor);
if(resolve)
@@ -696,7 +703,7 @@ ServerEntry::syncImpl()
else if(_load.get())
{
load = *_load;
- session = _session;
+ session = _allocationSession;
timeout = _deactivationTimeout; // loadServer might block to deactivate the previous server.
}
else
@@ -874,7 +881,7 @@ ServerEntry::loadCallback(const ServerPrx& proxy, const AdapterPrxDict& adpts, i
{
load = *_load;
noRestart = _noRestart;
- session = _session;
+ session = _allocationSession;
timeout = _deactivationTimeout; // loadServer might block to deactivate the previous server.
}
}
@@ -937,7 +944,7 @@ ServerEntry::destroyCallback()
_updated = false;
load = *_load;
noRestart = _noRestart;
- session = _session;
+ session = _allocationSession;
}
}
@@ -988,7 +995,7 @@ ServerEntry::exception(const Ice::Exception& ex)
_updated = false;
load = *_load.get();
noRestart = _noRestart;
- session = _session;
+ session = _allocationSession;
timeout = _deactivationTimeout; // loadServer might block to deactivate the previous server.
}
}
@@ -1041,7 +1048,7 @@ ServerEntry::checkUpdate(const ServerInfo& info, bool noRestart)
}
oldInfo = _loaded.get() ? *_loaded : *_load;
- session = _session;
+ session = _allocationSession;
}
NodeEntryPtr node;
@@ -1131,7 +1138,7 @@ ServerEntry::allocated(const SessionIPtr& session)
{
_load.reset(_loaded.release());
}
- _session = session;
+ _allocationSession = session;
_load->sessionId = session->getId();
}
@@ -1218,7 +1225,7 @@ ServerEntry::released(const SessionIPtr& session)
_load.reset(_loaded.release());
}
_load->sessionId = "";
- _session = 0;
+ _allocationSession = 0;
}
TraceLevelsPtr traceLevels = _cache.getTraceLevels();
diff --git a/cpp/src/IceGrid/ServerCache.h b/cpp/src/IceGrid/ServerCache.h
index 5d743f9db31..ad9dd1587a0 100644
--- a/cpp/src/IceGrid/ServerCache.h
+++ b/cpp/src/IceGrid/ServerCache.h
@@ -51,6 +51,7 @@ private:
const std::string _server;
const std::string _node;
+ const bool _remove;
const bool _noRestart;
const Ice::AsyncResultPtr _result;
};
@@ -130,7 +131,7 @@ private:
bool _noRestart;
std::vector<SynchronizationCallbackPtr> _callbacks;
- SessionIPtr _session;
+ SessionIPtr _allocationSession;
};
typedef IceUtil::Handle<ServerEntry> ServerEntryPtr;
typedef std::vector<ServerEntryPtr> ServerEntrySeq;
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp
index ae06066629a..22e6cdf1c95 100644
--- a/cpp/src/IceGrid/ServerI.cpp
+++ b/cpp/src/IceGrid/ServerI.cpp
@@ -3185,8 +3185,8 @@ ServerI::getProperties(const InternalServerDescriptorPtr& desc)
//
// Copy the descriptor properties.
//
- PropertyDescriptorSeqDict properties = desc->properties;
- PropertyDescriptorSeq& props = properties["config"];
+ PropertyDescriptorSeqDict propDict = desc->properties;
+ PropertyDescriptorSeq& props = propDict["config"];
//
// Cache the path of the stderr/stdout file, first check if the
@@ -3216,7 +3216,7 @@ ServerI::getProperties(const InternalServerDescriptorPtr& desc)
//
{
const PropertyDescriptorSeq& overrides = _node->getPropertiesOverride();
- for(PropertyDescriptorSeqDict::iterator p = properties.begin(); p != properties.end(); ++p)
+ for(PropertyDescriptorSeqDict::iterator p = propDict.begin(); p != propDict.end(); ++p)
{
if(getProperty(p->second, "Ice.Default.Locator").empty())
{
@@ -3244,5 +3244,5 @@ ServerI::getProperties(const InternalServerDescriptorPtr& desc)
}
}
- return properties;
+ return propDict;
}
diff --git a/cpp/src/IceGrid/Topics.cpp b/cpp/src/IceGrid/Topics.cpp
index 83c1d89ac9f..61411270dcf 100644
--- a/cpp/src/IceGrid/Topics.cpp
+++ b/cpp/src/IceGrid/Topics.cpp
@@ -104,14 +104,14 @@ ObserverTopic::unsubscribe(const Ice::ObjectPrx& observer, const string& name)
{
Lock sync(*this);
Ice::EncodingVersion v = IceInternal::getCompatibleEncoding(observer->ice_getEncodingVersion());
- map<Ice::EncodingVersion, IceStorm::TopicPrx>::const_iterator p = _topics.find(v);
- if(p == _topics.end())
+ map<Ice::EncodingVersion, IceStorm::TopicPrx>::const_iterator q = _topics.find(v);
+ if(q == _topics.end())
{
return;
}
try
{
- p->second->unsubscribe(observer);
+ q->second->unsubscribe(observer);
}
catch(const Ice::ObjectAdapterDeactivatedException&)
{
@@ -468,9 +468,9 @@ NodeObserverTopic::updateServer(const string& node, const ServerDynamicInfo& ser
try
{
- for(vector<NodeObserverPrx>::const_iterator p = _publishers.begin(); p != _publishers.end(); ++p)
+ for(vector<NodeObserverPrx>::const_iterator q = _publishers.begin(); q != _publishers.end(); ++q)
{
- (*p)->updateServer(node, server);
+ (*q)->updateServer(node, server);
}
}
catch(const Ice::LocalException& ex)
@@ -524,9 +524,9 @@ NodeObserverTopic::updateAdapter(const string& node, const AdapterDynamicInfo& a
try
{
- for(vector<NodeObserverPrx>::const_iterator p = _publishers.begin(); p != _publishers.end(); ++p)
+ for(vector<NodeObserverPrx>::const_iterator q = _publishers.begin(); q != _publishers.end(); ++q)
{
- (*p)->updateAdapter(node, adapter);
+ (*q)->updateAdapter(node, adapter);
}
}
catch(const Ice::LocalException& ex)
@@ -1026,9 +1026,9 @@ ObjectObserverTopic::wellKnownObjectsAddedOrUpdated(const ObjectInfoSeq& infos)
q->second = *p;
try
{
- for(vector<ObjectObserverPrx>::const_iterator q = _publishers.begin(); q != _publishers.end(); ++q)
+ for(vector<ObjectObserverPrx>::const_iterator r = _publishers.begin(); r != _publishers.end(); ++r)
{
- (*q)->objectUpdated(*p, getContext(_serial));
+ (*r)->objectUpdated(*p, getContext(_serial));
}
}
catch(const Ice::LocalException& ex)
@@ -1042,9 +1042,9 @@ ObjectObserverTopic::wellKnownObjectsAddedOrUpdated(const ObjectInfoSeq& infos)
_objects.insert(make_pair(p->proxy->ice_getIdentity(), *p));
try
{
- for(vector<ObjectObserverPrx>::const_iterator q = _publishers.begin(); q != _publishers.end(); ++q)
+ for(vector<ObjectObserverPrx>::const_iterator r = _publishers.begin(); r != _publishers.end(); ++r)
{
- (*q)->objectAdded(*p, getContext(_serial));
+ (*r)->objectAdded(*p, getContext(_serial));
}
}
catch(const Ice::LocalException& ex)
diff --git a/cpp/src/IceLocatorDiscovery/PluginI.cpp b/cpp/src/IceLocatorDiscovery/PluginI.cpp
index d27bac6c46a..ced0f671211 100644
--- a/cpp/src/IceLocatorDiscovery/PluginI.cpp
+++ b/cpp/src/IceLocatorDiscovery/PluginI.cpp
@@ -588,10 +588,10 @@ LocatorI::LocatorI(const string& name,
// datagram on each endpoint.
//
Ice::EndpointSeq endpoints = lookup->ice_getEndpoints();
- for(vector<Ice::EndpointPtr>::const_iterator p = endpoints.begin(); p != endpoints.end(); ++p)
+ for(vector<Ice::EndpointPtr>::const_iterator q = endpoints.begin(); q != endpoints.end(); ++q)
{
Ice::EndpointSeq single;
- single.push_back(*p);
+ single.push_back(*q);
_lookups.push_back(make_pair(lookup->ice_endpoints(single), LookupReplyPrxPtr()));
}
assert(!_lookups.empty());
diff --git a/cpp/src/IceSSL/EndpointI.cpp b/cpp/src/IceSSL/EndpointI.cpp
index be21e7dade7..c59f8464ca1 100644
--- a/cpp/src/IceSSL/EndpointI.cpp
+++ b/cpp/src/IceSSL/EndpointI.cpp
@@ -342,36 +342,36 @@ IceSSL::EndpointI::operator<(const Ice::LocalObject& r) const
}
bool
-IceSSL::EndpointI::checkOption(const string& option, const string& argument, const string& endpoint)
+IceSSL::EndpointI::checkOption(const string& /*option*/, const string& /*argument*/, const string& /*endpoint*/)
{
return false;
}
IceSSL::EndpointFactoryI::EndpointFactoryI(const InstancePtr& instance, Short type) :
- IceInternal::EndpointFactoryWithUnderlying(instance, type), _instance(instance.get())
+ IceInternal::EndpointFactoryWithUnderlying(instance, type), _sslInstance(instance.get())
{
}
void
IceSSL::EndpointFactoryI::destroy()
{
- _instance = 0;
+ _sslInstance = 0;
}
IceInternal::EndpointFactoryPtr
IceSSL::EndpointFactoryI::cloneWithUnderlying(const IceInternal::ProtocolInstancePtr& instance, Short underlying) const
{
- return new EndpointFactoryI(new Instance(_instance->engine(), instance->type(), instance->protocol()), underlying);
+ return new EndpointFactoryI(new Instance(_sslInstance->engine(), instance->type(), instance->protocol()), underlying);
}
IceInternal::EndpointIPtr
IceSSL::EndpointFactoryI::createWithUnderlying(const IceInternal::EndpointIPtr& underlying, vector<string>&, bool) const
{
- return ICE_MAKE_SHARED(EndpointI, _instance, underlying);
+ return ICE_MAKE_SHARED(EndpointI, _sslInstance, underlying);
}
IceInternal::EndpointIPtr
-IceSSL::EndpointFactoryI::readWithUnderlying(const IceInternal::EndpointIPtr& underlying, Ice::InputStream* s) const
+IceSSL::EndpointFactoryI::readWithUnderlying(const IceInternal::EndpointIPtr& underlying, Ice::InputStream*) const
{
- return ICE_MAKE_SHARED(EndpointI, _instance, underlying);
+ return ICE_MAKE_SHARED(EndpointI, _sslInstance, underlying);
}
diff --git a/cpp/src/IceSSL/EndpointI.h b/cpp/src/IceSSL/EndpointI.h
index 4f9b1ddeab7..13df972832a 100644
--- a/cpp/src/IceSSL/EndpointI.h
+++ b/cpp/src/IceSSL/EndpointI.h
@@ -97,7 +97,7 @@ protected:
private:
- InstancePtr _instance;
+ InstancePtr _sslInstance;
};
}
diff --git a/cpp/src/IceSSL/OpenSSLEngine.cpp b/cpp/src/IceSSL/OpenSSLEngine.cpp
index 17d48b342ef..9cf0b277242 100644
--- a/cpp/src/IceSSL/OpenSSLEngine.cpp
+++ b/cpp/src/IceSSL/OpenSSLEngine.cpp
@@ -748,10 +748,10 @@ OpenSSL::SSLEngine::initialize()
}
else
{
- string err = sslErrors();
- if(!err.empty())
+ string errStr = sslErrors();
+ if(!errStr.empty())
{
- msg += ":\n" + err;
+ msg += ":\n" + errStr;
}
}
throw PluginInitializationException(__FILE__, __LINE__, msg);
@@ -847,13 +847,13 @@ OpenSSL::SSLEngine::initialize()
//
// Establish the cipher list.
//
- string ciphers = properties->getProperty(propPrefix + "Ciphers");
- if(!ciphers.empty())
+ string ciphersStr = properties->getProperty(propPrefix + "Ciphers");
+ if(!ciphersStr.empty())
{
- if(!SSL_CTX_set_cipher_list(_ctx, ciphers.c_str()))
+ if(!SSL_CTX_set_cipher_list(_ctx, ciphersStr.c_str()))
{
throw PluginInitializationException(__FILE__, __LINE__,
- "IceSSL: unable to set ciphers using `" + ciphers + "':\n" + sslErrors());
+ "IceSSL: unable to set ciphers using `" + ciphersStr + "':\n" + sslErrors());
}
}
diff --git a/cpp/src/IceSSL/SSLEngine.cpp b/cpp/src/IceSSL/SSLEngine.cpp
index 41c598140c9..be9aaf72ddf 100644
--- a/cpp/src/IceSSL/SSLEngine.cpp
+++ b/cpp/src/IceSSL/SSLEngine.cpp
@@ -224,7 +224,7 @@ IceSSL::SSLEngine::verifyPeerCertName(const string& address, const ConnectionInf
}
void
-IceSSL::SSLEngine::verifyPeer(const string& address, const ConnectionInfoPtr& info, const string& desc)
+IceSSL::SSLEngine::verifyPeer(const string& /*address*/, const ConnectionInfoPtr& info, const string& desc)
{
const CertificateVerifierPtr verifier = getCertificateVerifier();
if(_verifyDepthMax > 0 && static_cast<int>(info->certs.size()) > _verifyDepthMax)
diff --git a/cpp/src/IceSSL/SecureTransportCertificateI.cpp b/cpp/src/IceSSL/SecureTransportCertificateI.cpp
index cac8020a3b8..d5c02f1d030 100644
--- a/cpp/src/IceSSL/SecureTransportCertificateI.cpp
+++ b/cpp/src/IceSSL/SecureTransportCertificateI.cpp
@@ -346,15 +346,15 @@ getX509AltName(SecCertificateRef cert, CFTypeRef key)
{
CFArrayRef section = (CFArrayRef)v;
ostringstream os;
- for(int i = 0, count = CFArrayGetCount(section); i < count;)
+ for(int j = 0, count = CFArrayGetCount(section); j < count;)
{
- CFDictionaryRef d = (CFDictionaryRef)CFArrayGetValueAtIndex(section, i);
+ CFDictionaryRef d = (CFDictionaryRef)CFArrayGetValueAtIndex(section, j);
CFStringRef sectionLabel = static_cast<CFStringRef>(CFDictionaryGetValue(d, kSecPropertyKeyLabel));
CFStringRef sectionValue = static_cast<CFStringRef>(CFDictionaryGetValue(d, kSecPropertyKeyValue));
os << certificateOIDAlias(fromCFString(sectionLabel)) << "=" << fromCFString(sectionValue);
- if(++i < count)
+ if(++j < count)
{
os << ",";
}
diff --git a/cpp/src/IceSSL/SecureTransportEngine.cpp b/cpp/src/IceSSL/SecureTransportEngine.cpp
index 80c4a1cd489..4ae8b39ec01 100644
--- a/cpp/src/IceSSL/SecureTransportEngine.cpp
+++ b/cpp/src/IceSSL/SecureTransportEngine.cpp
@@ -857,7 +857,6 @@ IceSSL::SecureTransport::SSLEngine::initialize()
PasswordPromptPtr passwordPrompt = getPasswordPrompt();
string certFile = properties->getProperty("IceSSL.CertFile");
- string keyFile = properties->getProperty("IceSSL.KeyFile");
string findCert = properties->getProperty("IceSSL.FindCert");
string keychain = properties->getProperty("IceSSL.Keychain");
string keychainPassword = properties->getProperty("IceSSL.KeychainPassword");
@@ -871,21 +870,24 @@ IceSSL::SecureTransport::SSLEngine::initialize()
"IceSSL: invalid value for IceSSL.CertFile:\n" + certFile);
}
vector<string> keyFiles;
- if(!keyFile.empty())
{
- if(!IceUtilInternal::splitString(keyFile, IceUtilInternal::pathsep, keyFiles) || keyFiles.size() > 2)
- {
- throw PluginInitializationException(__FILE__, __LINE__,
- "IceSSL: invalid value for IceSSL.KeyFile:\n" + keyFile);
- }
- if(files.size() != keyFiles.size())
+ string keyFile = properties->getProperty("IceSSL.KeyFile");
+ if(!keyFile.empty())
{
- throw PluginInitializationException(__FILE__, __LINE__,
- "IceSSL: IceSSL.KeyFile does not agree with IceSSL.CertFile");
+ if(!IceUtilInternal::splitString(keyFile, IceUtilInternal::pathsep, keyFiles) || keyFiles.size() > 2)
+ {
+ throw PluginInitializationException(__FILE__, __LINE__,
+ "IceSSL: invalid value for IceSSL.KeyFile:\n" + keyFile);
+ }
+ if(files.size() != keyFiles.size())
+ {
+ throw PluginInitializationException(__FILE__, __LINE__,
+ "IceSSL: IceSSL.KeyFile does not agree with IceSSL.CertFile");
+ }
}
}
- for(int i = 0; i < files.size(); ++i)
+ for(size_t i = 0; i < files.size(); ++i)
{
string file = files[i];
string keyFile = keyFiles.empty() ? "" : keyFiles[i];
diff --git a/cpp/src/IceSSL/SecureTransportTransceiverI.cpp b/cpp/src/IceSSL/SecureTransportTransceiverI.cpp
index 1a299a72a51..3200e659c8e 100644
--- a/cpp/src/IceSSL/SecureTransportTransceiverI.cpp
+++ b/cpp/src/IceSSL/SecureTransportTransceiverI.cpp
@@ -253,8 +253,8 @@ IceSSL::SecureTransport::TransceiverI::initialize(IceInternal::Buffer& readBuffe
}
else if(err == errSSLWouldBlock)
{
- assert(_flags & SSLWantRead || _flags & SSLWantWrite);
- return _flags & SSLWantRead ? IceInternal::SocketOperationRead : IceInternal::SocketOperationWrite;
+ assert(_tflags & SSLWantRead || _tflags & SSLWantWrite);
+ return _tflags & SSLWantRead ? IceInternal::SocketOperationRead : IceInternal::SocketOperationWrite;
}
else if(err == errSSLPeerAuthCompleted)
{
@@ -294,9 +294,11 @@ IceSSL::SecureTransport::TransceiverI::initialize(IceInternal::Buffer& readBuffe
}
assert(_ssl);
- SSLCipherSuite cipher;
- SSLGetNegotiatedCipher(_ssl.get(), &cipher);
- _cipher = _engine->getCipherName(cipher);
+ {
+ SSLCipherSuite cipher;
+ SSLGetNegotiatedCipher(_ssl.get(), &cipher);
+ _cipher = _engine->getCipherName(cipher);
+ }
_engine->verifyPeer(_host, ICE_DYNAMIC_CAST(ConnectionInfo, getInfo()), toString());
@@ -381,7 +383,7 @@ IceSSL::SecureTransport::TransceiverI::write(IceInternal::Buffer& buf)
{
_buffered = processed;
}
- assert(_flags & SSLWantWrite);
+ assert(_tflags & SSLWantWrite);
return IceInternal::SocketOperationWrite;
}
@@ -420,9 +422,9 @@ IceSSL::SecureTransport::TransceiverI::write(IceInternal::Buffer& buf)
buf.i += processed;
}
- if(packetSize > buf.b.end() - buf.i)
+ if(packetSize > static_cast<size_t>(buf.b.end() - buf.i))
{
- packetSize = buf.b.end() - buf.i;
+ packetSize = static_cast<size_t>(buf.b.end() - buf.i);
}
}
@@ -454,7 +456,7 @@ IceSSL::SecureTransport::TransceiverI::read(IceInternal::Buffer& buf)
if(err == errSSLWouldBlock)
{
buf.i += processed;
- assert(_flags & SSLWantRead);
+ assert(_tflags & SSLWantRead);
return IceInternal::SocketOperationRead;
}
@@ -485,9 +487,9 @@ IceSSL::SecureTransport::TransceiverI::read(IceInternal::Buffer& buf)
buf.i += processed;
- if(packetSize > buf.b.end() - buf.i)
+ if(packetSize > static_cast<size_t>(buf.b.end() - buf.i))
{
- packetSize = buf.b.end() - buf.i;
+ packetSize = static_cast<size_t>(buf.b.end() - buf.i);
}
}
@@ -570,7 +572,7 @@ IceSSL::SecureTransport::TransceiverI::~TransceiverI()
OSStatus
IceSSL::SecureTransport::TransceiverI::writeRaw(const char* data, size_t* length) const
{
- _flags &= ~SSLWantWrite;
+ _tflags &= ~SSLWantWrite;
try
{
@@ -579,7 +581,7 @@ IceSSL::SecureTransport::TransceiverI::writeRaw(const char* data, size_t* length
if(op == IceInternal::SocketOperationWrite)
{
*length = buf.i - buf.b.begin();
- _flags |= SSLWantWrite;
+ _tflags |= SSLWantWrite;
return errSSLWouldBlock;
}
assert(op == IceInternal::SocketOperationNone);
@@ -603,7 +605,7 @@ IceSSL::SecureTransport::TransceiverI::writeRaw(const char* data, size_t* length
OSStatus
IceSSL::SecureTransport::TransceiverI::readRaw(char* data, size_t* length) const
{
- _flags &= ~SSLWantRead;
+ _tflags &= ~SSLWantRead;
try
{
@@ -612,7 +614,7 @@ IceSSL::SecureTransport::TransceiverI::readRaw(char* data, size_t* length) const
if(op == IceInternal::SocketOperationRead)
{
*length = buf.i - buf.b.begin();
- _flags |= SSLWantRead;
+ _tflags |= SSLWantRead;
return errSSLWouldBlock;
}
assert(op == IceInternal::SocketOperationNone);
diff --git a/cpp/src/IceSSL/SecureTransportTransceiverI.h b/cpp/src/IceSSL/SecureTransportTransceiverI.h
index 9eeae288f51..7609a685c52 100644
--- a/cpp/src/IceSSL/SecureTransportTransceiverI.h
+++ b/cpp/src/IceSSL/SecureTransportTransceiverI.h
@@ -77,7 +77,7 @@ private:
SSLWantWrite = 0x2
};
- mutable Ice::Byte _flags;
+ mutable Ice::Byte _tflags;
size_t _maxSendPacketSize;
size_t _maxRecvPacketSize;
std::string _cipher;
diff --git a/cpp/src/IceSSL/SecureTransportUtil.cpp b/cpp/src/IceSSL/SecureTransportUtil.cpp
index d85fbf4d0d3..a9c7b1a68ae 100644
--- a/cpp/src/IceSSL/SecureTransportUtil.cpp
+++ b/cpp/src/IceSSL/SecureTransportUtil.cpp
@@ -363,11 +363,11 @@ loadPrivateKey(const string& file, SecCertificateRef cert, SecKeychainRef keycha
UniqueRef<SecKeyRef> key;
for(int i = 0; i < count; ++i)
{
- SecKeychainItemRef item =
+ SecKeychainItemRef itemRef =
static_cast<SecKeychainItemRef>(const_cast<void*>(CFArrayGetValueAtIndex(items.get(), 0)));
- if(SecKeyGetTypeID() == CFGetTypeID(item))
+ if(SecKeyGetTypeID() == CFGetTypeID(itemRef))
{
- key.retain(reinterpret_cast<SecKeyRef>(item));
+ key.retain(reinterpret_cast<SecKeyRef>(itemRef));
break;
}
}
diff --git a/cpp/src/IceStorm/InstrumentationI.cpp b/cpp/src/IceStorm/InstrumentationI.cpp
index 872c6b88f83..41cb2725243 100644
--- a/cpp/src/IceStorm/InstrumentationI.cpp
+++ b/cpp/src/IceStorm/InstrumentationI.cpp
@@ -241,7 +241,7 @@ namespace
struct QueuedUpdate
{
- QueuedUpdate(int count) : count(count)
+ QueuedUpdate(int countP) : count(countP)
{
}
@@ -265,7 +265,7 @@ namespace
struct OutstandingUpdate
{
- OutstandingUpdate(int count) : count(count)
+ OutstandingUpdate(int countP) : count(countP)
{
}
@@ -294,7 +294,7 @@ namespace
struct DeliveredUpdate
{
- DeliveredUpdate(int count) : count(count)
+ DeliveredUpdate(int countP) : count(countP)
{
}
diff --git a/cpp/src/IceStorm/Parser.cpp b/cpp/src/IceStorm/Parser.cpp
index 6ee8fe22f41..1ee3aef78d8 100644
--- a/cpp/src/IceStorm/Parser.cpp
+++ b/cpp/src/IceStorm/Parser.cpp
@@ -22,6 +22,8 @@
extern FILE* yyin;
extern int yydebug;
+int yyparse();
+
using namespace std;
using namespace Ice;
using namespace IceInternal;
@@ -45,9 +47,9 @@ class UnknownManagerException : public Exception
{
public:
- UnknownManagerException(const string& name, const char* file, int line) :
+ UnknownManagerException(const string& nameP, const char* file, int line) :
Exception(file, line),
- name(name)
+ name(nameP)
{
}
@@ -681,12 +683,12 @@ Parser::Parser(const CommunicatorPtr& communicator, const TopicManagerPrx& admin
}
void
-Parser::exception(const Ice::Exception& ex, bool warn)
+Parser::exception(const Ice::Exception& pex, bool warn)
{
ostringstream os;
try
{
- ex.ice_throw();
+ pex.ice_throw();
}
catch(const LinkExists& ex)
{
diff --git a/cpp/src/IceStorm/Parser.h b/cpp/src/IceStorm/Parser.h
index 5bcea7abf6d..7887c76d9b7 100644
--- a/cpp/src/IceStorm/Parser.h
+++ b/cpp/src/IceStorm/Parser.h
@@ -22,7 +22,6 @@
#define YYSTYPE std::list<std::string>
#define YY_DECL int yylex(YYSTYPE* yylvalp)
YY_DECL;
-int yyparse();
//
// I must set the initial stack depth to the maximum stack depth to
diff --git a/cpp/src/IceStorm/Service.cpp b/cpp/src/IceStorm/Service.cpp
index b53854cdb0e..28de33887b9 100644
--- a/cpp/src/IceStorm/Service.cpp
+++ b/cpp/src/IceStorm/Service.cpp
@@ -95,7 +95,7 @@ extern "C"
{
ICESTORM_SERVICE_API ::IceBox::Service*
-createIceStorm(CommunicatorPtr communicator)
+createIceStorm(CommunicatorPtr)
{
return new ServiceI;
}
@@ -300,11 +300,11 @@ ServiceI::start(
int nodeid = atoi(adapterid.substr(start, end-start).c_str());
ostringstream os;
os << "node" << nodeid;
- Ice::Identity id;
- id.category = instanceName;
- id.name = os.str();
+ Ice::Identity ident;
+ ident.category = instanceName;
+ ident.name = os.str();
- nodes[nodeid] = NodePrx::uncheckedCast((*p)->ice_adapterId(adapterid)->ice_identity(id));
+ nodes[nodeid] = NodePrx::uncheckedCast((*p)->ice_adapterId(adapterid)->ice_identity(ident));
}
}
diff --git a/cpp/src/IceStorm/TopicI.cpp b/cpp/src/IceStorm/TopicI.cpp
index 414b89ecfbc..16008fdcde1 100644
--- a/cpp/src/IceStorm/TopicI.cpp
+++ b/cpp/src/IceStorm/TopicI.cpp
@@ -394,12 +394,12 @@ TopicImpl::TopicImpl(
//
for(SubscriberRecordSeq::const_iterator p = subscribers.begin(); p != subscribers.end(); ++p)
{
- Ice::Identity id = p->obj->ice_getIdentity();
+ Ice::Identity ident = p->obj->ice_getIdentity();
TraceLevelsPtr traceLevels = _instance->traceLevels();
if(traceLevels->topic > 0)
{
Ice::Trace out(traceLevels->logger, traceLevels->topicCat);
- out << _name << " recreate " << _instance->communicator()->identityToString(id);
+ out << _name << " recreate " << _instance->communicator()->identityToString(ident);
if(traceLevels->topic > 1)
{
out << " endpoints: " << IceStormInternal::describeEndpoints(p->obj);
@@ -418,7 +418,7 @@ TopicImpl::TopicImpl(
catch(const Ice::Exception& ex)
{
Ice::Warning out(traceLevels->logger);
- out << _name << " recreate " << _instance->communicator()->identityToString(id);
+ out << _name << " recreate " << _instance->communicator()->identityToString(ident);
if(traceLevels->topic > 1)
{
out << " endpoints: " << IceStormInternal::describeEndpoints(p->obj);
@@ -1058,7 +1058,6 @@ TopicImpl::observerAddSubscriber(const LogUpdate& llu, const SubscriberRecord& r
{
// If the subscriber is already in the database display a
// diagnostic.
- TraceLevelsPtr traceLevels = _instance->traceLevels();
if(traceLevels->topic > 0)
{
Ice::Trace out(traceLevels->logger, traceLevels->topicCat);
diff --git a/cpp/src/IceStorm/TopicManagerI.cpp b/cpp/src/IceStorm/TopicManagerI.cpp
index ee8a3c4482a..ad37e967dd5 100644
--- a/cpp/src/IceStorm/TopicManagerI.cpp
+++ b/cpp/src/IceStorm/TopicManagerI.cpp
@@ -422,13 +422,13 @@ TopicManagerImpl::observerInit(const LogUpdate& llu, const TopicContentSeq& cont
for(TopicContentSeq::const_iterator p = content.begin(); p != content.end(); ++p)
{
- SubscriberRecordKey key;
- key.topic = p->id;
+ SubscriberRecordKey srkey;
+ srkey.topic = p->id;
SubscriberRecord rec;
rec.link = false;
rec.cost = 0;
- _subscriberMap.put(txn, key, rec);
+ _subscriberMap.put(txn, srkey, rec);
for(SubscriberRecordSeq::const_iterator q = p->records.begin(); q != p->records.end(); ++q)
{
@@ -486,14 +486,14 @@ TopicManagerImpl::observerInit(const LogUpdate& llu, const TopicContentSeq& cont
for(TopicContentSeq::const_iterator q = content.begin(); q != content.end(); ++q)
{
string name = identityToTopicName(q->id);
- map<string, TopicImplPtr>::const_iterator p = _topics.find(name);
- if(p == _topics.end())
+ map<string, TopicImplPtr>::const_iterator r = _topics.find(name);
+ if(r == _topics.end())
{
installTopic(name, q->id, true, q->records);
}
else
{
- p->second->update(q->records);
+ r->second->update(q->records);
}
}
// Clear the set of observers.
diff --git a/cpp/src/IceUtil/RecMutex.cpp b/cpp/src/IceUtil/RecMutex.cpp
index abc47d6cbe2..1acb4471166 100644
--- a/cpp/src/IceUtil/RecMutex.cpp
+++ b/cpp/src/IceUtil/RecMutex.cpp
@@ -113,7 +113,7 @@ IceUtil::RecMutex::lock(LockState& state) const
#else
void
-IceUtil::RecMutex::init(const MutexProtocol protocol)
+IceUtil::RecMutex::init(ICE_MAYBE_UNUSED const MutexProtocol protocol)
{
int rc;
pthread_mutexattr_t attr;
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index 8ebdd2f16b2..0ac929e440c 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -62,7 +62,7 @@ toOptional(const string& s, int typeCtx)
}
string
-stringTypeToString(const TypePtr& type, const StringList& metaData, int typeCtx)
+stringTypeToString(const TypePtr&, const StringList& metaData, int typeCtx)
{
string strType = findMetaData(metaData, typeCtx);
if(strType == "wstring" || (typeCtx & TypeContextUseWstring && strType == ""))
@@ -192,10 +192,10 @@ writeParamAllocateCode(Output& out, const TypePtr& type, bool optional, const st
seqType = findMetaData(seq->getMetaData(), typeCtx);
}
- string s;
+ string str;
if(seqType == "%array")
{
- s = typeToString(seq, scope, metaData, TypeContextAMIPrivateEnd);
+ str = typeToString(seq, scope, metaData, TypeContextAMIPrivateEnd);
}
else if(seqType.find("%range") == 0)
{
@@ -204,16 +204,16 @@ writeParamAllocateCode(Output& out, const TypePtr& type, bool optional, const st
{
md.push_back("cpp:type:" + seqType.substr(strlen("%range:")));
}
- s = typeToString(seq, scope, md, 0);
+ str = typeToString(seq, scope, md, 0);
}
- if(!s.empty())
+ if(!str.empty())
{
if(optional)
{
- s = toOptional(s, typeCtx);
+ str = toOptional(str, typeCtx);
}
- out << nl << s << ' ' << fixedName << "_tmp_;";
+ out << nl << str << ' ' << fixedName << "_tmp_;";
}
}
}
diff --git a/cpp/src/Slice/GrammarUtil.h b/cpp/src/Slice/GrammarUtil.h
index de34f2b8e63..952dfdedfc6 100644
--- a/cpp/src/Slice/GrammarUtil.h
+++ b/cpp/src/Slice/GrammarUtil.h
@@ -213,7 +213,6 @@ public:
#define YYSTYPE Slice::GrammarBasePtr
#define YY_DECL int slice_lex(YYSTYPE* yylvalp)
YY_DECL;
-int slice_parse();
//
// I must set the initial stack depth to the maximum stack depth to
diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp
index 094f2fd373a..09bfc4bcdce 100644
--- a/cpp/src/Slice/JavaUtil.cpp
+++ b/cpp/src/Slice/JavaUtil.cpp
@@ -971,11 +971,11 @@ Slice::JavaCompatGenerator::getPackagePrefix(const ContainedPtr& cont) const
string q;
if(!m->findMetaData(prefix, q))
{
- UnitPtr unit = cont->unit();
+ UnitPtr ut = cont->unit();
string file = cont->file();
assert(!file.empty());
- DefinitionContextPtr dc = unit->findDefinitionContext(file);
+ DefinitionContextPtr dc = ut->findDefinitionContext(file);
assert(dc);
q = dc->findMetaData(prefix);
}
@@ -2777,7 +2777,7 @@ Slice::JavaCompatGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
out << nl << "else";
out << sb;
out << nl << stream << ".writeSize(" << v << ".size());";
- string typeS = typeToString(type, TypeModeIn, package);
+ typeS = typeToString(type, TypeModeIn, package);
out << nl << "for(" << typeS << " elem : " << v << ')';
out << sb;
writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "elem", true, iter, false, customStream);
@@ -3451,11 +3451,11 @@ Slice::JavaGenerator::getPackagePrefix(const ContainedPtr& cont) const
string q;
if(!m->findMetaData(prefix, q))
{
- UnitPtr unit = cont->unit();
+ UnitPtr ut = cont->unit();
string file = cont->file();
assert(!file.empty());
- DefinitionContextPtr dc = unit->findDefinitionContext(file);
+ DefinitionContextPtr dc = ut->findDefinitionContext(file);
assert(dc);
q = dc->findMetaData(prefix);
}
@@ -4265,10 +4265,10 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out,
string s = optionalParam && optionalMapping ? param + ".get()" : param;
if(sz > 1)
{
- string ignore;
+ string ignore2;
out << nl << "final int optSize = " << s << " == null ? 0 : ";
- if(findMetaData("java:buffer", seq->getMetaData(), ignore) ||
- findMetaData("java:buffer", metaData, ignore))
+ if(findMetaData("java:buffer", seq->getMetaData(), ignore2) ||
+ findMetaData("java:buffer", metaData, ignore2))
{
out << s << ".remaining() / " << sz << ";";
}
@@ -4470,7 +4470,7 @@ Slice::JavaGenerator::writeDictionaryMarshalUnmarshalCode(Output& out,
out << nl << "final " << keyS << " key;";
writeMarshalUnmarshalCode(out, package, key, OptionalNone, false, 0, "key", false, iter, customStream);
- string valueS = typeToObjectString(value, TypeModeIn, package);
+ valueS = typeToObjectString(value, TypeModeIn, package);
ostringstream patchParams;
patchParams << "value -> " << v << ".put(key, value), " << valueS << ".class";
writeMarshalUnmarshalCode(out, package, value, OptionalNone, false, 0, "value", false, iter, customStream,
@@ -4671,7 +4671,7 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
// Marshal/unmarshal a custom sequence type.
//
BuiltinPtr b = BuiltinPtr::dynamicCast(type);
- string typeS = getUnqualified(seq, package);
+ typeS = getUnqualified(seq, package);
ostringstream o;
o << origContentS;
int d = depth;
@@ -4689,8 +4689,8 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
out << nl << "else";
out << sb;
out << nl << stream << ".writeSize(" << v << ".size());";
- string typeS = typeToString(type, TypeModeIn, package);
- out << nl << "for(" << typeS << " elem : " << v << ')';
+ string ctypeS = typeToString(type, TypeModeIn, package);
+ out << nl << "for(" << ctypeS << " elem : " << v << ')';
out << sb;
writeMarshalUnmarshalCode(out, package, type, OptionalNone, false, 0, "elem", true, iter, customStream);
out << eb;
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index 21faf648c1e..72c351ac9f8 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -26,6 +26,8 @@ using namespace Slice;
extern FILE* slice_in;
extern int slice_debug;
+int slice_parse();
+
//
// Operation attributes
//
@@ -376,8 +378,8 @@ Slice::SyntaxTreeBase::SyntaxTreeBase(const UnitPtr& unit, const DefinitionConte
// Type
// ----------------------------------------------------------------------
-Slice::Type::Type(const UnitPtr& unit) :
- SyntaxTreeBase(unit)
+Slice::Type::Type(const UnitPtr& ut) :
+ SyntaxTreeBase(ut)
{
}
@@ -524,9 +526,9 @@ const char* Slice::Builtin::builtinTable[] =
"Value"
};
-Slice::Builtin::Builtin(const UnitPtr& unit, Kind kind) :
- SyntaxTreeBase(unit),
- Type(unit),
+Slice::Builtin::Builtin(const UnitPtr& ut, Kind kind) :
+ SyntaxTreeBase(ut),
+ Type(ut),
_kind(kind)
{
//
@@ -2072,10 +2074,10 @@ Slice::Container::enumerators(const string& scoped) const
string name = scoped.substr(lastColon + 1);
for(EnumList::iterator p = enums.begin(); p != enums.end(); ++p)
{
- ContainedList cl = (*p)->lookupContained(name, false);
- if(!cl.empty())
+ ContainedList cl2 = (*p)->lookupContained(name, false);
+ if(!cl2.empty())
{
- result.push_back(EnumeratorPtr::dynamicCast(cl.front()));
+ result.push_back(EnumeratorPtr::dynamicCast(cl2.front()));
}
}
}
@@ -3527,7 +3529,7 @@ Slice::ClassDecl::recDependencies(set<ConstructedPtr>& dependencies)
void
Slice::ClassDecl::checkBasesAreLegal(const string& name, bool intf, bool local, const ClassList& bases,
- const UnitPtr& unit)
+ const UnitPtr& ut)
{
//
// Local definitions cannot have non-local bases, and vice versa.
@@ -3540,7 +3542,7 @@ Slice::ClassDecl::checkBasesAreLegal(const string& name, bool intf, bool local,
msg << (local ? "local" : "non-local") << " " << (intf ? "interface" : "class") << " `"
<< name << "' cannot have " << ((*p)->isLocal() ? "local" : "non-local") << " base "
<< ((*p)->isInterface() ? "interface" : "class") << " `" << (*p)->name() << "'";
- unit->error(msg.str());
+ ut->error(msg.str());
}
}
@@ -3577,7 +3579,7 @@ Slice::ClassDecl::checkBasesAreLegal(const string& name, bool intf, bool local,
// name (that is, if the union of the intersections of all possible pairs
// of partitions is empty).
//
- checkPairIntersections(spl, name, unit);
+ checkPairIntersections(spl, name, ut);
}
}
@@ -3679,7 +3681,7 @@ Slice::ClassDecl::toStringPartitionList(const GraphPartitionList& gpl)
// in the other and, if so, complain.
//
void
-Slice::ClassDecl::checkPairIntersections(const StringPartitionList& l, const string& name, const UnitPtr& unit)
+Slice::ClassDecl::checkPairIntersections(const StringPartitionList& l, const string& name, const UnitPtr& ut)
{
set<string> reported;
for(StringPartitionList::const_iterator i = l.begin(); i != l.end(); ++i)
@@ -3696,7 +3698,7 @@ Slice::ClassDecl::checkPairIntersections(const StringPartitionList& l, const str
{
string msg = "ambiguous multiple inheritance: `" + name;
msg += "' inherits operation `" + *s1 + "' from two or more unrelated base interfaces";
- unit->error(msg);
+ ut->error(msg);
reported.insert(*s1);
}
else if(!CICompare()(*s1, *s2) && !CICompare()(*s2, *s1) &&
@@ -3705,7 +3707,7 @@ Slice::ClassDecl::checkPairIntersections(const StringPartitionList& l, const str
string msg = "ambiguous multiple inheritance: `" + name;
msg += "' inherits operations `" + *s1 + "' and `" + *s2;
msg += "', which differ only in capitalization, from unrelated base interfaces";
- unit->error(msg);
+ ut->error(msg);
reported.insert(*s1);
reported.insert(*s2);
}
@@ -3807,8 +3809,8 @@ Slice::ClassDef::createOperation(const string& name,
}
string baseName = IceUtilInternal::toLower((*q)->name());
- string newName = IceUtilInternal::toLower(name);
- if(baseName == newName)
+ string newName2 = IceUtilInternal::toLower(name);
+ if(baseName == newName2)
{
string msg = "operation `" + name + "' differs only in capitalization from " + (*q)->kindOf();
msg += " `" + (*q)->name() + "', which is defined in a base interface or class";
@@ -3903,8 +3905,8 @@ Slice::ClassDef::createDataMember(const string& name, const TypePtr& type, bool
}
string baseName = IceUtilInternal::toLower((*q)->name());
- string newName = IceUtilInternal::toLower(name);
- if(baseName == newName)
+ string newName2 = IceUtilInternal::toLower(name);
+ if(baseName == newName2)
{
string msg = "data member `" + name + "' differs only in capitalization from " + (*q)->kindOf();
msg += " `" + (*q)->name() + "', which is defined in a base interface or class";
@@ -4449,8 +4451,8 @@ Slice::Exception::createDataMember(const string& name, const TypePtr& type, bool
}
string baseName = IceUtilInternal::toLower((*r)->name());
- string newName = IceUtilInternal::toLower(name);
- if(baseName == newName)
+ string newName2 = IceUtilInternal::toLower(name);
+ if(baseName == newName2)
{
string msg = "exception member `" + name + "' differs only in capitalization from exception member `";
msg += (*r)->name() + "', which is defined in a base exception";
@@ -6002,7 +6004,7 @@ Slice::Operation::attributes() const
//
freezeMD = freezeMD.substr(1);
- int i = 0;
+ i = 0;
while(i < 4)
{
if(freezeMD.find(txAttribute[i]) == 0)
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp
index 397dad8eb69..3783cd7dd1a 100644
--- a/cpp/src/Slice/Preprocessor.cpp
+++ b/cpp/src/Slice/Preprocessor.cpp
@@ -309,7 +309,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
bool
Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, const vector<string>& includePaths,
- const vector<string>& extraArgs, const string& cppSourceExt,
+ const vector<string>& extraArgs, const string& /*cppSourceExt*/,
const string& optValue)
{
if(!checkInputFile())
@@ -548,7 +548,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
}
}
- string::size_type pos = 0;
+ pos = 0;
while((pos = result.find("\\", pos + 1)) != string::npos)
{
result.insert(pos, 1, '\\');
@@ -590,7 +590,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
//
// Change .o[bj] suffix to the h header extension suffix.
//
- string::size_type pos = result.find(suffix);
+ pos = result.find(suffix);
if(pos != string::npos)
{
string name = result.substr(0, pos);
@@ -621,7 +621,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
//
// Find end of next file.
//
- string::size_type pos = 0;
+ pos = 0;
while((pos = result.find_first_of(" :\t\r\n\\", pos + 1)) != string::npos)
{
if(result[pos] == ':')
@@ -654,7 +654,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
//
// Change .o[bj] suffix to .cs suffix.
//
- string::size_type pos;
+ pos = 0;
if((pos = result.find(suffix)) != string::npos)
{
result.replace(pos, suffix.size() - 1, ".cs");
@@ -668,7 +668,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
//
// Change .o[bj] suffix to .js suffix.
//
- string::size_type pos;
+ pos = 0;
if((pos = result.find(suffix)) != string::npos)
{
result.replace(pos, suffix.size() - 1, ".js");
@@ -684,7 +684,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
{
result = pyPrefix + result;
}
- string::size_type pos;
+ pos = 0;
if((pos = result.find(suffix)) != string::npos)
{
result.replace(pos, suffix.size() - 1, "_ice.py");
@@ -696,7 +696,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
//
// Change .o[bj] suffix to .rb suffix.
//
- string::size_type pos;
+ pos = 0;
if((pos = result.find(suffix)) != string::npos)
{
result.replace(pos, suffix.size() - 1, ".rb");
@@ -708,7 +708,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
//
// Change .o[bj] suffix to .php suffix.
//
- string::size_type pos;
+ pos = 0;
if((pos = result.find(suffix)) != string::npos)
{
result.replace(pos, suffix.size() - 1, ".php");
@@ -717,7 +717,7 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
}
case ObjC:
{
- string::size_type pos = result.find(suffix);
+ pos = result.find(suffix);
if(pos != string::npos)
{
string name = result.substr(0, pos);
diff --git a/cpp/src/Slice/Python.cpp b/cpp/src/Slice/Python.cpp
index adc4a3ba3f1..b84de7c0ec1 100644
--- a/cpp/src/Slice/Python.cpp
+++ b/cpp/src/Slice/Python.cpp
@@ -148,21 +148,21 @@ createPackageDirectory(const string& output, const string& pkgdir)
// PackageVisitor. We need every intermediate subdirectory to have an __init__.py file, which
// can be empty.
//
- const string init = path + "/__init__.py";
- if(!IceUtilInternal::fileExists(init))
+ const string initFile = path + "/__init__.py";
+ if(!IceUtilInternal::fileExists(initFile))
{
//
// Create an empty file.
//
IceUtilInternal::Output out;
- out.open(init.c_str());
+ out.open(initFile.c_str());
if(!out)
{
ostringstream os;
- os << "cannot open '" << init << "': " << IceUtilInternal::errorToString(errno);
+ os << "cannot open '" << initFile << "': " << IceUtilInternal::errorToString(errno);
throw FileException(__FILE__, __LINE__, os.str());
}
- FileTracker::instance()->addFile(init);
+ FileTracker::instance()->addFile(initFile);
}
}
}
@@ -233,16 +233,16 @@ PackageVisitor::createModules(const UnitPtr& unit, const string& module, const s
for(StringList::iterator p = modules.begin(); p != modules.end(); ++p)
{
- vector<string> v;
- if(!IceUtilInternal::splitString(*p, ".", v))
+ vector<string> vs;
+ if(!IceUtilInternal::splitString(*p, ".", vs))
{
assert(false);
}
string currentModule;
string path = dir.empty() ? "." : dir;
- for(vector<string>::iterator q = v.begin(); q != v.end(); ++q)
+ for(vector<string>::iterator q = vs.begin(); q != vs.end(); ++q)
{
- if(q != v.begin())
+ if(q != vs.begin())
{
addSubmodule(path, currentModule, *q);
currentModule += ".";
@@ -413,9 +413,9 @@ PackageVisitor::writeInit(const string& dir, const string& name, const StringLis
ofstream os(IceUtilInternal::streamFilename(initPath).c_str());
if(!os)
{
- ostringstream os;
- os << "cannot open file '" << initPath << "': " << IceUtilInternal::errorToString(errno);
- throw FileException(__FILE__, __LINE__, os.str());
+ ostringstream oss;
+ oss << "cannot open file '" << initPath << "': " << IceUtilInternal::errorToString(errno);
+ throw FileException(__FILE__, __LINE__, oss.str());
}
FileTracker::instance()->addFile(initPath);
@@ -749,9 +749,9 @@ Slice::Python::compile(const vector<string>& argv)
out.open(path.c_str());
if(!out)
{
- ostringstream os;
- os << "cannot open '" << path << "': " << IceUtilInternal::errorToString(errno);
- throw FileException(__FILE__, __LINE__, os.str());
+ ostringstream oss;
+ oss << "cannot open '" << path << "': " << IceUtilInternal::errorToString(errno);
+ throw FileException(__FILE__, __LINE__, oss.str());
}
FileTracker::instance()->addFile(path);
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index e14565a6c4a..c4b3f48726b 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -2307,12 +2307,12 @@ Slice::Python::CodeVisitor::stripMarkup(const string& comment)
string::size_type start = 0;
while(start != string::npos)
{
- string::size_type nl = text.find_first_of("\r\n", start);
+ string::size_type newline = text.find_first_of("\r\n", start);
string line;
- if(nl != string::npos)
+ if(newline != string::npos)
{
- line = text.substr(start, nl - start);
- start = nl;
+ line = text.substr(start, newline - start);
+ start = newline;
}
else
{
@@ -2849,7 +2849,7 @@ Slice::Python::CodeVisitor::writeDocstring(const OperationPtr& op, DocstringMode
}
string
-Slice::Python::getPackageDirectory(const string& file, const UnitPtr& unit)
+Slice::Python::getPackageDirectory(const string& file, const UnitPtr& ut)
{
//
// file must be a fully-qualified path name.
@@ -2858,7 +2858,7 @@ Slice::Python::getPackageDirectory(const string& file, const UnitPtr& unit)
//
// Check if the file contains the python:pkgdir global metadata.
//
- DefinitionContextPtr dc = unit->findDefinitionContext(file);
+ DefinitionContextPtr dc = ut->findDefinitionContext(file);
assert(dc);
const string prefix = "python:pkgdir:";
string pkgdir = dc->findMetaData(prefix);
@@ -2874,7 +2874,7 @@ Slice::Python::getPackageDirectory(const string& file, const UnitPtr& unit)
}
string
-Slice::Python::getImportFileName(const string& file, const UnitPtr& unit, const vector<string>& includePaths)
+Slice::Python::getImportFileName(const string& file, const UnitPtr& ut, const vector<string>& includePaths)
{
//
// The file and includePaths arguments must be fully-qualified path names.
@@ -2883,7 +2883,7 @@ Slice::Python::getImportFileName(const string& file, const UnitPtr& unit, const
//
// Check if the file contains the python:pkgdir global metadata.
//
- string pkgdir = getPackageDirectory(file, unit);
+ string pkgdir = getPackageDirectory(file, ut);
if(!pkgdir.empty())
{
//
@@ -3046,11 +3046,11 @@ Slice::Python::getPackageMetadata(const ContainedPtr& cont)
string q;
if(!m->findMetaData(prefix, q))
{
- UnitPtr unit = cont->unit();
+ UnitPtr ut = cont->unit();
string file = cont->file();
assert(!file.empty());
- DefinitionContextPtr dc = unit->findDefinitionContext(file);
+ DefinitionContextPtr dc = ut->findDefinitionContext(file);
assert(dc);
q = dc->findMetaData(prefix);
}
@@ -3232,8 +3232,8 @@ Slice::Python::MetaDataVisitor::visitSequence(const SequencePtr& p)
const string file = p->file();
const string line = p->line();
StringList protobufMetaData;
- const UnitPtr unit = p->unit();
- const DefinitionContextPtr dc = unit->findDefinitionContext(file);
+ const UnitPtr ut = p->unit();
+ const DefinitionContextPtr dc = ut->findDefinitionContext(file);
assert(dc);
for(StringList::const_iterator q = metaData.begin(); q != metaData.end(); )
@@ -3285,8 +3285,8 @@ StringList
Slice::Python::MetaDataVisitor::validateSequence(const string& file, const string& line,
const TypePtr& type, const StringList& metaData)
{
- const UnitPtr unit = type->unit();
- const DefinitionContextPtr dc = unit->findDefinitionContext(file);
+ const UnitPtr ut = type->unit();
+ const DefinitionContextPtr dc = ut->findDefinitionContext(file);
assert(dc);
static const string prefix = "python:";
@@ -3322,8 +3322,8 @@ Slice::Python::MetaDataVisitor::reject(const ContainedPtr& cont)
StringList localMetaData = cont->getMetaData();
static const string prefix = "python:";
- const UnitPtr unit = cont->unit();
- const DefinitionContextPtr dc = unit->findDefinitionContext(cont->file());
+ const UnitPtr ut = cont->unit();
+ const DefinitionContextPtr dc = ut->findDefinitionContext(cont->file());
assert(dc);
for(StringList::const_iterator p = localMetaData.begin(); p != localMetaData.end();)
diff --git a/cpp/src/Slice/Ruby.cpp b/cpp/src/Slice/Ruby.cpp
index 8b61d7947b0..40e6d2f3de5 100644
--- a/cpp/src/Slice/Ruby.cpp
+++ b/cpp/src/Slice/Ruby.cpp
@@ -296,9 +296,9 @@ Slice::Ruby::compile(const vector<string>& argv)
out.open(file.c_str());
if(!out)
{
- ostringstream os;
- os << "cannot open`" << file << "': " << IceUtilInternal::errorToString(errno);
- throw FileException(__FILE__, __LINE__, os.str());
+ ostringstream oss;
+ oss << "cannot open`" << file << "': " << IceUtilInternal::errorToString(errno);
+ throw FileException(__FILE__, __LINE__, oss.str());
}
FileTracker::instance()->addFile(file);
//
diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp
index b9a2ddbc3ce..b8d1ce043d3 100644
--- a/cpp/src/Slice/RubyUtil.cpp
+++ b/cpp/src/Slice/RubyUtil.cpp
@@ -340,7 +340,6 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
//
// read/write accessors for data members.
//
- DataMemberList members = p->dataMembers();
if(!members.empty())
{
bool prot = p->hasMetaData("protected");
diff --git a/cpp/src/Slice/Scanner.cpp b/cpp/src/Slice/Scanner.cpp
index 2c043293cf1..2e2ab307d64 100644
--- a/cpp/src/Slice/Scanner.cpp
+++ b/cpp/src/Slice/Scanner.cpp
@@ -1249,7 +1249,7 @@ YY_RULE_SETUP
case 'U':
{
string escape = "";
- char c = next;
+ c = next;
int size = (c == 'u') ? 4 : 8;
while(size > 0)
{
diff --git a/cpp/src/Slice/Scanner.l b/cpp/src/Slice/Scanner.l
index d7505a2eca3..04c62b7c089 100644
--- a/cpp/src/Slice/Scanner.l
+++ b/cpp/src/Slice/Scanner.l
@@ -394,7 +394,7 @@ floating_literal (({fractional_constant}{exponent_part}?)|((\+|-)?[[:digit:]]
case 'U':
{
string escape = "";
- char c = next;
+ c = next;
int size = (c == 'u') ? 4 : 8;
while(size > 0)
{
diff --git a/cpp/src/slice2confluence/ConfluenceOutput.cpp b/cpp/src/slice2confluence/ConfluenceOutput.cpp
index f095ca9166d..ecee4fa5419 100644
--- a/cpp/src/slice2confluence/ConfluenceOutput.cpp
+++ b/cpp/src/slice2confluence/ConfluenceOutput.cpp
@@ -13,6 +13,15 @@
#include <sstream>
#include <algorithm>
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wshadow"
+# pragma clang diagnostic ignored "-Wshadow-field"
+# pragma clang diagnostic ignored "-Wunused-parameter"
+#elif defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Wshadow"
+# pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
using namespace std;
using namespace IceUtilInternal;
diff --git a/cpp/src/slice2confluence/Gen.cpp b/cpp/src/slice2confluence/Gen.cpp
index 16629ab5aa5..3eff17700c0 100644
--- a/cpp/src/slice2confluence/Gen.cpp
+++ b/cpp/src/slice2confluence/Gen.cpp
@@ -27,6 +27,15 @@
#include <string>
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wshadow"
+# pragma clang diagnostic ignored "-Wshadow-field"
+# pragma clang diagnostic ignored "-Wunused-parameter"
+#elif defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Wshadow"
+# pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
using namespace std;
using namespace Slice;
using namespace IceUtil;
diff --git a/cpp/src/slice2confluence/Gen.h b/cpp/src/slice2confluence/Gen.h
index e6558ec3984..abc59399e06 100644
--- a/cpp/src/slice2confluence/Gen.h
+++ b/cpp/src/slice2confluence/Gen.h
@@ -16,6 +16,11 @@
#include <iterator>
+#if defined(__clang__)
+// TODO: fix these warnings!
+# pragma clang diagnostic ignored "-Wshadow-field"
+#endif
+
namespace Slice
{
diff --git a/cpp/src/slice2confluence/Main.cpp b/cpp/src/slice2confluence/Main.cpp
index 0e6b6c21e56..2d30cada84d 100644
--- a/cpp/src/slice2confluence/Main.cpp
+++ b/cpp/src/slice2confluence/Main.cpp
@@ -71,7 +71,7 @@ splitCommas(string& str)
}
void
-interruptedCallback(int signal)
+interruptedCallback(int)
{
IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(globalMutex);
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index cf68c8cc12a..bd0a3b15b29 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -981,20 +981,20 @@ Slice::Gen::generate(const UnitPtr& p)
StringList globalMetaData = dc->getMetaData();
for(StringList::const_iterator q = globalMetaData.begin(); q != globalMetaData.end();)
{
- string s = *q++;
+ string md = *q++;
static const string includePrefix = "cpp:include:";
- if(s.find(includePrefix) == 0)
+ if(md.find(includePrefix) == 0)
{
- if(s.size() > includePrefix.size())
+ if(md.size() > includePrefix.size())
{
- H << nl << "#include <" << s.substr(includePrefix.size()) << ">";
+ H << nl << "#include <" << md.substr(includePrefix.size()) << ">";
}
else
{
ostringstream ostr;
- ostr << "ignoring invalid global metadata `" << s << "'";
+ ostr << "ignoring invalid global metadata `" << md << "'";
dc->warning(InvalidMetaData, file, -1, ostr.str());
- globalMetaData.remove(s);
+ globalMetaData.remove(md);
}
}
}
@@ -1793,7 +1793,6 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
DataMemberList dataMembers = p->dataMembers();
vector<string> params;
- vector<string>::const_iterator pi;
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
@@ -2651,7 +2650,6 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
#endif
for(ExceptionList::const_iterator i = throws.begin(); i != throws.end(); ++i)
{
- string scoped = (*i)->scoped();
C << nl << "catch(const " << fixKwd((*i)->scoped()) << "&)";
C << sb;
C << nl << "throw;";
@@ -2714,7 +2712,6 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
#endif
for(ExceptionList::const_iterator i = throws.begin(); i != throws.end(); ++i)
{
- string scoped = (*i)->scoped();
C << nl << "catch(const " << fixKwd((*i)->scoped()) << "&)";
C << sb;
C << nl << "throw;";
@@ -3814,7 +3811,6 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
vector<string> paramsDeclAMI;
vector<string> outParamsDeclAMI;
- ParamDeclList paramList = p->parameters();
for(ParamDeclList::const_iterator r = paramList.begin(); r != paramList.end(); ++r)
{
string paramName = fixKwd((*r)->name());
@@ -4841,8 +4837,6 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p)
}
H.restoreIndent();
- string isConst = ((op->mode() == Operation::Nonmutating) || op->hasMetaData("cpp:const")) ? " const" : "";
-
H << ")" << isConst << ';';
C << sp << nl << retS << nl;
@@ -5500,8 +5494,8 @@ Slice::Gen::MetaDataVisitor::visitOperation(const OperationPtr& p)
StringList metaData = p->getMetaData();
- const UnitPtr unit = p->unit();
- const DefinitionContextPtr dc = unit->findDefinitionContext(p->file());
+ const UnitPtr ut = p->unit();
+ const DefinitionContextPtr dc = ut->findDefinitionContext(p->file());
assert(dc);
if(!cl->isLocal() && p->hasMetaData("cpp:noexcept"))
{
@@ -5582,8 +5576,8 @@ Slice::Gen::MetaDataVisitor::validate(const SyntaxTreeBasePtr& cont, const Strin
static const string cpp11Prefix = "cpp11:";
static const string cpp98Prefix = "cpp98:";
- const UnitPtr unit = cont->unit();
- const DefinitionContextPtr dc = unit->findDefinitionContext(file);
+ const UnitPtr ut = cont->unit();
+ const DefinitionContextPtr dc = ut->findDefinitionContext(file);
assert(dc);
StringList newMetaData = metaData;
for(StringList::const_iterator p = newMetaData.begin(); p != newMetaData.end();)
@@ -5716,7 +5710,7 @@ Slice::Gen::NormalizeMetaDataVisitor::NormalizeMetaDataVisitor(bool cpp11) :
}
bool
-Slice::Gen::NormalizeMetaDataVisitor::visitUnitStart(const UnitPtr& p)
+Slice::Gen::NormalizeMetaDataVisitor::visitUnitStart(const UnitPtr&)
{
return true;
}
@@ -5970,11 +5964,11 @@ Slice::Gen::resetUseWstring(list<int>& hist)
}
string
-Slice::Gen::getHeaderExt(const string& file, const UnitPtr& unit)
+Slice::Gen::getHeaderExt(const string& file, const UnitPtr& ut)
{
string ext;
static const string headerExtPrefix = "cpp:header-ext:";
- DefinitionContextPtr dc = unit->findDefinitionContext(file);
+ DefinitionContextPtr dc = ut->findDefinitionContext(file);
assert(dc);
string meta = dc->findMetaData(headerExtPrefix);
if(meta.size() > headerExtPrefix.size())
@@ -5985,11 +5979,11 @@ Slice::Gen::getHeaderExt(const string& file, const UnitPtr& unit)
}
string
-Slice::Gen::getSourceExt(const string& file, const UnitPtr& unit)
+Slice::Gen::getSourceExt(const string& file, const UnitPtr& ut)
{
string ext;
static const string sourceExtPrefix = "cpp:source-ext:";
- DefinitionContextPtr dc = unit->findDefinitionContext(file);
+ DefinitionContextPtr dc = ut->findDefinitionContext(file);
assert(dc);
string meta = dc->findMetaData(sourceExtPrefix);
if(meta.size() > sourceExtPrefix.size())
@@ -6017,7 +6011,7 @@ Slice::Gen::Cpp11DeclVisitor::visitUnitStart(const UnitPtr& p)
}
void
-Slice::Gen::Cpp11DeclVisitor::visitUnitEnd(const UnitPtr& p)
+Slice::Gen::Cpp11DeclVisitor::visitUnitEnd(const UnitPtr&)
{
C << sp << nl << "}";
}
@@ -6679,7 +6673,7 @@ Slice::Gen::Cpp11ProxyVisitor::Cpp11ProxyVisitor(Output& h, Output& c, const str
}
bool
-Slice::Gen::Cpp11ProxyVisitor::visitUnitStart(const UnitPtr& p)
+Slice::Gen::Cpp11ProxyVisitor::visitUnitStart(const UnitPtr&)
{
return true;
}
diff --git a/cpp/src/slice2cs/CsUtil.cpp b/cpp/src/slice2cs/CsUtil.cpp
index 8a50432423d..cd3d5239b7c 100644
--- a/cpp/src/slice2cs/CsUtil.cpp
+++ b/cpp/src/slice2cs/CsUtil.cpp
@@ -135,9 +135,9 @@ Slice::CsGenerator::getNamespacePrefix(const ContainedPtr& cont)
}
string
-Slice::CsGenerator::getCustomTypeIdNamespace(const UnitPtr& unit)
+Slice::CsGenerator::getCustomTypeIdNamespace(const UnitPtr& ut)
{
- DefinitionContextPtr dc = unit->findDefinitionContext(unit->topLevelFile());
+ DefinitionContextPtr dc = ut->findDefinitionContext(ut->topLevelFile());
assert(dc);
static const string typeIdNsPrefix = "cs:typeid-namespace:";
@@ -480,23 +480,23 @@ Slice::CsGenerator::typeToString(const TypePtr& type, const string& package, boo
string meta;
if(seq->findMetaData(prefix, meta))
{
- string type = meta.substr(prefix.size());
- if(type == "List" || type == "LinkedList" || type == "Queue" || type == "Stack")
+ string customType = meta.substr(prefix.size());
+ if(customType == "List" || customType == "LinkedList" || customType == "Queue" || customType == "Stack")
{
- return "global::System.Collections.Generic." + type + "<" +
+ return "global::System.Collections.Generic." + customType + "<" +
typeToString(seq->type(), package, optional, local) + ">";
}
else
{
- return "global::" + type + "<" + typeToString(seq->type(), package, optional, local) + ">";
+ return "global::" + customType + "<" + typeToString(seq->type(), package, optional, local) + ">";
}
}
prefix = "cs:serializable:";
if(seq->findMetaData(prefix, meta))
{
- string type = meta.substr(prefix.size());
- return "global::" + type;
+ string customType = meta.substr(prefix.size());
+ return "global::" + customType;
}
return typeToString(seq->type(), package, optional, local) + "[]";
@@ -561,7 +561,6 @@ Slice::CsGenerator::resultType(const OperationPtr& op, const string& package, bo
}
else if(op->returnType() || outParams.size() > 1)
{
- ClassDefPtr cl = ClassDefPtr::dynamicCast(op->container());
t = getUnqualified(cl, package, "", resultStructName("", op->name()));
}
else
@@ -2185,7 +2184,7 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
const string& scope,
const string& param,
bool optional,
- int tag,
+ int /*tag*/,
bool serialize)
{
//
@@ -2617,8 +2616,8 @@ Slice::CsGenerator::MetaDataVisitor::validate(const ContainedPtr& cont)
StringList localMetaData = cont->getMetaData();
StringList newLocalMetaData;
- const UnitPtr unit = cont->unit();
- const DefinitionContextPtr dc = unit->findDefinitionContext(cont->file());
+ const UnitPtr ut = cont->unit();
+ const DefinitionContextPtr dc = ut->findDefinitionContext(cont->file());
assert(dc);
for(StringList::iterator p = localMetaData.begin(); p != localMetaData.end(); ++p)
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index ed7f4eea4f7..9ad2e55561d 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -1835,7 +1835,7 @@ Slice::CsVisitor::writeDocCommentAMD(const OperationPtr& p, const string& extraP
}
void
-Slice::CsVisitor::writeDocCommentParam(const OperationPtr& p, ParamDir paramType, bool amd)
+Slice::CsVisitor::writeDocCommentParam(const OperationPtr& p, ParamDir paramType, bool /*amd*/)
{
//
// Collect the names of the in- or -out parameters to be documented.
@@ -2195,7 +2195,7 @@ Slice::Gen::CompactIdVisitor::visitUnitStart(const UnitPtr& p)
}
void
-Slice::Gen::CompactIdVisitor::visitUnitEnd(const UnitPtr& p)
+Slice::Gen::CompactIdVisitor::visitUnitEnd(const UnitPtr&)
{
_out << eb;
}
@@ -2676,7 +2676,7 @@ Slice::Gen::TypesVisitor::visitOperation(const OperationPtr& p)
}
void
-Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p)
+Slice::Gen::TypesVisitor::visitSequence(const SequencePtr&)
{
//
// No need to generate anything for sequences.
@@ -2810,8 +2810,8 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sb;
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
- string name = fixId((*q)->name(), DotNet::Exception, false);
- writeSerializeDeserializeCode(_out, (*q)->type(), ns, name, (*q)->optional(), (*q)->tag(), false);
+ string memberName = fixId((*q)->name(), DotNet::Exception, false);
+ writeSerializeDeserializeCode(_out, (*q)->type(), ns, memberName, (*q)->optional(), (*q)->tag(), false);
}
_out << eb;
@@ -2825,8 +2825,8 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sb;
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
- string name = fixId((*q)->name(), DotNet::Exception, false);
- _out << nl << "this." << name << " = " << fixId((*q)->name()) << ';';
+ string memberName = fixId((*q)->name(), DotNet::Exception, false);
+ _out << nl << "this." << memberName << " = " << fixId((*q)->name()) << ';';
}
_out << eb;
}
@@ -2931,8 +2931,8 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sb;
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
- string name = fixId((*q)->name(), DotNet::Exception, false);
- writeSerializeDeserializeCode(_out, (*q)->type(), ns, name, (*q)->optional(), (*q)->tag(), true);
+ string memberName = fixId((*q)->name(), DotNet::Exception, false);
+ writeSerializeDeserializeCode(_out, (*q)->type(), ns, memberName, (*q)->optional(), (*q)->tag(), true);
}
_out << sp << nl << "base.GetObjectData(info, context);";
_out << eb;
@@ -3314,7 +3314,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
}
void
-Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p)
+Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr&)
{
}
@@ -4122,7 +4122,7 @@ Slice::Gen::OpsVisitor::visitClassDefStart(const ClassDefPtr& p)
bool amd = !p->isLocal() && (p->hasMetaData("amd") || op->hasMetaData("amd"));
string retS;
vector<string> params, args;
- string name = getDispatchParams(op, retS, params, args, ns);
+ string opName = getDispatchParams(op, retS, params, args, ns);
_out << sp;
if(amd)
{
@@ -4137,7 +4137,7 @@ Slice::Gen::OpsVisitor::visitClassDefStart(const ClassDefPtr& p)
emitAttributes(op);
emitDeprecate(op, op, _out, "operation");
emitGeneratedCodeAttribute();
- _out << nl << retS << " " << name << spar << params << epar << ";";
+ _out << nl << retS << " " << opName << spar << params << epar << ";";
}
_out << eb;
@@ -5053,10 +5053,10 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
else
{
_out << nl << valueS << " v;";
- StructPtr st = StructPtr::dynamicCast(value);
- if(st)
+ StructPtr stv = StructPtr::dynamicCast(value);
+ if(stv)
{
- if(isValueType(st))
+ if(isValueType(stv))
{
_out << nl << "v = new " << typeToString(value, ns) << "();";
}
@@ -5160,8 +5160,8 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
{
string retS;
vector<string> params, args;
- string name = getDispatchParams(*i, retS, params, args, ns);
- _out << sp << nl << "public abstract " << retS << " " << name << spar << params << epar << ';';
+ string opName = getDispatchParams(*i, retS, params, args, ns);
+ _out << sp << nl << "public abstract " << retS << " " << opName << spar << params << epar << ';';
}
if(!ops.empty())
@@ -5275,11 +5275,11 @@ Slice::Gen::DispatcherVisitor::writeTieOperations(const ClassDefPtr& p, NameSet*
if(!opNames)
{
- NameSet opNames;
+ NameSet opNamesTmp;
ClassList bases = p->bases();
for(ClassList::const_iterator i = bases.begin(); i != bases.end(); ++i)
{
- writeTieOperations(*i, &opNames);
+ writeTieOperations(*i, &opNamesTmp);
}
}
else
@@ -5330,7 +5330,6 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment
if(!cl->isLocal() && (cl->hasMetaData("amd") || op->hasMetaData("amd")))
{
- ParamDeclList::const_iterator i;
vector<string> pDecl = getInParams(op, ns);
string resultType = CsGenerator::resultType(op, ns, true);
diff --git a/cpp/src/slice2cs/Main.cpp b/cpp/src/slice2cs/Main.cpp
index fc965cc529b..cd07739a508 100644
--- a/cpp/src/slice2cs/Main.cpp
+++ b/cpp/src/slice2cs/Main.cpp
@@ -230,8 +230,8 @@ compile(const vector<string>& argv)
//
// Ignore duplicates.
//
- vector<string>::iterator p = find(args.begin(), args.end(), *i);
- if(p != i)
+ vector<string>::iterator j = find(args.begin(), args.end(), *i);
+ if(j != i)
{
continue;
}
diff --git a/cpp/src/slice2html/Gen.cpp b/cpp/src/slice2html/Gen.cpp
index 3a4f1e54314..6e1440dd9c5 100644
--- a/cpp/src/slice2html/Gen.cpp
+++ b/cpp/src/slice2html/Gen.cpp
@@ -25,6 +25,15 @@
#include <iterator>
#include <string.h>
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wshadow"
+# pragma clang diagnostic ignored "-Wshadow-field"
+# pragma clang diagnostic ignored "-Wunused-parameter"
+#elif defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Wshadow"
+# pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
using namespace std;
using namespace Slice;
using namespace IceUtil;
diff --git a/cpp/src/slice2html/Gen.h b/cpp/src/slice2html/Gen.h
index c4f9d922ae1..7cc3faa3dd1 100644
--- a/cpp/src/slice2html/Gen.h
+++ b/cpp/src/slice2html/Gen.h
@@ -13,6 +13,11 @@
#include <Slice/Parser.h>
#include <IceUtil/OutputUtil.h>
+#if defined(__clang__)
+// TODO: fix these warnings!
+# pragma clang diagnostic ignored "-Wshadow-field"
+#endif
+
namespace Slice
{
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 2db53d50907..e937de14f11 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -18,6 +18,13 @@
#include <limits>
+// TODO: fix this warning!
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wshadow"
+#elif defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Wshadow"
+#endif
+
using namespace std;
using namespace Slice;
using namespace IceUtil;
diff --git a/cpp/src/slice2java/GenCompat.cpp b/cpp/src/slice2java/GenCompat.cpp
index 2e50562471f..8c69fdd574f 100644
--- a/cpp/src/slice2java/GenCompat.cpp
+++ b/cpp/src/slice2java/GenCompat.cpp
@@ -18,6 +18,13 @@
#include <limits>
+// TODO: fix this warning!
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wshadow"
+#elif defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Wshadow"
+#endif
+
using namespace std;
using namespace Slice;
using namespace IceUtil;
@@ -596,7 +603,7 @@ Slice::JavaCompatVisitor::getParamsAsyncLambda(const OperationPtr& op, const str
}
vector<string>
-Slice::JavaCompatVisitor::getArgsAsyncLambda(const OperationPtr& op, const string& package, bool context, bool sentCB)
+Slice::JavaCompatVisitor::getArgsAsyncLambda(const OperationPtr& op, const string& /*package*/, bool context, bool sentCB)
{
vector<string> args = getInOutArgs(op, InParam);
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp
index 207b24d1e35..82aa7646157 100644
--- a/cpp/src/slice2java/Main.cpp
+++ b/cpp/src/slice2java/Main.cpp
@@ -23,6 +23,13 @@ using namespace std;
using namespace Slice;
using namespace IceUtilInternal;
+// TODO: fix this warning!
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wshadow"
+#elif defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Wshadow"
+#endif
+
namespace
{
diff --git a/cpp/src/slice2js/Gen.cpp b/cpp/src/slice2js/Gen.cpp
index 10b571b6d83..58c6ee1e51b 100644
--- a/cpp/src/slice2js/Gen.cpp
+++ b/cpp/src/slice2js/Gen.cpp
@@ -17,6 +17,13 @@
#include <Slice/FileTracker.h>
#include <Slice/Util.h>
+// TODO: fix this warning!
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wshadow"
+#elif defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Wshadow"
+#endif
+
using namespace std;
using namespace Slice;
using namespace IceUtil;
@@ -419,7 +426,7 @@ Slice::JsVisitor::writeInitDataMembers(const DataMemberList& dataMembers)
}
string
-Slice::JsVisitor::getValue(const string& scope, const TypePtr& type)
+Slice::JsVisitor::getValue(const string& /*scope*/, const TypePtr& type)
{
assert(type);
@@ -479,7 +486,7 @@ Slice::JsVisitor::getValue(const string& scope, const TypePtr& type)
}
string
-Slice::JsVisitor::writeConstantValue(const string& scope, const TypePtr& type, const SyntaxTreeBasePtr& valueType,
+Slice::JsVisitor::writeConstantValue(const string& /*scope*/, const TypePtr& type, const SyntaxTreeBasePtr& valueType,
const string& value)
{
ostringstream os;
@@ -642,7 +649,7 @@ Slice::Gen::Gen(const string& base, const vector<string>& includePaths, const st
printGeneratedHeader(_out, _fileBase + ".ice");
}
-Slice::Gen::Gen(const string& base, const vector<string>& includePaths, const string& dir, bool typeScript,
+Slice::Gen::Gen(const string& base, const vector<string>& includePaths, const string& /*dir*/, bool typeScript,
ostream& out) :
_out(out),
_includePaths(includePaths),
@@ -815,14 +822,14 @@ Slice::Gen::RequireVisitor::visitClassDefStart(const ClassDefPtr& p)
}
bool
-Slice::Gen::RequireVisitor::visitStructStart(const StructPtr& p)
+Slice::Gen::RequireVisitor::visitStructStart(const StructPtr&)
{
_seenStruct = true; // Set regardless of whether p->isLocal()
return false;
}
void
-Slice::Gen::RequireVisitor::visitOperation(const OperationPtr& p)
+Slice::Gen::RequireVisitor::visitOperation(const OperationPtr&)
{
_seenOperation = true;
}
@@ -879,7 +886,7 @@ Slice::Gen::RequireVisitor::visitDictionary(const DictionaryPtr& dict)
}
void
-Slice::Gen::RequireVisitor::visitEnum(const EnumPtr& p)
+Slice::Gen::RequireVisitor::visitEnum(const EnumPtr&)
{
_seenEnum = true;
}
@@ -1156,7 +1163,7 @@ Slice::Gen::TypesVisitor::visitModuleStart(const ModulePtr& p)
}
void
-Slice::Gen::TypesVisitor::visitModuleEnd(const ModulePtr& p)
+Slice::Gen::TypesVisitor::visitModuleEnd(const ModulePtr&)
{
}
@@ -2437,7 +2444,7 @@ Slice::Gen::TypeScriptAliasVisitor::addAlias(const string& type, const string& p
}
bool
-Slice::Gen::TypeScriptAliasVisitor::visitModuleStart(const ModulePtr& p)
+Slice::Gen::TypeScriptAliasVisitor::visitModuleStart(const ModulePtr&)
{
return true;
}
@@ -2539,7 +2546,7 @@ Slice::Gen::TypeScriptAliasVisitor::visitDictionary(const DictionaryPtr& dict)
}
void
-Slice::Gen::TypeScriptAliasVisitor::writeAlias(const UnitPtr& p)
+Slice::Gen::TypeScriptAliasVisitor::writeAlias(const UnitPtr&)
{
if(!_aliases.empty())
{
diff --git a/cpp/src/slice2js/JsUtil.cpp b/cpp/src/slice2js/JsUtil.cpp
index 55e47de850b..607c7bc9339 100644
--- a/cpp/src/slice2js/JsUtil.cpp
+++ b/cpp/src/slice2js/JsUtil.cpp
@@ -23,6 +23,13 @@
#include <unistd.h>
#endif
+// TODO: fix this warning!
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wshadow"
+#elif defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Wshadow"
+#endif
+
using namespace std;
using namespace Slice;
using namespace IceUtil;
diff --git a/cpp/src/slice2matlab/Main.cpp b/cpp/src/slice2matlab/Main.cpp
index c673feb482b..c1af189ccd0 100644
--- a/cpp/src/slice2matlab/Main.cpp
+++ b/cpp/src/slice2matlab/Main.cpp
@@ -38,6 +38,13 @@ using namespace std;
using namespace Slice;
using namespace IceUtilInternal;
+// TODO: fix this warning!
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wshadow"
+#elif defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Wshadow"
+#endif
+
namespace
{
diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp
index 108d4c8da1a..d753073e370 100644
--- a/cpp/src/slice2objc/Gen.cpp
+++ b/cpp/src/slice2objc/Gen.cpp
@@ -28,6 +28,13 @@ using namespace std;
using namespace Slice;
using namespace IceUtilInternal;
+// TODO: fix this warning!
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wshadow"
+#elif defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Wshadow"
+#endif
+
namespace
{
@@ -661,7 +668,7 @@ Slice::ObjCVisitor::getServerArgs(const OperationPtr& op) const
return result;
}
-Slice::Gen::Gen(const string& name, const string& base, const string& include, const vector<string>& includePaths,
+Slice::Gen::Gen(const string& /*name*/, const string& base, const string& include, const vector<string>& includePaths,
const string& dir, const string& dllExport) :
_base(base),
_include(include),
@@ -901,7 +908,7 @@ Slice::Gen::UnitVisitor::visitModuleStart(const ModulePtr& p)
}
void
-Slice::Gen::UnitVisitor::visitUnitEnd(const UnitPtr& unit)
+Slice::Gen::UnitVisitor::visitUnitEnd(const UnitPtr&)
{
string uuid = IceUtil::generateUUID();
for(string::size_type pos = 0; pos < uuid.size(); ++pos)
@@ -1624,7 +1631,7 @@ Slice::Gen::TypesVisitor::writeConstantValue(IceUtilInternal::Output& out, const
}
void
-Slice::Gen::TypesVisitor::writeInit(const ContainedPtr& p, const DataMemberList& dataMembers,
+Slice::Gen::TypesVisitor::writeInit(const ContainedPtr&, const DataMemberList& dataMembers,
const DataMemberList& baseDataMembers, const DataMemberList& allDataMembers,
bool requiresMemberInit, int baseType, ContainerType ct) const
{
@@ -1778,7 +1785,7 @@ Slice::Gen::TypesVisitor::writeMembers(const DataMemberList& dataMembers, int ba
}
void
-Slice::Gen::TypesVisitor::writeMemberSignature(const DataMemberList& dataMembers, int baseType,
+Slice::Gen::TypesVisitor::writeMemberSignature(const DataMemberList& dataMembers, int /*baseType*/,
ContainerType ct) const
{
if(ct == LocalException)
@@ -2671,7 +2678,7 @@ Slice::Gen::DelegateMVisitor::DelegateMVisitor(Output& H, Output& M, const strin
}
bool
-Slice::Gen::DelegateMVisitor::visitModuleStart(const ModulePtr& p)
+Slice::Gen::DelegateMVisitor::visitModuleStart(const ModulePtr&)
{
return true;
}
@@ -3019,7 +3026,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p)
}
void
-Slice::Gen::DelegateMVisitor::visitClassDefEnd(const ClassDefPtr& p)
+Slice::Gen::DelegateMVisitor::visitClassDefEnd(const ClassDefPtr&)
{
_H << nl << "@end";
_M << nl << "@end";
diff --git a/cpp/src/slice2objc/Main.cpp b/cpp/src/slice2objc/Main.cpp
index c0f09d940ee..a191491fa5e 100644
--- a/cpp/src/slice2objc/Main.cpp
+++ b/cpp/src/slice2objc/Main.cpp
@@ -48,7 +48,7 @@ Init init;
}
void
-interruptedCallback(int signal)
+interruptedCallback(int)
{
IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(globalMutex);
interrupted = true;
diff --git a/cpp/src/slice2objc/ObjCUtil.cpp b/cpp/src/slice2objc/ObjCUtil.cpp
index 242ed701287..b1e49e69464 100644
--- a/cpp/src/slice2objc/ObjCUtil.cpp
+++ b/cpp/src/slice2objc/ObjCUtil.cpp
@@ -148,7 +148,7 @@ Slice::ObjCGenerator::moduleName(const ModulePtr& m)
}
ModulePtr
-Slice::ObjCGenerator::findModule(const ContainedPtr& cont, int baseTypes, bool mangleCasts)
+Slice::ObjCGenerator::findModule(const ContainedPtr& cont, int /*baseTypes*/, bool /*mangleCasts*/)
{
ModulePtr m = ModulePtr::dynamicCast(cont);
ContainerPtr container = cont->container();
@@ -244,13 +244,13 @@ Slice::ObjCGenerator::getFactoryMethod(const ContainedPtr& p, bool deprecated)
}
else
{
- for(string::iterator p = name.begin(); p != name.end() && isalpha(*p); ++p)
+ for(string::iterator q = name.begin(); q != name.end() && isalpha(*q); ++q)
{
- if(p != name.end() - 1 && isalpha(*(p + 1)) && !isupper(*(p + 1)))
+ if(q != name.end() - 1 && isalpha(*(q + 1)) && !isupper(*(q + 1)))
{
break;
}
- *p = tolower(*p);
+ *q = tolower(*q);
}
}
return name;
diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp
index 980f8853e8c..c0ccdd26fd8 100644
--- a/cpp/src/slice2php/Main.cpp
+++ b/cpp/src/slice2php/Main.cpp
@@ -34,6 +34,13 @@
# include <unistd.h>
#endif
+// TODO: fix this warning!
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wshadow"
+#elif defined(__GNUC__)
+# pragma GCC diagnostic ignored "-Wshadow"
+#endif
+
using namespace std;
using namespace Slice;
using namespace Slice::PHP;
diff --git a/cpp/test/Ice/acm/AllTests.cpp b/cpp/test/Ice/acm/AllTests.cpp
index cbe654b2d4c..6df4319364c 100644
--- a/cpp/test/Ice/acm/AllTests.cpp
+++ b/cpp/test/Ice/acm/AllTests.cpp
@@ -130,7 +130,7 @@ class TestCase :
public:
TestCase(const string& name, const RemoteCommunicatorPrxPtr& com) :
- _name(name), _com(com), _logger(new LoggerI()),
+ _testCaseName(name), _com(com), _logger(new LoggerI()),
_clientACMTimeout(-1), _clientACMClose(-1), _clientACMHeartbeat(-1),
_serverACMTimeout(-1), _serverACMClose(-1), _serverACMHeartbeat(-1),
_heartbeat(0), _closed(false)
@@ -176,7 +176,7 @@ public:
void join()
#endif
{
- cout << "testing " << _name << "... " << flush;
+ cout << "testing " << _testCaseName << "... " << flush;
_logger->start();
#ifdef ICE_CPP11_MAPPING
t.join();
@@ -279,7 +279,7 @@ public:
protected:
- const string _name;
+ const string _testCaseName;
const RemoteCommunicatorPrxPtr _com;
string _msg;
LoggerIPtr _logger;
@@ -309,7 +309,7 @@ public:
setServerACM(1, -1, -1); // Faster ACM to make sure we receive enough ACM heartbeats
}
- virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr& proxy)
+ virtual void runTestCase(const RemoteObjectAdapterPrxPtr&, const TestIntfPrxPtr& proxy)
{
proxy->sleep(4);
@@ -358,7 +358,7 @@ public:
setServerACM(2, 2, 0); // Disable heartbeat on invocations
}
- virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr& proxy)
+ virtual void runTestCase(const RemoteObjectAdapterPrxPtr&, const TestIntfPrxPtr& proxy)
{
try
{
@@ -391,7 +391,7 @@ public:
setServerACM(1, 2, 0); // Disable heartbeat on invocations
}
- virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr& proxy)
+ virtual void runTestCase(const RemoteObjectAdapterPrxPtr&, const TestIntfPrxPtr& proxy)
{
// No close on invocation, the call should succeed this time.
proxy->sleep(3);
@@ -411,7 +411,7 @@ public:
setClientACM(1, 1, 0); // Only close on idle
}
- virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr& proxy)
+ virtual void runTestCase(const RemoteObjectAdapterPrxPtr&, const TestIntfPrxPtr&)
{
IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(3000)); // Idle for 3 seconds
@@ -431,7 +431,7 @@ public:
setClientACM(1, 2, 0); // Only close on invocation
}
- virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr& proxy)
+ virtual void runTestCase(const RemoteObjectAdapterPrxPtr&, const TestIntfPrxPtr&)
{
IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(3000)); // Idle for 3 seconds
@@ -450,7 +450,7 @@ public:
setClientACM(1, 3, 0); // Only close on idle and invocation
}
- virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr& proxy)
+ virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr&)
{
//
// Put the adapter on hold. The server will not respond to
@@ -483,7 +483,7 @@ public:
setClientACM(1, 4, 0); // Only close on idle and invocation
}
- virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr& proxy)
+ virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr&)
{
adapter->hold();
IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(3000)); // Idle for 3 seconds
@@ -504,7 +504,7 @@ public:
setServerACM(1, -1, 2); // Enable server heartbeats.
}
- virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr& proxy)
+ virtual void runTestCase(const RemoteObjectAdapterPrxPtr&, const TestIntfPrxPtr&)
{
IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(3000));
@@ -522,7 +522,7 @@ public:
setServerACM(1, -1, 3); // Enable server heartbeats.
}
- virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr& proxy)
+ virtual void runTestCase(const RemoteObjectAdapterPrxPtr&, const TestIntfPrxPtr& proxy)
{
for(int i = 0; i < 10; ++i)
{
@@ -548,7 +548,7 @@ public:
setServerACM(10, -1, 0);
}
- virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr& proxy)
+ virtual void runTestCase(const RemoteObjectAdapterPrxPtr&, const TestIntfPrxPtr& proxy)
{
proxy->startHeartbeatCount();
Ice::ConnectionPtr con = proxy->ice_getConnection();
@@ -614,7 +614,7 @@ public:
setClientACM(15, 4, 0);
}
- virtual void runTestCase(const RemoteObjectAdapterPrxPtr& adapter, const TestIntfPrxPtr& proxy)
+ virtual void runTestCase(const RemoteObjectAdapterPrxPtr&, const TestIntfPrxPtr& proxy)
{
Ice::ConnectionPtr con = proxy->ice_getConnection();
diff --git a/cpp/test/Ice/acm/TestI.cpp b/cpp/test/Ice/acm/TestI.cpp
index cbbada92dfb..82a6b9eadfb 100644
--- a/cpp/test/Ice/acm/TestI.cpp
+++ b/cpp/test/Ice/acm/TestI.cpp
@@ -105,7 +105,7 @@ RemoteObjectAdapterI::deactivate(const Ice::Current&)
}
void
-TestI::sleep(int delay, const Ice::Current& current)
+TestI::sleep(int delay, const Ice::Current&)
{
Lock sync(*this);
timedWait(IceUtil::Time::seconds(delay));
@@ -120,7 +120,7 @@ TestI::sleepAndHold(int delay, const Ice::Current& current)
}
void
-TestI::interruptSleep(const Ice::Current& current)
+TestI::interruptSleep(const Ice::Current&)
{
Lock sync(*this);
notifyAll();
diff --git a/cpp/test/Ice/ami/AllTests.cpp b/cpp/test/Ice/ami/AllTests.cpp
index c60ca2f6d67..f1de69154ef 100644
--- a/cpp/test/Ice/ami/AllTests.cpp
+++ b/cpp/test/Ice/ami/AllTests.cpp
@@ -62,7 +62,7 @@ struct Cookie : public Ice::LocalObject
};
typedef IceUtil::Handle<Cookie> CookiePtr;
-class CallbackBase : public Ice::LocalObject
+class CallbackBase : public virtual Ice::LocalObject
{
public:
@@ -781,7 +781,7 @@ public:
{
}
- virtual void closed(const Ice::ConnectionPtr& con)
+ virtual void closed(const Ice::ConnectionPtr&)
{
called();
}
@@ -906,16 +906,16 @@ allTests(Test::TestHelper* helper, bool collocated)
#ifdef ICE_CPP11_MAPPING
string sref = "test:" + helper->getTestEndpoint();
- auto obj = communicator->stringToProxy(sref);
- test(obj);
+ auto prx = communicator->stringToProxy(sref);
+ test(prx);
- auto p = Ice::uncheckedCast<Test::TestIntfPrx>(obj);
+ auto p = Ice::uncheckedCast<Test::TestIntfPrx>(prx);
sref = "testController:" + helper->getTestEndpoint(1);
- obj = communicator->stringToProxy(sref);
- test(obj);
+ prx = communicator->stringToProxy(sref);
+ test(prx);
- auto testController = Ice::uncheckedCast<Test::TestIntfControllerPrx>(obj);
+ auto testController = Ice::uncheckedCast<Test::TestIntfControllerPrx>(prx);
Ice::Context ctx;
cout << "testing lambda API... " << flush;
@@ -1796,7 +1796,7 @@ allTests(Test::TestHelper* helper, bool collocated)
promise.set_value();
thrower(throwEx[i]);
},
- [&](const exception_ptr& ex)
+ [&](const exception_ptr&)
{
test(false);
});
@@ -2190,7 +2190,7 @@ allTests(Test::TestHelper* helper, bool collocated)
auto con = p->ice_getConnection();
auto sc = make_shared<promise<void>>();
con->setCloseCallback(
- [sc](Ice::ConnectionPtr connection)
+ [sc](Ice::ConnectionPtr)
{
sc->set_value();
});
@@ -2245,13 +2245,13 @@ allTests(Test::TestHelper* helper, bool collocated)
for(int i = 0; i < maxQueue; i++)
{
auto s = make_shared<promise<void>>();
- atomic_flag sent = ATOMIC_FLAG_INIT;
+ atomic_flag sent2 = ATOMIC_FLAG_INIT;
p->opWithPayloadAsync(seq,
[s]() { s->set_value(); },
[s](exception_ptr ex) { s->set_exception(ex); },
- [&sent](bool) { sent.test_and_set(); });
+ [&sent2](bool) { sent2.test_and_set(); });
results.push_back(s->get_future());
- if(sent.test_and_set())
+ if(sent2.test_and_set())
{
done = false;
maxQueue *= 2;
@@ -2265,11 +2265,11 @@ allTests(Test::TestHelper* helper, bool collocated)
done = false;
}
- for(vector<future<void>>::iterator p = results.begin(); p != results.end(); ++p)
+ for(vector<future<void>>::iterator r = results.begin(); r != results.end(); ++r)
{
try
{
- p->get();
+ r->get();
}
catch(const Ice::LocalException&)
{
@@ -2293,7 +2293,7 @@ allTests(Test::TestHelper* helper, bool collocated)
auto sent = make_shared<promise<void>>();
p->startDispatchAsync([s]() { s->set_value(); },
[s](exception_ptr ex) { s->set_exception(ex); },
- [sent](bool ss) { sent->set_value(); });
+ [sent](bool) { sent->set_value(); });
auto f = s->get_future();
sent->get_future().get(); // Ensure the request was sent before we close the connection.
con->close(Ice::ConnectionClose::Gracefully);
@@ -2315,7 +2315,7 @@ allTests(Test::TestHelper* helper, bool collocated)
con = p->ice_getConnection();
auto sc = make_shared<promise<void>>();
con->setCloseCallback(
- [sc](Ice::ConnectionPtr connection)
+ [sc](Ice::ConnectionPtr)
{
sc->set_value();
});
@@ -2350,7 +2350,7 @@ allTests(Test::TestHelper* helper, bool collocated)
auto sent = make_shared<promise<void>>();
p->startDispatchAsync([s]() { s->set_value(); },
[s](exception_ptr ex) { s->set_exception(ex); },
- [sent](bool ss) { sent->set_value(); });
+ [sent](bool) { sent->set_value(); });
auto f = s->get_future();
sent->get_future().get(); // Ensure the request was sent before we close the connection.
con->close(Ice::ConnectionClose::Forcefully);
@@ -2702,7 +2702,7 @@ allTests(Test::TestHelper* helper, bool collocated)
Ice::InitializationData initData;
initData.properties = communicator->getProperties()->clone();
Ice::CommunicatorPtr ic = Ice::initialize(initData);
- Ice::ObjectPrx obj = ic->stringToProxy(p->ice_toString());
+ obj = ic->stringToProxy(p->ice_toString());
Test::TestIntfPrx p2 = Test::TestIntfPrx::checkedCast(obj);
ic->destroy();
@@ -3982,12 +3982,12 @@ allTests(Test::TestHelper* helper, bool collocated)
done = false;
}
- for(vector<Ice::AsyncResultPtr>::const_iterator p = results.begin(); p != results.end(); ++p)
+ for(vector<Ice::AsyncResultPtr>::const_iterator r = results.begin(); r != results.end(); ++r)
{
- (*p)->waitForCompleted();
+ (*r)->waitForCompleted();
try
{
- (*p)->throwLocalException();
+ (*r)->throwLocalException();
}
catch(const Ice::LocalException&)
{
diff --git a/cpp/test/Ice/ami/TestI.cpp b/cpp/test/Ice/ami/TestI.cpp
index 2893a408cd0..0e3f5f9bed6 100644
--- a/cpp/test/Ice/ami/TestI.cpp
+++ b/cpp/test/Ice/ami/TestI.cpp
@@ -99,7 +99,7 @@ TestIntfI::close(Test::CloseMode mode, const Ice::Current& current)
}
void
-TestIntfI::sleep(Ice::Int ms, const Ice::Current& current)
+TestIntfI::sleep(Ice::Int ms, const Ice::Current&)
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
timedWait(IceUtil::Time::milliSeconds(ms));
@@ -107,7 +107,7 @@ TestIntfI::sleep(Ice::Int ms, const Ice::Current& current)
#ifdef ICE_CPP11_MAPPING
void
-TestIntfI::startDispatchAsync(std::function<void()> response, std::function<void(std::exception_ptr)> ex,
+TestIntfI::startDispatchAsync(std::function<void()> response, std::function<void(std::exception_ptr)>,
const Ice::Current&)
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
@@ -143,7 +143,7 @@ TestIntfI::startDispatch_async(const Test::AMD_TestIntf_startDispatchPtr& cb, co
#endif
void
-TestIntfI::finishDispatch(const Ice::Current& current)
+TestIntfI::finishDispatch(const Ice::Current&)
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
if(_shutdown)
diff --git a/cpp/test/Ice/background/AllTests.cpp b/cpp/test/Ice/background/AllTests.cpp
index 61cb5b11afe..de2d989f7ed 100644
--- a/cpp/test/Ice/background/AllTests.cpp
+++ b/cpp/test/Ice/background/AllTests.cpp
@@ -456,8 +456,7 @@ connectTests(const ConfigurationPtr& configuration, const Test::BackgroundPrxPtr
}
background->ice_getConnection()->close(Ice::ICE_SCOPED_ENUM(ConnectionClose, GracefullyWithWait));
- int i;
- for(i = 0; i < 4; ++i)
+ for(int i = 0; i < 4; ++i)
{
if(i == 0 || i == 2)
{
@@ -550,7 +549,7 @@ connectTests(const ConfigurationPtr& configuration, const Test::BackgroundPrxPtr
OpThreadPtr thread1 = new OpThread(background);
OpThreadPtr thread2 = new OpThread(background);
- for(i = 0; i < 5; i++)
+ for(int i = 0; i < 5; i++)
{
try
{
@@ -598,8 +597,7 @@ initializeTests(const ConfigurationPtr& configuration,
}
background->ice_getConnection()->close(Ice::ICE_SCOPED_ENUM(ConnectionClose, GracefullyWithWait));
- int i;
- for(i = 0; i < 4; i++)
+ for(int i = 0; i < 4; i++)
{
if(i == 0 || i == 2)
{
@@ -760,7 +758,7 @@ initializeTests(const ConfigurationPtr& configuration,
OpThreadPtr thread1 = new OpThread(background);
OpThreadPtr thread2 = new OpThread(background);
- for(i = 0; i < 5; i++)
+ for(int i = 0; i < 5; i++)
{
try
{
@@ -882,8 +880,7 @@ validationTests(const ConfigurationPtr& configuration,
test(false);
}
- int i;
- for(i = 0; i < 2; i++)
+ for(int i = 0; i < 2; i++)
{
configuration->readException(new Ice::SocketException(__FILE__, __LINE__));
BackgroundPrxPtr prx = i == 0 ? background : background->ice_oneway();
@@ -1228,8 +1225,7 @@ readWriteTests(const ConfigurationPtr& configuration,
test(false);
}
- int i;
- for(i = 0; i < 2; i++)
+ for(int i = 0; i < 2; i++)
{
BackgroundPrxPtr prx = i == 0 ? background : background->ice_oneway();
@@ -1308,28 +1304,30 @@ readWriteTests(const ConfigurationPtr& configuration,
configuration->readReady(false); // Required in C# to make sure beginRead() doesn't throw too soon.
configuration->readException(new Ice::SocketException(__FILE__, __LINE__));
#ifdef ICE_CPP11_MAPPING
- promise<void> completed;
- background->opAsync(
- []()
- {
- test(false);
- },
- [&completed](exception_ptr e)
- {
- try
- {
- rethrow_exception(e);
- }
- catch(const Ice::SocketException&)
- {
- completed.set_value();
- }
- catch(...)
+ {
+ promise<void> completed;
+ background->opAsync(
+ []()
{
test(false);
- }
- });
- completed.get_future().get();
+ },
+ [&completed](exception_ptr e)
+ {
+ try
+ {
+ rethrow_exception(e);
+ }
+ catch(const Ice::SocketException&)
+ {
+ completed.set_value();
+ }
+ catch(...)
+ {
+ test(false);
+ }
+ });
+ completed.get_future().get();
+ }
#else
Ice::AsyncResultPtr r = background->begin_op();
try
@@ -1390,7 +1388,7 @@ readWriteTests(const ConfigurationPtr& configuration,
configuration->writeException(0);
}
- for(i = 0; i < 2; ++i)
+ for(int i = 0; i < 2; ++i)
{
BackgroundPrxPtr prx = i == 0 ? background : background->ice_oneway();
@@ -1427,7 +1425,7 @@ readWriteTests(const ConfigurationPtr& configuration,
test(sent.get_future().wait_for(chrono::milliseconds(0)) != future_status::ready);
completed.get_future().get();
#else
- Ice::AsyncResultPtr r = prx->begin_op();
+ r = prx->begin_op();
test(!r->sentSynchronously());
try
{
@@ -1486,7 +1484,7 @@ readWriteTests(const ConfigurationPtr& configuration,
completed.get_future().get();
#else
- Ice::AsyncResultPtr r = background->begin_op();
+ r = background->begin_op();
try
{
background->end_op(r);
@@ -1530,7 +1528,7 @@ readWriteTests(const ConfigurationPtr& configuration,
});
completed.get_future().get();
#else
- Ice::AsyncResultPtr r = background->begin_op();
+ r = background->begin_op();
// The read exception might propagate before the message send is seen as completed on IOCP.
# ifndef ICE_USE_IOCP
r->waitForSent();
@@ -1591,7 +1589,7 @@ readWriteTests(const ConfigurationPtr& configuration,
{
c1.set_value();
},
- [](exception_ptr err)
+ [](exception_ptr)
{
test(false);
},
@@ -1609,7 +1607,7 @@ readWriteTests(const ConfigurationPtr& configuration,
{
c2.set_value();
},
- [](exception_ptr err)
+ [](exception_ptr)
{
test(false);
},
@@ -1775,7 +1773,7 @@ readWriteTests(const ConfigurationPtr& configuration,
OpThreadPtr thread1 = new OpThread(background);
OpThreadPtr thread2 = new OpThread(background);
- for(i = 0; i < 5; i++)
+ for(int i = 0; i < 5; i++)
{
try
{
diff --git a/cpp/test/Ice/background/Transceiver.cpp b/cpp/test/Ice/background/Transceiver.cpp
index f6b044b864f..13cfba89aea 100644
--- a/cpp/test/Ice/background/Transceiver.cpp
+++ b/cpp/test/Ice/background/Transceiver.cpp
@@ -24,8 +24,9 @@ Transceiver::getNativeInfo()
IceInternal::SocketOperation
Transceiver::initialize(IceInternal::Buffer& readBuffer, IceInternal::Buffer& writeBuffer)
{
+ IceInternal::SocketOperation status = IceInternal::SocketOperationNone;
#ifndef ICE_USE_IOCP
- IceInternal::SocketOperation status = _configuration->initializeSocketOperation();
+ status = _configuration->initializeSocketOperation();
if(status == IceInternal::SocketOperationConnect)
{
return status;
@@ -52,7 +53,7 @@ Transceiver::initialize(IceInternal::Buffer& readBuffer, IceInternal::Buffer& wr
_configuration->checkInitializeException();
if(!_initialized)
{
- IceInternal::SocketOperation status = _transceiver->initialize(readBuffer, writeBuffer);
+ status = _transceiver->initialize(readBuffer, writeBuffer);
if(status != IceInternal::SocketOperationNone)
{
return status;
diff --git a/cpp/test/Ice/binding/AllTests.cpp b/cpp/test/Ice/binding/AllTests.cpp
index ca2a64f2c41..dd358dc6465 100644
--- a/cpp/test/Ice/binding/AllTests.cpp
+++ b/cpp/test/Ice/binding/AllTests.cpp
@@ -1009,10 +1009,10 @@ allTests(Test::TestHelper* helper)
Ice::InitializationData clientInitData;
clientInitData.properties = *q;
Ice::CommunicatorHolder clientCommunicator(clientInitData);
- Ice::ObjectPrxPtr prx = clientCommunicator->stringToProxy(strPrx);
+ Ice::ObjectPrxPtr clientPrx = clientCommunicator->stringToProxy(strPrx);
try
{
- prx->ice_ping();
+ clientPrx->ice_ping();
test(false);
}
catch(const Ice::ObjectNotExistException&)
diff --git a/cpp/test/Ice/binding/TestI.cpp b/cpp/test/Ice/binding/TestI.cpp
index ecadd92171b..2975993180b 100644
--- a/cpp/test/Ice/binding/TestI.cpp
+++ b/cpp/test/Ice/binding/TestI.cpp
@@ -91,7 +91,7 @@ RemoteObjectAdapterI::getTestIntf(const Ice::Current&)
}
void
-RemoteObjectAdapterI::deactivate(const Ice::Current& current)
+RemoteObjectAdapterI::deactivate(const Ice::Current&)
{
try
{
diff --git a/cpp/test/Ice/custom/AllTests.cpp b/cpp/test/Ice/custom/AllTests.cpp
index 39877b6960a..ffb0b379dd9 100644
--- a/cpp/test/Ice/custom/AllTests.cpp
+++ b/cpp/test/Ice/custom/AllTests.cpp
@@ -3366,10 +3366,10 @@ allTests(Test::TestHelper* helper)
cout << "testing class mapped structs with AMI... " << flush;
{
- Test::ClassStructPtr cs2;
- Test::ClassStructSeq csseq2;
+ cs2 = 0;
+ csseq2.clear();
Ice::AsyncResultPtr r = t->begin_opClassStruct(cs, csseq1);
- Test::ClassStructPtr cs3 = t->end_opClassStruct(cs2, csseq2, r);
+ cs3 = t->end_opClassStruct(cs2, csseq2, r);
assert(cs3 == cs);
assert(csseq1.size() == csseq2.size());
assert(csseq1[0] == csseq2[0]);
@@ -3424,8 +3424,7 @@ allTests(Test::TestHelper* helper)
test(r.returnValue == wstr);
#else
Ice::AsyncResultPtr r = wsc1->begin_opString(wstr);
- wstring out;
- wstring ret = wsc1->end_opString(out, r);
+ ret = wsc1->end_opString(out, r);
test(out == wstr);
test(ret == wstr);
#endif
@@ -3436,10 +3435,10 @@ allTests(Test::TestHelper* helper)
promise<bool> done;
wsc1->opStringAsync(wstr,
- [&](wstring ret, wstring out)
+ [&](wstring retP, wstring outP)
{
- test(out == wstr);
- test(ret == wstr);
+ test(outP == wstr);
+ test(retP == wstr);
done.set_value(true);
},
[&](std::exception_ptr)
@@ -3467,8 +3466,7 @@ allTests(Test::TestHelper* helper)
test(r.returnValue == wstr);
#else
Ice::AsyncResultPtr r = wsc2->begin_opString(wstr);
- wstring out;
- wstring ret = wsc2->end_opString(out, r);
+ ret = wsc2->end_opString(out, r);
test(out == wstr);
test(ret == wstr);
#endif
@@ -3479,10 +3477,10 @@ allTests(Test::TestHelper* helper)
promise<bool> done;
wsc2->opStringAsync(wstr,
- [&](wstring ret, wstring out)
+ [&](wstring retP, wstring outP)
{
- test(out == wstr);
- test(ret == wstr);
+ test(outP == wstr);
+ test(retP == wstr);
done.set_value(true);
},
[&](std::exception_ptr)
diff --git a/cpp/test/Ice/defaultValue/Client.cpp b/cpp/test/Ice/defaultValue/Client.cpp
index 3057e93e872..215966e95f0 100644
--- a/cpp/test/Ice/defaultValue/Client.cpp
+++ b/cpp/test/Ice/defaultValue/Client.cpp
@@ -22,7 +22,7 @@ public:
};
void
-Client::run(int argc, char** argv)
+Client::run(int, char**)
{
void allTests();
allTests();
diff --git a/cpp/test/Ice/exceptions/TestAMDI.cpp b/cpp/test/Ice/exceptions/TestAMDI.cpp
index c423a8381fb..b098008c430 100644
--- a/cpp/test/Ice/exceptions/TestAMDI.cpp
+++ b/cpp/test/Ice/exceptions/TestAMDI.cpp
@@ -200,7 +200,7 @@ ThrowerI::throwCasCAsync(int a, int b, int c,
void
ThrowerI::throwModAAsync(int a, int a2,
function<void()>,
- function<void(exception_ptr)> exception,
+ function<void(exception_ptr)>,
const Ice::Current&)
{
Mod::A ex;
diff --git a/cpp/test/Ice/faultTolerance/AllTests.cpp b/cpp/test/Ice/faultTolerance/AllTests.cpp
index e1917b4ea11..3d0a2ffadcf 100644
--- a/cpp/test/Ice/faultTolerance/AllTests.cpp
+++ b/cpp/test/Ice/faultTolerance/AllTests.cpp
@@ -89,9 +89,9 @@ public:
catch(const Ice::ConnectFailedException&)
{
}
- catch(const Ice::Exception& ex)
+ catch(const Ice::Exception& e)
{
- cout << ex << endl;
+ cout << e << endl;
test(false);
}
called();
diff --git a/cpp/test/Ice/gc/Client.cpp b/cpp/test/Ice/gc/Client.cpp
index 49425be3f7d..126084f473a 100644
--- a/cpp/test/Ice/gc/Client.cpp
+++ b/cpp/test/Ice/gc/Client.cpp
@@ -525,7 +525,7 @@ public:
};
void
-Client::run(int argc, char** argv)
+Client::run(int, char**)
{
allTests();
}
diff --git a/cpp/test/Ice/hold/AllTests.cpp b/cpp/test/Ice/hold/AllTests.cpp
index 4db7f187534..f316bcebddf 100644
--- a/cpp/test/Ice/hold/AllTests.cpp
+++ b/cpp/test/Ice/hold/AllTests.cpp
@@ -109,20 +109,19 @@ allTests(Test::TestHelper* helper)
cout << "ok" << endl;
cout << "changing state between active and hold rapidly... " << flush;
- int i;
- for(i = 0; i < 100; ++i)
+ for(int i = 0; i < 100; ++i)
{
hold->putOnHold(0);
}
- for(i = 0; i < 100; ++i)
+ for(int i = 0; i < 100; ++i)
{
hold->ice_oneway()->putOnHold(0);
}
- for(i = 0; i < 100; ++i)
+ for(int i = 0; i < 100; ++i)
{
holdSerialized->putOnHold(0);
}
- for(i = 0; i < 100; ++i)
+ for(int i = 0; i < 100; ++i)
{
holdSerialized->ice_oneway()->putOnHold(0);
}
@@ -140,9 +139,9 @@ allTests(Test::TestHelper* helper)
auto sent = make_shared<promise<bool>>();
auto expected = value;
hold->setAsync(value + 1, IceUtilInternal::random(5),
- [cond, expected, completed](int value)
+ [cond, expected, completed](int val)
{
- if(value != expected)
+ if(val != expected)
{
cond->set(false);
}
@@ -215,9 +214,9 @@ allTests(Test::TestHelper* helper)
holdSerialized->setAsync(
value + 1,
IceUtilInternal::random(1),
- [cond, expected, completed](int value)
+ [cond, expected, completed](int val)
{
- if(value != expected)
+ if(val != expected)
{
cond->set(false);
}
@@ -282,7 +281,7 @@ allTests(Test::TestHelper* helper)
[](exception_ptr)
{
},
- [completed](bool sentSynchronously)
+ [completed](bool /*sentSynchronously*/)
{
completed->set_value();
});
@@ -318,7 +317,7 @@ allTests(Test::TestHelper* helper)
{
hold->waitForHold();
hold->waitForHold();
- for(i = 0; i < 1000; ++i)
+ for(int i = 0; i < 1000; ++i)
{
hold->ice_oneway()->ice_ping();
if((i % 20) == 0)
diff --git a/cpp/test/Ice/impl/Makefile.mk b/cpp/test/Ice/impl/Makefile.mk
index 5c5d0feaba6..a4e19bae6e9 100644
--- a/cpp/test/Ice/impl/Makefile.mk
+++ b/cpp/test/Ice/impl/Makefile.mk
@@ -18,7 +18,7 @@ define make-impl-with-config
ifneq ($$($2_impl),)
$5_sources += $$($5_objdir)/$$($2_impl)I.cpp
$5_objects += $$(addprefix $$($5_objdir)/,$$(call source-to-object,$$($5_objdir)/$$($2_impl)I.cpp))
-$5_cppflags += -I$$($5_objdir)
+$5_cppflags += -I$$($5_objdir) $(nounusedparameter-cppflags)
$$($5_objects): $$($5_objdir)/$$($2_impl)I.cpp
diff --git a/cpp/test/Ice/info/AllTests.cpp b/cpp/test/Ice/info/AllTests.cpp
index 40addf59a37..75680954a2c 100644
--- a/cpp/test/Ice/info/AllTests.cpp
+++ b/cpp/test/Ice/info/AllTests.cpp
@@ -194,14 +194,14 @@ allTests(Test::TestHelper* helper)
test(ctx["host"] == tcpinfo->host);
test(ctx["compress"] == "false");
istringstream is(ctx["port"]);
- int port;
- is >> port;
- test(port > 0);
+ int portCtx;
+ is >> portCtx;
+ test(portCtx > 0);
info = base->ice_datagram()->ice_getConnection()->getEndpoint()->getInfo();
Ice::UDPEndpointInfoPtr udp = ICE_DYNAMIC_CAST(Ice::UDPEndpointInfo, info);
test(udp);
- test(udp->port == port);
+ test(udp->port == portCtx);
test(udp->host == defaultHost);
}
cout << "ok" << endl;
diff --git a/cpp/test/Ice/interceptor/AMDInterceptorI.cpp b/cpp/test/Ice/interceptor/AMDInterceptorI.cpp
index 647e7e62d88..204fc5d3305 100644
--- a/cpp/test/Ice/interceptor/AMDInterceptorI.cpp
+++ b/cpp/test/Ice/interceptor/AMDInterceptorI.cpp
@@ -97,9 +97,9 @@ AMDInterceptorI::dispatch(Ice::Request& request)
{
rethrow_exception(ex);
}
- catch(const IceUtil::Exception& ex)
+ catch(const IceUtil::Exception& e)
{
- setException(ex);
+ setException(e);
}
catch(...)
{
diff --git a/cpp/test/Ice/invoke/AllTests.cpp b/cpp/test/Ice/invoke/AllTests.cpp
index d56d47b60f8..168834a3e68 100644
--- a/cpp/test/Ice/invoke/AllTests.cpp
+++ b/cpp/test/Ice/invoke/AllTests.cpp
@@ -12,7 +12,6 @@
#include <Test.h>
using namespace std;
-using namespace Ice;
static string testString = "This is a test string";
@@ -302,15 +301,15 @@ allTests(Test::TestHelper* helper)
{
Ice::ByteSeq inEncaps, outEncaps;
- if(!oneway->ice_invoke("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps))
+ if(!oneway->ice_invoke("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps))
{
test(false);
}
- test(batchOneway->ice_invoke("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps));
- test(batchOneway->ice_invoke("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps));
- test(batchOneway->ice_invoke("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps));
- test(batchOneway->ice_invoke("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps));
+ test(batchOneway->ice_invoke("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps));
+ test(batchOneway->ice_invoke("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps));
+ test(batchOneway->ice_invoke("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps));
+ test(batchOneway->ice_invoke("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps));
batchOneway->ice_flushBatchRequests();
Ice::OutputStream out(communicator);
@@ -320,7 +319,7 @@ allTests(Test::TestHelper* helper)
out.finished(inEncaps);
// ice_invoke
- if(cl->ice_invoke("opString", ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps))
+ if(cl->ice_invoke("opString", Ice::ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps))
{
Ice::InputStream in(communicator, out.getEncoding(), outEncaps);
in.startEncapsulation();
@@ -338,7 +337,7 @@ allTests(Test::TestHelper* helper)
// ice_invoke with array mapping
pair<const ::Ice::Byte*, const ::Ice::Byte*> inPair(&inEncaps[0], &inEncaps[0] + inEncaps.size());
- if(cl->ice_invoke("opString", ICE_ENUM(OperationMode, Normal), inPair, outEncaps))
+ if(cl->ice_invoke("opString", Ice::ICE_ENUM(OperationMode, Normal), inPair, outEncaps))
{
Ice::InputStream in(communicator, out.getEncoding(), outEncaps);
in.startEncapsulation();
@@ -363,7 +362,7 @@ allTests(Test::TestHelper* helper)
{
ctx["raise"] = "";
}
- if(cl->ice_invoke("opException", ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps, ctx))
+ if(cl->ice_invoke("opException", Ice::ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps, ctx))
{
test(false);
}
@@ -393,7 +392,7 @@ allTests(Test::TestHelper* helper)
{
Ice::ByteSeq inEncaps;
- batchOneway->ice_invokeAsync("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps,
+ batchOneway->ice_invokeAsync("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps,
[](bool, const vector<Ice::Byte>)
{
test(false);
@@ -413,10 +412,10 @@ allTests(Test::TestHelper* helper)
//
{
Ice::ByteSeq inEncaps;
- test(batchOneway->ice_invokeAsync("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps).get().returnValue);
- test(batchOneway->ice_invokeAsync("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps).get().returnValue);
- test(batchOneway->ice_invokeAsync("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps).get().returnValue);
- test(batchOneway->ice_invokeAsync("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps).get().returnValue);
+ test(batchOneway->ice_invokeAsync("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps).get().returnValue);
+ test(batchOneway->ice_invokeAsync("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps).get().returnValue);
+ test(batchOneway->ice_invokeAsync("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps).get().returnValue);
+ test(batchOneway->ice_invokeAsync("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps).get().returnValue);
batchOneway->ice_flushBatchRequests();
}
@@ -425,7 +424,7 @@ allTests(Test::TestHelper* helper)
Ice::ByteSeq inEncaps, outEncaps;
oneway->ice_invokeAsync(
"opOneway",
- OperationMode::Normal,
+ Ice::OperationMode::Normal,
inEncaps,
nullptr,
[&](exception_ptr ex)
@@ -446,7 +445,7 @@ allTests(Test::TestHelper* helper)
{
Ice::ByteSeq inEncaps, outEncaps;
- auto completed = oneway->ice_invokeAsync("opOneway", OperationMode::Normal, inEncaps);
+ auto completed = oneway->ice_invokeAsync("opOneway", Ice::OperationMode::Normal, inEncaps);
test(completed.get().returnValue);
}
@@ -459,7 +458,7 @@ allTests(Test::TestHelper* helper)
out.endEncapsulation();
out.finished(inEncaps);
- cl->ice_invokeAsync("opString", OperationMode::Normal, inEncaps,
+ cl->ice_invokeAsync("opString", Ice::OperationMode::Normal, inEncaps,
[&](bool ok, vector<Ice::Byte> outParams)
{
outEncaps = move(outParams);
@@ -491,7 +490,7 @@ allTests(Test::TestHelper* helper)
out.endEncapsulation();
out.finished(inEncaps);
- auto result = cl->ice_invokeAsync("opString", OperationMode::Normal, inEncaps).get();
+ auto result = cl->ice_invokeAsync("opString", Ice::OperationMode::Normal, inEncaps).get();
test(result.returnValue);
Ice::InputStream in(communicator, result.outParams);
@@ -516,7 +515,7 @@ allTests(Test::TestHelper* helper)
auto inPair = make_pair(inEncaps.data(), inEncaps.data() + inEncaps.size());
- cl->ice_invokeAsync("opString", OperationMode::Normal, inPair,
+ cl->ice_invokeAsync("opString", Ice::OperationMode::Normal, inPair,
[&](bool ok, pair<const Ice::Byte*, const Ice::Byte*> outParams)
{
vector<Ice::Byte>(outParams.first, outParams.second).swap(outEncaps);
@@ -556,7 +555,7 @@ allTests(Test::TestHelper* helper)
auto inPair = make_pair(inEncaps.data(), inEncaps.data() + inEncaps.size());
- auto result = cl->ice_invokeAsync("opString", OperationMode::Normal, inPair).get();
+ auto result = cl->ice_invokeAsync("opString", Ice::OperationMode::Normal, inPair).get();
test(result.returnValue);
Ice::InputStream in(communicator, result.outParams);
@@ -574,7 +573,7 @@ allTests(Test::TestHelper* helper)
promise<void> sent;
Ice::ByteSeq inEncaps, outEncaps;
- cl->ice_invokeAsync("opException", OperationMode::Normal, inEncaps,
+ cl->ice_invokeAsync("opException", Ice::OperationMode::Normal, inEncaps,
[&](bool ok, vector<Ice::Byte> outParams)
{
outEncaps = move(outParams);
@@ -611,7 +610,7 @@ allTests(Test::TestHelper* helper)
//
{
Ice::ByteSeq inEncaps;
- auto result = cl->ice_invokeAsync("opException", OperationMode::Normal, inEncaps).get();
+ auto result = cl->ice_invokeAsync("opException", Ice::OperationMode::Normal, inEncaps).get();
test(!result.returnValue);
Ice::InputStream in(communicator, result.outParams);
@@ -636,10 +635,10 @@ allTests(Test::TestHelper* helper)
{
Ice::ByteSeq inEncaps, outEncaps;
- test(batchOneway->end_ice_invoke(outEncaps, batchOneway->begin_ice_invoke("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps)));
- test(batchOneway->end_ice_invoke(outEncaps, batchOneway->begin_ice_invoke("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps)));
- test(batchOneway->end_ice_invoke(outEncaps, batchOneway->begin_ice_invoke("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps)));
- test(batchOneway->end_ice_invoke(outEncaps, batchOneway->begin_ice_invoke("opOneway", ICE_ENUM(OperationMode, Normal), inEncaps)));
+ test(batchOneway->end_ice_invoke(outEncaps, batchOneway->begin_ice_invoke("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps)));
+ test(batchOneway->end_ice_invoke(outEncaps, batchOneway->begin_ice_invoke("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps)));
+ test(batchOneway->end_ice_invoke(outEncaps, batchOneway->begin_ice_invoke("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps)));
+ test(batchOneway->end_ice_invoke(outEncaps, batchOneway->begin_ice_invoke("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps)));
batchOneway->ice_flushBatchRequests();
}
diff --git a/cpp/test/Ice/invoke/Server.cpp b/cpp/test/Ice/invoke/Server.cpp
index ccee3948daf..42cc9a9d960 100644
--- a/cpp/test/Ice/invoke/Server.cpp
+++ b/cpp/test/Ice/invoke/Server.cpp
@@ -77,13 +77,6 @@ private:
Ice::ObjectPtr _blobject;
};
-int
-run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
-{
-
- return EXIT_SUCCESS;
-}
-
class Server : public Test::TestHelper
{
public:
diff --git a/cpp/test/Ice/location/AllTests.cpp b/cpp/test/Ice/location/AllTests.cpp
index fe309e7358d..1bd242a73f2 100644
--- a/cpp/test/Ice/location/AllTests.cpp
+++ b/cpp/test/Ice/location/AllTests.cpp
@@ -587,7 +587,7 @@ allTests(Test::TestHelper* helper, const string& ref)
registry->setAdapterDirectProxy("TestAdapter5", locator->findAdapterById("TestAdapter"));
registry->addObject(communicator->stringToProxy("test3@TestAdapter"));
- int count = locator->getRequestCount();
+ count = locator->getRequestCount();
ic->stringToProxy("test@TestAdapter5")->ice_locatorCacheTimeout(0)->ice_ping(); // No locator cache.
ic->stringToProxy("test3")->ice_locatorCacheTimeout(0)->ice_ping(); // No locator cache.
count += 3;
diff --git a/cpp/test/Ice/logger/Client5.cpp b/cpp/test/Ice/logger/Client5.cpp
index 2d7442a98c6..60a3edc3975 100644
--- a/cpp/test/Ice/logger/Client5.cpp
+++ b/cpp/test/Ice/logger/Client5.cpp
@@ -45,7 +45,7 @@ public:
};
void
-Client5::run(int argc, char** argv)
+Client5::run(int, char**)
{
//
// Run Client application 20 times, each times it generate 512 bytes of log messages,
diff --git a/cpp/test/Ice/metrics/AllTests.cpp b/cpp/test/Ice/metrics/AllTests.cpp
index fab844de98f..7e67d887a47 100644
--- a/cpp/test/Ice/metrics/AllTests.cpp
+++ b/cpp/test/Ice/metrics/AllTests.cpp
@@ -278,7 +278,7 @@ struct Void
struct Connect
{
- Connect(const Ice::ObjectPrxPtr& proxy) : proxy(proxy)
+ Connect(const Ice::ObjectPrxPtr& proxyP) : proxy(proxyP)
{
}
@@ -307,7 +307,7 @@ struct Connect
struct InvokeOp
{
- InvokeOp(const Test::MetricsPrxPtr& proxy) : proxy(proxy)
+ InvokeOp(const Test::MetricsPrxPtr& proxyP) : proxy(proxyP)
{
}
diff --git a/cpp/test/Ice/metrics/InstrumentationI.h b/cpp/test/Ice/metrics/InstrumentationI.h
index ce6cdfaa053..faa192eaa32 100644
--- a/cpp/test/Ice/metrics/InstrumentationI.h
+++ b/cpp/test/Ice/metrics/InstrumentationI.h
@@ -227,7 +227,7 @@ public:
}
virtual Ice::Instrumentation::RemoteObserverPtr
- getRemoteObserver(const Ice::ConnectionInfoPtr& c, const Ice::EndpointPtr& e, Ice::Int, Ice::Int)
+ getRemoteObserver(const Ice::ConnectionInfoPtr&, const Ice::EndpointPtr&, Ice::Int, Ice::Int)
{
IceUtil::Mutex::Lock sync(*this);
if(!remoteObserver)
diff --git a/cpp/test/Ice/objects/AllTests.cpp b/cpp/test/Ice/objects/AllTests.cpp
index 7633f3732bb..19f19cf13a6 100644
--- a/cpp/test/Ice/objects/AllTests.cpp
+++ b/cpp/test/Ice/objects/AllTests.cpp
@@ -64,10 +64,10 @@ testUOE(const Ice::CommunicatorPtr& communicator)
void clear(const CPtr&);
+#ifdef ICE_CPP11_MAPPING
void
clear(const BPtr& b)
{
-#ifdef ICE_CPP11_MAPPING
// No GC with the C++11 mapping
if(dynamic_pointer_cast<B>(b->theA))
{
@@ -82,23 +82,33 @@ clear(const BPtr& b)
clear(dynamic_pointer_cast<B>(tmp));
}
b->theC = nullptr;
-#endif
}
+#else
+void
+clear(const BPtr&)
+{
+}
+#endif
+#ifdef ICE_CPP11_MAPPING
void
clear(const CPtr& c)
{
-#ifdef ICE_CPP11_MAPPING
// No GC with the C++11 mapping
clear(c->theB);
c->theB = nullptr;
-#endif
}
+#else
+void
+clear(const CPtr&)
+{
+}
+#endif
+#ifdef ICE_CPP11_MAPPING
void
clear(const DPtr& d)
{
-#ifdef ICE_CPP11_MAPPING
// No GC with the C++11 mapping
if(dynamic_pointer_cast<B>(d->theA))
{
@@ -107,8 +117,13 @@ clear(const DPtr& d)
d->theA = nullptr;
clear(d->theB);
d->theB = nullptr;
-#endif
}
+#else
+void
+clear(const DPtr&)
+{
+}
+#endif
}
@@ -341,10 +356,12 @@ allTests(Test::TestHelper* helper)
cout << "ok" << endl;
cout << "getting K... " << flush;
- KPtr k = initial->getK();
- LPtr l = ICE_DYNAMIC_CAST(L, k->value);
- test(l);
- test(l->data == "l");
+ {
+ KPtr k = initial->getK();
+ LPtr l = ICE_DYNAMIC_CAST(L, k->value);
+ test(l);
+ test(l->data == "l");
+ }
cout << "ok" << endl;
cout << "testing Value as parameter..." << flush;
@@ -434,10 +451,10 @@ allTests(Test::TestHelper* helper)
cout << "testing recursive type... " << flush;
RecursivePtr top = ICE_MAKE_SHARED(Recursive);
- RecursivePtr p = top;
int depth = 0;
try
{
+ RecursivePtr p = top;
#if defined(NDEBUG) || !defined(__APPLE__)
const int maxDepth = 2000;
#else
@@ -513,9 +530,9 @@ allTests(Test::TestHelper* helper)
cout << "testing Object factory registration... " << flush;
{
- BasePtr base = p->opDerived();
- test(base);
- test(base->ice_id() == "::Test::Derived");
+ BasePtr basePtr = p->opDerived();
+ test(basePtr);
+ test(basePtr->ice_id() == "::Test::Derived");
}
cout << "ok" << endl;
diff --git a/cpp/test/Ice/objects/Client.cpp b/cpp/test/Ice/objects/Client.cpp
index 677d60e32a8..763dcffa4e1 100644
--- a/cpp/test/Ice/objects/Client.cpp
+++ b/cpp/test/Ice/objects/Client.cpp
@@ -98,7 +98,7 @@ public:
assert(_destroyed);
}
- virtual Ice::ValuePtr create(const string& type)
+ virtual Ice::ValuePtr create(const string&)
{
return ICE_NULLPTR;
}
diff --git a/cpp/test/Ice/objects/Collocated.cpp b/cpp/test/Ice/objects/Collocated.cpp
index 01a2e3c99a8..a8780f5a166 100644
--- a/cpp/test/Ice/objects/Collocated.cpp
+++ b/cpp/test/Ice/objects/Collocated.cpp
@@ -91,7 +91,7 @@ public:
assert(_destroyed);
}
- virtual Ice::ValuePtr create(const string& type)
+ virtual Ice::ValuePtr create(const string&)
{
return ICE_NULLPTR;
}
diff --git a/cpp/test/Ice/operations/BatchOneways.cpp b/cpp/test/Ice/operations/BatchOneways.cpp
index 63a4e7ed63b..2f1c180867d 100644
--- a/cpp/test/Ice/operations/BatchOneways.cpp
+++ b/cpp/test/Ice/operations/BatchOneways.cpp
@@ -141,15 +141,16 @@ batchOneways(const Test::MyClassPrxPtr& p)
Ice::Identity identity;
identity.name = "invalid";
- Ice::ObjectPrxPtr batch3 = batch->ice_identity(identity);
- batch3->ice_ping();
- batch3->ice_flushBatchRequests();
-
- // Make sure that a bogus batch request doesn't cause troubles to other ones.
- batch3->ice_ping();
- batch->ice_ping();
- batch->ice_flushBatchRequests();
- batch->ice_ping();
+ {
+ Ice::ObjectPrxPtr batch3 = batch->ice_identity(identity);
+ batch3->ice_ping();
+ batch3->ice_flushBatchRequests();
+ // Make sure that a bogus batch request doesn't cause troubles to other ones.
+ batch3->ice_ping();
+ batch->ice_ping();
+ batch->ice_flushBatchRequests();
+ batch->ice_ping();
+ }
if(batch->ice_getConnection() &&
p->ice_getCommunicator()->getProperties()->getProperty("Ice.Default.Protocol") != "bt")
@@ -159,41 +160,41 @@ batchOneways(const Test::MyClassPrxPtr& p)
BatchRequestInterceptorIPtr interceptor = ICE_MAKE_SHARED(BatchRequestInterceptorI);
#if defined(ICE_CPP11_MAPPING)
- initData.batchRequestInterceptor = [=](const Ice::BatchRequest& request, int count, int size)
+ initData.batchRequestInterceptor = [=](const Ice::BatchRequest& request, int countP, int size)
{
- interceptor->enqueue(request, count, size);
+ interceptor->enqueue(request, countP, size);
};
#else
initData.batchRequestInterceptor = interceptor;
#endif
Ice::CommunicatorPtr ic = Ice::initialize(initData);
- Test::MyClassPrxPtr batch =
+ Test::MyClassPrxPtr batch4 =
ICE_UNCHECKED_CAST(Test::MyClassPrx, ic->stringToProxy(p->ice_toString()))->ice_batchOneway();
test(interceptor->count() == 0);
- batch->ice_ping();
- batch->ice_ping();
- batch->ice_ping();
+ batch4->ice_ping();
+ batch4->ice_ping();
+ batch4->ice_ping();
test(interceptor->count() == 0);
interceptor->enqueue(true);
- batch->ice_ping();
- batch->ice_ping();
- batch->ice_ping();
+ batch4->ice_ping();
+ batch4->ice_ping();
+ batch4->ice_ping();
test(interceptor->count() == 3);
- batch->ice_flushBatchRequests();
- batch->ice_ping();
+ batch4->ice_flushBatchRequests();
+ batch4->ice_ping();
test(interceptor->count() == 1);
- batch->opByteSOneway(bs1);
+ batch4->opByteSOneway(bs1);
test(interceptor->count() == 2);
- batch->opByteSOneway(bs1);
+ batch4->opByteSOneway(bs1);
test(interceptor->count() == 3);
- batch->opByteSOneway(bs1); // This should trigger the flush
- batch->ice_ping();
+ batch4->opByteSOneway(bs1); // This should trigger the flush
+ batch4->ice_ping();
test(interceptor->count() == 2);
ic->destroy();
diff --git a/cpp/test/Ice/operations/TestI.cpp b/cpp/test/Ice/operations/TestI.cpp
index 96651a25d4b..d23f1372a4d 100644
--- a/cpp/test/Ice/operations/TestI.cpp
+++ b/cpp/test/Ice/operations/TestI.cpp
@@ -65,7 +65,7 @@ MyDerivedClassI::shutdown(const Ice::Current& current)
}
bool
-MyDerivedClassI::supportsCompress(const Ice::Current& current)
+MyDerivedClassI::supportsCompress(const Ice::Current&)
{
#if defined(ICE_OS_UWP)
return false;
diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp
index c2222899420..8730e4e7f24 100644
--- a/cpp/test/Ice/operations/Twoways.cpp
+++ b/cpp/test/Ice/operations/Twoways.cpp
@@ -936,28 +936,28 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr& p)
}
{
- Test::MyStruct s11 = { 1, 1 };
- Test::MyStruct s12 = { 1, 2 };
+ Test::MyStruct ms11 = { 1, 1 };
+ Test::MyStruct ms12 = { 1, 2 };
Test::MyStructMyEnumD di1;
- di1[s11] = ICE_ENUM(MyEnum, enum1);
- di1[s12] = ICE_ENUM(MyEnum, enum2);
+ di1[ms11] = ICE_ENUM(MyEnum, enum1);
+ di1[ms12] = ICE_ENUM(MyEnum, enum2);
- Test::MyStruct s22 = { 2, 2 };
- Test::MyStruct s23 = { 2, 3 };
+ Test::MyStruct ms22 = { 2, 2 };
+ Test::MyStruct ms23 = { 2, 3 };
Test::MyStructMyEnumD di2;
- di2[s11] = ICE_ENUM(MyEnum, enum1);
- di2[s22] = ICE_ENUM(MyEnum, enum3);
- di2[s23] = ICE_ENUM(MyEnum, enum2);
+ di2[ms11] = ICE_ENUM(MyEnum, enum1);
+ di2[ms22] = ICE_ENUM(MyEnum, enum3);
+ di2[ms23] = ICE_ENUM(MyEnum, enum2);
Test::MyStructMyEnumD _do;
Test::MyStructMyEnumD ro = p->opMyStructMyEnumD(di1, di2, _do);
test(_do == di1);
test(ro.size() == 4);
- test(ro[s11] == ICE_ENUM(MyEnum, enum1));
- test(ro[s12] == ICE_ENUM(MyEnum, enum2));
- test(ro[s22] == ICE_ENUM(MyEnum, enum3));
- test(ro[s23] == ICE_ENUM(MyEnum, enum2));
+ test(ro[ms11] == ICE_ENUM(MyEnum, enum1));
+ test(ro[ms12] == ICE_ENUM(MyEnum, enum2));
+ test(ro[ms22] == ICE_ENUM(MyEnum, enum3));
+ test(ro[ms23] == ICE_ENUM(MyEnum, enum2));
}
{
@@ -1261,21 +1261,21 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr& p)
Test::MyStructMyEnumDS dsi2;
dsi2.resize(1);
- Test::MyStruct s11 = { 1, 1 };
- Test::MyStruct s12 = { 1, 2 };
+ Test::MyStruct ms11 = { 1, 1 };
+ Test::MyStruct ms12 = { 1, 2 };
Test::MyStructMyEnumD di1;
- di1[s11] = ICE_ENUM(MyEnum, enum1);
- di1[s12] = ICE_ENUM(MyEnum, enum2);
+ di1[ms11] = ICE_ENUM(MyEnum, enum1);
+ di1[ms12] = ICE_ENUM(MyEnum, enum2);
- Test::MyStruct s22 = { 2, 2 };
- Test::MyStruct s23 = { 2, 3 };
+ Test::MyStruct ms22 = { 2, 2 };
+ Test::MyStruct ms23 = { 2, 3 };
Test::MyStructMyEnumD di2;
- di2[s11] = ICE_ENUM(MyEnum, enum1);
- di2[s22] = ICE_ENUM(MyEnum, enum3);
- di2[s23] = ICE_ENUM(MyEnum, enum2);
+ di2[ms11] = ICE_ENUM(MyEnum, enum1);
+ di2[ms22] = ICE_ENUM(MyEnum, enum3);
+ di2[ms23] = ICE_ENUM(MyEnum, enum2);
Test::MyStructMyEnumD di3;
- di3[s23] = ICE_ENUM(MyEnum, enum3);
+ di3[ms23] = ICE_ENUM(MyEnum, enum3);
dsi1[0] = di1;
dsi1[1] = di2;
@@ -1288,23 +1288,23 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr& p)
test(ro.size() == 2);
test(ro[0].size() == 3);
- test(ro[0][s11] == ICE_ENUM(MyEnum, enum1));
- test(ro[0][s22] == ICE_ENUM(MyEnum, enum3));
- test(ro[0][s23] == ICE_ENUM(MyEnum, enum2));
+ test(ro[0][ms11] == ICE_ENUM(MyEnum, enum1));
+ test(ro[0][ms22] == ICE_ENUM(MyEnum, enum3));
+ test(ro[0][ms23] == ICE_ENUM(MyEnum, enum2));
test(ro[1].size() == 2);
- test(ro[1][s11] == ICE_ENUM(MyEnum, enum1));
- test(ro[1][s12] == ICE_ENUM(MyEnum, enum2));
+ test(ro[1][ms11] == ICE_ENUM(MyEnum, enum1));
+ test(ro[1][ms12] == ICE_ENUM(MyEnum, enum2));
test(_do.size() == 3);
test(_do[0].size() == 1);
- test(_do[0][s23] == ICE_ENUM(MyEnum, enum3));
+ test(_do[0][ms23] == ICE_ENUM(MyEnum, enum3));
test(_do[1].size() == 2);
- test(_do[1][s11] == ICE_ENUM(MyEnum, enum1));
- test(_do[1][s12] == ICE_ENUM(MyEnum, enum2));
+ test(_do[1][ms11] == ICE_ENUM(MyEnum, enum1));
+ test(_do[1][ms12] == ICE_ENUM(MyEnum, enum2));
test(_do[2].size() == 3);
- test(_do[2][s11] == ICE_ENUM(MyEnum, enum1));
- test(_do[2][s22] == ICE_ENUM(MyEnum, enum3));
- test(_do[2][s23] == ICE_ENUM(MyEnum, enum2));
+ test(_do[2][ms11] == ICE_ENUM(MyEnum, enum1));
+ test(_do[2][ms22] == ICE_ENUM(MyEnum, enum3));
+ test(_do[2][ms23] == ICE_ENUM(MyEnum, enum2));
}
catch(const Ice::OperationNotExistException&)
{
@@ -1710,27 +1710,29 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr& p)
}
{
- Ice::Context ctx;
- ctx["one"] = "ONE";
- ctx["two"] = "TWO";
- ctx["three"] = "THREE";
{
- Test::StringStringD r = p->opContext();
- test(p->ice_getContext().empty());
- test(r != ctx);
- }
- {
- Test::StringStringD r = p->opContext(ctx);
- test(p->ice_getContext().empty());
- test(r == ctx);
- }
- {
- Test::MyClassPrxPtr p2 = ICE_CHECKED_CAST(Test::MyClassPrx, p->ice_context(ctx));
- test(p2->ice_getContext() == ctx);
- Test::StringStringD r = p2->opContext();
- test(r == ctx);
- r = p2->opContext(ctx);
- test(r == ctx);
+ Ice::Context ctx;
+ ctx["one"] = "ONE";
+ ctx["two"] = "TWO";
+ ctx["three"] = "THREE";
+ {
+ Test::StringStringD r = p->opContext();
+ test(p->ice_getContext().empty());
+ test(r != ctx);
+ }
+ {
+ Test::StringStringD r = p->opContext(ctx);
+ test(p->ice_getContext().empty());
+ test(r == ctx);
+ }
+ {
+ Test::MyClassPrxPtr p2 = ICE_CHECKED_CAST(Test::MyClassPrx, p->ice_context(ctx));
+ test(p2->ice_getContext() == ctx);
+ Test::StringStringD r = p2->opContext();
+ test(r == ctx);
+ r = p2->opContext(ctx);
+ test(r == ctx);
+ }
}
if(p->ice_getConnection() && communicator->getProperties()->getProperty("Ice.Default.Protocol") != "bt")
@@ -1754,13 +1756,13 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr& p)
ctx["three"] = "THREE";
Ice::PropertiesPtr properties = ic->getProperties();
- Test::MyClassPrxPtr p =
+ Test::MyClassPrxPtr q =
ICE_UNCHECKED_CAST(Test::MyClassPrx,
ic->stringToProxy("test:" + TestHelper::getTestEndpoint(properties, 0)));
ic->getImplicitContext()->setContext(ctx);
test(ic->getImplicitContext()->getContext() == ctx);
- test(p->opContext() == ctx);
+ test(q->opContext() == ctx);
test(ic->getImplicitContext()->containsKey("zero") == false);
string r = ic->getImplicitContext()->put("zero", "ZERO");
@@ -1769,7 +1771,7 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr& p)
test(ic->getImplicitContext()->get("zero") == "ZERO");
ctx = ic->getImplicitContext()->getContext();
- test(p->opContext() == ctx);
+ test(q->opContext() == ctx);
Ice::Context prxContext;
prxContext["one"] = "UN";
prxContext["four"] = "QUATRE";
@@ -1778,19 +1780,19 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr& p)
combined.insert(ctx.begin(), ctx.end());
test(combined["one"] == "UN");
- p = ICE_UNCHECKED_CAST(Test::MyClassPrx, p->ice_context(prxContext));
+ q = ICE_UNCHECKED_CAST(Test::MyClassPrx, q->ice_context(prxContext));
ic->getImplicitContext()->setContext(Ice::Context());
- test(p->opContext() == prxContext);
+ test(q->opContext() == prxContext);
ic->getImplicitContext()->setContext(ctx);
- test(p->opContext() == combined);
+ test(q->opContext() == combined);
test(ic->getImplicitContext()->remove("one") == "ONE");
if(impls[i] == "PerThread")
{
- IceUtil::ThreadPtr thread = new PerThreadContextInvokeThread(p->ice_context(Ice::Context()));
+ IceUtil::ThreadPtr thread = new PerThreadContextInvokeThread(q->ice_context(Ice::Context()));
thread->start();
thread->getThreadControl().join();
}
diff --git a/cpp/test/Ice/operations/TwowaysAMI.cpp b/cpp/test/Ice/operations/TwowaysAMI.cpp
index 47451f5c41a..2dee6c11358 100644
--- a/cpp/test/Ice/operations/TwowaysAMI.cpp
+++ b/cpp/test/Ice/operations/TwowaysAMI.cpp
@@ -519,23 +519,23 @@ public:
void opMyStructMyEnumD(const Test::MyStructMyEnumD& ro, const Test::MyStructMyEnumD& _do)
{
- Test::MyStruct s11 = { 1, 1 };
- Test::MyStruct s12 = { 1, 2 };
+ Test::MyStruct ms11 = { 1, 1 };
+ Test::MyStruct ms12 = { 1, 2 };
Test::MyStructMyEnumD di1;
- di1[s11] = ICE_ENUM(Test::MyEnum, enum1);
- di1[s12] = ICE_ENUM(Test::MyEnum, enum2);
+ di1[ms11] = ICE_ENUM(Test::MyEnum, enum1);
+ di1[ms12] = ICE_ENUM(Test::MyEnum, enum2);
test(_do == di1);
- Test::MyStruct s22 = { 2, 2 };
- Test::MyStruct s23 = { 2, 3 };
+ Test::MyStruct ms22 = { 2, 2 };
+ Test::MyStruct ms23 = { 2, 3 };
test(ro.size() == 4);
- test(ro.find(s11) != ro.end());
- test(ro.find(s11)->second == ICE_ENUM(Test::MyEnum, enum1));
- test(ro.find(s12) != ro.end());
- test(ro.find(s12)->second == ICE_ENUM(Test::MyEnum, enum2));
- test(ro.find(s22) != ro.end());
- test(ro.find(s22)->second == ICE_ENUM(Test::MyEnum, enum3));
- test(ro.find(s23) != ro.end());
- test(ro.find(s23)->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(ro.find(ms11) != ro.end());
+ test(ro.find(ms11)->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(ro.find(ms12) != ro.end());
+ test(ro.find(ms12)->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(ro.find(ms22) != ro.end());
+ test(ro.find(ms22)->second == ICE_ENUM(Test::MyEnum, enum3));
+ test(ro.find(ms23) != ro.end());
+ test(ro.find(ms23)->second == ICE_ENUM(Test::MyEnum, enum2));
called();
}
@@ -737,40 +737,40 @@ public:
void opMyStructMyEnumDS(const Test::MyStructMyEnumDS& ro, const Test::MyStructMyEnumDS& _do)
{
- Test::MyStruct s11 = { 1, 1 };
- Test::MyStruct s12 = { 1, 2 };
- Test::MyStruct s22 = { 2, 2 };
- Test::MyStruct s23 = { 2, 3 };
+ Test::MyStruct ms11 = { 1, 1 };
+ Test::MyStruct ms12 = { 1, 2 };
+ Test::MyStruct ms22 = { 2, 2 };
+ Test::MyStruct ms23 = { 2, 3 };
test(ro.size() == 2);
test(ro[0].size() == 3);
- test(ro[0].find(s11) != ro[0].end());
- test(ro[0].find(s11)->second == ICE_ENUM(Test::MyEnum, enum1));
- test(ro[0].find(s22) != ro[0].end());
- test(ro[0].find(s22)->second == ICE_ENUM(Test::MyEnum, enum3));
- test(ro[0].find(s23) != ro[0].end());
- test(ro[0].find(s23)->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(ro[0].find(ms11) != ro[0].end());
+ test(ro[0].find(ms11)->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(ro[0].find(ms22) != ro[0].end());
+ test(ro[0].find(ms22)->second == ICE_ENUM(Test::MyEnum, enum3));
+ test(ro[0].find(ms23) != ro[0].end());
+ test(ro[0].find(ms23)->second == ICE_ENUM(Test::MyEnum, enum2));
test(ro[1].size() == 2);
- test(ro[1].find(s11) != ro[1].end());
- test(ro[1].find(s11)->second == ICE_ENUM(Test::MyEnum, enum1));
- test(ro[1].find(s12) != ro[1].end());
- test(ro[1].find(s12)->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(ro[1].find(ms11) != ro[1].end());
+ test(ro[1].find(ms11)->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(ro[1].find(ms12) != ro[1].end());
+ test(ro[1].find(ms12)->second == ICE_ENUM(Test::MyEnum, enum2));
test(_do.size() == 3);
test(_do[0].size() == 1);
- test(_do[0].find(s23) != _do[0].end());
- test(_do[0].find(s23)->second == ICE_ENUM(Test::MyEnum, enum3));
+ test(_do[0].find(ms23) != _do[0].end());
+ test(_do[0].find(ms23)->second == ICE_ENUM(Test::MyEnum, enum3));
test(_do[1].size() == 2);
- test(_do[1].find(s11) != _do[1].end());
- test(_do[1].find(s11)->second == ICE_ENUM(Test::MyEnum, enum1));
- test(_do[1].find(s12) != _do[1].end());
- test(_do[1].find(s12)->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(_do[1].find(ms11) != _do[1].end());
+ test(_do[1].find(ms11)->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(_do[1].find(ms12) != _do[1].end());
+ test(_do[1].find(ms12)->second == ICE_ENUM(Test::MyEnum, enum2));
test(_do[2].size() == 3);
- test(_do[2].find(s11) != _do[2].end());
- test(_do[2].find(s11)->second == ICE_ENUM(Test::MyEnum, enum1));
- test(_do[2].find(s22) != _do[2].end());
- test(_do[2].find(s22)->second == ICE_ENUM(Test::MyEnum, enum3));
- test(_do[2].find(s23) != _do[2].end());
- test(_do[2].find(s23)->second == ICE_ENUM(Test::MyEnum, enum2));
+ test(_do[2].find(ms11) != _do[2].end());
+ test(_do[2].find(ms11)->second == ICE_ENUM(Test::MyEnum, enum1));
+ test(_do[2].find(ms22) != _do[2].end());
+ test(_do[2].find(ms22)->second == ICE_ENUM(Test::MyEnum, enum3));
+ test(_do[2].find(ms23) != _do[2].end());
+ test(_do[2].find(ms23)->second == ICE_ENUM(Test::MyEnum, enum2));
called();
}
@@ -1191,9 +1191,9 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
#ifdef ICE_CPP11_MAPPING
p->opShortIntLongAsync(10, 11, 12,
- [&](long long int l1, short s1, int i1, long long int l2)
+ [&](long long int l1, short s1P, int i1, long long int l2)
{
- cb->opShortIntLong(l1, s1, i1, l2);
+ cb->opShortIntLong(l1, s1P, i1, l2);
},
makeExceptionClosure(cb));
#else
@@ -1225,9 +1225,9 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
#ifdef ICE_CPP11_MAPPING
p->opStringAsync("hello", "world",
- [&](string s1, string s2)
+ [&](string s1P, string s2P)
{
- cb->opString(move(s1), move(s2));
+ cb->opString(move(s1P), move(s2P));
},
makeExceptionClosure(cb));
#else
@@ -1729,18 +1729,18 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
}
{
- Test::MyStruct s11 = { 1, 1 };
- Test::MyStruct s12 = { 1, 2 };
+ Test::MyStruct ms11 = { 1, 1 };
+ Test::MyStruct ms12 = { 1, 2 };
Test::MyStructMyEnumD di1;
- di1[s11] = ICE_ENUM(Test::MyEnum, enum1);
- di1[s12] = ICE_ENUM(Test::MyEnum, enum2);
+ di1[ms11] = ICE_ENUM(Test::MyEnum, enum1);
+ di1[ms12] = ICE_ENUM(Test::MyEnum, enum2);
- Test::MyStruct s22 = { 2, 2 };
- Test::MyStruct s23 = { 2, 3 };
+ Test::MyStruct ms22 = { 2, 2 };
+ Test::MyStruct ms23 = { 2, 3 };
Test::MyStructMyEnumD di2;
- di2[s11] = ICE_ENUM(Test::MyEnum, enum1);
- di2[s22] = ICE_ENUM(Test::MyEnum, enum3);
- di2[s23] = ICE_ENUM(Test::MyEnum, enum2);
+ di2[ms11] = ICE_ENUM(Test::MyEnum, enum1);
+ di2[ms22] = ICE_ENUM(Test::MyEnum, enum3);
+ di2[ms23] = ICE_ENUM(Test::MyEnum, enum2);
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
#ifdef ICE_CPP11_MAPPING
@@ -1980,21 +1980,21 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
Test::MyStructMyEnumDS dsi2;
dsi2.resize(1);
- Test::MyStruct s11 = { 1, 1 };
- Test::MyStruct s12 = { 1, 2 };
+ Test::MyStruct ms11 = { 1, 1 };
+ Test::MyStruct ms12 = { 1, 2 };
Test::MyStructMyEnumD di1;
- di1[s11] = ICE_ENUM(Test::MyEnum, enum1);
- di1[s12] = ICE_ENUM(Test::MyEnum, enum2);
+ di1[ms11] = ICE_ENUM(Test::MyEnum, enum1);
+ di1[ms12] = ICE_ENUM(Test::MyEnum, enum2);
- Test::MyStruct s22 = { 2, 2 };
- Test::MyStruct s23 = { 2, 3 };
+ Test::MyStruct ms22 = { 2, 2 };
+ Test::MyStruct ms23 = { 2, 3 };
Test::MyStructMyEnumD di2;
- di2[s11] = ICE_ENUM(Test::MyEnum, enum1);
- di2[s22] = ICE_ENUM(Test::MyEnum, enum3);
- di2[s23] = ICE_ENUM(Test::MyEnum, enum2);
+ di2[ms11] = ICE_ENUM(Test::MyEnum, enum1);
+ di2[ms22] = ICE_ENUM(Test::MyEnum, enum3);
+ di2[ms23] = ICE_ENUM(Test::MyEnum, enum2);
Test::MyStructMyEnumD di3;
- di3[s23] = ICE_ENUM(Test::MyEnum, enum3);
+ di3[ms23] = ICE_ENUM(Test::MyEnum, enum3);
dsi1[0] = di1;
dsi1[1] = di2;
@@ -2350,9 +2350,9 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
#ifdef ICE_CPP11_MAPPING
p->opIntSAsync(s,
- [&](Test::IntS s1)
+ [&](Test::IntS s1P)
{
- cb->opIntS(s1);
+ cb->opIntS(s1P);
},
makeExceptionClosure(cb));
#else
@@ -2365,94 +2365,96 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
}
{
- Test::StringStringD ctx;
- ctx["one"] = "ONE";
- ctx["two"] = "TWO";
- ctx["three"] = "THREE";
{
- test(p->ice_getContext().empty());
+ Ice::Context ctx;
+ ctx["one"] = "ONE";
+ ctx["two"] = "TWO";
+ ctx["three"] = "THREE";
+ {
+ test(p->ice_getContext().empty());
#ifdef ICE_CPP11_MAPPING
- promise<void> prom;
- p->opContextAsync(
- [&](Ice::Context c)
- {
- test(c != ctx);
- prom.set_value();
- },
- [](exception_ptr)
- {
- test(false);
- });
- prom.get_future().get();
+ promise<void> prom;
+ p->opContextAsync(
+ [&](Ice::Context c)
+ {
+ test(c != ctx);
+ prom.set_value();
+ },
+ [](exception_ptr)
+ {
+ test(false);
+ });
+ prom.get_future().get();
#else
- Ice::AsyncResultPtr r = p->begin_opContext();
- Ice::Context c = p->end_opContext(r);
- test(c != ctx);
+ Ice::AsyncResultPtr r = p->begin_opContext();
+ Ice::Context c = p->end_opContext(r);
+ test(c != ctx);
#endif
- }
- {
- test(p->ice_getContext().empty());
+ }
+ {
+ test(p->ice_getContext().empty());
#ifdef ICE_CPP11_MAPPING
- promise<void> prom;
- p->opContextAsync(
- [&](Ice::Context c)
- {
- test(c == ctx);
- prom.set_value();
- },
- [](exception_ptr)
- {
- test(false);
- }, nullptr, ctx);
- prom.get_future().get();
+ promise<void> prom;
+ p->opContextAsync(
+ [&](Ice::Context c)
+ {
+ test(c == ctx);
+ prom.set_value();
+ },
+ [](exception_ptr)
+ {
+ test(false);
+ }, nullptr, ctx);
+ prom.get_future().get();
#else
- Ice::AsyncResultPtr r = p->begin_opContext(ctx);
- Ice::Context c = p->end_opContext(r);
- test(c == ctx);
+ Ice::AsyncResultPtr r = p->begin_opContext(ctx);
+ Ice::Context c = p->end_opContext(r);
+ test(c == ctx);
#endif
- }
- Test::MyClassPrxPtr p2 = ICE_CHECKED_CAST(Test::MyClassPrx, p->ice_context(ctx));
- test(p2->ice_getContext() == ctx);
- {
+ }
+ {
+ Test::MyClassPrxPtr p2 = ICE_CHECKED_CAST(Test::MyClassPrx, p->ice_context(ctx));
+ test(p2->ice_getContext() == ctx);
#ifdef ICE_CPP11_MAPPING
- promise<void> prom;
- p2->opContextAsync(
- [&](Ice::Context c)
- {
- test(c == ctx);
- prom.set_value();
- },
- [](exception_ptr)
- {
- test(false);
- });
- prom.get_future().get();
+ promise<void> prom;
+ p2->opContextAsync(
+ [&](Ice::Context c)
+ {
+ test(c == ctx);
+ prom.set_value();
+ },
+ [](exception_ptr)
+ {
+ test(false);
+ });
+ prom.get_future().get();
#else
- Ice::AsyncResultPtr r = p2->begin_opContext();
- Ice::Context c = p2->end_opContext(r);
- test(c == ctx);
+ Ice::AsyncResultPtr r = p2->begin_opContext();
+ Ice::Context c = p2->end_opContext(r);
+ test(c == ctx);
#endif
- }
- {
- Test::MyClassPrxPtr p2 = ICE_CHECKED_CAST(Test::MyClassPrx, p->ice_context(ctx));
+ }
+ {
+ Test::MyClassPrxPtr p2 = ICE_CHECKED_CAST(Test::MyClassPrx, p->ice_context(ctx));
#ifdef ICE_CPP11_MAPPING
- promise<void> prom;
- p2->opContextAsync(
- [&](Ice::Context c)
- {
- test(c == ctx);
- prom.set_value();
- },
- [](exception_ptr)
- {
- test(false);
- }, nullptr, ctx);
- prom.get_future().get();
+ promise<void> prom;
+ p2->opContextAsync(
+ [&](Ice::Context c)
+ {
+ test(c == ctx);
+ prom.set_value();
+ },
+ [](exception_ptr)
+ {
+ test(false);
+ }, nullptr, ctx);
+ prom.get_future().get();
#else
- Ice::AsyncResultPtr r = p2->begin_opContext(ctx);
- Ice::Context c = p2->end_opContext(r);
- test(c == ctx);
+ Ice::AsyncResultPtr r = p2->begin_opContext(ctx);
+ Ice::Context c = p2->end_opContext(r);
+ test(c == ctx);
#endif
+ }
}
if(p->ice_getConnection() && communicator->getProperties()->getProperty("Ice.Default.Protocol") != "bt")
@@ -2476,7 +2478,7 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
ctx["three"] = "THREE";
Ice::PropertiesPtr properties = ic->getProperties();
- Test::MyClassPrxPtr p =
+ Test::MyClassPrxPtr q =
ICE_UNCHECKED_CAST(Test::MyClassPrx,
ic->stringToProxy("test:" + TestHelper::getTestEndpoint(properties)));
ic->getImplicitContext()->setContext(ctx);
@@ -2484,7 +2486,7 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
{
#ifdef ICE_CPP11_MAPPING
promise<void> prom;
- p->opContextAsync(
+ q->opContextAsync(
[&](Ice::Context c)
{
test(c == ctx);
@@ -2496,8 +2498,8 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
});
prom.get_future().get();
#else
- Ice::AsyncResultPtr r = p->begin_opContext();
- Ice::Context c = p->end_opContext(r);
+ Ice::AsyncResultPtr r = q->begin_opContext();
+ Ice::Context c = q->end_opContext(r);
test(c == ctx);
#endif
}
@@ -2508,7 +2510,7 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
{
#ifdef ICE_CPP11_MAPPING
promise<void> prom;
- p->opContextAsync(
+ q->opContextAsync(
[&](Ice::Context c)
{
test(c == ctx);
@@ -2528,8 +2530,8 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
});
prom.get_future().get();
#else
- Ice::AsyncResultPtr r = p->begin_opContext();
- Ice::Context c = p->end_opContext(r);
+ Ice::AsyncResultPtr r = q->begin_opContext();
+ Ice::Context c = q->end_opContext(r);
test(c == ctx);
#endif
}
@@ -2542,13 +2544,13 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
combined.insert(ctx.begin(), ctx.end());
test(combined["one"] == "UN");
- p = ICE_UNCHECKED_CAST(Test::MyClassPrx, p->ice_context(prxContext));
+ q = ICE_UNCHECKED_CAST(Test::MyClassPrx, q->ice_context(prxContext));
ic->getImplicitContext()->setContext(Ice::Context());
{
#ifdef ICE_CPP11_MAPPING
promise<void> prom;
- p->opContextAsync(
+ q->opContextAsync(
[&](Ice::Context c)
{
test(c == prxContext);
@@ -2560,8 +2562,8 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
});
prom.get_future().get();
#else
- Ice::AsyncResultPtr r = p->begin_opContext();
- Ice::Context c = p->end_opContext(r);
+ Ice::AsyncResultPtr r = q->begin_opContext();
+ Ice::Context c = q->end_opContext(r);
test(c == prxContext);
#endif
}
@@ -2570,7 +2572,7 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
{
#ifdef ICE_CPP11_MAPPING
promise<void> prom;
- p->opContextAsync(
+ q->opContextAsync(
[&](Ice::Context c)
{
test(c == combined);
@@ -2582,8 +2584,8 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
});
prom.get_future().get();
#else
- Ice::AsyncResultPtr r = p->begin_opContext();
- Ice::Context c = p->end_opContext(r);
+ Ice::AsyncResultPtr r = q->begin_opContext();
+ Ice::Context c = q->end_opContext(r);
test(c == combined);
#endif
}
@@ -3305,18 +3307,18 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
}
{
- Test::MyStruct s11 = { 1, 1 };
- Test::MyStruct s12 = { 1, 2 };
+ Test::MyStruct ms11 = { 1, 1 };
+ Test::MyStruct ms12 = { 1, 2 };
Test::MyStructMyEnumD di1;
- di1[s11] = ICE_ENUM(Test::MyEnum, enum1);
- di1[s12] = ICE_ENUM(Test::MyEnum, enum2);
+ di1[ms11] = ICE_ENUM(Test::MyEnum, enum1);
+ di1[ms12] = ICE_ENUM(Test::MyEnum, enum2);
- Test::MyStruct s22 = { 2, 2 };
- Test::MyStruct s23 = { 2, 3 };
+ Test::MyStruct ms22 = { 2, 2 };
+ Test::MyStruct ms23 = { 2, 3 };
Test::MyStructMyEnumD di2;
- di2[s11] = ICE_ENUM(Test::MyEnum, enum1);
- di2[s22] = ICE_ENUM(Test::MyEnum, enum3);
- di2[s23] = ICE_ENUM(Test::MyEnum, enum2);
+ di2[ms11] = ICE_ENUM(Test::MyEnum, enum1);
+ di2[ms22] = ICE_ENUM(Test::MyEnum, enum3);
+ di2[ms23] = ICE_ENUM(Test::MyEnum, enum2);
CallbackPtr cb = ICE_MAKE_SHARED(Callback);
auto f = p->opMyStructMyEnumDAsync(di1, di2);
@@ -3569,21 +3571,21 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr&
Test::MyStructMyEnumDS dsi2;
dsi2.resize(1);
- Test::MyStruct s11 = { 1, 1 };
- Test::MyStruct s12 = { 1, 2 };
+ Test::MyStruct ms11 = { 1, 1 };
+ Test::MyStruct ms12 = { 1, 2 };
Test::MyStructMyEnumD di1;
- di1[s11] = ICE_ENUM(Test::MyEnum, enum1);
- di1[s12] = ICE_ENUM(Test::MyEnum, enum2);
+ di1[ms11] = ICE_ENUM(Test::MyEnum, enum1);
+ di1[ms12] = ICE_ENUM(Test::MyEnum, enum2);
- Test::MyStruct s22 = { 2, 2 };
- Test::MyStruct s23 = { 2, 3 };
+ Test::MyStruct ms22 = { 2, 2 };
+ Test::MyStruct ms23 = { 2, 3 };
Test::MyStructMyEnumD di2;
- di2[s11] = ICE_ENUM(Test::MyEnum, enum1);
- di2[s22] = ICE_ENUM(Test::MyEnum, enum3);
- di2[s23] = ICE_ENUM(Test::MyEnum, enum2);
+ di2[ms11] = ICE_ENUM(Test::MyEnum, enum1);
+ di2[ms22] = ICE_ENUM(Test::MyEnum, enum3);
+ di2[ms23] = ICE_ENUM(Test::MyEnum, enum2);
Test::MyStructMyEnumD di3;
- di3[s23] = ICE_ENUM(Test::MyEnum, enum3);
+ di3[ms23] = ICE_ENUM(Test::MyEnum, enum3);
dsi1[0] = di1;
dsi1[1] = di2;
diff --git a/cpp/test/Ice/optional/AllTests.cpp b/cpp/test/Ice/optional/AllTests.cpp
index 6a5fb48be57..6d97a4401b3 100644
--- a/cpp/test/Ice/optional/AllTests.cpp
+++ b/cpp/test/Ice/optional/AllTests.cpp
@@ -907,24 +907,24 @@ allTests(Test::TestHelper* helper, bool)
cout << "ok" << endl;
cout << "testing tag marshalling... " << flush;
- BPtr b = ICE_MAKE_SHARED(B);
- BPtr b2 = ICE_DYNAMIC_CAST(B, initial->pingPong(b));
- test(!b2->ma);
- test(!b2->mb);
- test(!b2->mc);
-
- b->ma = 10;
- b->mb = 11;
- b->mc = 12;
- b->md = 13;
-
- b2 = ICE_DYNAMIC_CAST(B, initial->pingPong(b));
- test(b2->ma == 10);
- test(b2->mb == 11);
- test(b2->mc == 12);
- test(b2->md == 13);
-
{
+ BPtr b = ICE_MAKE_SHARED(B);
+ BPtr b2 = ICE_DYNAMIC_CAST(B, initial->pingPong(b));
+ test(!b2->ma);
+ test(!b2->mb);
+ test(!b2->mc);
+
+ b->ma = 10;
+ b->mb = 11;
+ b->mc = 12;
+ b->md = 13;
+
+ b2 = ICE_DYNAMIC_CAST(B, initial->pingPong(b));
+ test(b2->ma == 10);
+ test(b2->mb == 11);
+ test(b2->mc == 12);
+ test(b2->md == 13);
+
factory->setEnabled(true);
Ice::OutputStream out(communicator);
out.startEncapsulation();
diff --git a/cpp/test/Ice/optional/TestI.cpp b/cpp/test/Ice/optional/TestI.cpp
index 1696df988f2..cfaac265930 100644
--- a/cpp/test/Ice/optional/TestI.cpp
+++ b/cpp/test/Ice/optional/TestI.cpp
@@ -39,7 +39,7 @@ InitialI::pingPong(shared_ptr<Value> obj, const Current& current)
}
#else
Ice::ValuePtr
-InitialI::pingPong(const Ice::ValuePtr& obj, const Current& current)
+InitialI::pingPong(const Ice::ValuePtr& obj, const Current&)
{
return obj;
}
diff --git a/cpp/test/Ice/plugin/Plugin.cpp b/cpp/test/Ice/plugin/Plugin.cpp
index 4ff2f7bccd4..0a2d9d6c900 100644
--- a/cpp/test/Ice/plugin/Plugin.cpp
+++ b/cpp/test/Ice/plugin/Plugin.cpp
@@ -356,7 +356,7 @@ extern "C"
{
ICE_DECLSPEC_EXPORT ::Ice::Plugin*
-createPlugin(const Ice::CommunicatorPtr& communicator, const string&, const Ice::StringSeq& args)
+createPlugin(const Ice::CommunicatorPtr& communicator, const string&, const Ice::StringSeq&)
{
return new Plugin(communicator);
}
diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp
index e82b881397b..b1a6e86b336 100644
--- a/cpp/test/Ice/proxy/AllTests.cpp
+++ b/cpp/test/Ice/proxy/AllTests.cpp
@@ -1122,30 +1122,30 @@ allTests(Test::TestHelper* helper)
cout << "ok" << endl;
cout << "testing checked cast with context... " << flush;
- Ice::Context c = cl->getContext();
- test(c.size() == 0);
+ Ice::Context ctx = cl->getContext();
+ test(ctx.size() == 0);
- c["one"] = "hello";
- c["two"] = "world";
+ ctx["one"] = "hello";
+ ctx["two"] = "world";
#ifdef ICE_CPP11_MAPPING
- cl = Ice::checkedCast<Test::MyClassPrx>(base, c);
+ cl = Ice::checkedCast<Test::MyClassPrx>(base, ctx);
#else
- cl = Test::MyClassPrx::checkedCast(base, c);
+ cl = Test::MyClassPrx::checkedCast(base, ctx);
#endif
Ice::Context c2 = cl->getContext();
- test(c == c2);
+ test(ctx == c2);
//
// Now with alternate API
//
#ifndef ICE_CPP11_MAPPING
cl = Ice::checkedCast<Test::MyClassPrx>(base);
- c = cl->getContext();
- test(c.size() == 0);
+ ctx = cl->getContext();
+ test(ctx.size() == 0);
- cl = Ice::checkedCast<Test::MyClassPrx>(base, c);
+ cl = Ice::checkedCast<Test::MyClassPrx>(base, ctx);
c2 = cl->getContext();
- test(c == c2);
+ test(ctx == c2);
#endif
cout << "ok" << endl;
@@ -1161,7 +1161,7 @@ allTests(Test::TestHelper* helper)
test(cl->ice_secure(true)->ice_fixed(connection)->ice_isSecure());
test(cl->ice_facet("facet")->ice_fixed(connection)->ice_getFacet() == "facet");
test(cl->ice_oneway()->ice_fixed(connection)->ice_isOneway());
- Ice::Context ctx;
+ ctx.clear();
ctx["one"] = "hello";
ctx["two"] = "world";
test(cl->ice_fixed(connection)->ice_getContext().empty());
@@ -1432,8 +1432,10 @@ allTests(Test::TestHelper* helper)
test(pstr == "test -t -e 1.1:tcp -h 127.0.0.1 -p 12010 -t 10000");
// Opaque endpoint encoded with 1.1 encoding.
- Ice::ObjectPrxPtr p2 = communicator->stringToProxy("test -e 1.1:opaque -e 1.1 -t 1 -v CTEyNy4wLjAuMeouAAAQJwAAAA==");
- test(communicator->proxyToString(p2) == "test -t -e 1.1:tcp -h 127.0.0.1 -p 12010 -t 10000");
+ {
+ Ice::ObjectPrxPtr p2 = communicator->stringToProxy("test -e 1.1:opaque -e 1.1 -t 1 -v CTEyNy4wLjAuMeouAAAQJwAAAA==");
+ test(communicator->proxyToString(p2) == "test -t -e 1.1:tcp -h 127.0.0.1 -p 12010 -t 10000");
+ }
if(communicator->getProperties()->getPropertyAsInt("Ice.IPv6") == 0 &&
communicator->getProperties()->getProperty("Ice.Default.Host") == "127.0.0.1")
diff --git a/cpp/test/Ice/retry/TestI.cpp b/cpp/test/Ice/retry/TestI.cpp
index ed4e611790f..05d4516b89f 100644
--- a/cpp/test/Ice/retry/TestI.cpp
+++ b/cpp/test/Ice/retry/TestI.cpp
@@ -32,7 +32,7 @@ RetryI::op(bool kill, const Ice::Current& current)
}
int
-RetryI::opIdempotent(int nRetry, const Ice::Current& current)
+RetryI::opIdempotent(int nRetry, const Ice::Current&)
{
if(nRetry < 0)
{
@@ -51,7 +51,7 @@ RetryI::opIdempotent(int nRetry, const Ice::Current& current)
}
void
-RetryI::opNotIdempotent(const Ice::Current& current)
+RetryI::opNotIdempotent(const Ice::Current&)
{
throw Ice::ConnectionLostException(__FILE__, __LINE__);
}
diff --git a/cpp/test/Ice/scope/AllTests.cpp b/cpp/test/Ice/scope/AllTests.cpp
index 2c2977da6d2..703db8fe69f 100644
--- a/cpp/test/Ice/scope/AllTests.cpp
+++ b/cpp/test/Ice/scope/AllTests.cpp
@@ -63,7 +63,7 @@ public:
called();
}
- void error(const Ice::Exception& ex)
+ void error(const Ice::Exception&)
{
test(false);
}
@@ -139,7 +139,7 @@ public:
called();
}
- void error(const Ice::Exception& ex)
+ void error(const Ice::Exception&)
{
test(false);
}
@@ -215,7 +215,7 @@ public:
called();
}
- void error(const Ice::Exception& ex)
+ void error(const Ice::Exception&)
{
test(false);
}
@@ -303,7 +303,7 @@ public:
called();
}
- void error(const Ice::Exception& ex)
+ void error(const Ice::Exception&)
{
test(false);
}
diff --git a/cpp/test/Ice/servantLocator/TestAMDI.cpp b/cpp/test/Ice/servantLocator/TestAMDI.cpp
index d3522bd5f30..483312ec2fd 100644
--- a/cpp/test/Ice/servantLocator/TestAMDI.cpp
+++ b/cpp/test/Ice/servantLocator/TestAMDI.cpp
@@ -142,7 +142,7 @@ TestAMDI::asyncResponseAsync(function<void()> response,
}
void
-TestAMDI::asyncExceptionAsync(function<void()> response,
+TestAMDI::asyncExceptionAsync(function<void()>,
function<void(exception_ptr)> error,
const Current&)
{
@@ -159,7 +159,7 @@ TestAMDI::asyncExceptionAsync(function<void()> response,
void
TestAMDI::shutdownAsync(function<void()> response,
- function<void(exception_ptr)> error,
+ function<void(exception_ptr)>,
const Current& current)
{
current.adapter->deactivate();
diff --git a/cpp/test/Ice/services/AllTests.cpp b/cpp/test/Ice/services/AllTests.cpp
index c88a66a0fdc..8df1aae6499 100644
--- a/cpp/test/Ice/services/AllTests.cpp
+++ b/cpp/test/Ice/services/AllTests.cpp
@@ -55,12 +55,12 @@ public:
}
virtual void
- connectFailed(const Glacier2::SessionHelperPtr&, const Ice::Exception& ex)
+ connectFailed(const Glacier2::SessionHelperPtr&, const Ice::Exception&)
{
}
virtual void
- createdCommunicator(const Glacier2::SessionHelperPtr& session)
+ createdCommunicator(const Glacier2::SessionHelperPtr&)
{
}
};
@@ -69,7 +69,7 @@ class SessionHelperClient
{
public:
- int run(int argc, char* argv[])
+ int run(int, char*[])
{
_factory = ICE_MAKE_SHARED(Glacier2::SessionFactoryHelper, ICE_MAKE_SHARED(SessionCallbackI));
return EXIT_SUCCESS;
diff --git a/cpp/test/Ice/slicing/objects/AllTests.cpp b/cpp/test/Ice/slicing/objects/AllTests.cpp
index 9ca6c17e42b..06e00e7a24d 100644
--- a/cpp/test/Ice/slicing/objects/AllTests.cpp
+++ b/cpp/test/Ice/slicing/objects/AllTests.cpp
@@ -3137,8 +3137,7 @@ allTests(Test::TestHelper* helper)
//
// Sending more than 254 objects exercises the encoding for object ids.
//
- int i;
- for(i = 0; i < 300; ++i)
+ for(int i = 0; i < 300; ++i)
{
PCDerived2Ptr p2 = ICE_MAKE_SHARED(PCDerived2);
p2->pi = i;
diff --git a/cpp/test/Ice/slicing/objects/TestI.cpp b/cpp/test/Ice/slicing/objects/TestI.cpp
index b7ab0719ecc..9b423b9d7f4 100644
--- a/cpp/test/Ice/slicing/objects/TestI.cpp
+++ b/cpp/test/Ice/slicing/objects/TestI.cpp
@@ -441,15 +441,21 @@ TestI::returnTest2(BPtr& p1, BPtr& p2, const ::Ice::Current&)
return p1;
}
+#ifdef ICE_CPP11_MAPPING
BPtr
TestI::returnTest3(ICE_IN(BPtr) p1, ICE_IN(BPtr) p2, const ::Ice::Current&)
{
-#ifdef ICE_CPP11_MAPPING
_values.push_back(p1);
_values.push_back(p2);
-#endif
return p1;
}
+#else
+BPtr
+TestI::returnTest3(ICE_IN(BPtr) p1, ICE_IN(BPtr), const ::Ice::Current&)
+{
+ return p1;
+}
+#endif
SS3
TestI::sequenceTest(ICE_IN(SS1Ptr) p1, ICE_IN(SS2Ptr) p2, const ::Ice::Current&)
diff --git a/cpp/test/Ice/stream/Client.cpp b/cpp/test/Ice/stream/Client.cpp
index a88f05ea86e..eddc65c0062 100644
--- a/cpp/test/Ice/stream/Client.cpp
+++ b/cpp/test/Ice/stream/Client.cpp
@@ -83,22 +83,22 @@ namespace Ice
template<class S>
struct StreamWriter<TestObjectWriter, S>
{
- static void write(S* ostr, const TestObjectWriter&) { assert(false); }
+ static void write(S*, const TestObjectWriter&) { assert(false); }
};
template<class S>
struct StreamReader<TestObjectWriter, S>
{
- static void read(S* istr, TestObjectWriter&) { assert(false); }
+ static void read(S*, TestObjectWriter&) { assert(false); }
};
template<class S>
struct StreamWriter<TestObjectReader, S>
{
- static void write(S* ostr, const TestObjectReader&) { assert(false); }
+ static void write(S*, const TestObjectReader&) { assert(false); }
};
template<class S>
struct StreamReader<TestObjectReader, S>
{
- static void read(S* istr, TestObjectReader&) { assert(false); }
+ static void read(S*, TestObjectReader&) { assert(false); }
};
}
#endif
@@ -900,8 +900,8 @@ allTests(Test::TestHelper* helper)
test(arr2S[2].size() == arrS[2].size());
#ifdef ICE_CPP11_MAPPING
- auto clearS = [](MyClassS& arr) {
- for(MyClassS::iterator p = arr.begin(); p != arr.end(); ++p)
+ auto clearS = [](MyClassS& arr3) {
+ for(MyClassS::iterator p = arr3.begin(); p != arr3.end(); ++p)
{
if(*p)
{
@@ -911,8 +911,8 @@ allTests(Test::TestHelper* helper)
}
}
};
- auto clearSS = [clearS](MyClassSS& arr) {
- for(MyClassSS::iterator p = arr.begin(); p != arr.end(); ++p)
+ auto clearSS = [clearS](MyClassSS& arr3) {
+ for(MyClassSS::iterator p = arr3.begin(); p != arr3.end(); ++p)
{
clearS(*p);
}
diff --git a/cpp/test/Ice/timeout/AllTests.cpp b/cpp/test/Ice/timeout/AllTests.cpp
index a9787193bc1..f29c4da7839 100644
--- a/cpp/test/Ice/timeout/AllTests.cpp
+++ b/cpp/test/Ice/timeout/AllTests.cpp
@@ -192,8 +192,8 @@ allTests(Test::TestHelper* helper)
controller->holdAdapter(100);
try
{
- ByteSeq seq(1000000);
- to->sendData(seq);
+ ByteSeq seq2(1000000);
+ to->sendData(seq2);
}
catch(const Ice::TimeoutException&)
{
@@ -485,7 +485,7 @@ allTests(Test::TestHelper* helper)
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TimeoutCollocated");
adapter->activate();
- TimeoutPrxPtr timeout = ICE_UNCHECKED_CAST(TimeoutPrx, adapter->addWithUUID(ICE_MAKE_SHARED(TimeoutI)));
+ timeout = ICE_UNCHECKED_CAST(TimeoutPrx, adapter->addWithUUID(ICE_MAKE_SHARED(TimeoutI)));
timeout = timeout->ice_invocationTimeout(100);
try
{
diff --git a/cpp/test/Ice/timeout/TestI.cpp b/cpp/test/Ice/timeout/TestI.cpp
index 1c3daf4fa93..6b8cb63baaa 100644
--- a/cpp/test/Ice/timeout/TestI.cpp
+++ b/cpp/test/Ice/timeout/TestI.cpp
@@ -47,7 +47,7 @@ TimeoutI::sendData(ICE_IN(Test::ByteSeq), const Ice::Current&)
}
void
-TimeoutI::sleep(Ice::Int to, const Ice::Current& c)
+TimeoutI::sleep(Ice::Int to, const Ice::Current&)
{
IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(to));
}
diff --git a/cpp/test/IceBridge/simple/AllTests.cpp b/cpp/test/IceBridge/simple/AllTests.cpp
index d73576dae3d..a5b5ee29b1f 100644
--- a/cpp/test/IceBridge/simple/AllTests.cpp
+++ b/cpp/test/IceBridge/simple/AllTests.cpp
@@ -87,10 +87,10 @@ allTests(Test::TestHelper* helper)
{
Ice::CommunicatorPtr communicator = helper->communicator();
cout << "testing connection to bridge... " << flush;
- Ice::ObjectPrx base = communicator->stringToProxy("test:" + helper->getTestEndpoint(1) + ":" +
+ Ice::ObjectPrx prx = communicator->stringToProxy("test:" + helper->getTestEndpoint(1) + ":" +
helper->getTestEndpoint(1, "udp"));
- test(base);
- Test::MyClassPrx cl = Ice::checkedCast<Test::MyClassPrx>(base);
+ test(prx);
+ Test::MyClassPrx cl = Ice::checkedCast<Test::MyClassPrx>(prx);
cl->ice_ping();
cout << "ok" << endl;
@@ -133,7 +133,7 @@ allTests(Test::TestHelper* helper)
// The bridge forwards the CloseConnectionException from the server as an
// UnknownLocalException. It eventually closes the connection when notified
// of the connection close.
- test(ex.unknown.find("CloseConnectionException") >= 0);
+ test(ex.unknown.find("CloseConnectionException") != string::npos);
}
IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(1));
}
diff --git a/cpp/test/IceBridge/simple/TestI.cpp b/cpp/test/IceBridge/simple/TestI.cpp
index 558323dda5e..8049c6d2702 100644
--- a/cpp/test/IceBridge/simple/TestI.cpp
+++ b/cpp/test/IceBridge/simple/TestI.cpp
@@ -146,7 +146,7 @@ MyClassI::incCounter(int expected, const Ice::Current& c)
}
void
-MyClassI::waitCounter(int value, const Ice::Current& c)
+MyClassI::waitCounter(int value, const Ice::Current&)
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor);
while(_counter != value)
diff --git a/cpp/test/IceDiscovery/simple/TestI.cpp b/cpp/test/IceDiscovery/simple/TestI.cpp
index 5c38cf0c801..909aefc8020 100644
--- a/cpp/test/IceDiscovery/simple/TestI.cpp
+++ b/cpp/test/IceDiscovery/simple/TestI.cpp
@@ -36,7 +36,7 @@ ControllerI::activateObjectAdapter(ICE_IN(string) name,
}
void
-ControllerI::deactivateObjectAdapter(ICE_IN(string) name, const Ice::Current& current)
+ControllerI::deactivateObjectAdapter(ICE_IN(string) name, const Ice::Current&)
{
_adapters[name]->destroy();
_adapters.erase(name);
diff --git a/cpp/test/IceGrid/activation/AllTests.cpp b/cpp/test/IceGrid/activation/AllTests.cpp
index 61503746c05..7eb967f9b82 100644
--- a/cpp/test/IceGrid/activation/AllTests.cpp
+++ b/cpp/test/IceGrid/activation/AllTests.cpp
@@ -96,13 +96,13 @@ allTests(Test::TestHelper* helper)
IceGrid::QueryPrx query = IceGrid::QueryPrx::checkedCast(
communicator->stringToProxy(communicator->getDefaultLocator()->ice_getIdentity().category + "/Query"));
- IceGrid::AdminSessionPrx session = registry->createAdminSession("foo", "bar");
+ IceGrid::AdminSessionPrx adminSession = registry->createAdminSession("foo", "bar");
- session->ice_getConnection()->setACM(registry->getACMTimeout(),
+ adminSession->ice_getConnection()->setACM(registry->getACMTimeout(),
IceUtil::None,
Ice::ICE_ENUM(ACMHeartbeat, HeartbeatAlways));
- IceGrid::AdminPrx admin = session->getAdmin();
+ IceGrid::AdminPrx admin = adminSession->getAdmin();
test(admin);
admin->startServer("node-1");
@@ -741,5 +741,5 @@ allTests(Test::TestHelper* helper)
admin->stopServer("node-1");
admin->stopServer("node-2");
- session->destroy();
+ adminSession->destroy();
}
diff --git a/cpp/test/IceGrid/allocation/AllTests.cpp b/cpp/test/IceGrid/allocation/AllTests.cpp
index f8ed209c2f6..09bd0d024ef 100644
--- a/cpp/test/IceGrid/allocation/AllTests.cpp
+++ b/cpp/test/IceGrid/allocation/AllTests.cpp
@@ -1003,8 +1003,8 @@ allTests(Test::TestHelper* helper)
cout << "ok" << endl;
cout << "testing application updates with allocated objects... " << flush;
{
- SessionPrx session1 = registry->createSession("Client1", "");
- SessionPrx session2 = registry->createSession("Client2", "");
+ session1 = registry->createSession("Client1", "");
+ session2 = registry->createSession("Client2", "");
ServerDescriptorPtr objectAllocOriginal = admin->getServerInfo("ObjectAllocation").descriptor;
ServerDescriptorPtr objectAllocUpdate = ServerDescriptorPtr::dynamicCast(objectAllocOriginal->ice_clone());
@@ -1100,7 +1100,6 @@ allTests(Test::TestHelper* helper)
test(session1);
session1->ice_ping();
- Ice::ObjectPrx obj;
obj = session1->allocateObjectById(allocatable)->ice_connectionId("client1")->ice_router(router1);
obj->ice_ping();
session1->releaseObject(allocatable);
diff --git a/cpp/test/IceGrid/deployer/Service.cpp b/cpp/test/IceGrid/deployer/Service.cpp
index 53304a60142..854896094b3 100644
--- a/cpp/test/IceGrid/deployer/Service.cpp
+++ b/cpp/test/IceGrid/deployer/Service.cpp
@@ -35,7 +35,7 @@ extern "C"
// Factory function
//
ICE_DECLSPEC_EXPORT ::IceBox::Service*
-create(CommunicatorPtr communicator)
+create(CommunicatorPtr)
{
return new ServiceI;
}
diff --git a/cpp/test/IceGrid/noRestartUpdate/Service.cpp b/cpp/test/IceGrid/noRestartUpdate/Service.cpp
index 6e1d3e7b991..af091a86b53 100644
--- a/cpp/test/IceGrid/noRestartUpdate/Service.cpp
+++ b/cpp/test/IceGrid/noRestartUpdate/Service.cpp
@@ -35,7 +35,7 @@ extern "C"
// Factory function
//
ICE_DECLSPEC_EXPORT ::IceBox::Service*
-create(CommunicatorPtr communicator)
+create(CommunicatorPtr)
{
return new ServiceI;
}
diff --git a/cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp b/cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp
index e759070b0ee..7fc9d0c8929 100644
--- a/cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp
+++ b/cpp/test/IceGrid/replicaGroup/RegistryPlugin.cpp
@@ -80,11 +80,11 @@ public:
string server = p->second;
Ice::StringSeq filteredAdapters;
- for(Ice::StringSeq::const_iterator p = adpts.begin(); p != adpts.end(); ++p)
+ for(Ice::StringSeq::const_iterator q = adpts.begin(); q != adpts.end(); ++q)
{
- if(_facade->getAdapterServer(*p) == server)
+ if(_facade->getAdapterServer(*q) == server)
{
- filteredAdapters.push_back(*p);
+ filteredAdapters.push_back(*q);
}
}
return filteredAdapters;
@@ -105,7 +105,7 @@ public:
}
virtual Ice::ObjectProxySeq
- filter(const string& type, const Ice::ObjectProxySeq& objects, const Ice::ConnectionPtr&, const Ice::Context& ctx)
+ filter(const string& /*type*/, const Ice::ObjectProxySeq& objects, const Ice::ConnectionPtr&, const Ice::Context& ctx)
{
Ice::Context::const_iterator p = ctx.find("server");
if(p == ctx.end())
@@ -115,11 +115,11 @@ public:
string server = p->second;
Ice::ObjectProxySeq filteredObjects;
- for(Ice::ObjectProxySeq::const_iterator p = objects.begin(); p != objects.end(); ++p)
+ for(Ice::ObjectProxySeq::const_iterator q = objects.begin(); q != objects.end(); ++q)
{
- if(_facade->getAdapterServer((*p)->ice_getAdapterId()) == server)
+ if(_facade->getAdapterServer((*q)->ice_getAdapterId()) == server)
{
- filteredObjects.push_back(*p);
+ filteredObjects.push_back(*q);
}
}
return filteredObjects;
@@ -140,7 +140,7 @@ public:
}
virtual Ice::StringSeq
- filter(const string& id, const Ice::StringSeq& adapters, const Ice::ConnectionPtr& con, const Ice::Context& ctx)
+ filter(const string& /*id*/, const Ice::StringSeq& adapters, const Ice::ConnectionPtr& /*con*/, const Ice::Context& ctx)
{
Ice::Context::const_iterator p = ctx.find("server");
if(p == ctx.end() || p->second == _exclude)
diff --git a/cpp/test/IceGrid/replicaGroup/Service.cpp b/cpp/test/IceGrid/replicaGroup/Service.cpp
index f77a1323d48..fe01f8e57b9 100644
--- a/cpp/test/IceGrid/replicaGroup/Service.cpp
+++ b/cpp/test/IceGrid/replicaGroup/Service.cpp
@@ -35,7 +35,7 @@ extern "C"
// Factory function
//
ICE_DECLSPEC_EXPORT ::IceBox::Service*
-create(CommunicatorPtr communicator)
+create(CommunicatorPtr)
{
return new ServiceI;
}
diff --git a/cpp/test/IceGrid/replication/AllTests.cpp b/cpp/test/IceGrid/replication/AllTests.cpp
index 681b22656be..3a1c011e2fc 100644
--- a/cpp/test/IceGrid/replication/AllTests.cpp
+++ b/cpp/test/IceGrid/replication/AllTests.cpp
@@ -253,13 +253,13 @@ allTests(Test::TestHelper* helper)
IceGrid::RegistryPrx registry = IceGrid::RegistryPrx::checkedCast(
comm->stringToProxy(comm->getDefaultLocator()->ice_getIdentity().category + "/Registry"));
- AdminSessionPrx session = registry->createAdminSession("foo", "bar");
+ AdminSessionPrx adminSession = registry->createAdminSession("foo", "bar");
- session->ice_getConnection()->setACM(registry->getACMTimeout(),
+ adminSession->ice_getConnection()->setACM(registry->getACMTimeout(),
IceUtil::None,
Ice::ICE_ENUM(ACMHeartbeat, HeartbeatAlways));
- AdminPrx admin = session->getAdmin();
+ AdminPrx admin = adminSession->getAdmin();
test(admin);
map<string, string> params;
@@ -782,24 +782,26 @@ allTests(Test::TestHelper* helper)
params["id"] = "Node1";
instantiateServer(admin, "IceGridNode", params);
- //
- // Add an application which is using Node1. Otherwise, when a
- // registry restarts it would throw aways the proxy of the nodes
- // because the node isn't used by any application.
- //
- ApplicationDescriptor app;
- app.name = "DummyApp";
- app.nodes["Node1"].description = "dummy node";
- try
- {
- masterAdmin->addApplication(app);
- }
- catch(const Ice::Exception& ex)
{
- cerr << ex << endl;
- test(false);
+ //
+ // Add an application which is using Node1. Otherwise, when a
+ // registry restarts it would throw aways the proxy of the nodes
+ // because the node isn't used by any application.
+ //
+ ApplicationDescriptor app;
+ app.name = "DummyApp";
+ app.nodes["Node1"].description = "dummy node";
+ try
+ {
+ masterAdmin->addApplication(app);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ test(false);
+ }
}
-
+
//
// Test node session establishment.
//
@@ -995,8 +997,8 @@ allTests(Test::TestHelper* helper)
{
cerr << ex << endl;
- ApplicationInfo app = admin->getApplicationInfo("Test");
- cerr << "properties-override = " << app.descriptor.variables["properties-override"] << endl;
+ ApplicationInfo appInfo = admin->getApplicationInfo("Test");
+ cerr << "properties-override = " << appInfo.descriptor.variables["properties-override"] << endl;
PropertyDescriptorSeq& seq = admin->getServerInfo("Node1").descriptor->propertySet.properties;
for(PropertyDescriptorSeq::const_iterator p = seq.begin(); p != seq.end(); ++p)
diff --git a/cpp/test/IceGrid/session/AllTests.cpp b/cpp/test/IceGrid/session/AllTests.cpp
index 742e2331f10..5448cfc3307 100644
--- a/cpp/test/IceGrid/session/AllTests.cpp
+++ b/cpp/test/IceGrid/session/AllTests.cpp
@@ -108,7 +108,7 @@ public:
}
virtual void
- applicationInit(int serial, const ApplicationInfoSeq& apps, const Ice::Current&)
+ applicationInit(int serialP, const ApplicationInfoSeq& apps, const Ice::Current&)
{
Lock sync(*this);
for(ApplicationInfoSeq::const_iterator p = apps.begin(); p != apps.end(); ++p)
@@ -118,27 +118,27 @@ public:
this->applications.insert(make_pair(p->descriptor.name, *p));
}
}
- updated(updateSerial(serial, "init update"));
+ updated(updateSerial(serialP, "init update"));
}
virtual void
- applicationAdded(int serial, const ApplicationInfo& app, const Ice::Current&)
+ applicationAdded(int serialP, const ApplicationInfo& app, const Ice::Current&)
{
Lock sync(*this);
this->applications.insert(make_pair(app.descriptor.name, app));
- updated(updateSerial(serial, "application added `" + app.descriptor.name + "'"));
+ updated(updateSerial(serialP, "application added `" + app.descriptor.name + "'"));
}
virtual void
- applicationRemoved(int serial, const std::string& name, const Ice::Current&)
+ applicationRemoved(int serialP, const std::string& name, const Ice::Current&)
{
Lock sync(*this);
this->applications.erase(name);
- updated(updateSerial(serial, "application removed `" + name + "'"));
+ updated(updateSerial(serialP, "application removed `" + name + "'"));
}
virtual void
- applicationUpdated(int serial, const ApplicationUpdateInfo& info, const Ice::Current&)
+ applicationUpdated(int serialP, const ApplicationUpdateInfo& info, const Ice::Current&)
{
Lock sync(*this);
const ApplicationUpdateDescriptor& desc = info.descriptor;
@@ -150,7 +150,7 @@ public:
{
this->applications[desc.name].descriptor.variables[p->first] = p->second;
}
- updated(updateSerial(serial, "application updated `" + desc.name + "'"));
+ updated(updateSerial(serialP, "application updated `" + desc.name + "'"));
}
int serial;
@@ -159,9 +159,9 @@ public:
private:
string
- updateSerial(int serial, const string& update)
+ updateSerial(int serialP, const string& update)
{
- this->serial = serial;
+ serial = serialP;
ostringstream os;
os << update << " (serial = " << serial << ")";
return os.str();
@@ -178,12 +178,12 @@ public:
}
virtual void
- adapterInit(const AdapterInfoSeq& adapters, const Ice::Current&)
+ adapterInit(const AdapterInfoSeq& adaptersP, const Ice::Current&)
{
Lock sync(*this);
- for(AdapterInfoSeq::const_iterator q = adapters.begin(); q != adapters.end(); ++q)
+ for(AdapterInfoSeq::const_iterator q = adaptersP.begin(); q != adaptersP.end(); ++q)
{
- this->adapters.insert(make_pair(q->id, *q));
+ adapters.insert(make_pair(q->id, *q));
}
updated(updateSerial(0, "init update"));
}
@@ -192,7 +192,7 @@ public:
adapterAdded(const AdapterInfo& info, const Ice::Current&)
{
Lock sync(*this);
- this->adapters.insert(make_pair(info.id, info));
+ adapters.insert(make_pair(info.id, info));
updated(updateSerial(0, "adapter added `" + info.id + "'"));
}
@@ -200,7 +200,7 @@ public:
adapterUpdated(const AdapterInfo& info, const Ice::Current&)
{
Lock sync(*this);
- this->adapters[info.id] = info;
+ adapters[info.id] = info;
updated(updateSerial(0, "adapter updated `" + info.id + "'"));
}
@@ -208,7 +208,7 @@ public:
adapterRemoved(const string& id, const Ice::Current&)
{
Lock sync(*this);
- this->adapters.erase(id);
+ adapters.erase(id);
updated(updateSerial(0, "adapter removed `" + id + "'"));
}
@@ -218,9 +218,9 @@ public:
private:
string
- updateSerial(int serial, const string& update)
+ updateSerial(int serialP, const string& update)
{
- this->serial = serial;
+ serial = serialP;
ostringstream os;
os << update << " (serial = " << serial << ")";
return os.str();
@@ -237,12 +237,12 @@ public:
}
virtual void
- objectInit(const ObjectInfoSeq& objects, const Ice::Current&)
+ objectInit(const ObjectInfoSeq& objectsP, const Ice::Current&)
{
Lock sync(*this);
- for(ObjectInfoSeq::const_iterator r = objects.begin(); r != objects.end(); ++r)
+ for(ObjectInfoSeq::const_iterator r = objectsP.begin(); r != objectsP.end(); ++r)
{
- this->objects.insert(make_pair(r->proxy->ice_getIdentity(), *r));
+ objects.insert(make_pair(r->proxy->ice_getIdentity(), *r));
}
updated(updateSerial(0, "init update"));
}
@@ -251,7 +251,7 @@ public:
objectAdded(const ObjectInfo& info, const Ice::Current&)
{
Lock sync(*this);
- this->objects.insert(make_pair(info.proxy->ice_getIdentity(), info));
+ objects.insert(make_pair(info.proxy->ice_getIdentity(), info));
updated(updateSerial(0, "object added `" + info.proxy->ice_toString() + "'"));
}
@@ -259,7 +259,7 @@ public:
objectUpdated(const ObjectInfo& info, const Ice::Current&)
{
Lock sync(*this);
- this->objects[info.proxy->ice_getIdentity()] = info;
+ objects[info.proxy->ice_getIdentity()] = info;
updated(updateSerial(0, "object updated `" + info.proxy->ice_toString() + "'"));
}
@@ -267,7 +267,7 @@ public:
objectRemoved(const Ice::Identity& id, const Ice::Current& current)
{
Lock sync(*this);
- this->objects.erase(id);
+ objects.erase(id);
updated(updateSerial(0, "object removed `" +
current.adapter->getCommunicator()->identityToString(id) + "'"));
}
@@ -278,9 +278,9 @@ public:
private:
string
- updateSerial(int serial, const string& update)
+ updateSerial(int serialP, const string& update)
{
- this->serial = serial;
+ serial = serialP;
ostringstream os;
os << update << " (serial = " << serial << ")";
return os.str();
diff --git a/cpp/test/IceSSL/configuration/AllTests.cpp b/cpp/test/IceSSL/configuration/AllTests.cpp
index 5955947676e..851f7ffe0c9 100644
--- a/cpp/test/IceSSL/configuration/AllTests.cpp
+++ b/cpp/test/IceSSL/configuration/AllTests.cpp
@@ -392,7 +392,7 @@ class ImportCerts
{
public:
- ImportCerts(const string& defaultDir, const char* certificates[])
+ ImportCerts(const string& /*defaultDir*/, const char* /*certificates*/[])
{
// Nothing to do.
}
@@ -1634,9 +1634,9 @@ allTests(Test::TestHelper* helper, const string& testDir, bool p12)
test(fact);
{
- Test::Properties d = createServerProps(defaultProps, p12, "s_rsa_ca1", "");
+ d = createServerProps(defaultProps, p12, "s_rsa_ca1", "");
d["IceSSL.VerifyPeer"] = "0";
- Test::ServerPrxPtr server = fact->createServer(d);
+ server = fact->createServer(d);
try
{
info = ICE_DYNAMIC_CAST(IceSSL::ConnectionInfo, server->ice_getConnection()->getInfo());
@@ -1670,9 +1670,9 @@ allTests(Test::TestHelper* helper, const string& testDir, bool p12)
test(fact);
{
- Test::Properties d = createServerProps(defaultProps, p12, "s_rsa_cai1", "");
+ d = createServerProps(defaultProps, p12, "s_rsa_cai1", "");
d["IceSSL.VerifyPeer"] = "0";
- Test::ServerPrxPtr server = fact->createServer(d);
+ server = fact->createServer(d);
try
{
server->ice_getConnection()->getInfo();
@@ -1704,9 +1704,9 @@ allTests(Test::TestHelper* helper, const string& testDir, bool p12)
fact = ICE_CHECKED_CAST(Test::ServerFactoryPrx, comm->stringToProxy(factoryRef));
test(fact);
{
- Test::Properties d = createServerProps(defaultProps, p12, "s_rsa_cai1", "");
+ d = createServerProps(defaultProps, p12, "s_rsa_cai1", "");
d["IceSSL.VerifyPeer"] = "0";
- Test::ServerPrxPtr server = fact->createServer(d);
+ server = fact->createServer(d);
try
{
info = ICE_DYNAMIC_CAST(IceSSL::ConnectionInfo, server->ice_getConnection()->getInfo());
@@ -1723,9 +1723,9 @@ allTests(Test::TestHelper* helper, const string& testDir, bool p12)
}
{
- Test::Properties d = createServerProps(defaultProps, p12, "s_rsa_cai2", "");
+ d = createServerProps(defaultProps, p12, "s_rsa_cai2", "");
d["IceSSL.VerifyPeer"] = "0";
- Test::ServerPrxPtr server = fact->createServer(d);
+ server = fact->createServer(d);
try
{
server->ice_getConnection()->getInfo();
@@ -1752,9 +1752,9 @@ allTests(Test::TestHelper* helper, const string& testDir, bool p12)
test(fact);
{
- Test::Properties d = createServerProps(defaultProps, p12, "s_rsa_cai2", "");
+ d = createServerProps(defaultProps, p12, "s_rsa_cai2", "");
d["IceSSL.VerifyPeer"] = "0";
- Test::ServerPrxPtr server = fact->createServer(d);
+ server = fact->createServer(d);
try
{
info = ICE_DYNAMIC_CAST(IceSSL::ConnectionInfo, server->ice_getConnection()->getInfo());
@@ -1784,9 +1784,9 @@ allTests(Test::TestHelper* helper, const string& testDir, bool p12)
test(fact);
{
- Test::Properties d = createServerProps(defaultProps, p12, "s_rsa_cai2", "cacert1");
+ d = createServerProps(defaultProps, p12, "s_rsa_cai2", "cacert1");
d["IceSSL.VerifyPeer"] = "2";
- Test::ServerPrxPtr server = fact->createServer(d);
+ server = fact->createServer(d);
try
{
server->ice_getConnection();
@@ -1811,10 +1811,10 @@ allTests(Test::TestHelper* helper, const string& testDir, bool p12)
}
{
- Test::Properties d = createServerProps(defaultProps, p12, "s_rsa_cai2", "cacert1");
+ d = createServerProps(defaultProps, p12, "s_rsa_cai2", "cacert1");
d["IceSSL.VerifyPeer"] = "2";
d["IceSSL.VerifyDepthMax"] = "4";
- Test::ServerPrxPtr server = fact->createServer(d);
+ server = fact->createServer(d);
try
{
server->ice_getConnection();
@@ -1937,8 +1937,8 @@ allTests(Test::TestHelper* helper, const string& testDir, bool p12)
CertificateVerifierIPtr verifier = ICE_MAKE_SHARED(CertificateVerifierI);
#ifdef ICE_CPP11_MAPPING
- plugin->setCertificateVerifier([verifier](const shared_ptr<IceSSL::ConnectionInfo>& info)
- { return verifier->verify(info); });
+ plugin->setCertificateVerifier([verifier](const shared_ptr<IceSSL::ConnectionInfo>& infoP)
+ { return verifier->verify(infoP); });
#else
plugin->setCertificateVerifier(verifier);
#endif
@@ -2013,8 +2013,8 @@ allTests(Test::TestHelper* helper, const string& testDir, bool p12)
CertificateVerifierIPtr verifier = ICE_MAKE_SHARED(CertificateVerifierI);
#ifdef ICE_CPP11_MAPPING
- plugin->setCertificateVerifier([verifier](const shared_ptr<IceSSL::ConnectionInfo>& info)
- { return verifier->verify(info); });
+ plugin->setCertificateVerifier([verifier](const shared_ptr<IceSSL::ConnectionInfo>& infoP)
+ { return verifier->verify(infoP); });
#else
plugin->setCertificateVerifier(verifier);
#endif
@@ -2046,72 +2046,74 @@ allTests(Test::TestHelper* helper, const string& testDir, bool p12)
cout << "testing protocols... " << flush;
{
# ifndef ICE_USE_SECURE_TRANSPORT
- //
- // This should fail because the client and server have no protocol
- // in common.
- //
- InitializationData initData;
- initData.properties = createClientProps(defaultProps, p12, "c_rsa_ca1", "cacert1");
- initData.properties->setProperty("IceSSL.VerifyPeer", "0");
- initData.properties->setProperty("IceSSL.Protocols", "tls1_1");
- CommunicatorPtr comm = initialize(initData);
-
- Test::ServerFactoryPrxPtr fact = ICE_CHECKED_CAST(Test::ServerFactoryPrx, comm->stringToProxy(factoryRef));
- test(fact);
- Test::Properties d = createServerProps(defaultProps, p12, "s_rsa_ca1", "cacert1");
- d["IceSSL.VerifyPeer"] = "0";
- d["IceSSL.Protocols"] = "tls1_2";
- Test::ServerPrxPtr server = fact->createServer(d);
- try
- {
- server->ice_ping();
- test(false);
- }
- catch(const ProtocolException&)
- {
- // Expected on some platforms.
- }
- catch(const ConnectionLostException&)
- {
- // Expected on some platforms.
- }
- catch(const LocalException& ex)
- {
- cerr << ex << endl;
- test(false);
- }
- fact->destroyServer(server);
- comm->destroy();
-
- //
- // This should succeed.
- //
- comm = initialize(initData);
- fact = ICE_CHECKED_CAST(Test::ServerFactoryPrx, comm->stringToProxy(factoryRef));
- test(fact);
- d = createServerProps(defaultProps, p12, "s_rsa_ca1", "cacert1");
- d["IceSSL.VerifyPeer"] = "0";
- d["IceSSL.Protocols"] = "tls1_1, tls1_2";
- server = fact->createServer(d);
- try
- {
- server->ice_ping();
- }
- catch(const LocalException& ex)
{
//
- // OpenSSL < 1.0 doesn't support tls 1.1 so it will fail, we ignore the error in this case.
+ // This should fail because the client and server have no protocol
+ // in common.
//
-#ifdef ICE_USE_OPENSSL
- if(openSSLVersion < 0x1000000)
-#endif
+ InitializationData initData;
+ initData.properties = createClientProps(defaultProps, p12, "c_rsa_ca1", "cacert1");
+ initData.properties->setProperty("IceSSL.VerifyPeer", "0");
+ initData.properties->setProperty("IceSSL.Protocols", "tls1_1");
+ CommunicatorPtr comm = initialize(initData);
+
+ Test::ServerFactoryPrxPtr fact = ICE_CHECKED_CAST(Test::ServerFactoryPrx, comm->stringToProxy(factoryRef));
+ test(fact);
+ Test::Properties d = createServerProps(defaultProps, p12, "s_rsa_ca1", "cacert1");
+ d["IceSSL.VerifyPeer"] = "0";
+ d["IceSSL.Protocols"] = "tls1_2";
+ Test::ServerPrxPtr server = fact->createServer(d);
+ try
+ {
+ server->ice_ping();
+ test(false);
+ }
+ catch(const ProtocolException&)
+ {
+ // Expected on some platforms.
+ }
+ catch(const ConnectionLostException&)
+ {
+ // Expected on some platforms.
+ }
+ catch(const LocalException& ex)
{
cerr << ex << endl;
test(false);
}
+ fact->destroyServer(server);
+ comm->destroy();
+
+ //
+ // This should succeed.
+ //
+ comm = initialize(initData);
+ fact = ICE_CHECKED_CAST(Test::ServerFactoryPrx, comm->stringToProxy(factoryRef));
+ test(fact);
+ d = createServerProps(defaultProps, p12, "s_rsa_ca1", "cacert1");
+ d["IceSSL.VerifyPeer"] = "0";
+ d["IceSSL.Protocols"] = "tls1_1, tls1_2";
+ server = fact->createServer(d);
+ try
+ {
+ server->ice_ping();
+ }
+ catch(const LocalException& ex)
+ {
+ //
+ // OpenSSL < 1.0 doesn't support tls 1.1 so it will fail, we ignore the error in this case.
+ //
+#ifdef ICE_USE_OPENSSL
+ if(openSSLVersion < 0x1000000)
+#endif
+ {
+ cerr << ex << endl;
+ test(false);
+ }
+ }
+ fact->destroyServer(server);
+ comm->destroy();
}
- fact->destroyServer(server);
- comm->destroy();
//
// This should fail because the client only accept SSLv3 and the server
@@ -2187,69 +2189,71 @@ allTests(Test::TestHelper* helper, const string& testDir, bool p12)
// enabled protocol versions. See the test bellow.
//
- //
- // This should fail because the client and server have no protocol
- // in common.
- //
- InitializationData initData;
- initData.properties = createClientProps(defaultProps, p12);
- initData.properties->setProperty("IceSSL.Ciphers", "(DH_anon*)");
- initData.properties->setProperty("IceSSL.VerifyPeer", "0");
- initData.properties->setProperty("IceSSL.ProtocolVersionMax", "tls1");
- initData.properties->setProperty("IceSSL.ProtocolVersionMin", "tls1");
- CommunicatorPtr comm = initialize(initData);
- Test::ServerFactoryPrxPtr fact = ICE_CHECKED_CAST(Test::ServerFactoryPrx, comm->stringToProxy(factoryRef));
- test(fact);
- Test::Properties d = createServerProps(defaultProps, p12);
- d["IceSSL.Ciphers"] = "(DH_anon*)";
- d["IceSSL.VerifyPeer"] = "0";
- d["IceSSL.ProtocolVersionMax"] = "tls1_2";
- d["IceSSL.ProtocolVersionMin"] = "tls1_2";
- Test::ServerPrxPtr server = fact->createServer(d);
- try
- {
- server->ice_ping();
- test(false);
- }
- catch(const ProtocolException&)
- {
- // Expected on some platforms.
- }
- catch(const ConnectionLostException&)
{
- // Expected on some platforms.
- }
- catch(const LocalException& ex)
- {
- cerr << ex << endl;
- test(false);
- }
- fact->destroyServer(server);
- comm->destroy();
+ //
+ // This should fail because the client and server have no protocol
+ // in common.
+ //
+ InitializationData initData;
+ initData.properties = createClientProps(defaultProps, p12);
+ initData.properties->setProperty("IceSSL.Ciphers", "(DH_anon*)");
+ initData.properties->setProperty("IceSSL.VerifyPeer", "0");
+ initData.properties->setProperty("IceSSL.ProtocolVersionMax", "tls1");
+ initData.properties->setProperty("IceSSL.ProtocolVersionMin", "tls1");
+ CommunicatorPtr comm = initialize(initData);
+ Test::ServerFactoryPrxPtr fact = ICE_CHECKED_CAST(Test::ServerFactoryPrx, comm->stringToProxy(factoryRef));
+ test(fact);
+ Test::Properties d = createServerProps(defaultProps, p12);
+ d["IceSSL.Ciphers"] = "(DH_anon*)";
+ d["IceSSL.VerifyPeer"] = "0";
+ d["IceSSL.ProtocolVersionMax"] = "tls1_2";
+ d["IceSSL.ProtocolVersionMin"] = "tls1_2";
+ Test::ServerPrxPtr server = fact->createServer(d);
+ try
+ {
+ server->ice_ping();
+ test(false);
+ }
+ catch(const ProtocolException&)
+ {
+ // Expected on some platforms.
+ }
+ catch(const ConnectionLostException&)
+ {
+ // Expected on some platforms.
+ }
+ catch(const LocalException& ex)
+ {
+ cerr << ex << endl;
+ test(false);
+ }
+ fact->destroyServer(server);
+ comm->destroy();
- //
- // This should succeed.
- //
- comm = initialize(initData);
- fact = ICE_CHECKED_CAST(Test::ServerFactoryPrx, comm->stringToProxy(factoryRef));
- test(fact);
- d = createServerProps(defaultProps, p12);
- d["IceSSL.Ciphers"] = "(DH_anon*)";
- d["IceSSL.VerifyPeer"] = "0";
- d["IceSSL.ProtocolVersionMax"] = "tls1";
- d["IceSSL.ProtocolVersionMin"] = "ssl3";
- server = fact->createServer(d);
- try
- {
- server->ice_ping();
- }
- catch(const LocalException& ex)
- {
- cerr << ex << endl;
- test(false);
+ //
+ // This should succeed.
+ //
+ comm = initialize(initData);
+ fact = ICE_CHECKED_CAST(Test::ServerFactoryPrx, comm->stringToProxy(factoryRef));
+ test(fact);
+ d = createServerProps(defaultProps, p12);
+ d["IceSSL.Ciphers"] = "(DH_anon*)";
+ d["IceSSL.VerifyPeer"] = "0";
+ d["IceSSL.ProtocolVersionMax"] = "tls1";
+ d["IceSSL.ProtocolVersionMin"] = "ssl3";
+ server = fact->createServer(d);
+ try
+ {
+ server->ice_ping();
+ }
+ catch(const LocalException& ex)
+ {
+ cerr << ex << endl;
+ test(false);
+ }
+ fact->destroyServer(server);
+ comm->destroy();
}
- fact->destroyServer(server);
- comm->destroy();
//
// This should fail because the client only accept SSLv3 and the server
@@ -4254,9 +4258,9 @@ allTests(Test::TestHelper* helper, const string& testDir, bool p12)
{
try
{
- Ice::WSConnectionInfoPtr info =
+ Ice::WSConnectionInfoPtr wsinfo =
ICE_DYNAMIC_CAST(Ice::WSConnectionInfo, p->ice_getConnection()->getInfo());
- IceSSL::ConnectionInfoPtr sslInfo = ICE_DYNAMIC_CAST(IceSSL::ConnectionInfo, info->underlying);
+ IceSSL::ConnectionInfoPtr sslInfo = ICE_DYNAMIC_CAST(IceSSL::ConnectionInfo, wsinfo->underlying);
test(sslInfo->verified);
break;
}
diff --git a/cpp/test/IceStorm/stress/Subscriber.cpp b/cpp/test/IceStorm/stress/Subscriber.cpp
index 59cfb0fabcd..4aef857a90b 100644
--- a/cpp/test/IceStorm/stress/Subscriber.cpp
+++ b/cpp/test/IceStorm/stress/Subscriber.cpp
@@ -169,7 +169,7 @@ public:
current.adapter->deactivate();
_count = _total;
{
- IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(_remainingMutex);
+ IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync2(_remainingMutex);
--_remaining;
if(_remaining == 0)
{
diff --git a/cpp/test/IceUtil/ctrlCHandler/Client.cpp b/cpp/test/IceUtil/ctrlCHandler/Client.cpp
index 05be89e95a2..a1f8514bd07 100644
--- a/cpp/test/IceUtil/ctrlCHandler/Client.cpp
+++ b/cpp/test/IceUtil/ctrlCHandler/Client.cpp
@@ -28,7 +28,7 @@ public:
};
void
-Client::run(int argc, char** argv)
+Client::run(int, char**)
{
{
cout << "First ignore CTRL+C and the like for 10 seconds (try it!)" << endl;
diff --git a/cpp/test/IceUtil/priority/Client.cpp b/cpp/test/IceUtil/priority/Client.cpp
index 47112d2f4ea..f613aa1925c 100644
--- a/cpp/test/IceUtil/priority/Client.cpp
+++ b/cpp/test/IceUtil/priority/Client.cpp
@@ -43,7 +43,7 @@ public:
};
void
-Client::run(int argc, char** argv)
+Client::run(int, char**)
{
initializeTestSuite();
diff --git a/cpp/test/IceUtil/sha1/Client.cpp b/cpp/test/IceUtil/sha1/Client.cpp
index 6e47a29045a..c03fb34713e 100644
--- a/cpp/test/IceUtil/sha1/Client.cpp
+++ b/cpp/test/IceUtil/sha1/Client.cpp
@@ -83,7 +83,7 @@ public:
};
void
-Client::run(int argc, char* argv[])
+Client::run(int, char*[])
{
cout << "Testing sha1 hash computation... ";
for(int i = 0; i < itemsSize; ++i)
diff --git a/cpp/test/IceUtil/stacktrace/Client.cpp b/cpp/test/IceUtil/stacktrace/Client.cpp
index 7a5d2a50aa1..9055a00ef41 100644
--- a/cpp/test/IceUtil/stacktrace/Client.cpp
+++ b/cpp/test/IceUtil/stacktrace/Client.cpp
@@ -104,7 +104,7 @@ public:
};
void
-Client::run(int argc, char* argv[])
+Client::run(int, char*[])
{
if(IceUtilInternal::stackTraceImpl() == IceUtilInternal::STNone)
{
diff --git a/cpp/test/IceUtil/thread/Client.cpp b/cpp/test/IceUtil/thread/Client.cpp
index 23464f642d0..574bb220424 100644
--- a/cpp/test/IceUtil/thread/Client.cpp
+++ b/cpp/test/IceUtil/thread/Client.cpp
@@ -23,7 +23,7 @@ public:
};
void
-Client::run(int argc, char** argv)
+Client::run(int, char**)
{
initializeTestSuite();
diff --git a/cpp/test/IceUtil/thread/StartTest.cpp b/cpp/test/IceUtil/thread/StartTest.cpp
index eef50038b47..6f32a98bf41 100644
--- a/cpp/test/IceUtil/thread/StartTest.cpp
+++ b/cpp/test/IceUtil/thread/StartTest.cpp
@@ -64,8 +64,8 @@ StartTest::run()
{
for(int j = 0; j < 40; j++)
{
- Thread* t = new StartTestThread;
- t->start().detach();
+ Thread* thread = new StartTestThread;
+ thread->start().detach();
}
ThreadControl::sleep(Time::milliSeconds(5));
}
diff --git a/cpp/test/IceUtil/timer/Client.cpp b/cpp/test/IceUtil/timer/Client.cpp
index 1c8a1c5166a..41e528f8c38 100644
--- a/cpp/test/IceUtil/timer/Client.cpp
+++ b/cpp/test/IceUtil/timer/Client.cpp
@@ -161,7 +161,7 @@ public:
};
void
-Client::run(int, char* argv[])
+Client::run(int, char*[])
{
cout << "testing timer... " << flush;
{
diff --git a/cpp/test/Slice/macros/Client.cpp b/cpp/test/Slice/macros/Client.cpp
index 308a5e53e70..7ef1075ee13 100644
--- a/cpp/test/Slice/macros/Client.cpp
+++ b/cpp/test/Slice/macros/Client.cpp
@@ -22,7 +22,7 @@ public:
};
void
-Client::run(int argc, char** argv)
+Client::run(int, char**)
{
cout << "testing Slice predefined macros... " << flush;
DefaultPtr d = ICE_MAKE_SHARED(Default);
diff --git a/objective-c/src/Ice/CommunicatorI.mm b/objective-c/src/Ice/CommunicatorI.mm
index cd99acc831d..253f64bc16b 100644
--- a/objective-c/src/Ice/CommunicatorI.mm
+++ b/objective-c/src/Ice/CommunicatorI.mm
@@ -255,7 +255,7 @@
return nil; // Keep the compiler happy.
}
--(id<ICEObjectAdapter>) createObjectAdapter:(NSString*)name;
+-(id<ICEObjectAdapter>) createObjectAdapter:(NSString*)name
{
NSException* nsex = nil;
try
@@ -273,7 +273,7 @@
return nil; // Keep the compiler happy.
}
--(id<ICEObjectAdapter>) createObjectAdapterWithEndpoints:(NSString*)name endpoints:(NSString*)endpoints;
+-(id<ICEObjectAdapter>) createObjectAdapterWithEndpoints:(NSString*)name endpoints:(NSString*)endpoints
{
NSException* nsex = nil;
try
diff --git a/objective-c/src/Ice/ConnectionI.mm b/objective-c/src/Ice/ConnectionI.mm
index aea1b336f3d..fe855ad9e2e 100644
--- a/objective-c/src/Ice/ConnectionI.mm
+++ b/objective-c/src/Ice/ConnectionI.mm
@@ -45,7 +45,7 @@ registerConnectionInfoClass(Class cl)
@implementation ICEConnectionInfo (ICEInternal)
-+(id) checkedConnectionInfoWithConnectionInfo:(Ice::ConnectionInfo*)connectionInfo
++(id) checkedConnectionInfoWithConnectionInfo:(Ice::ConnectionInfo*)__unused connectionInfo
{
assert(false);
return nil;
@@ -99,7 +99,7 @@ registerConnectionInfoClass(Class cl)
return [[ICEConnectionInfo alloc] initWithConnectionInfo:info];
}
--(id) initWithConnectionInfo:(Ice::ConnectionInfo*)connectionInfo;
+-(id) initWithConnectionInfo:(Ice::ConnectionInfo*)connectionInfo
{
self = [super initWithCxxObject:connectionInfo];
if(self != nil)
@@ -194,7 +194,7 @@ public:
}
void
- closed(const Ice::ConnectionPtr& connection)
+ closed(const Ice::ConnectionPtr&)
{
NSException* ex = nil;
@autoreleasepool
@@ -237,7 +237,7 @@ public:
}
void
- heartbeat(const Ice::ConnectionPtr& connection)
+ heartbeat(const Ice::ConnectionPtr&)
{
NSException* ex = nil;
@autoreleasepool
@@ -373,7 +373,7 @@ private:
CONNECTION->end_flushBatchRequests(r);
}, result);
}
--(void) setCloseCallback:(ICECloseCallback)callback;
+-(void) setCloseCallback:(ICECloseCallback)callback
{
CONNECTION->setCloseCallback(new CloseCallbackI(self, callback));
}
diff --git a/objective-c/src/Ice/EndpointI.mm b/objective-c/src/Ice/EndpointI.mm
index 560d4992316..5bfadb72eeb 100644
--- a/objective-c/src/Ice/EndpointI.mm
+++ b/objective-c/src/Ice/EndpointI.mm
@@ -45,7 +45,7 @@ registerEndpointInfoClass(Class cl)
@implementation ICEEndpointInfo(ICEInternal)
-+(id) checkedEndpointInfoWithEndpointInfo:(Ice::EndpointInfo*)endpointInfo
++(id) checkedEndpointInfoWithEndpointInfo:(Ice::EndpointInfo*)__unused endpointInfo
{
assert(false);
return nil;
@@ -104,7 +104,7 @@ registerEndpointInfoClass(Class cl)
return [[ICEEndpointInfo alloc] initWithEndpointInfo:info];
}
--(id) initWithEndpointInfo:(Ice::EndpointInfo*)endpointInfo;
+-(id) initWithEndpointInfo:(Ice::EndpointInfo*)endpointInfo
{
self = [super initWithCxxObject:endpointInfo];
if(self)
@@ -122,12 +122,12 @@ registerEndpointInfoClass(Class cl)
return ENDPOINTINFO->type();
}
--(BOOL) datagram;
+-(BOOL) datagram
{
return ENDPOINTINFO->datagram();
}
--(BOOL) secure;
+-(BOOL) secure
{
return ENDPOINTINFO->secure();
}
@@ -135,7 +135,7 @@ registerEndpointInfoClass(Class cl)
@implementation ICEIPEndpointInfo(ICEInternal)
--(id) initWithIPEndpointInfo:(Ice::IPEndpointInfo*)ipEndpointInfo;
+-(id) initWithIPEndpointInfo:(Ice::IPEndpointInfo*)ipEndpointInfo
{
self = [super initWithEndpointInfo:ipEndpointInfo];
if(self)
diff --git a/objective-c/src/Ice/Exception.mm b/objective-c/src/Ice/Exception.mm
index e2007df71dc..57814446794 100644
--- a/objective-c/src/Ice/Exception.mm
+++ b/objective-c/src/Ice/Exception.mm
@@ -40,18 +40,18 @@
return nil;
}
--(id) initWithCoder:(NSCoder*)decoder
+-(id) initWithCoder:(NSCoder*)__unused decoder
{
[NSException raise:NSInvalidArchiveOperationException format:@"ICEExceptions do not support NSCoding"];
return nil;
}
--(void) encodeWithCoder:(NSCoder*)coder
+-(void) encodeWithCoder:(NSCoder*)__unused coder
{
[NSException raise:NSInvalidArchiveOperationException format:@"ICEExceptions do not support NSCoding"];
}
--(id) copyWithZone:(NSZone *)zone
+-(id) copyWithZone:(NSZone*)__unused zone
{
NSAssert(false, @"copyWithZone: must be overriden");
return nil;
@@ -188,7 +188,7 @@ localExceptionToString(const Ice::LocalException& ex)
[os endException];
}
--(void) iceWriteImpl:(id<ICEOutputStream>)os
+-(void) iceWriteImpl:(id<ICEOutputStream>)__unused os
{
NSAssert(NO, @"iceWriteImpl requires override");
}
@@ -200,7 +200,7 @@ localExceptionToString(const Ice::LocalException& ex)
[is endException:NO];
}
--(void) iceReadImpl:(id<ICEInputStream>)is
+-(void) iceReadImpl:(id<ICEInputStream>)__unused is
{
NSAssert(NO, @"iceReadImpl requires override");
}
diff --git a/objective-c/src/Ice/Initialize.mm b/objective-c/src/Ice/Initialize.mm
index 3ea61f5daee..a020bf4df15 100644
--- a/objective-c/src/Ice/Initialize.mm
+++ b/objective-c/src/Ice/Initialize.mm
@@ -190,7 +190,7 @@ private:
-(id) init:(id<ICEProperties>)props logger:(id<ICELogger>)log
dispatcher:(void(^)(id<ICEDispatcherCall>, id<ICEConnection>))d
- batchRequestInterceptor:(void(^)(id<ICEBatchRequest>, int, int))i;
+ batchRequestInterceptor:(void(^)(id<ICEBatchRequest>, int, int))i
{
self = [super init];
if(!self)
@@ -204,7 +204,7 @@ private:
return self;
}
-+(id) initializationData;
++(id) initializationData
{
ICEInitializationData *s = [[ICEInitializationData alloc] init];
[s autorelease];
@@ -213,7 +213,7 @@ private:
+(id) initializationData:(id<ICEProperties>)p logger:(id<ICELogger>)l
dispatcher:(void(^)(id<ICEDispatcherCall>, id<ICEConnection>))d
- batchRequestInterceptor:(void(^)(id<ICEBatchRequest>, int, int))i;
+ batchRequestInterceptor:(void(^)(id<ICEBatchRequest>, int, int))i
{
return [[((ICEInitializationData *)[ICEInitializationData alloc]) init:p logger:l dispatcher:d
batchRequestInterceptor:i] autorelease];
@@ -230,7 +230,7 @@ private:
return copy;
}
--(NSUInteger) hash;
+-(NSUInteger) hash
{
NSUInteger h = 0;
h = (h << 5 ^ [properties hash]);
@@ -241,7 +241,7 @@ private:
return h;
}
--(BOOL) isEqual:(id)anObject;
+-(BOOL) isEqual:(id)anObject
{
if(self == anObject)
{
@@ -325,7 +325,7 @@ private:
return YES;
}
--(void) dealloc;
+-(void) dealloc
{
[properties release];
[logger release];
diff --git a/objective-c/src/Ice/Object.mm b/objective-c/src/Ice/Object.mm
index 88755c06505..759936fe885 100644
--- a/objective-c/src/Ice/Object.mm
+++ b/objective-c/src/Ice/Object.mm
@@ -337,26 +337,26 @@ static NSString* ICEObject_ids[1] =
{
return nil;
}
--(BOOL) ice_isA:(NSString*)typeId current:(ICECurrent*)current
+-(BOOL) ice_isA:(NSString*)__unused typeId current:(ICECurrent*)__unused current
{
NSAssert(NO, @"ice_isA requires override");
return nil;
}
--(void) ice_ping:(ICECurrent*)current
+-(void) ice_ping:(ICECurrent*)__unused current
{
NSAssert(NO, @"ice_ping requires override");
}
--(NSString*) ice_id:(ICECurrent*)current
+-(NSString*) ice_id:(ICECurrent*)__unused current
{
NSAssert(NO, @"ice_id requires override");
return nil;
}
--(NSArray*) ice_ids:(ICECurrent*)current
+-(NSArray*) ice_ids:(ICECurrent*)__unused current
{
NSAssert(NO, @"ice_ids requires override");
return nil;
}
--(void) ice_dispatch:(id<ICERequest>)request;
+-(void) ice_dispatch:(id<ICERequest>)__unused request
{
NSAssert(NO, @"ice_dispatch requires override");
}
@@ -372,11 +372,11 @@ static NSString* ICEObject_ids[1] =
*idx = 0;
return ICEObject_ids;
}
--(void) iceWrite:(id<ICEOutputStream>)os
+-(void) iceWrite:(id<ICEOutputStream>)__unused os
{
NSAssert(NO, @"iceWrite requires override");
}
--(void) iceRead:(id<ICEInputStream>)is
+-(void) iceRead:(id<ICEInputStream>)__unused is
{
NSAssert(NO, @"iceRead requires override");
}
@@ -435,24 +435,24 @@ static NSString* ICEObject_all[4] =
return [[[self alloc] initWithDelegate:delegate] autorelease];
}
--(BOOL) ice_isA:(NSString*)typeId current:(ICECurrent*)current
+-(BOOL) ice_isA:(NSString*)typeId current:(ICECurrent*)__unused current
{
int count, index;
NSString*const* staticIds = [[self class] iceStaticIds:&count idIndex:&index];
return ICEInternalLookupString(staticIds, count, typeId) >= 0;
}
--(void) ice_ping:(ICECurrent*)current
+-(void) ice_ping:(ICECurrent*)__unused current
{
// Nothing to do.
}
--(NSString*) ice_id:(ICECurrent*)current
+-(NSString*) ice_id:(ICECurrent*)__unused current
{
return [[self class] ice_staticId];
}
--(NSArray*) ice_ids:(ICECurrent*)current
+-(NSArray*) ice_ids:(ICECurrent*)__unused current
{
int count, index;
NSString*const* staticIds = [[self class] iceStaticIds:&count idIndex:&index];
@@ -543,12 +543,12 @@ static NSString* ICEObject_all[4] =
[is endValue:NO];
}
--(void) iceWriteImpl:(id<ICEOutputStream>)os
+-(void) iceWriteImpl:(id<ICEOutputStream>)__unused os
{
NSAssert(NO, @"iceWriteImpl requires override");
}
--(void) iceReadImpl:(id<ICEInputStream>)is
+-(void) iceReadImpl:(id<ICEInputStream>)__unused is
{
NSAssert(NO, @"iceReadImpl requires override");
}
@@ -652,7 +652,7 @@ static NSString* ICEObject_all[4] =
}
}
}
--(BOOL) ice_isA:(NSString*)typeId current:(ICECurrent*)current
+-(BOOL) ice_isA:(NSString*)typeId current:(ICECurrent*)__unused current
{
NSException* nsex = nil;
try
@@ -665,7 +665,7 @@ static NSString* ICEObject_all[4] =
}
@throw nsex;
}
--(void) ice_ping:(ICECurrent*)current
+-(void) ice_ping:(ICECurrent*)__unused current
{
NSException* nsex = nil;
try
@@ -678,7 +678,7 @@ static NSString* ICEObject_all[4] =
}
@throw nsex;
}
--(NSString*) ice_id:(ICECurrent*)current
+-(NSString*) ice_id:(ICECurrent*)__unused current
{
NSException* nsex = nil;
try
@@ -691,7 +691,7 @@ static NSString* ICEObject_all[4] =
}
@throw nsex;
}
--(NSArray*) ice_ids:(ICECurrent*)current
+-(NSArray*) ice_ids:(ICECurrent*)__unused current
{
NSException* nsex = nil;
try
@@ -704,7 +704,7 @@ static NSString* ICEObject_all[4] =
}
@throw nsex;
}
--(void) ice_dispatch:(id<ICERequest>)request
+-(void) ice_dispatch:(id<ICERequest>)__unused request
{
@throw [ICEFeatureNotSupportedException featureNotSupportedException:__FILE__ line:__LINE__];
}
diff --git a/objective-c/src/Ice/Proxy.mm b/objective-c/src/Ice/Proxy.mm
index 7e1acf50689..e16d0be6dbe 100644
--- a/objective-c/src/Ice/Proxy.mm
+++ b/objective-c/src/Ice/Proxy.mm
@@ -186,7 +186,7 @@ BOOL _returnsData;
@implementation ICEAsyncResult
-(ICEAsyncResult*) initWithAsyncResult:(const Ice::AsyncResultPtr&)arg
operation:(NSString*)op
- proxy:(id<ICEObjectPrx>)p;
+ proxy:(id<ICEObjectPrx>)p
{
self = [super init];
if(!self)
@@ -875,7 +875,7 @@ BOOL _returnsData;
}
}
--(id) copyWithZone:(NSZone *)zone
+-(id) copyWithZone:(NSZone *)__unused zone
{
return [self retain];
}
@@ -1489,7 +1489,7 @@ BOOL _returnsData;
return [ICEEncodingVersion encodingVersionWithEncodingVersion:OBJECTPRX->ice_getEncodingVersion()];
}
--(id) ice_encodingVersion:(ICEEncodingVersion*)encoding;
+-(id) ice_encodingVersion:(ICEEncodingVersion*)encoding
{
return [[self class] iceObjectPrxWithObjectPrx:OBJECTPRX->ice_encodingVersion([encoding encodingVersion])];
}
diff --git a/objective-c/src/Ice/Stream.mm b/objective-c/src/Ice/Stream.mm
index b5a9a1d4c02..dd5a94c7c2c 100644
--- a/objective-c/src/Ice/Stream.mm
+++ b/objective-c/src/Ice/Stream.mm
@@ -352,7 +352,7 @@ private:
{
ICENone = [[ICEInternalNone alloc] init];
}
--(id) copyWithZone:(NSZone *)zone
+-(id) copyWithZone:(NSZone *)__unused zone
{
return self;
}
@@ -2255,7 +2255,7 @@ private:
return nil; // Keep the compiler happy.
}
--(void) reset:(BOOL)clearBuffer
+-(void) reset:(BOOL)__unused clearBuffer
{
NSException* nsex = nil;
try
@@ -2332,7 +2332,7 @@ private:
@end
@implementation ICEStreamHelper
-+(id) readRetained:(id<ICEInputStream>)stream
++(id) readRetained:(id<ICEInputStream>)__unused stream
{
NSAssert(NO, @"requires override");
return nil;
@@ -2341,11 +2341,11 @@ private:
{
return [[self readRetained:stream] autorelease];
}
-+(void) write:(id)obj stream:(id<ICEOutputStream>)stream
++(void) write:(id)__unused obj stream:(id<ICEOutputStream>)__unused stream
{
NSAssert(NO, @"requires override");
}
-+(id) readOptionalRetained:(id<ICEInputStream>)stream tag:(ICEInt)tag
++(id) readOptionalRetained:(id<ICEInputStream>)__unused stream tag:(ICEInt)__unused tag
{
NSAssert(NO, @"requires override");
return nil;
@@ -2355,7 +2355,7 @@ private:
return [[self readOptionalRetained:stream tag:tag] autorelease];
return nil;
}
-+(void) writeOptional:(id)obj stream:(id<ICEOutputStream>)stream tag:(ICEInt)tag
++(void) writeOptional:(id)__unused obj stream:(id<ICEOutputStream>)__unused stream tag:(ICEInt)__unused tag
{
NSAssert(NO, @"requires override");
}
@@ -2927,12 +2927,12 @@ private:
@end
@implementation ICEDataSequenceHelper
-+(id) readRetained:(id<ICEInputStream>)stream
++(id) readRetained:(id<ICEInputStream>)__unused stream
{
NSAssert(NO, @"readRetained requires override");
return nil;
}
-+(void) write:(id)obj stream:(id<ICEOutputStream>)stream
++(void) write:(id)__unused obj stream:(id<ICEOutputStream>)__unused stream
{
NSAssert(NO, @"write requires override");
}
@@ -3216,13 +3216,13 @@ private:
@end
@implementation ICEObjectDictionaryHelper
-+(id) readRetained:(id<ICEInputStream>)stream
++(id) readRetained:(id<ICEInputStream>)__unused stream
{
NSAssert(NO, @"ICEObjectDictionaryHelper readRetained requires override");
return nil;
}
-+(void) write:(id)obj stream:(id<ICEOutputStream>)stream
++(void) write:(id)__unused obj stream:(id<ICEOutputStream>)__unused stream
{
NSAssert(NO, @"ICEObjectDictionaryHelper write requires override");
}
diff --git a/objective-c/src/Ice/StreamI.h b/objective-c/src/Ice/StreamI.h
index bdb7bec6a0f..7b2a86b0f14 100644
--- a/objective-c/src/Ice/StreamI.h
+++ b/objective-c/src/Ice/StreamI.h
@@ -24,8 +24,8 @@
NSData* data_;
}
+(Ice::Object*)createObjectReader:(ICEObject*)obj;
--initWithCxxCommunicator:(Ice::Communicator*)com data:(const std::pair<const Byte*, const Byte*>&)data;
--initWithCommunicator:(id<ICECommunicator>)com data:(NSData*)data encoding:(ICEEncodingVersion*)e;
+-(id)initWithCxxCommunicator:(Ice::Communicator*)com data:(const std::pair<const Byte*, const Byte*>&)data;
+-(id)initWithCommunicator:(id<ICECommunicator>)com data:(NSData*)data encoding:(ICEEncodingVersion*)e;
-(Ice::InputStream*) is;
@end
@@ -35,8 +35,8 @@
Ice::OutputStream stream_;
std::map<ICEObject*, Ice::ObjectPtr>* objectWriters_;
}
--initWithCxxCommunicator:(Ice::Communicator*)communicator;
--initWithCxxStream:(Ice::OutputStream*)stream;
--initWithCommunicator:(id<ICECommunicator>)com encoding:(ICEEncodingVersion*)e;
+-(id)initWithCxxCommunicator:(Ice::Communicator*)communicator;
+-(id)initWithCxxStream:(Ice::OutputStream*)stream;
+-(id)initWithCommunicator:(id<ICECommunicator>)com encoding:(ICEEncodingVersion*)e;
-(Ice::OutputStream*) os;
@end
diff --git a/objective-c/test/Common/TestCommon.m b/objective-c/test/Common/TestCommon.m
index fcfc7c71a81..e385a282e59 100644
--- a/objective-c/test/Common/TestCommon.m
+++ b/objective-c/test/Common/TestCommon.m
@@ -235,7 +235,7 @@ tprintf(const char* fmt, ...)
}
void
-serverReady(id<ICECommunicator> c)
+serverReady(id<ICECommunicator>__unused c)
{
}
diff --git a/objective-c/test/Ice/acm/AllTests.m b/objective-c/test/Ice/acm/AllTests.m
index 575a031b3f8..34fa502077e 100644
--- a/objective-c/test/Ice/acm/AllTests.m
+++ b/objective-c/test/Ice/acm/AllTests.m
@@ -59,7 +59,7 @@
}
[_cond unlock];
}
--(void) trace:(NSString*)category message:(NSString*)message
+-(void) trace:(NSString*)__unused category message:(NSString*)message
{
[_cond lock];
[_messages addObject:message];
@@ -93,13 +93,13 @@
{
return [@"" mutableCopy];
}
--(id<ICELogger>) cloneWithPrefix:(NSString*)prefix
+-(id<ICELogger>) cloneWithPrefix:(NSString*)__unused prefix
{
return self;
}
-(void) dump
{
- for(int i = 0; i < _messages.count; ++i)
+ for(size_t i = 0; i < _messages.count; ++i)
{
tprintf([_messages[i] UTF8String]);
}
@@ -264,14 +264,14 @@
@try
{
- [[proxy ice_getConnection] setCloseCallback:^(id<ICEConnection> connection)
+ [[proxy ice_getConnection] setCloseCallback:^(id<ICEConnection> __unused connection)
{
[self->_cond lock];
self->_closed = YES;
[self->_cond signal];
[self->_cond unlock];
}];
- [[proxy ice_getConnection] setHeartbeatCallback:^(id<ICEConnection> connection)
+ [[proxy ice_getConnection] setHeartbeatCallback:^(id<ICEConnection> __unused connection)
{
[self->_cond lock];
++self->_heartbeat;
@@ -292,7 +292,7 @@
return nil; // To keep compiler happy
}
--(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)proxy
+-(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)__unused adapter proxy:(id<TestACMTestIntfPrx>)__unused proxy
{
NSAssert(NO, @"Subclasses need to overwrite this method");
}
@@ -393,7 +393,7 @@
{
return @"invocation heartbeat";
}
--(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)proxy
+-(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)__unused adapter proxy:(id<TestACMTestIntfPrx>)proxy
{
[proxy sleep:4];
@@ -456,7 +456,7 @@
{
return @"invocation with no heartbeat";
}
--(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)proxy
+-(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)__unused adapter proxy:(id<TestACMTestIntfPrx>)proxy
{
@try
{
@@ -503,7 +503,7 @@
{
return @"invocation with no heartbeat and close on idle";
}
--(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)proxy
+-(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)__unused adapter proxy:(id<TestACMTestIntfPrx>)proxy
{
// No close on invocation, the call should succeed this time.
[proxy sleep:3];
@@ -538,7 +538,7 @@
{
return @"close on idle";
}
--(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)proxy
+-(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)__unused adapter proxy:(id<TestACMTestIntfPrx>)__unused proxy
{
[_cond lock];
[_cond waitUntilDate:[NSDate dateWithTimeIntervalSinceNow:3]]; // Idle for 3 seconds
@@ -575,7 +575,7 @@
{
return @"close on invocation";
}
--(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)proxy
+-(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)__unused adapter proxy:(id<TestACMTestIntfPrx>)__unused proxy
{
[_cond lock];
[_cond waitUntilDate:[NSDate dateWithTimeIntervalSinceNow:3]]; // Idle for 3 seconds
@@ -611,7 +611,7 @@
{
return @"close on idle and invocation";
}
--(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)proxy
+-(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)__unused proxy
{
//
// Put the adapter on hold. The server will not respond to
@@ -661,7 +661,7 @@
{
return @"forceful close on idle and invocation";
}
--(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)proxy
+-(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)__unused proxy
{
[adapter hold];
@@ -700,7 +700,7 @@
{
return @"heartbeat on idle";
}
--(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)proxy
+-(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)__unused adapter proxy:(id<TestACMTestIntfPrx>)__unused proxy
{
[_cond lock];
[_cond waitUntilDate:[NSDate dateWithTimeIntervalSinceNow:3]];
@@ -735,7 +735,7 @@
{
return @"heartbeat always";
}
--(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)proxy
+-(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)__unused adapter proxy:(id<TestACMTestIntfPrx>)proxy
{
for(int i = 0; i < 10; ++i)
{
@@ -779,7 +779,7 @@
{
return @"manual heartbeats";
}
--(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)proxy
+-(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)__unused adapter proxy:(id<TestACMTestIntfPrx>)__unused proxy
{
[proxy startHeartbeatCount];
id<ICEConnection> con = [proxy ice_getConnection];
@@ -809,7 +809,7 @@
{
return @"setACM/getACM";
}
--(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)adapter proxy:(id<TestACMTestIntfPrx>)proxy
+-(void) runTestCase:(id<TestACMRemoteObjectAdapterPrx>)__unused adapter proxy:(id<TestACMTestIntfPrx>)proxy
{
@try
{
@@ -869,19 +869,19 @@ acmAllTests(id<ICECommunicator> communicator)
[tests addObject:[HeartbeatManualTest testCase:com]];
[tests addObject:[SetACMTest testCase:com]];
- for(int i = 0; i < tests.count; ++i)
+ for(size_t i = 0; i < tests.count; ++i)
{
[tests[i] initialize];
}
- for(int i = 0; i < tests.count; ++i)
+ for(size_t i = 0; i < tests.count; ++i)
{
[tests[i] start];
}
- for(int i = 0; i < tests.count; ++i)
+ for(size_t i = 0; i < tests.count; ++i)
{
[tests[i] join];
}
- for(int i = 0; i < tests.count; ++i)
+ for(size_t i = 0; i < tests.count; ++i)
{
[tests[i] destroy];
}
diff --git a/objective-c/test/Ice/acm/TestI.m b/objective-c/test/Ice/acm/TestI.m
index ed67f466ae5..e40e858a9fe 100644
--- a/objective-c/test/Ice/acm/TestI.m
+++ b/objective-c/test/Ice/acm/TestI.m
@@ -28,7 +28,7 @@
[super dealloc];
}
#endif
--(void) heartbeat:(id<ICEConnection>)c
+-(void) heartbeat:(id<ICEConnection>)__unused connection
{
[_cond lock];
++_count;
@@ -115,19 +115,19 @@
}
#endif
--(id<TestACMTestIntfPrx>) getTestIntf:(ICECurrent*)current
+-(id<TestACMTestIntfPrx>) getTestIntf:(ICECurrent*)__unused current
{
return _testIntf;
}
--(void) activate:(ICECurrent*)current
+-(void) activate:(ICECurrent*)__unused current
{
[_adapter activate];
}
--(void) hold:(ICECurrent*)current
+-(void) hold:(ICECurrent*)__unused current
{
[_adapter hold];
}
--(void) deactivate:(ICECurrent*)current
+-(void) deactivate:(ICECurrent*)__unused current
{
@try
{
@@ -158,7 +158,7 @@
[super dealloc];
}
#endif
--(void) sleep:(ICEInt)delay current:(ICECurrent*)current
+-(void) sleep:(ICEInt)delay current:(ICECurrent*)__unused current
{
[_cond lock];
@try
@@ -183,13 +183,13 @@
[_cond unlock];
}
}
--(void) interruptSleep:(ICECurrent*)current
+-(void) interruptSleep:(ICECurrent*)__unused current
{
[_cond lock];
[_cond signal];
[_cond unlock];
}
--(void) startHeartbeatCount:(ICECurrent*)current
+-(void) startHeartbeatCount:(ICECurrent*) current
{
ACMConnectionCallbackI* callback = [ACMConnectionCallbackI new];
_callback = callback;
@@ -198,7 +198,7 @@
[callback heartbeat:c];
}];
}
--(void) waitForHeartbeatCount:(int)count current:(ICECurrent*)current
+-(void) waitForHeartbeatCount:(int)count current:(ICECurrent*)__unused current
{
[_callback waitForCount:count];
ICE_RELEASE(_callback);
diff --git a/objective-c/test/Ice/admin/AllTests.m b/objective-c/test/Ice/admin/AllTests.m
index 3aeef204f9b..390104ff018 100644
--- a/objective-c/test/Ice/admin/AllTests.m
+++ b/objective-c/test/Ice/admin/AllTests.m
@@ -127,7 +127,7 @@ testFacets(id<ICECommunicator> com, BOOL builtInFacets)
[super dealloc];
}
#endif
--(void) init:(NSString*)prefix logMessages:(ICEMutableLogMessageSeq*)logMessages current:(ICECurrent*)current
+-(void) init:(NSString*)prefix logMessages:(ICEMutableLogMessageSeq*)logMessages current:(ICECurrent*)__unused current
{
[_cond lock];
@try
@@ -142,7 +142,7 @@ testFacets(id<ICECommunicator> com, BOOL builtInFacets)
[_cond unlock];
}
}
--(void) log:(ICELogMessage*)logMessage current:(ICECurrent*)current
+-(void) log:(ICELogMessage*)logMessage current:(ICECurrent*)__unused current
{
[_cond lock];
@try
diff --git a/objective-c/test/Ice/admin/TestI.m b/objective-c/test/Ice/admin/TestI.m
index 488df62d712..13e5ae2b352 100644
--- a/objective-c/test/Ice/admin/TestI.m
+++ b/objective-c/test/Ice/admin/TestI.m
@@ -16,23 +16,23 @@
@end
@implementation NullLogger
--(void) print:(NSString*)message
+-(void) print:(NSString*)__unused message
{
}
--(void) trace:(NSString*)category message:(NSString*)message
+-(void) trace:(NSString*)__unused category message:(NSString*)__unused message
{
}
--(void) warning:(NSString*)message
+-(void) warning:(NSString*)__unused message
{
}
--(void) error:(NSString*)message
+-(void) error:(NSString*)__unused message
{
}
-(NSMutableString*) getPrefix
{
return ICE_AUTORELEASE([@"NullLogger" mutableCopy]);
}
--(id<ICELogger>) cloneWithPrefix:(NSString*)prefix
+-(id<ICELogger>) cloneWithPrefix:(NSString*)__unused prefix
{
return self;
}
@@ -57,12 +57,12 @@
[super dealloc];
}
#endif
--(id<ICEObjectPrx>) getAdmin:(ICECurrent*)current
+-(id<ICEObjectPrx>) getAdmin:(ICECurrent*)__unused current
{
return [_communicator getAdmin];
}
--(ICEPropertyDict*) getChanges:(ICECurrent*)current
+-(ICEPropertyDict*) getChanges:(ICECurrent*)__unused current
{
[_cond lock];
@try
@@ -86,27 +86,27 @@
[_cond unlock];
}
}
--(void) print:(NSString*)message current:(ICECurrent*)current
+-(void) print:(NSString*)message current:(ICECurrent*)__unused current
{
[[_communicator getLogger] print:message];
}
--(void) trace:(NSString*)category message:(NSString*)message current:(ICECurrent*)current
+-(void) trace:(NSString*)category message:(NSString*)message current:(ICECurrent*)__unused current
{
[[_communicator getLogger] trace:category message:message];
}
--(void) warning:(NSString*)message current:(ICECurrent*)current
+-(void) warning:(NSString*)message current:(ICECurrent*)__unused current
{
[[_communicator getLogger] warning:message];
}
--(void) error:(NSString*)message current:(ICECurrent*)current
+-(void) error:(NSString*)message current:(ICECurrent*)__unused current
{
[[_communicator getLogger] error:message];
}
--(void) shutdown:(ICECurrent*)current
+-(void) shutdown:(ICECurrent*)__unused current
{
[_communicator shutdown];
}
--(void) waitForShutdown:(ICECurrent*)current
+-(void) waitForShutdown:(ICECurrent*)__unused current
{
//
// Note that we are executing in a thread of the *main* communicator,
@@ -114,7 +114,7 @@
//
[_communicator waitForShutdown];
}
--(void) destroy:(ICECurrent*)current
+-(void) destroy:(ICECurrent*)__unused current
{
[_communicator destroy];
}
@@ -187,7 +187,7 @@
@end
@implementation TestAdminTestFacetI
--(void) op:(ICECurrent*)current
+-(void) op:(ICECurrent*)__unused current
{
}
@end
diff --git a/objective-c/test/Ice/ami/AllTests.m b/objective-c/test/Ice/ami/AllTests.m
index 473a0f43374..edf2d18fc61 100644
--- a/objective-c/test/Ice/ami/AllTests.m
+++ b/objective-c/test/Ice/ami/AllTests.m
@@ -150,7 +150,7 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
{
TestAMICallback* cb = [TestAMICallback create];
ICEContext* ctx = [NSDictionary dictionary];
- void (^exCB)(ICEException*) = ^(ICEException* ex)
+ void (^exCB)(ICEException*) = ^(ICEException* __unused ex)
{
test(NO);
};
@@ -324,7 +324,7 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
[cb called];
};
- void (^isACB)(BOOL) = ICE_AUTORELEASE([ ^(BOOL ret) { test(NO); } copy ]);
+ void (^isACB)(BOOL) = ICE_AUTORELEASE([ ^(BOOL __unused ret) { test(NO); } copy ]);
[i begin_ice_isA:@"dummy" response:isACB exception:exCB];
[cb check];
[i begin_ice_isA:@"dummy" context:ctx response:isACB exception:exCB];
@@ -336,13 +336,13 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
[i begin_ice_ping:ctx response:pingCB exception:exCB];
[cb check];
- void (^idCB)(NSString*) = ICE_AUTORELEASE([ ^(NSString* ret) { test(NO); } copy ]);
+ void (^idCB)(NSString*) = ICE_AUTORELEASE([ ^(NSString* __unused ret) { test(NO); } copy ]);
[i begin_ice_id:idCB exception:exCB];
[cb check];
[i begin_ice_id:ctx response:idCB exception:exCB];
[cb check];
- void (^idsCB)(NSArray*) = ICE_AUTORELEASE([ ^(NSArray* ret) { test(NO); } copy ]);
+ void (^idsCB)(NSArray*) = ICE_AUTORELEASE([ ^(NSArray* __unused ret) { test(NO); } copy ]);
[i begin_ice_ids:idsCB exception:exCB];
[cb check];
[i begin_ice_ids:ctx response:idsCB exception:exCB];
@@ -350,7 +350,7 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
if(!collocated)
{
- void (^conCB)(id<ICEConnection>) = ICE_AUTORELEASE([ ^(id<ICEConnection> ret) { test(NO); } copy ]);
+ void (^conCB)(id<ICEConnection>) = ICE_AUTORELEASE([ ^(id<ICEConnection> __unused ret) { test(NO); } copy ]);
[i begin_ice_getConnection:conCB exception:exCB];
[cb check];
}
@@ -363,7 +363,7 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
@try
{
- [p begin_opWithResult:nil exception:^(ICEException* ex) { test(NO); }];
+ [p begin_opWithResult:nil exception:^(ICEException* __unused ex) { test(NO); }];
test(NO);
}
@catch(NSException* ex)
@@ -377,11 +377,11 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
{
TestAMICallback* cb = [TestAMICallback create];
ICEContext* ctx = [NSDictionary dictionary];
- void (^exCB)(ICEException*) = ^(ICEException* ex) {
+ void (^exCB)(ICEException*) = ^(ICEException* __unused ex) {
test(NO);
};
- void (^sentCB)(BOOL) = ^(BOOL ss) { [cb called]; };
+ void (^sentCB)(BOOL) = ^(BOOL __unused ss) { [cb called]; };
[p begin_ice_isA:@"test" response:nil exception:exCB sent:sentCB];
[cb check];
@@ -417,19 +417,19 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
{
@try
{
- TestAMICallback* cb = [TestAMICallback create];
+ TestAMICallback* cb2 = [TestAMICallback create];
while(true)
{
if(![[p begin_opWithPayload:seq response:nil exception:exCB sent:
- ^(BOOL ss) {
- [cb called];
+ ^(BOOL __unused ss) {
+ [cb2 called];
}] sentSynchronously])
{
- [cbs addObject:cb];
+ [cbs addObject:cb2];
break;
}
- [cbs addObject:cb];
- cb = [TestAMICallback create];
+ [cbs addObject:cb2];
+ cb2 = [TestAMICallback create];
}
}
@catch(NSException* ex)
@@ -438,9 +438,9 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
@throw ex;
}
[testController resumeAdapter];
- for(TestAMICallback* cb in cbs)
+ for(TestAMICallback* cb2 in cbs)
{
- [cb check];
+ [cb2 check];
}
}
}
@@ -509,7 +509,7 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
}
};
- void (^exCB)(ICEException*) = ^(ICEException* ex)
+ void (^exCB)(ICEException*) = ^(ICEException* __unused ex)
{
test(NO);
};
@@ -518,8 +518,8 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
for(i = 0; i < 3; ++i)
{
void (^throwResponse)(void) = ^{ thrower(i); };
- void (^throwEx)(ICEException*) = ^(ICEException* ex){ thrower(i); };
- void (^throwSent)(BOOL) = ^(BOOL b){ thrower(i); };
+ void (^throwEx)(ICEException*) = ^(ICEException* __unused ex){ thrower(i); };
+ void (^throwSent)(BOOL) = ^(BOOL __unused b){ thrower(i); };
[p begin_ice_ping:throwResponse exception:exCB];
[cb check];
@@ -552,8 +552,8 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
test(![br isSent]);
[b1 opBatch];
TestAMICallback* cb = [TestAMICallback create];
- id<ICEAsyncResult> r = [b1 begin_ice_flushBatchRequests:^(ICEException* ex) { test(NO); }
- sent:^(BOOL sentSynchronously) { [cb called]; }];
+ id<ICEAsyncResult> r = [b1 begin_ice_flushBatchRequests:^(ICEException* __unused ex) { test(NO); }
+ sent:^(BOOL __unused sentSynchronously) { [cb called]; }];
[cb check];
test([r isSent]);
test([r isCompleted]);
@@ -588,11 +588,11 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
[b1 opBatch];
TestAMICallback* cb = [TestAMICallback create];
id<ICEAsyncResult> r = [[b1 ice_getConnection] begin_flushBatchRequests:ICECompressBatchBasedOnProxy
- exception:^(ICEException* ex)
+ exception:^(ICEException* __unused ex)
{
test(NO);
}
- sent:^(BOOL sentSynchronously) { [cb called]; }];
+ sent:^(BOOL __unused sentSynchronously) { [cb called]; }];
[cb check];
test([r isSent]);
test([r isCompleted]);
@@ -609,8 +609,8 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
[[b1 ice_getConnection] close:ICEConnectionCloseGracefullyWithWait];
TestAMICallback* cb = [TestAMICallback create];
id<ICEAsyncResult> r = [[b1 ice_getConnection] begin_flushBatchRequests:ICECompressBatchBasedOnProxy
- exception:^(ICEException* ex) { [cb called]; }
- sent:^(BOOL sentSynchronously) { test(NO); }];
+ exception:^(ICEException* __unused ex) { [cb called]; }
+ sent:^(BOOL __unused sentSynchronously) { test(NO); }];
[cb check];
test(![r isSent]);
test([r isCompleted]);
@@ -630,8 +630,8 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
[b1 opBatch];
TestAMICallback* cb = [TestAMICallback create];
id<ICEAsyncResult> r = [communicator begin_flushBatchRequests:ICECompressBatchBasedOnProxy
- exception:^(ICEException* ex) { test(NO); }
- sent:^(BOOL sentSynchronously) { [cb called]; }];
+ exception:^(ICEException* __unused ex) { test(NO); }
+ sent:^(BOOL __unused sentSynchronously) { [cb called]; }];
[cb check];
test([r isSent]);
test([r isCompleted]);
@@ -648,8 +648,8 @@ amiAllTests(id<ICECommunicator> communicator, BOOL collocated)
[[b1 ice_getConnection] close:ICEConnectionCloseGracefullyWithWait];
TestAMICallback* cb = [TestAMICallback create];
id<ICEAsyncResult> r = [communicator begin_flushBatchRequests:ICECompressBatchBasedOnProxy
- exception:^(ICEException* ex) { test(NO); }
- sent:^(BOOL sentSynchronously) { [cb called]; }];
+ exception:^(ICEException* __unused ex) { test(NO); }
+ sent:^(BOOL __unused sentSynchronously) { [cb called]; }];
[cb check];
test([r isSent]);
test([r isCompleted]);
diff --git a/objective-c/test/Ice/ami/TestI.m b/objective-c/test/Ice/ami/TestI.m
index c7a349e336a..c4ccd9fac70 100644
--- a/objective-c/test/Ice/ami/TestI.m
+++ b/objective-c/test/Ice/ami/TestI.m
@@ -32,17 +32,17 @@
}
#endif
--(void) op:(ICECurrent*)current
+-(void) op:(ICECurrent*)__unused current
{
}
--(void) opWithPayload:(ICEMutableByteSeq*)data current:(ICECurrent*)current
+-(void) opWithPayload:(ICEMutableByteSeq*)__unused data current:(ICECurrent*)__unused current
{
}
--(int) opWithResult:(ICECurrent*)current
+-(int) opWithResult:(ICECurrent*)__unused current
{
return 15;
}
--(void) opWithUE:(ICECurrent*)current
+-(void) opWithUE:(ICECurrent*)__unused current
{
@throw [TestAMITestIntfException testIntfException];
}
@@ -51,14 +51,14 @@
{
[[current.adapter getCommunicator] shutdown];
}
--(void) opBatch:(ICECurrent *)current
+-(void) opBatch:(ICECurrent *)__unused current
{
[_cond lock];
++_batchCount;
[_cond signal];
[_cond unlock];
}
--(ICEInt) opBatchCount:(ICECurrent *)current
+-(ICEInt) opBatchCount:(ICECurrent *)__unused current
{
[_cond lock];
@try
@@ -71,7 +71,7 @@
}
return 0;
}
--(BOOL) waitForBatch:(ICEInt)count current:(ICECurrent *)current
+-(BOOL) waitForBatch:(ICEInt)count current:(ICECurrent *)__unused current
{
[_cond lock];
@try
@@ -94,7 +94,7 @@
{
[current.con close:(ICEConnectionClose)mode];
}
--(void) sleep:(ICEInt)delay current:(ICECurrent *)current
+-(void) sleep:(ICEInt)delay current:(ICECurrent *)__unused current
{
[_cond lock];
@try
@@ -106,7 +106,7 @@
[_cond unlock];
}
}
--(void) startDispatch:(ICECurrent*)current
+-(void) startDispatch:(ICECurrent*)__unused current
{
[_cond lock];
_dispatching = YES;
@@ -122,18 +122,18 @@
[_cond unlock];
}
}
--(void) finishDispatch:(ICECurrent*)current
+-(void) finishDispatch:(ICECurrent*)__unused current
{
[_cond lock];
_dispatching = NO;
[_cond signal];
[_cond unlock];
}
--(BOOL) supportsAMD:(ICECurrent *)current
+-(BOOL) supportsAMD:(ICECurrent *)__unused current
{
return NO;
}
--(BOOL) supportsFunctionalTests:(ICECurrent *)current
+-(BOOL) supportsFunctionalTests:(ICECurrent *)__unused current
{
return NO;
}
@@ -145,7 +145,7 @@
@end
@implementation TestAMITestOuterInnerTestIntfI
--(int) op:(ICEInt)i j:(ICEInt*)j current:(ICECurrent*)current
+-(int) op:(ICEInt)i j:(ICEInt*)j current:(ICECurrent*)__unused current
{
*j = i;
return i;
@@ -163,11 +163,11 @@
_adapter = adapter;
return self;
}
--(void) holdAdapter:(ICECurrent*)current
+-(void) holdAdapter:(ICECurrent*)__unused current
{
[_adapter hold];
}
--(void) resumeAdapter:(ICECurrent*)current
+-(void) resumeAdapter:(ICECurrent*)__unused current
{
[_adapter activate];
}
diff --git a/objective-c/test/Ice/binding/AllTests.m b/objective-c/test/Ice/binding/AllTests.m
index 76a676fc2ab..c53cfe5adab 100644
--- a/objective-c/test/Ice/binding/AllTests.m
+++ b/objective-c/test/Ice/binding/AllTests.m
@@ -98,7 +98,7 @@ getEndpoints(id<TestBindingTestIntfPrx> proxy)
int length = 0;
NSString* s = [proxy ice_toString];
int index;
- for(index = 0; index < [s length]; ++index)
+ for(index = 0; index < (int)[s length]; ++index)
{
unichar c = [s characterAtIndex:index];
if(c == '"')
diff --git a/objective-c/test/Ice/binding/TestI.m b/objective-c/test/Ice/binding/TestI.m
index 4c5eb7b3bc5..3f4f7b93490 100644
--- a/objective-c/test/Ice/binding/TestI.m
+++ b/objective-c/test/Ice/binding/TestI.m
@@ -32,7 +32,7 @@
return [TestBindingRemoteObjectAdapterPrx uncheckedCast:[current.adapter addWithUUID:remote]];
}
--(void) deactivateObjectAdapter:(id<TestBindingRemoteObjectAdapterPrx>)adapter current:(ICECurrent*)current
+-(void) deactivateObjectAdapter:(id<TestBindingRemoteObjectAdapterPrx>)adapter current:(ICECurrent*)__unused current
{
[adapter deactivate]; // Collocated call
}
@@ -68,12 +68,12 @@
}
#endif
--(id<TestBindingTestIntfPrx>) getTestIntf:(ICECurrent*)current
+-(id<TestBindingTestIntfPrx>) getTestIntf:(ICECurrent*)__unused current
{
return testIntf_;
}
--(void) deactivate:(ICECurrent*)current
+-(void) deactivate:(ICECurrent*)__unused current
{
@try
{
diff --git a/objective-c/test/Ice/defaultServant/Client.m b/objective-c/test/Ice/defaultServant/Client.m
index 007641b1012..814386864eb 100644
--- a/objective-c/test/Ice/defaultServant/Client.m
+++ b/objective-c/test/Ice/defaultServant/Client.m
@@ -96,7 +96,7 @@ run(id<ICECommunicator> communicator)
for(NSString* name in stringArray)
{
[identity setName:name];
- id<TestDefaultServantMyObjectPrx> prx = [TestDefaultServantMyObjectPrx uncheckedCast:[oa createProxy:identity]];
+ prx = [TestDefaultServantMyObjectPrx uncheckedCast:[oa createProxy:identity]];
@try
{
@@ -130,7 +130,7 @@ run(id<ICECommunicator> communicator)
for(NSString* name in stringArray)
{
[identity setName:name];
- id<TestDefaultServantMyObjectPrx> prx = [TestDefaultServantMyObjectPrx uncheckedCast:[oa createProxy:identity]];
+ prx = [TestDefaultServantMyObjectPrx uncheckedCast:[oa createProxy:identity]];
[prx ice_ping];
test([[prx getName] isEqualToString:name]);
}
diff --git a/objective-c/test/Ice/defaultValue/Client.m b/objective-c/test/Ice/defaultValue/Client.m
index c289a2f12bb..c8277ec7f9b 100644
--- a/objective-c/test/Ice/defaultValue/Client.m
+++ b/objective-c/test/Ice/defaultValue/Client.m
@@ -24,7 +24,7 @@ run()
#endif
int
-main(int argc, char* argv[])
+main(int __unused argc, char* __unused argv[])
{
#ifdef ICE_STATIC_LIBS
ICEregisterIceSSL(YES);
diff --git a/objective-c/test/Ice/dispatcher/Client.m b/objective-c/test/Ice/dispatcher/Client.m
index f445c17ae7f..030e256636f 100644
--- a/objective-c/test/Ice/dispatcher/Client.m
+++ b/objective-c/test/Ice/dispatcher/Client.m
@@ -46,7 +46,7 @@ main(int argc, char* argv[])
ICEInitializationData* initData = [ICEInitializationData initializationData];
initData.properties = defaultClientProperties(&argc, argv);
dispatch_queue_t queue = dispatch_queue_create("Dispatcher", DISPATCH_QUEUE_SERIAL);
- initData.dispatcher = ^(id<ICEDispatcherCall> call, id<ICEConnection> con) {
+ initData.dispatcher = ^(id<ICEDispatcherCall> call, id<ICEConnection> __unused con) {
dispatch_sync(queue, ^ { [call run]; });
};
#if TARGET_OS_IPHONE
diff --git a/objective-c/test/Ice/dispatcher/Collocated.m b/objective-c/test/Ice/dispatcher/Collocated.m
index 2dd720eedc2..bfbe0ea3c9b 100644
--- a/objective-c/test/Ice/dispatcher/Collocated.m
+++ b/objective-c/test/Ice/dispatcher/Collocated.m
@@ -63,7 +63,7 @@ main(int argc, char* argv[])
ICEInitializationData* initData = [ICEInitializationData initializationData];
initData.properties = defaultServerProperties(&argc, argv);
dispatch_queue_t queue = dispatch_queue_create("Dispatcher", DISPATCH_QUEUE_SERIAL);
- initData.dispatcher = ^(id<ICEDispatcherCall> call, id<ICEConnection> con) {
+ initData.dispatcher = ^(id<ICEDispatcherCall> call, id<ICEConnection> __unused con) {
dispatch_sync(queue, ^ { [call run]; });
};
#if TARGET_OS_IPHONE
diff --git a/objective-c/test/Ice/dispatcher/Server.m b/objective-c/test/Ice/dispatcher/Server.m
index fbfece6d5fd..41a510864e5 100644
--- a/objective-c/test/Ice/dispatcher/Server.m
+++ b/objective-c/test/Ice/dispatcher/Server.m
@@ -64,7 +64,7 @@ main(int argc, char* argv[])
ICEInitializationData* initData = [ICEInitializationData initializationData];
initData.properties = defaultServerProperties(&argc, argv);
dispatch_queue_t queue = dispatch_queue_create("Dispatcher", DISPATCH_QUEUE_SERIAL);
- initData.dispatcher = ^(id<ICEDispatcherCall> call, id<ICEConnection> con) {
+ initData.dispatcher = ^(id<ICEDispatcherCall> call, id<ICEConnection> __unused con) {
dispatch_sync(queue, ^ { [call run]; });
};
#if TARGET_OS_IPHONE
diff --git a/objective-c/test/Ice/dispatcher/TestI.m b/objective-c/test/Ice/dispatcher/TestI.m
index 35e17730b54..6aef83e74a7 100644
--- a/objective-c/test/Ice/dispatcher/TestI.m
+++ b/objective-c/test/Ice/dispatcher/TestI.m
@@ -13,14 +13,14 @@
#import <Foundation/NSThread.h>
@implementation TestDispatcherTestIntfI
--(void) op:(ICECurrent*)current
+-(void) op:(ICECurrent*)__unused current
{
}
--(void) sleep:(ICEInt)to current:(ICECurrent*)current
+-(void) sleep:(ICEInt)to current:(ICECurrent*)__unused current
{
[NSThread sleepForTimeInterval:to / 1000.0];
}
--(void) opWithPayload:(ICEMutableByteSeq*)data current:(ICECurrent*)current
+-(void) opWithPayload:(ICEMutableByteSeq*)__unused data current:(ICECurrent*)__unused current
{
}
-(void) shutdown:(ICECurrent*)current
@@ -40,11 +40,11 @@
_adapter = adapter;
return self;
}
--(void) holdAdapter:(ICECurrent*)current
+-(void) holdAdapter:(ICECurrent*)__unused current
{
[_adapter hold];
}
--(void) resumeAdapter:(ICECurrent*)current
+-(void) resumeAdapter:(ICECurrent*)__unused current
{
[_adapter activate];
}
diff --git a/objective-c/test/Ice/enums/TestI.m b/objective-c/test/Ice/enums/TestI.m
index e014082d9fa..dae3ebb1bba 100644
--- a/objective-c/test/Ice/enums/TestI.m
+++ b/objective-c/test/Ice/enums/TestI.m
@@ -18,49 +18,49 @@
[[[current adapter] getCommunicator] shutdown];
}
--(TestEnumByteEnum) opByte:(TestEnumByteEnum)b1 b2:(TestEnumByteEnum*)b2 current:(ICECurrent*)current
+-(TestEnumByteEnum) opByte:(TestEnumByteEnum)b1 b2:(TestEnumByteEnum*)b2 current:(ICECurrent*)__unused current
{
*b2 = b1;
return b1;
}
--(TestEnumShortEnum) opShort:(TestEnumShortEnum)s1 s2:(TestEnumShortEnum*)s2 current:(ICECurrent*)current
+-(TestEnumShortEnum) opShort:(TestEnumShortEnum)s1 s2:(TestEnumShortEnum*)s2 current:(ICECurrent*)__unused current
{
*s2 = s1;
return s1;
}
--(TestEnumIntEnum) opInt:(TestEnumIntEnum)i1 i2:(TestEnumIntEnum*)i2 current:(ICECurrent*)current
+-(TestEnumIntEnum) opInt:(TestEnumIntEnum)i1 i2:(TestEnumIntEnum*)i2 current:(ICECurrent*)__unused current
{
*i2 = i1;
return i1;
}
--(TestEnumSimpleEnum) opSimple:(TestEnumSimpleEnum)s1 s2:(TestEnumSimpleEnum*)s2 current:(ICECurrent*)current
+-(TestEnumSimpleEnum) opSimple:(TestEnumSimpleEnum)s1 s2:(TestEnumSimpleEnum*)s2 current:(ICECurrent*)__unused current
{
*s2 = s1;
return s1;
}
--(TestEnumByteEnumSeq*) opByteSeq:(TestEnumByteEnumSeq*)b1 b2:(TestEnumByteEnumSeq**)b2 current:(ICECurrent*)current
+-(TestEnumByteEnumSeq*) opByteSeq:(TestEnumByteEnumSeq*)b1 b2:(TestEnumByteEnumSeq**)b2 current:(ICECurrent*)__unused current
{
*b2 = b1;
return b1;
}
--(TestEnumShortEnumSeq*) opShortSeq:(TestEnumShortEnumSeq*)s1 s2:(TestEnumShortEnumSeq**)s2 current:(ICECurrent*)current
+-(TestEnumShortEnumSeq*) opShortSeq:(TestEnumShortEnumSeq*)s1 s2:(TestEnumShortEnumSeq**)s2 current:(ICECurrent*)__unused current
{
*s2 = s1;
return s1;
}
--(TestEnumIntEnumSeq*) opIntSeq:(TestEnumIntEnumSeq*)i1 i2:(TestEnumIntEnumSeq**)i2 current:(ICECurrent*)current
+-(TestEnumIntEnumSeq*) opIntSeq:(TestEnumIntEnumSeq*)i1 i2:(TestEnumIntEnumSeq**)i2 current:(ICECurrent*)__unused current
{
*i2 = i1;
return i1;
}
--(TestEnumSimpleEnumSeq*) opSimpleSeq:(TestEnumSimpleEnumSeq*)s1 s2:(TestEnumSimpleEnumSeq**)s2 current:(ICECurrent*)current
+-(TestEnumSimpleEnumSeq*) opSimpleSeq:(TestEnumSimpleEnumSeq*)s1 s2:(TestEnumSimpleEnumSeq**)s2 current:(ICECurrent*)__unused current
{
*s2 = s1;
return s1;
diff --git a/objective-c/test/Ice/exceptions/TestI.m b/objective-c/test/Ice/exceptions/TestI.m
index 4d0750f6217..17340611e2a 100644
--- a/objective-c/test/Ice/exceptions/TestI.m
+++ b/objective-c/test/Ice/exceptions/TestI.m
@@ -35,22 +35,22 @@
[[current.adapter getCommunicator] shutdown];
}
--(BOOL) supportsUndeclaredExceptions:(ICECurrent*)current
+-(BOOL) supportsUndeclaredExceptions:(ICECurrent*)__unused current
{
return YES;
}
--(BOOL) supportsAssertException:(ICECurrent*)current
+-(BOOL) supportsAssertException:(ICECurrent*)__unused current
{
return NO;
}
--(void) throwAasA:(ICEInt)a current:(ICECurrent*)current
+-(void) throwAasA:(ICEInt)a current:(ICECurrent*)__unused current
{
@throw [TestExceptionsA a:a];
}
--(void) throwAorDasAorD:(ICEInt)a current:(ICECurrent*)current
+-(void) throwAorDasAorD:(ICEInt)a current:(ICECurrent*)__unused current
{
if(a > 0)
{
@@ -62,57 +62,57 @@
}
}
--(void) throwBasA:(ICEInt)a b:(ICEInt)b current:(ICECurrent*)current
+-(void) throwBasA:(ICEInt)a b:(ICEInt)b current:(ICECurrent*)__unused current
{
[self throwBasB:a b:b current:current];
}
--(void) throwCasA:(ICEInt)a b:(ICEInt)b c:(ICEInt) c current:(ICECurrent*)current
+-(void) throwCasA:(ICEInt)a b:(ICEInt)b c:(ICEInt) c current:(ICECurrent*)__unused current
{
[self throwCasC:a b:b c:c current:current];
}
--(void) throwBasB:(ICEInt)a b:(ICEInt)b current:(ICECurrent*)current
+-(void) throwBasB:(ICEInt)a b:(ICEInt)b current:(ICECurrent*)__unused current
{
@throw [TestExceptionsB b:a bMem:b];
}
--(void) throwCasB:(ICEInt)a b:(ICEInt)b c:(ICEInt)c current:(ICECurrent*)current
+-(void) throwCasB:(ICEInt)a b:(ICEInt)b c:(ICEInt)c current:(ICECurrent*)__unused current
{
[self throwCasC:a b:b c:c current:current];
}
--(void) throwCasC:(ICEInt)a b:(ICEInt)b c:(ICEInt)c current:(ICECurrent*)current
+-(void) throwCasC:(ICEInt)a b:(ICEInt)b c:(ICEInt)c current:(ICECurrent*)__unused current
{
@throw [TestExceptionsC c:a bMem:b cMem:c];
}
--(void) throwModA:(ICEInt)a a2:(ICEInt)a2 current:(ICECurrent*)current
+-(void) throwModA:(ICEInt)a a2:(ICEInt)a2 current:(ICECurrent*)__unused current
{
@throw [TestExceptionsModA a:a a2Mem:a2];
}
--(void) throwUndeclaredA:(ICEInt)a current:(ICECurrent*)current
+-(void) throwUndeclaredA:(ICEInt)a current:(ICECurrent*)__unused current
{
@throw [TestExceptionsA a:a];
}
--(void) throwUndeclaredB:(ICEInt)a b:(ICEInt)b current:(ICECurrent*)current
+-(void) throwUndeclaredB:(ICEInt)a b:(ICEInt)b current:(ICECurrent*)__unused current
{
@throw [TestExceptionsB b:a bMem:b];
}
--(void) throwUndeclaredC:(ICEInt)a b:(ICEInt)b c:(ICEInt)c current:(ICECurrent*)current
+-(void) throwUndeclaredC:(ICEInt)a b:(ICEInt)b c:(ICEInt)c current:(ICECurrent*)__unused current
{
@throw [TestExceptionsC c:a bMem:b cMem:c];
}
--(void) throwLocalException:(ICECurrent*)current
+-(void) throwLocalException:(ICECurrent*)__unused current
{
@throw [ICETimeoutException timeoutException:__FILE__ line:__LINE__];
}
--(ICEByteSeq*) throwMemoryLimitException:(ICEMutableByteSeq*)bs current:(ICECurrent*)current
+-(ICEByteSeq*) throwMemoryLimitException:(ICEMutableByteSeq*)__unused bs current:(ICECurrent*)__unused current
{
int limit = 20 * 1024;
ICEMutableByteSeq *r = [NSMutableData dataWithLength:limit];
@@ -124,25 +124,25 @@
return r;
}
--(void) throwNonIceException:(ICECurrent*)current
+-(void) throwNonIceException:(ICECurrent*)__unused current
{
@throw ICE_AUTORELEASE([[FooException alloc] init]);
}
--(void) throwAssertException:(ICECurrent*)current
+-(void) throwAssertException:(ICECurrent*)__unused current
{
// Not supported.
}
--(void) throwLocalExceptionIdempotent:(ICECurrent*)current
+-(void) throwLocalExceptionIdempotent:(ICECurrent*)__unused current
{
@throw [ICETimeoutException timeoutException:__FILE__ line:__LINE__];
}
--(void) throwAfterResponse:(ICECurrent*)current
+-(void) throwAfterResponse:(ICECurrent*)__unused current
{
// Only relevant for AMD
}
--(void) throwAfterException:(ICECurrent*)current
+-(void) throwAfterException:(ICECurrent*)__unused current
{
// Only relevant for AMD
@throw [TestExceptionsA a:12345];
diff --git a/objective-c/test/Ice/facets/TestI.m b/objective-c/test/Ice/facets/TestI.m
index 80f9208bf4a..9672f7ce383 100644
--- a/objective-c/test/Ice/facets/TestI.m
+++ b/objective-c/test/Ice/facets/TestI.m
@@ -11,66 +11,66 @@
#import <facets/TestI.h>
@implementation TestFacetsAI
--(NSString*) callA:(ICECurrent*)current
+-(NSString*) callA:(ICECurrent*)__unused current
{
return @"A";
}
@end
@implementation TestFacetsBI
--(NSString*) callA:(ICECurrent*)current
+-(NSString*) callA:(ICECurrent*)__unused current
{
return @"A";
}
--(NSString*) callB:(ICECurrent*)current
+-(NSString*) callB:(ICECurrent*)__unused current
{
return @"B";
}
@end
@implementation TestFacetsCI
--(NSString*) callA:(ICECurrent*)current
+-(NSString*) callA:(ICECurrent*)__unused current
{
return @"A";
}
--(NSString*) callC:(ICECurrent*)current
+-(NSString*) callC:(ICECurrent*)__unused current
{
return @"C";
}
@end
@implementation TestFacetsDI
--(NSString*) callA:(ICECurrent*)current
+-(NSString*) callA:(ICECurrent*)__unused current
{
return @"A";
}
--(NSString*) callB:(ICECurrent*)current
+-(NSString*) callB:(ICECurrent*)__unused current
{
return @"B";
}
--(NSString*) callC:(ICECurrent*)current
+-(NSString*) callC:(ICECurrent*)__unused current
{
return @"C";
}
--(NSString*) callD:(ICECurrent*)current
+-(NSString*) callD:(ICECurrent*)__unused current
{
return @"D";
}
@end
@implementation TestFacetsEI
--(NSString*) callE:(ICECurrent*)current
+-(NSString*) callE:(ICECurrent*)__unused current
{
return @"E";
}
@end
@implementation TestFacetsFI
--(NSString*) callE:(ICECurrent*)current
+-(NSString*) callE:(ICECurrent*)__unused current
{
return @"E";
}
--(NSString*) callF:(ICECurrent*)current
+-(NSString*) callF:(ICECurrent*)__unused current
{
return @"F";
}
@@ -81,7 +81,7 @@
{
[[current.adapter getCommunicator] shutdown];
}
--(NSString*) callG:(ICECurrent*)current
+-(NSString*) callG:(ICECurrent*)__unused current
{
return @"G";
}
@@ -92,11 +92,11 @@
{
[[current.adapter getCommunicator] shutdown];
}
--(NSString*) callG:(ICECurrent*)current
+-(NSString*) callG:(ICECurrent*)__unused current
{
return @"G";
}
--(NSString*) callH:(ICECurrent*)current
+-(NSString*) callH:(ICECurrent*)__unused current
{
return @"H";
}
diff --git a/objective-c/test/Ice/faultTolerance/AllTests.m b/objective-c/test/Ice/faultTolerance/AllTests.m
index 607c10a2622..b58dbba097c 100644
--- a/objective-c/test/Ice/faultTolerance/AllTests.m
+++ b/objective-c/test/Ice/faultTolerance/AllTests.m
@@ -66,7 +66,7 @@
[self called];
}
--(void) pidException:(ICEException*)ex
+-(void) pidException:(ICEException*)__unused ex
{
test(NO);
}
@@ -79,7 +79,7 @@
[self called];
}
--(void) shutdownException:(ICEException*)ex
+-(void) shutdownException:(ICEException*)__unused ex
{
test(NO);
}
diff --git a/objective-c/test/Ice/faultTolerance/TestI.m b/objective-c/test/Ice/faultTolerance/TestI.m
index e1a77204258..afbbb17bfbf 100644
--- a/objective-c/test/Ice/faultTolerance/TestI.m
+++ b/objective-c/test/Ice/faultTolerance/TestI.m
@@ -18,17 +18,17 @@
[[current.adapter getCommunicator] shutdown];
}
--(void) abort:(ICECurrent*)current
+-(void) abort:(ICECurrent*)__unused current
{
exit(0);
}
--(void) idempotentAbort:(ICECurrent*)current
+-(void) idempotentAbort:(ICECurrent*)__unused current
{
exit(0);
}
--(ICEInt) pid:(ICECurrent*)current
+-(ICEInt) pid:(ICECurrent*)__unused current
{
return getpid();
}
diff --git a/objective-c/test/Ice/hash/Client.m b/objective-c/test/Ice/hash/Client.m
index 70d47da355a..9dbfbd37fa9 100644
--- a/objective-c/test/Ice/hash/Client.m
+++ b/objective-c/test/Ice/hash/Client.m
@@ -24,7 +24,7 @@ run()
#endif
int
-main(int argc, char* argv[])
+main(int __unused argc, char* __unused argv[])
{
#ifdef ICE_STATIC_LIBS
ICEregisterIceSSL(YES);
diff --git a/objective-c/test/Ice/hold/AllTests.m b/objective-c/test/Ice/hold/AllTests.m
index 73edff9d383..87920ec5b53 100644
--- a/objective-c/test/Ice/hold/AllTests.m
+++ b/objective-c/test/Ice/hold/AllTests.m
@@ -123,20 +123,19 @@ allTests(id<ICECommunicator> communicator)
tprintf("ok\n");
tprintf("changing state between active and hold rapidly... ");
- int i;
- for(i = 0; i < 100; ++i)
+ for(int i = 0; i < 100; ++i)
{
[hold putOnHold:0];
}
- for(i = 0; i < 100; ++i)
+ for(int i = 0; i < 100; ++i)
{
[[hold ice_oneway] putOnHold:0];
}
- for(i = 0; i < 100; ++i)
+ for(int i = 0; i < 100; ++i)
{
[holdSerialized putOnHold:0];
}
- for(i = 0; i < 100; ++i)
+ for(int i = 0; i < 100; ++i)
{
[[holdSerialized ice_oneway] putOnHold:0];
}
@@ -151,7 +150,7 @@ allTests(id<ICECommunicator> communicator)
{
cb = ICE_AUTORELEASE([[AMICheckSetValue alloc] init:cond expected:value]);
if([hold begin_set:++value delay:(random() % 5 + 1) response:^(ICEInt r) { [cb ice_response:r]; }
- exception:^(ICEException* ex) { [cb ice_exception:ex]; } sent:^(BOOL ss) { [cb ice_sent]; }])
+ exception:^(ICEException* ex) { [cb ice_exception:ex]; } sent:^(BOOL __unused ss) { [cb ice_sent]; }])
{
cb = 0;
}
@@ -185,7 +184,7 @@ allTests(id<ICECommunicator> communicator)
{
cb = ICE_AUTORELEASE([[AMICheckSetValue alloc] init:cond expected:value]);
if([holdSerialized begin_set:++value delay:0 response:^(ICEInt r) { [cb ice_response:r]; }
- exception:^(ICEException* ex) { [cb ice_exception:ex]; } sent:^(BOOL ss) { [cb ice_sent]; }])
+ exception:^(ICEException* ex) { [cb ice_exception:ex]; } sent:^(BOOL __unused ss) { [cb ice_sent]; }])
{
cb = 0;
}
@@ -204,11 +203,10 @@ allTests(id<ICECommunicator> communicator)
cb = 0;
}
test([cond value]);
- int i;
#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
- for(i = 0; i < 400; ++i)
+ for(int i = 0; i < 400; ++i)
#else
- for(i = 0; i < 20000; ++i)
+ for(int i = 0; i < 20000; ++i)
#endif
{
[[holdSerialized ice_oneway] setOneway:(value + 1) expected:value];
@@ -225,7 +223,7 @@ allTests(id<ICECommunicator> communicator)
{
[hold waitForHold];
[hold waitForHold];
- for(i = 0; i < 1000; ++i)
+ for(int i = 0; i < 1000; ++i)
{
[[hold ice_oneway] ice_ping];
if((i % 20) == 0)
diff --git a/objective-c/test/Ice/hold/TestI.m b/objective-c/test/Ice/hold/TestI.m
index 60ec1753c90..74503b154f3 100644
--- a/objective-c/test/Ice/hold/TestI.m
+++ b/objective-c/test/Ice/hold/TestI.m
@@ -111,7 +111,7 @@
} timeout:0];
}
--(ICEInt) set:(ICEInt)value delay:(ICEInt)delay current:(ICECurrent*)current
+-(ICEInt) set:(ICEInt)value delay:(ICEInt)delay current:(ICECurrent*)__unused current
{
[NSThread sleepForTimeInterval:delay / 1000.0];
@synchronized(self)
@@ -123,7 +123,7 @@
return 0;
}
--(void) setOneway:(ICEInt)value expected:(ICEInt)expected current:(ICECurrent*)current
+-(void) setOneway:(ICEInt)value expected:(ICEInt)expected current:(ICECurrent*)__unused current
{
@synchronized(self)
{
diff --git a/objective-c/test/Ice/inheritance/TestI.m b/objective-c/test/Ice/inheritance/TestI.m
index 351baa4d415..79566fd4320 100644
--- a/objective-c/test/Ice/inheritance/TestI.m
+++ b/objective-c/test/Ice/inheritance/TestI.m
@@ -11,112 +11,112 @@
#import <inheritance/TestI.h>
@implementation CAI
--(id<TestInheritanceMACAPrx>) caop:(id<TestInheritanceMACAPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMACAPrx>) caop:(id<TestInheritanceMACAPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
@end
@implementation CBI
--(id<TestInheritanceMACAPrx>) caop:(id<TestInheritanceMACAPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMACAPrx>) caop:(id<TestInheritanceMACAPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMBCBPrx>) cbop:(id<TestInheritanceMBCBPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMBCBPrx>) cbop:(id<TestInheritanceMBCBPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
@end
@implementation CCI
--(id<TestInheritanceMACAPrx>) caop:(id<TestInheritanceMACAPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMACAPrx>) caop:(id<TestInheritanceMACAPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMBCBPrx>) cbop:(id<TestInheritanceMBCBPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMBCBPrx>) cbop:(id<TestInheritanceMBCBPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMACCPrx>) ccop:(id<TestInheritanceMACCPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMACCPrx>) ccop:(id<TestInheritanceMACCPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
@end
@implementation IAI
--(id<TestInheritanceMAIAPrx>) iaop:(id<TestInheritanceMAIAPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMAIAPrx>) iaop:(id<TestInheritanceMAIAPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
@end
@implementation IB1I
--(id<TestInheritanceMAIAPrx>) iaop:(id<TestInheritanceMAIAPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMAIAPrx>) iaop:(id<TestInheritanceMAIAPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMBIB1Prx>) ib1op:(id<TestInheritanceMBIB1Prx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMBIB1Prx>) ib1op:(id<TestInheritanceMBIB1Prx>)p current:(ICECurrent*)__unused current
{
return p;
}
@end
@implementation IB2I
--(id<TestInheritanceMAIAPrx>) iaop:(id<TestInheritanceMAIAPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMAIAPrx>) iaop:(id<TestInheritanceMAIAPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMBIB2Prx>) ib2op:(id<TestInheritanceMBIB2Prx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMBIB2Prx>) ib2op:(id<TestInheritanceMBIB2Prx>)p current:(ICECurrent*)__unused current
{
return p;
}
@end
@implementation ICI
--(id<TestInheritanceMAIAPrx>) iaop:(id<TestInheritanceMAIAPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMAIAPrx>) iaop:(id<TestInheritanceMAIAPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMBIB1Prx>) ib1op:(id<TestInheritanceMBIB1Prx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMBIB1Prx>) ib1op:(id<TestInheritanceMBIB1Prx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMBIB2Prx>) ib2op:(id<TestInheritanceMBIB2Prx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMBIB2Prx>) ib2op:(id<TestInheritanceMBIB2Prx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMAICPrx>) icop:(id<TestInheritanceMAICPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMAICPrx>) icop:(id<TestInheritanceMAICPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
@end
@implementation CDI
--(id<TestInheritanceMACAPrx>) caop:(id<TestInheritanceMACAPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMACAPrx>) caop:(id<TestInheritanceMACAPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMBCBPrx>) cbop:(id<TestInheritanceMBCBPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMBCBPrx>) cbop:(id<TestInheritanceMBCBPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMACCPrx>) ccop:(id<TestInheritanceMACCPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMACCPrx>) ccop:(id<TestInheritanceMACCPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMACDPrx>) cdop:(id<TestInheritanceMACDPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMACDPrx>) cdop:(id<TestInheritanceMACDPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMAIAPrx>) iaop:(id<TestInheritanceMAIAPrx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMAIAPrx>) iaop:(id<TestInheritanceMAIAPrx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMBIB1Prx>) ib1op:(id<TestInheritanceMBIB1Prx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMBIB1Prx>) ib1op:(id<TestInheritanceMBIB1Prx>)p current:(ICECurrent*)__unused current
{
return p;
}
--(id<TestInheritanceMBIB2Prx>) ib2op:(id<TestInheritanceMBIB2Prx>)p current:(ICECurrent*)current
+-(id<TestInheritanceMBIB2Prx>) ib2op:(id<TestInheritanceMBIB2Prx>)p current:(ICECurrent*)__unused current
{
return p;
}
@@ -146,42 +146,42 @@
[[current.adapter getCommunicator] shutdown];
}
--(id<TestInheritanceMACAPrx>) caop:(ICECurrent*)current
+-(id<TestInheritanceMACAPrx>) caop:(ICECurrent*)__unused current
{
return ca_;
}
--(id<TestInheritanceMBCBPrx>) cbop:(ICECurrent*)current
+-(id<TestInheritanceMBCBPrx>) cbop:(ICECurrent*)__unused current
{
return cb_;
}
--(id<TestInheritanceMACCPrx>) ccop:(ICECurrent*)current
+-(id<TestInheritanceMACCPrx>) ccop:(ICECurrent*)__unused current
{
return cc_;
}
--(id<TestInheritanceMACDPrx>) cdop:(ICECurrent*)current
+-(id<TestInheritanceMACDPrx>) cdop:(ICECurrent*)__unused current
{
return cd_;
}
--(id<TestInheritanceMAIAPrx>) iaop:(ICECurrent*)current
+-(id<TestInheritanceMAIAPrx>) iaop:(ICECurrent*)__unused current
{
return ia_;
}
--(id<TestInheritanceMBIB1Prx>) ib1op:(ICECurrent*)current
+-(id<TestInheritanceMBIB1Prx>) ib1op:(ICECurrent*)__unused current
{
return ib1_;
}
--(id<TestInheritanceMBIB2Prx>) ib2op:(ICECurrent*)current
+-(id<TestInheritanceMBIB2Prx>) ib2op:(ICECurrent*)__unused current
{
return ib2_;
}
--(id<TestInheritanceMAICPrx>) icop:(ICECurrent*)current
+-(id<TestInheritanceMAICPrx>) icop:(ICECurrent*)__unused current
{
return ic_;
}
diff --git a/objective-c/test/Ice/interceptor/MyObjectI.m b/objective-c/test/Ice/interceptor/MyObjectI.m
index cbb54fb63bd..794dc954632 100644
--- a/objective-c/test/Ice/interceptor/MyObjectI.m
+++ b/objective-c/test/Ice/interceptor/MyObjectI.m
@@ -12,7 +12,7 @@
#import <TestCommon.h>
@implementation TestInterceptorMyObjectI
--(int) add:(int)x y:(int)y current:(ICECurrent*)current
+-(int) add:(int)x y:(int)y current:(ICECurrent*)__unused current
{
return x + y;
}
@@ -28,17 +28,17 @@
return x + y;
}
--(int) badAdd:(int)x y:(int)y current:(ICECurrent*)current
+-(int) badAdd:(int)__unused x y:(int)__unused y current:(ICECurrent*)__unused current
{
@throw [TestInterceptorInvalidInputException invalidInputException];
}
--(int) notExistAdd:(int)x y:(int)y current:(ICECurrent*)current
+-(int) notExistAdd:(int)__unused x y:(int)__unused y current:(ICECurrent*)__unused current
{
@throw [ICEObjectNotExistException objectNotExistException:__FILE__ line:__LINE__];
}
--(int) badSystemAdd:(int)x y:(int)y current:(ICECurrent*)current
+-(int) badSystemAdd:(int)__unused x y:(int)__unused y current:(ICECurrent*)__unused current
{
@throw [ICEInitializationException initializationException:__FILE__ line:__LINE__ reason:@"testing"];
}
diff --git a/objective-c/test/Ice/invoke/AllTests.m b/objective-c/test/Ice/invoke/AllTests.m
index 3fef625c657..b81dd6bcdd9 100644
--- a/objective-c/test/Ice/invoke/AllTests.m
+++ b/objective-c/test/Ice/invoke/AllTests.m
@@ -233,8 +233,8 @@ invokeAllTests(id<ICECommunicator> communicator)
TestInvokeCallback* cb = [[TestInvokeCallback alloc] initWithCommunicator:communicator];
[cl begin_ice_invoke:@"opString" mode:ICENormal inEncaps:inEncaps
- response:^(BOOL ok, NSMutableData* outEncaps) { [cb opString:ok outEncaps:outEncaps]; }
- exception:^(ICEException* ex) { test(NO); }];
+ response:^(BOOL ok, NSMutableData* outEncapsP) { [cb opString:ok outEncaps:outEncapsP]; }
+ exception:^(ICEException* __unused ex) { test(NO); }];
[cb check];
ICE_RELEASE(cb);
}
@@ -271,7 +271,7 @@ invokeAllTests(id<ICECommunicator> communicator)
TestInvokeCallback* cb = [[TestInvokeCallback alloc] initWithCommunicator:communicator];
[cl begin_ice_invoke:@"opException" mode:ICENormal inEncaps:inEncaps
response:^(BOOL ok, NSMutableData* outP) { [cb opException:ok outEncaps:outP]; }
- exception:^(ICEException* ex) { test(NO); }];
+ exception:^(ICEException* __unused ex) { test(NO); }];
[cb check];
ICE_RELEASE(cb);
}
diff --git a/objective-c/test/Ice/location/AllTests.m b/objective-c/test/Ice/location/AllTests.m
index 1c66460daa1..041adcef2ac 100644
--- a/objective-c/test/Ice/location/AllTests.m
+++ b/objective-c/test/Ice/location/AllTests.m
@@ -17,7 +17,7 @@
@end
@implementation DummyHelloI
--(void) sayHello:(ICECurrent*)current
+-(void) sayHello:(ICECurrent*)__unused current
{
// Do nothing, this is just a dummy servant.
}
diff --git a/objective-c/test/Ice/location/ServerLocator.m b/objective-c/test/Ice/location/ServerLocator.m
index 334b9241854..631026c34d6 100644
--- a/objective-c/test/Ice/location/ServerLocator.m
+++ b/objective-c/test/Ice/location/ServerLocator.m
@@ -32,7 +32,7 @@
}
#endif
--(void) setAdapterDirectProxy:(NSMutableString *)adapter proxy:(id<ICEObjectPrx>)proxy current:(ICECurrent *)current
+-(void) setAdapterDirectProxy:(NSMutableString *)adapter proxy:(id<ICEObjectPrx>)proxy current:(ICECurrent *)__unused current
{
if(proxy == nil)
{
@@ -46,7 +46,7 @@
-(void) setReplicatedAdapterDirectProxy:(NSMutableString *)adapterId
replicaGroupId:(NSMutableString *)replicaGroupId
p:(id<ICEObjectPrx>)p
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
if(p == nil)
{
@@ -59,10 +59,10 @@
[adapters_ setObject:p forKey:replicaGroupId];
}
}
--(void) setServerProcessProxy:(NSMutableString *)id_ proxy:(id<ICEProcessPrx>)proxy current:(ICECurrent *)current
+-(void) setServerProcessProxy:(NSMutableString *)__unused id_ proxy:(id<ICEProcessPrx>)__unused proxy current:(ICECurrent *)__unused current
{
}
--(void) addObject:(id<ICEObjectPrx>)object current:(ICECurrent*)current
+-(void) addObject:(id<ICEObjectPrx>)object current:(ICECurrent*)__unused current
{
[self addObject:object];
}
@@ -103,7 +103,7 @@
requestCount_ = 0;
return self;
}
--(id<ICEObjectPrx>) findObjectById:(ICEIdentity *)id_ current:(ICECurrent *)current
+-(id<ICEObjectPrx>) findObjectById:(ICEIdentity *)id_ current:(ICECurrent *)__unused current
{
++requestCount_;
return [registry_ getObject:id_];
@@ -118,11 +118,11 @@
}
return [registry_ getAdapter:id_];
}
--(id<ICELocatorRegistryPrx>) getRegistry:(ICECurrent *)current
+-(id<ICELocatorRegistryPrx>) getRegistry:(ICECurrent *)__unused current
{
return registryPrx_;
}
--(int) getRequestCount:(ICECurrent*)current
+-(int) getRequestCount:(ICECurrent*)__unused current
{
return requestCount_;
}
diff --git a/objective-c/test/Ice/location/TestI.m b/objective-c/test/Ice/location/TestI.m
index bd98a954161..e514cfa7e28 100644
--- a/objective-c/test/Ice/location/TestI.m
+++ b/objective-c/test/Ice/location/TestI.m
@@ -43,7 +43,7 @@
{
return [NSString stringWithFormat:@"default -p %d", 12010 + port];
}
--(void) startServer:(ICECurrent*)current
+-(void) startServer:(ICECurrent*)__unused current
{
for(id<ICECommunicator> c in communicators_)
{
@@ -157,22 +157,22 @@
}
#endif
--(void) shutdown:(ICECurrent*)current
+-(void) shutdown:(ICECurrent*)__unused current
{
[[adapter1_ getCommunicator] shutdown];
}
--(id<TestLocationHelloPrx>) getHello:(ICECurrent*)current
+-(id<TestLocationHelloPrx>) getHello:(ICECurrent*)__unused current
{
return [TestLocationHelloPrx uncheckedCast:[adapter1_ createIndirectProxy:[ICEUtil stringToIdentity:@"hello"]]];
}
--(id<TestLocationHelloPrx>) getReplicatedHello:(ICECurrent*)current
+-(id<TestLocationHelloPrx>) getReplicatedHello:(ICECurrent*)__unused current
{
return [TestLocationHelloPrx uncheckedCast:[adapter1_ createProxy:[ICEUtil stringToIdentity:@"hello"]]];
}
--(void) migrateHello:(ICECurrent*)current
+-(void) migrateHello:(ICECurrent*)__unused current
{
ICEIdentity* ident = [ICEUtil stringToIdentity:@"hello"];
@try
@@ -187,7 +187,7 @@
@end
@implementation HelloI
--(void) sayHello:(ICECurrent*)current
+-(void) sayHello:(ICECurrent*)__unused current
{
}
@end
diff --git a/objective-c/test/Ice/metrics/AllTests.m b/objective-c/test/Ice/metrics/AllTests.m
index 60111808f66..ea5b3d2c9ad 100644
--- a/objective-c/test/Ice/metrics/AllTests.m
+++ b/objective-c/test/Ice/metrics/AllTests.m
@@ -53,7 +53,7 @@ NSCondition* cond;
[cond unlock];
}
--(void) updated:(ICEMutablePropertyDict*)properties
+-(void) updated:(ICEMutablePropertyDict*)__unused properties
{
[cond lock];
updated = YES;
@@ -118,7 +118,7 @@ NSCondition* cond;
[cond unlock];
}
--(void) exception:(ICEException*)exception
+-(void) exception:(ICEException*)__unused exception
{
[self response];
}
@@ -262,12 +262,12 @@ getClientProps(id<ICEPropertiesAdminPrx> p, ICEMutablePropertyDict* orig, NSStri
{
ICEMutablePropertyDict* props = [p getPropertiesForPrefix:@"IceMX.Metrics"];
ICEPropertyDict* cprops = ICE_AUTORELEASE([props copy]);
- [cprops enumerateKeysAndObjectsUsingBlock: ^(id key, id obj, BOOL *stop)
+ [cprops enumerateKeysAndObjectsUsingBlock: ^(id key, id __unused obj, BOOL* __unused stop)
{
[props setObject:@"" forKey:key];
}];
- [orig enumerateKeysAndObjectsUsingBlock: ^(id key, id obj, BOOL *stop)
+ [orig enumerateKeysAndObjectsUsingBlock: ^(id key, id obj, BOOL* __unused stop)
{
[props setObject:obj forKey:key];
}];
@@ -293,12 +293,12 @@ getServerProps(id<ICEPropertiesAdminPrx> p, ICEMutablePropertyDict* orig, NSStri
{
ICEMutablePropertyDict* props = [p getPropertiesForPrefix:@"IceMX.Metrics"];
ICEPropertyDict* sprops = ICE_AUTORELEASE([props copy]);
- [sprops enumerateKeysAndObjectsUsingBlock: ^(id key, id obj, BOOL *stop)
+ [sprops enumerateKeysAndObjectsUsingBlock: ^(id key, id __unused obj, BOOL* __unused stop)
{
[props setObject:@"" forKey:key];
}];
- [orig enumerateKeysAndObjectsUsingBlock: ^(id key, id obj, BOOL *stop)
+ [orig enumerateKeysAndObjectsUsingBlock: ^(id key, id __unused obj, BOOL* __unused stop)
{
[props setObject:obj forKey:key];
}];
@@ -566,9 +566,9 @@ metricsAllTests(id<ICECommunicator> communicator)
sm2 = getServerConnectionMetrics(serverMetrics, sm1.sentBytes + replySz);
// 4 is for the seq variable size
- test(cm2.sentBytes - cm1.sentBytes == requestSz + [bs length] + 4);
+ test(cm2.sentBytes - cm1.sentBytes == requestSz + (ICELong)[bs length] + 4);
test(cm2.receivedBytes - cm1.receivedBytes == replySz);
- test(sm2.receivedBytes - sm1.receivedBytes == requestSz + [bs length] + 4);
+ test(sm2.receivedBytes - sm1.receivedBytes == requestSz + (ICELong)[bs length] + 4);
test(sm2.sentBytes - sm1.sentBytes == replySz);
cm1 = cm2;
@@ -582,9 +582,9 @@ metricsAllTests(id<ICECommunicator> communicator)
sm2 = getServerConnectionMetrics(serverMetrics, sm1.sentBytes + replySz);
// 4 is for the seq variable size
- test(cm2.sentBytes - cm1.sentBytes == requestSz + [bs length] + 4);
+ test(cm2.sentBytes - cm1.sentBytes == requestSz + (ICELong)[bs length] + 4);
test(cm2.receivedBytes - cm1.receivedBytes == replySz);
- test(sm2.receivedBytes - sm1.receivedBytes == requestSz + [bs length] + 4);
+ test(sm2.receivedBytes - sm1.receivedBytes == requestSz + (ICELong)[bs length] + 4);
test(sm2.sentBytes - sm1.sentBytes == replySz);
[props setObject:@"state" forKey:@"IceMX.Metrics.View.Map.Connection.GroupBy"];
diff --git a/objective-c/test/Ice/metrics/TestI.m b/objective-c/test/Ice/metrics/TestI.m
index 4d54b1dedaa..c9d60dcb317 100644
--- a/objective-c/test/Ice/metrics/TestI.m
+++ b/objective-c/test/Ice/metrics/TestI.m
@@ -18,7 +18,7 @@
return self;
}
--(void) op:(ICECurrent*)current
+-(void) op:(ICECurrent*)__unused current
{
}
@@ -27,27 +27,27 @@
[current.con close:ICEConnectionCloseForcefully];
}
--(void) opWithUserException:(ICECurrent*)current
+-(void) opWithUserException:(ICECurrent*)__unused current
{
@throw [TestMetricsUserEx userEx];
}
--(void) opWithRequestFailedException:(ICECurrent*)current
+-(void) opWithRequestFailedException:(ICECurrent*)__unused current
{
@throw [ICEObjectNotExistException objectNotExistException:__FILE__ line:__LINE__];
}
--(void) opWithLocalException:(ICECurrent*)current
+-(void) opWithLocalException:(ICECurrent*)__unused current
{
@throw [ICESyscallException syscallException:__FILE__ line:__LINE__];
}
--(void) opWithUnknownException:(ICECurrent*)current
+-(void) opWithUnknownException:(ICECurrent*)__unused current
{
@throw @"TEST";
}
--(void) opByteS:(ICEByteSeq*)bs current:(ICECurrent*)current
+-(void) opByteS:(ICEByteSeq*)__unused bs current:(ICECurrent*)__unused current
{
}
@@ -81,13 +81,13 @@
}
#endif
--(void) hold:(ICECurrent*)current
+-(void) hold:(ICECurrent*)__unused current
{
[adapter hold];
[adapter waitForHold];
}
--(void) resume:(ICECurrent*)current
+-(void) resume:(ICECurrent*)__unused current
{
[adapter activate];
}
diff --git a/objective-c/test/Ice/objects/AllTests.m b/objective-c/test/Ice/objects/AllTests.m
index d5e1c91b11f..c49bdb31963 100644
--- a/objective-c/test/Ice/objects/AllTests.m
+++ b/objective-c/test/Ice/objects/AllTests.m
@@ -52,17 +52,17 @@ void breakRetainCycleD(TestObjectsD* d1)
}
@interface TestObjectsAbstractBaseI : TestObjectsAbstractBase<TestObjectsAbstractBase>
--(void) op:(ICECurrent *)current;
+-(void) op:(ICECurrent *)__unused current;
@end
@implementation TestObjectsAbstractBaseI
--(void) op:(ICECurrent *)current;
+-(void) op:(ICECurrent *)__unused current
{
}
@end
id<TestObjectsInitialPrx>
-objectsAllTests(id<ICECommunicator> communicator, BOOL collocated)
+objectsAllTests(id<ICECommunicator> communicator, BOOL __unused collocated)
{
tprintf("testing stringToProxy... ");
NSString* ref = @"initial:default -p 12010";
@@ -479,8 +479,8 @@ objectsAllTests(id<ICECommunicator> communicator, BOOL collocated)
TestObjectsMutableBasePrxSeq* seq = [TestObjectsMutableBasePrxSeq array];
[seq addObject:[NSNull null]];
- NSString* ref = @"base:default -p 12010";
- id<ICEObjectPrx> base = [communicator stringToProxy:ref];
+ ref = @"base:default -p 12010";
+ base = [communicator stringToProxy:ref];
id<TestObjectsBasePrx> b = [TestObjectsBasePrx uncheckedCast:base];
[seq addObject:b];
@@ -543,7 +543,7 @@ objectsAllTests(id<ICECommunicator> communicator, BOOL collocated)
TestObjectsMutableObjectPrxDict* dict = [TestObjectsMutableObjectPrxDict dictionary];
[dict setObject:[NSNull null] forKey:@"zero"];
- NSString* ref = @"object:default -p 12010";
+ ref = @"object:default -p 12010";
id<ICEObjectPrx> o = [communicator stringToProxy:ref];
[dict setObject:o forKey:@"one"];
@@ -606,8 +606,8 @@ objectsAllTests(id<ICECommunicator> communicator, BOOL collocated)
TestObjectsMutableBasePrxDict* dict = [TestObjectsMutableBasePrxDict dictionary];
[dict setObject:[NSNull null] forKey:@"zero"];
- NSString* ref = @"base:default -p 12010";
- id<ICEObjectPrx> base = [communicator stringToProxy:ref];
+ ref = @"base:default -p 12010";
+ base = [communicator stringToProxy:ref];
id<TestObjectsBasePrx> b = [TestObjectsBasePrx uncheckedCast:base];
[dict setObject:b forKey:@"one"];
@@ -640,14 +640,14 @@ objectsAllTests(id<ICECommunicator> communicator, BOOL collocated)
@try
{
- NSString* ref = @"test:default -p 12010";
- id<TestObjectsTestIntfPrx> p = [TestObjectsTestIntfPrx checkedCast:[communicator stringToProxy:ref]];
+ ref = @"test:default -p 12010";
+ id<TestObjectsTestIntfPrx> q = [TestObjectsTestIntfPrx checkedCast:[communicator stringToProxy:ref]];
{
tprintf("testing getting ObjectFactory registration... ");
- TestObjectsBase *base = [p opDerived];
- test(base);
- test([[base ice_id] isEqualToString:@"::Test::Derived"]);
+ TestObjectsBase *base2 = [q opDerived];
+ test(base2);
+ test([[base2 ice_id] isEqualToString:@"::Test::Derived"]);
tprintf("ok\n");
}
@@ -655,7 +655,7 @@ objectsAllTests(id<ICECommunicator> communicator, BOOL collocated)
tprintf("testing getting ExceptionFactory registration... ");
@try
{
- [p throwDerived];
+ [q throwDerived];
test(NO);
}
@catch(TestObjectsBaseEx* ex)
diff --git a/objective-c/test/Ice/objects/Client.m b/objective-c/test/Ice/objects/Client.m
index 0db4fb0b30d..2fdc684eb25 100644
--- a/objective-c/test/Ice/objects/Client.m
+++ b/objective-c/test/Ice/objects/Client.m
@@ -70,7 +70,7 @@ static ICEValueFactory factory = ^ICEObject* (NSString* type)
@implementation ClientMyObjectFactory
--(ICEObject*) create:(NSString*)type
+-(ICEObject*) create:(NSString*)__unused type
{
return nil;
}
diff --git a/objective-c/test/Ice/objects/Collocated.m b/objective-c/test/Ice/objects/Collocated.m
index d89074345e2..1d4ba7fad62 100644
--- a/objective-c/test/Ice/objects/Collocated.m
+++ b/objective-c/test/Ice/objects/Collocated.m
@@ -66,7 +66,7 @@ ICEValueFactory factory = ^ICEObject* (NSString* type)
@implementation CollocatedMyObjectFactory
--(ICEObject*) create:(NSString*)type
+-(ICEObject*) create:(NSString*)__unused type
{
return nil;
}
diff --git a/objective-c/test/Ice/objects/TestI.m b/objective-c/test/Ice/objects/TestI.m
index 1690eb4b105..0cc89a3a268 100644
--- a/objective-c/test/Ice/objects/TestI.m
+++ b/objective-c/test/Ice/objects/TestI.m
@@ -63,7 +63,7 @@
}
return self;
}
--(BOOL) checkValues:(ICECurrent*)current
+-(BOOL) checkValues:(ICECurrent*)__unused current
{
return e1 && e1 == e2;
}
@@ -128,7 +128,7 @@
}
#endif
--(void) shutdown:(ICECurrent*)current
+-(void) shutdown:(ICECurrent*)__unused current
{
_b1.theA = nil; // Break cyclic reference.
_b1.theB = nil; // Break cyclic reference.
@@ -145,7 +145,7 @@
[[current.adapter getCommunicator] shutdown];
}
--(TestObjectsB*) getB1:(ICECurrent*)current
+-(TestObjectsB*) getB1:(ICECurrent*)__unused current
{
_b1.preMarshalInvoked = NO;
_b2.preMarshalInvoked = NO;
@@ -153,7 +153,7 @@
return _b1;
}
--(TestObjectsB*) getB2:(ICECurrent*)current
+-(TestObjectsB*) getB2:(ICECurrent*)__unused current
{
_b1.preMarshalInvoked = NO;
_b2.preMarshalInvoked = NO;
@@ -161,7 +161,7 @@
return _b2;
}
--(TestObjectsC*) getC:(ICECurrent*)current
+-(TestObjectsC*) getC:(ICECurrent*)__unused current
{
_b1.preMarshalInvoked = NO;
_b2.preMarshalInvoked = NO;
@@ -169,7 +169,7 @@
return _c;
}
--(TestObjectsD*) getD:(ICECurrent*)current
+-(TestObjectsD*) getD:(ICECurrent*)__unused current
{
_b1.preMarshalInvoked = NO;
_b2.preMarshalInvoked = NO;
@@ -178,36 +178,36 @@
return _d;
}
--(TestObjectsE*) getE:(ICECurrent*)current
+-(TestObjectsE*) getE:(ICECurrent*)__unused current
{
return _e;
}
--(TestObjectsF*) getF:(ICECurrent*)current
+-(TestObjectsF*) getF:(ICECurrent*)__unused current
{
return _f;
}
--(void) setRecursive:(TestObjectsRecursive*)recursive current:(ICECurrent*)current
+-(void) setRecursive:(TestObjectsRecursive*)__unused recursive current:(ICECurrent*)__unused current
{
}
--(BOOL) supportsClassGraphDepthMax:(ICECurrent*)current
+-(BOOL) supportsClassGraphDepthMax:(ICECurrent*)__unused current
{
return YES;
}
--(TestObjectsB*) getMB:(ICECurrent*)current
+-(TestObjectsB*) getMB:(ICECurrent*)__unused current
{
return _b1;
}
--(TestObjectsB*) getAMDMB:(ICECurrent*)current
+-(TestObjectsB*) getAMDMB:(ICECurrent*)__unused current
{
return _b1;
}
--(void) getAll:(TestObjectsB **)b1 b2:(TestObjectsB **)b2 theC:(TestObjectsC **)theC theD:(TestObjectsD **)theD current:(ICECurrent *)current;
+-(void) getAll:(TestObjectsB **)b1 b2:(TestObjectsB **)b2 theC:(TestObjectsC **)theC theD:(TestObjectsD **)theD current:(ICECurrent *)__unused current
{
_b1.preMarshalInvoked = NO;
_b2.preMarshalInvoked = NO;
@@ -219,50 +219,50 @@
*theD = _d;
}
--(TestObjectsI*) getI:(ICECurrent*)current
+-(TestObjectsI*) getI:(ICECurrent*)__unused current
{
return [TestObjectsI i];
}
--(TestObjectsI*) getJ:(ICECurrent*)current
+-(TestObjectsI*) getJ:(ICECurrent*)__unused current
{
return (TestObjectsI*)[TestObjectsJ j];
}
--(TestObjectsI*) getH:(ICECurrent*)current
+-(TestObjectsI*) getH:(ICECurrent*)__unused current
{
return (TestObjectsI*)[TestObjectsH h];
}
--(ICEObject*) getK:(ICECurrent*)current
+-(ICEObject*) getK:(ICECurrent*)__unused current
{
return [[TestObjectsK alloc] init:[[TestObjectsL alloc] init:@"l"]];
}
--(ICEObject*) opValue:(ICEObject*)v1 v2:(ICEObject**)v2 current:(ICECurrent*)current
+-(ICEObject*) opValue:(ICEObject*)v1 v2:(ICEObject**)v2 current:(ICECurrent*)__unused current
{
*v2 = v1;
return v1;
}
--(TestObjectsValueSeq*) opValueSeq:(TestObjectsMutableValueSeq*)v1 v2:(TestObjectsValueSeq**)v2 current:(ICECurrent*)current
+-(TestObjectsValueSeq*) opValueSeq:(TestObjectsMutableValueSeq*)v1 v2:(TestObjectsValueSeq**)v2 current:(ICECurrent*)__unused current
{
*v2 = v1;
return v1;
}
--(TestObjectsValueMap*) opValueMap:(TestObjectsMutableValueMap*)v1 v2:(TestObjectsValueMap**)v2 current:(ICECurrent*)current
+-(TestObjectsValueMap*) opValueMap:(TestObjectsMutableValueMap*)v1 v2:(TestObjectsValueMap**)v2 current:(ICECurrent*)__unused current
{
*v2 = v1;
return v1;
}
--(TestObjectsI*) getD1:(TestObjectsI*)d1 current:(ICECurrent*)current
+-(TestObjectsI*) getD1:(TestObjectsI*)d1 current:(ICECurrent*)__unused current
{
return d1;
}
--(void) throwEDerived:(ICECurrent*)current
+-(void) throwEDerived:(ICECurrent*)__unused current
{
@throw [TestObjectsEDerived eDerived:[TestObjectsA1 a1:@"a1"]
a2:[TestObjectsA1 a1:@"a2"]
@@ -271,86 +271,86 @@
}
-(TestObjectsBaseSeq*) opBaseSeq:(TestObjectsMutableBaseSeq*)inSeq outSeq:(TestObjectsBaseSeq**)outSeq
- current:(ICECurrent*)current
+ current:(ICECurrent*)__unused current
{
*outSeq = inSeq;
return inSeq;
}
--(TestObjectsCompact*) getCompact:(ICECurrent*)current
+-(TestObjectsCompact*) getCompact:(ICECurrent*)__unused current
{
return (TestObjectsCompact*)[TestObjectsCompactExt compactExt];
}
--(TestInnerA*) getInnerA:(ICECurrent *)current
+-(TestInnerA*) getInnerA:(ICECurrent *)__unused current
{
return [TestInnerA a:_b1];
}
--(TestInnerSubA*) getInnerSubA:(ICECurrent *)current
+-(TestInnerSubA*) getInnerSubA:(ICECurrent *)__unused current
{
return [TestInnerSubA a:[TestInnerA a:_b1]];
}
--(void) throwInnerEx:(ICECurrent *)current
+-(void) throwInnerEx:(ICECurrent *)__unused current
{
@throw [TestInnerEx ex:@"Inner::Ex"];
}
--(void) throwInnerSubEx:(ICECurrent *)current
+-(void) throwInnerSubEx:(ICECurrent *)__unused current
{
@throw [TestInnerSubEx ex:@"Inner::Sub::Ex"];
}
--(void) setG:(TestObjectsG*)g current:(ICECurrent*)current
+-(void) setG:(TestObjectsG*)__unused g current:(ICECurrent*)__unused current
{
}
--(void) setI:(TestObjectsI*)i current:(ICECurrent*)current
+-(void) setI:(TestObjectsI*)__unused i current:(ICECurrent*)__unused current
{
}
--(TestObjectsObjectSeq *) getObjectSeq:(TestObjectsMutableObjectSeq *)s current:(ICECurrent*)current
+-(TestObjectsObjectSeq *) getObjectSeq:(TestObjectsMutableObjectSeq *)s current:(ICECurrent*)__unused current
{
return s;
}
--(TestObjectsObjectPrxSeq *) getObjectPrxSeq:(TestObjectsMutableObjectPrxSeq *)s current:(ICECurrent*)current
+-(TestObjectsObjectPrxSeq *) getObjectPrxSeq:(TestObjectsMutableObjectPrxSeq *)s current:(ICECurrent*)__unused current
{
return s;
}
--(TestObjectsBaseSeq *) getBaseSeq:(TestObjectsMutableBaseSeq *)s current:(ICECurrent*)current
+-(TestObjectsBaseSeq *) getBaseSeq:(TestObjectsMutableBaseSeq *)s current:(ICECurrent*)__unused current
{
return s;
}
--(TestObjectsBasePrxSeq *) getBasePrxSeq:(TestObjectsMutableBasePrxSeq *)s current:(ICECurrent*)current
+-(TestObjectsBasePrxSeq *) getBasePrxSeq:(TestObjectsMutableBasePrxSeq *)s current:(ICECurrent*)__unused current
{
return s;
}
--(TestObjectsObjectDict *) getObjectDict:(TestObjectsMutableObjectDict *)d current:(ICECurrent*)current
+-(TestObjectsObjectDict *) getObjectDict:(TestObjectsMutableObjectDict *)d current:(ICECurrent*)__unused current
{
return d;
}
--(TestObjectsObjectPrxDict *) getObjectPrxDict:(TestObjectsMutableObjectPrxDict *)d current:(ICECurrent*)current
+-(TestObjectsObjectPrxDict *) getObjectPrxDict:(TestObjectsMutableObjectPrxDict *)d current:(ICECurrent*)__unused current
{
return d;
}
--(TestObjectsBaseDict *) getBaseDict:(TestObjectsMutableBaseDict *)d current:(ICECurrent*)current
+-(TestObjectsBaseDict *) getBaseDict:(TestObjectsMutableBaseDict *)d current:(ICECurrent*)__unused current
{
return d;
}
--(TestObjectsBasePrxDict *) getBasePrxDict:(TestObjectsMutableBasePrxDict *)d current:(ICECurrent*)current
+-(TestObjectsBasePrxDict *) getBasePrxDict:(TestObjectsMutableBasePrxDict *)d current:(ICECurrent*)__unused current
{
return d;
}
--(TestObjectsM *) opM:(TestObjectsM *)v1 v2:(TestObjectsM **)v2 current:(ICECurrent *)current
+-(TestObjectsM *) opM:(TestObjectsM *)v1 v2:(TestObjectsM **)v2 current:(ICECurrent *)__unused current
{
*v2 = v1;
return v1;
@@ -358,7 +358,7 @@
@end
@implementation UnexpectedObjectExceptionTestI
--(BOOL)ice_invoke:(NSData*)inEncaps outEncaps:(NSMutableData**)outEncaps current:(ICECurrent*)current
+-(BOOL)ice_invoke:(NSData*)__unused inEncaps outEncaps:(NSMutableData**)outEncaps current:(ICECurrent*)current
{
id<ICECommunicator> communicator = [current.adapter getCommunicator];
id<ICEOutputStream> o = [ICEUtil createOutputStream:communicator];
diff --git a/objective-c/test/Ice/objects/TestIntfI.m b/objective-c/test/Ice/objects/TestIntfI.m
index 46de25601c6..d64eed45201 100644
--- a/objective-c/test/Ice/objects/TestIntfI.m
+++ b/objective-c/test/Ice/objects/TestIntfI.m
@@ -13,7 +13,7 @@
#import <ObjectsDerivedEx.h>
@implementation TestObjectsTestIntfI
--(TestObjectsBase*) opDerived:(ICECurrent *)current
+-(TestObjectsBase*) opDerived:(ICECurrent *)__unused current
{
TestObjectsDerived *d = ICE_AUTORELEASE([[TestObjectsDerived alloc] init]);
d.theS.str = @"S.str";
@@ -22,7 +22,7 @@
return d;
}
--(void) throwDerived:(ICECurrent *)current
+-(void) throwDerived:(ICECurrent *)__unused current
{
@throw [TestObjectsDerivedEx derivedEx:@"reason"];
}
diff --git a/objective-c/test/Ice/operations/BatchOneways.m b/objective-c/test/Ice/operations/BatchOneways.m
index c647fb243b7..263b618cf88 100644
--- a/objective-c/test/Ice/operations/BatchOneways.m
+++ b/objective-c/test/Ice/operations/BatchOneways.m
@@ -84,17 +84,17 @@ batchOneways(id<TestOperationsMyClassPrx> p)
__block int _size = 0;
__block int _lastRequestSize = 0;
__block BOOL _enqueue = NO;
- initData.batchRequestInterceptor = ^(id<ICEBatchRequest> request, int count, int size)
+ initData.batchRequestInterceptor = ^(id<ICEBatchRequest> request, int countP, int size)
{
test([[request getOperation] isEqualToString:@"opByteSOneway"] ||
[[request getOperation] isEqualToString:@"ice_ping"]);
test([[request getProxy] ice_isBatchOneway]);
- if(count > 0)
+ if(countP > 0)
{
test(_lastRequestSize + _size == size);
}
- _count = count;
+ _count = countP;
_size = size;
if(_size + [request getSize] > 25000)
diff --git a/objective-c/test/Ice/operations/Oneways.m b/objective-c/test/Ice/operations/Oneways.m
index d379c4d5837..1c955d5b753 100644
--- a/objective-c/test/Ice/operations/Oneways.m
+++ b/objective-c/test/Ice/operations/Oneways.m
@@ -12,7 +12,7 @@
#import <OperationsTest.h>
void
-oneways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> proxy)
+oneways(id<ICECommunicator>__unused communicator, id<TestOperationsMyClassPrx> proxy)
{
id<TestOperationsMyClassPrx> p = [TestOperationsMyClassPrx uncheckedCast:[proxy ice_oneway]];
diff --git a/objective-c/test/Ice/operations/OnewaysAMI.m b/objective-c/test/Ice/operations/OnewaysAMI.m
index ea6f4f25bb5..b40ca7f2a97 100644
--- a/objective-c/test/Ice/operations/OnewaysAMI.m
+++ b/objective-c/test/Ice/operations/OnewaysAMI.m
@@ -68,7 +68,7 @@
{
[self called];
}
--(void) opVoidException:(ICEException*)ex
+-(void) opVoidException:(ICEException*)__unused ex
{
test(NO);
}
@@ -85,7 +85,7 @@
{
test(NO);
}
--(void) opByteEx:(ICEException*)ex
+-(void) opByteEx:(ICEException*)__unused ex
{
test(NO);
}
@@ -97,7 +97,7 @@
@end
void
-onewaysAMI(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> proxy)
+onewaysAMI(id<ICECommunicator> __unused communicator, id<TestOperationsMyClassPrx> proxy)
{
id<TestOperationsMyClassPrx> p = [TestOperationsMyClassPrx uncheckedCast:[proxy ice_oneway]];
@@ -110,7 +110,7 @@ onewaysAMI(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> proxy)
OnewayAMICallback* cb = [OnewayAMICallback create];
@try
{
- [p begin_opByte:0 p2:0 response:^(ICEByte r, ICEByte p3) { [cb opByteExResponse]; } exception:^(ICEException* ex) { [cb opByteExException:ex]; }];
+ [p begin_opByte:0 p2:0 response:^(ICEByte __unused r, ICEByte __unused p3) { [cb opByteExResponse]; } exception:^(ICEException* ex) { [cb opByteExException:ex]; }];
[cb check];
}
@catch(NSException* ex)
diff --git a/objective-c/test/Ice/operations/TestI.m b/objective-c/test/Ice/operations/TestI.m
index fe031e94479..a971fca7ce1 100644
--- a/objective-c/test/Ice/operations/TestI.m
+++ b/objective-c/test/Ice/operations/TestI.m
@@ -33,21 +33,21 @@
}
#endif
--(void) opVoid:(ICECurrent*)current
+-(void) opVoid:(ICECurrent*)__unused current
{
}
--(void) opDerived:(ICECurrent*)current
+-(void) opDerived:(ICECurrent*)__unused current
{
}
--(ICEByte) opByte:(ICEByte)p1 p2:(ICEByte)p2 p3:(ICEByte *)p3 current:(ICECurrent *)current
+-(ICEByte) opByte:(ICEByte)p1 p2:(ICEByte)p2 p3:(ICEByte *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1 ^ p2;
return p1;
}
--(BOOL) opBool:(BOOL)p1 p2:(BOOL)p2 p3:(BOOL *)p3 current:(ICECurrent*)current
+-(BOOL) opBool:(BOOL)p1 p2:(BOOL)p2 p3:(BOOL *)p3 current:(ICECurrent*)__unused current
{
*p3 = p1;
return p2;
@@ -55,7 +55,7 @@
-(ICELong) opShortIntLong:(ICEShort)p1 p2:(ICEInt)p2 p3:(ICELong)p3
p4:(ICEShort *)p4 p5:(ICEInt *)p5 p6:(ICELong *)p6
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p4 = p1;
*p5 = p2;
@@ -64,14 +64,14 @@
}
-(ICEDouble) opFloatDouble:(ICEFloat)p1 p2:(ICEDouble)p2 p3:(ICEFloat *)p3 p4:(ICEDouble *)p4
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = p1;
*p4 = p2;
return p2;
}
--(NSString *) opString:(NSMutableString *)p1 p2:(NSMutableString *)p2 p3:(NSString **)p3 current:(ICECurrent *)current
+-(NSString *) opString:(NSMutableString *)p1 p2:(NSMutableString *)p2 p3:(NSString **)p3 current:(ICECurrent *)__unused current
{
NSMutableString *sout = [NSMutableString stringWithCapacity:([p2 length] + 1 + [p1 length])];
[sout appendString:p2];
@@ -86,14 +86,14 @@
return ret;
}
--(TestOperationsMyEnum) opMyEnum:(TestOperationsMyEnum)p1 p2:(TestOperationsMyEnum *)p2 current:(ICECurrent *)current
+-(TestOperationsMyEnum) opMyEnum:(TestOperationsMyEnum)p1 p2:(TestOperationsMyEnum *)p2 current:(ICECurrent *)__unused current
{
*p2 = p1;
return TestOperationsenum3;
}
-(id<TestOperationsMyClassPrx>) opMyClass:(id<TestOperationsMyClassPrx>)p1 p2:(id<TestOperationsMyClassPrx> *)p2 p3:(id<TestOperationsMyClassPrx> *)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p2 = p1;
*p3 = [TestOperationsMyClassPrx uncheckedCast:[current.adapter
@@ -102,7 +102,7 @@
}
-(TestOperationsStructure *) opStruct:(TestOperationsStructure *)p1 p2:(TestOperationsStructure *)p2 p3:(TestOperationsStructure **)p3
- current:(ICECurrent *)current;
+ current:(ICECurrent *)__unused current
{
*p3 = ICE_AUTORELEASE([p1 copy]);
(*p3).s.s = @"a new string";
@@ -110,13 +110,13 @@
}
-(TestOperationsByteS *) opByteS:(TestOperationsMutableByteS *)p1 p2:(TestOperationsMutableByteS *)p2 p3:(TestOperationsByteS **)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableByteS dataWithLength:[p1 length]];
ICEByte *target = (ICEByte *)[*p3 bytes];
ICEByte *src = (ICEByte *)[p1 bytes] + [p1 length];
int i;
- for(i = 0; i != [p1 length]; ++i)
+ for(i = 0; i != (int)[p1 length]; ++i)
{
*target++ = *--src;
}
@@ -126,7 +126,7 @@
}
-(TestOperationsBoolS *) opBoolS:(TestOperationsMutableBoolS *)p1 p2:(TestOperationsMutableBoolS *)p2 p3:(TestOperationsBoolS **)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableBoolS dataWithData:p1];
[(TestOperationsMutableBoolS *)*p3 appendData:p2];
@@ -135,7 +135,7 @@
BOOL *target = (BOOL *)[r bytes];
BOOL *src = (BOOL *)([p1 bytes] + [p1 length]);
int i;
- for(i = 0; i != [p1 length]; ++i)
+ for(i = 0; i != (int)[p1 length]; ++i)
{
*target++ = *--src;
}
@@ -144,14 +144,14 @@
-(TestOperationsLongS *) opShortIntLongS:(TestOperationsMutableShortS *)p1 p2:(TestOperationsMutableIntS *)p2 p3:(TestOperationsMutableLongS *)p3
p4:(TestOperationsShortS **)p4 p5:(TestOperationsIntS **)p5 p6:(TestOperationsLongS **)p6
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p4 = [TestOperationsMutableShortS dataWithData:p1];
*p5 = [TestOperationsMutableIntS dataWithLength:[p2 length]];
ICEInt *target = (ICEInt *)[*p5 bytes];
ICEInt *src = (ICEInt *)([p2 bytes] + [p2 length]);
int i;
- for(i = 0; i != [p2 length] / sizeof(ICEInt); ++i)
+ for(i = 0; i != (int)[p2 length] / sizeof(ICEInt); ++i)
{
*target++ = *--src;
}
@@ -161,14 +161,13 @@
}
-(TestOperationsDoubleS *) opFloatDoubleS:(TestOperationsMutableFloatS *)p1 p2:(TestOperationsMutableDoubleS *)p2
- p3:(TestOperationsFloatS **)p3 p4:(TestOperationsDoubleS **)p4 current:(ICECurrent *)current
+ p3:(TestOperationsFloatS **)p3 p4:(TestOperationsDoubleS **)p4 current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableFloatS dataWithData:p1];
*p4 = [TestOperationsMutableDoubleS dataWithLength:[p2 length]];
ICEDouble *target = (ICEDouble *)[*p4 bytes];
ICEDouble *src = (ICEDouble *)([p2 bytes] + [p2 length]);
- int i;
- for(i = 0; i != [p2 length] / sizeof(ICEDouble); ++i)
+ for(size_t i = 0; i != [p2 length] / sizeof(ICEDouble); ++i)
{
*target++ = *--src;
}
@@ -176,12 +175,12 @@
+ ([p1 length] / sizeof(ICEFloat) * sizeof(ICEDouble)))];
ICEDouble *rp = (ICEDouble *)[r bytes];
ICEDouble *p2p = (ICEDouble *)[p2 bytes];
- for(i = 0; i < [p2 length] / sizeof(ICEDouble); ++i)
+ for(size_t i = 0; i < [p2 length] / sizeof(ICEDouble); ++i)
{
*rp++ = *p2p++;
}
ICEFloat *bp1 = (ICEFloat *)[p1 bytes];
- for(i = 0; i < [p1 length] / sizeof(ICEFloat); ++i)
+ for(size_t i = 0; i < [p1 length] / sizeof(ICEFloat); ++i)
{
*rp++ = bp1[i];
}
@@ -189,7 +188,7 @@
}
-(TestOperationsStringS *) opStringS:(TestOperationsMutableStringS *)p1 p2:(TestOperationsMutableStringS *)p2
- p3:(TestOperationsStringS **)p3 current:(ICECurrent *)current
+ p3:(TestOperationsStringS **)p3 current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableStringS arrayWithArray:p1];
[(TestOperationsMutableStringS *)*p3 addObjectsFromArray:p2];
@@ -203,13 +202,12 @@
}
-(TestOperationsMyEnumS *) opMyEnumS:(TestOperationsMutableMyEnumS *)p1 p2:(TestOperationsMutableMyEnumS *)p2
- p3:(TestOperationsMyEnumS **)p3 current:(ICECurrent *)current
+ p3:(TestOperationsMyEnumS **)p3 current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableMyEnumS dataWithLength:[p1 length]];
TestOperationsMyEnum *target = (TestOperationsMyEnum *)[*p3 bytes];
TestOperationsMyEnum *src = (TestOperationsMyEnum *)([p1 bytes] + [p1 length]);
- int i;
- for(i = 0; i != [p1 length] / sizeof(TestOperationsMyEnum); ++i)
+ for(size_t i = 0; i != [p1 length] / sizeof(TestOperationsMyEnum); ++i)
{
*target++ = *--src;
}
@@ -219,7 +217,7 @@
}
-(TestOperationsMyClassS *) opMyClassS:(TestOperationsMutableMyClassS *)p1 p2:(TestOperationsMutableMyClassS *)p2
- p3:(TestOperationsMyClassS **)p3 current:(ICECurrent *)current
+ p3:(TestOperationsMyClassS **)p3 current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableMyClassS arrayWithArray:p1];
[(TestOperationsMutableMyClassS *)*p3 addObjectsFromArray:p2];
@@ -233,7 +231,7 @@
}
-(TestOperationsByteSS *) opByteSS:(TestOperationsMutableByteSS *)p1 p2:(TestOperationsMutableByteSS *)p2 p3:(TestOperationsByteSS * *)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableByteSS array];
NSEnumerator *enumerator = [p1 reverseObjectEnumerator];
@@ -248,7 +246,7 @@
}
-(TestOperationsBoolSS *) opBoolSS:(TestOperationsMutableBoolSS *)p1 p2:(TestOperationsMutableBoolSS *)p2 p3:(TestOperationsBoolSS * *)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableBoolSS arrayWithArray:p1];
[(TestOperationsMutableBoolSS *)*p3 addObjectsFromArray:p2];
@@ -264,7 +262,7 @@
-(TestOperationsLongSS *) opShortIntLongSS:(TestOperationsMutableShortSS *)p1 p2:(TestOperationsMutableIntSS *)p2 p3:(TestOperationsMutableLongSS *)p3
p4:(TestOperationsShortSS **)p4 p5:(TestOperationsIntSS **)p5 p6:(TestOperationsLongSS **)p6
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p4 = [TestOperationsShortSS arrayWithArray:p1];
*p5 = [TestOperationsMutableIntSS array];
@@ -279,7 +277,7 @@
}
-(TestOperationsDoubleSS *) opFloatDoubleSS:(TestOperationsMutableFloatSS *)p1 p2:(TestOperationsMutableDoubleSS *)p2
- p3:(TestOperationsFloatSS **)p3 p4:(TestOperationsDoubleSS **)p4 current:(ICECurrent *)current
+ p3:(TestOperationsFloatSS **)p3 p4:(TestOperationsDoubleSS **)p4 current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsFloatSS arrayWithArray:p1];
*p4 = [TestOperationsMutableDoubleSS array];
@@ -294,7 +292,7 @@
}
-(TestOperationsStringSS *) opStringSS:(TestOperationsMutableStringSS *)p1 p2:(TestOperationsMutableStringSS *)p2 p3:(TestOperationsStringSS **)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableStringSS arrayWithArray:p1];
[(TestOperationsMutableStringSS *)*p3 addObjectsFromArray:p2];
@@ -308,7 +306,7 @@
}
-(TestOperationsStringSSS *) opStringSSS:(TestOperationsMutableStringSSS *)p1 p2:(TestOperationsMutableStringSSS *)p2 p3:(TestOperationsStringSSS **)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableStringSSS arrayWithArray:p1];
[(TestOperationsMutableStringSSS *)*p3 addObjectsFromArray:p2];
@@ -322,7 +320,7 @@
}
-(TestOperationsByteBoolD *) opByteBoolD:(TestOperationsMutableByteBoolD *)p1 p2:(TestOperationsMutableByteBoolD *)p2 p3:(TestOperationsByteBoolD **)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableByteBoolD dictionaryWithDictionary:p1];
TestOperationsMutableByteBoolD *r = [TestOperationsMutableByteBoolD dictionaryWithDictionary:p1];
@@ -331,7 +329,7 @@
}
-(TestOperationsShortIntD *) opShortIntD:(TestOperationsMutableShortIntD *)p1 p2:(TestOperationsMutableShortIntD *)p2 p3:(TestOperationsShortIntD **)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableShortIntD dictionaryWithDictionary:p1];
TestOperationsMutableShortIntD *r = [TestOperationsMutableShortIntD dictionaryWithDictionary:p1];
@@ -340,7 +338,7 @@
}
-(TestOperationsLongFloatD *) opLongFloatD:(TestOperationsMutableLongFloatD *)p1 p2:(TestOperationsMutableLongFloatD *)p2 p3:(TestOperationsLongFloatD **)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableLongFloatD dictionaryWithDictionary:p1];
TestOperationsMutableLongFloatD *r = [TestOperationsMutableLongFloatD dictionaryWithDictionary:p1];
@@ -349,7 +347,7 @@
}
-(TestOperationsStringStringD *) opStringStringD:(TestOperationsMutableStringStringD *)p1 p2:(TestOperationsMutableStringStringD *)p2
- p3:(TestOperationsStringStringD **)p3 current:(ICECurrent *)current
+ p3:(TestOperationsStringStringD **)p3 current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableStringStringD dictionaryWithDictionary:p1];
TestOperationsMutableStringStringD *r = [TestOperationsMutableStringStringD dictionaryWithDictionary:p1];
@@ -359,7 +357,7 @@
-(TestOperationsStringMyEnumD *) opStringMyEnumD:(TestOperationsMutableStringMyEnumD *)p1
p2:(TestOperationsMutableStringMyEnumD *)p2
- p3:(TestOperationsStringMyEnumD **)p3 current:(ICECurrent *)current
+ p3:(TestOperationsStringMyEnumD **)p3 current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableStringMyEnumD dictionaryWithDictionary:p1];
TestOperationsMutableStringMyEnumD *r = [TestOperationsMutableStringMyEnumD dictionaryWithDictionary:p1];
@@ -370,7 +368,7 @@
-(TestOperationsMyEnumStringD *) opMyEnumStringD:(TestOperationsMyEnumStringD*)p1
p2:(TestOperationsMyEnumStringD*)p2
p3:(TestOperationsMyEnumStringD**)p3
- current:(ICECurrent*)current
+ current:(ICECurrent*)__unused current
{
*p3 = [TestOperationsMutableMyEnumStringD dictionaryWithDictionary:p1];
TestOperationsMutableMyEnumStringD *r = [TestOperationsMutableMyEnumStringD dictionaryWithDictionary:p1];
@@ -381,7 +379,7 @@
-(TestOperationsMyStructMyEnumD *) opMyStructMyEnumD:(TestOperationsMyStructMyEnumD*)p1
p2:(TestOperationsMyStructMyEnumD*)p2
p3:(TestOperationsMyStructMyEnumD**)p3
- current:(ICECurrent*)current
+ current:(ICECurrent*)__unused current
{
*p3 = [TestOperationsMutableMyStructMyEnumD dictionaryWithDictionary:p1];
TestOperationsMutableMyStructMyEnumD *r = [TestOperationsMutableMyStructMyEnumD dictionaryWithDictionary:p1];
@@ -392,7 +390,7 @@
-(TestOperationsByteBoolDS*) opByteBoolDS:(TestOperationsMutableByteBoolDS*)p1
p2:(TestOperationsMutableByteBoolDS*)p2
p3:(TestOperationsByteBoolDS**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableByteBoolDS arrayWithArray:p2];
[(TestOperationsMutableByteBoolDS *)*p3 addObjectsFromArray:p1];
@@ -408,7 +406,7 @@
-(TestOperationsShortIntDS*) opShortIntDS:(TestOperationsMutableShortIntDS*)p1
p2:(TestOperationsMutableShortIntDS*)p2
p3:(TestOperationsShortIntDS**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableShortIntDS arrayWithArray:p2];
[(TestOperationsMutableShortIntDS *)*p3 addObjectsFromArray:p1];
@@ -424,7 +422,7 @@
-(TestOperationsLongFloatDS*) opLongFloatDS:(TestOperationsMutableLongFloatDS*)p1
p2:(TestOperationsMutableLongFloatDS*)p2
p3:(TestOperationsLongFloatDS**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableLongFloatDS arrayWithArray:p2];
[(TestOperationsMutableLongFloatDS *)*p3 addObjectsFromArray:p1];
@@ -440,7 +438,7 @@
-(TestOperationsStringStringDS*) opStringStringDS:(TestOperationsMutableStringStringDS*)p1
p2:(TestOperationsMutableStringStringDS*)p2
p3:(TestOperationsStringStringDS**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableStringStringDS arrayWithArray:p2];
[(TestOperationsMutableStringStringDS *)*p3 addObjectsFromArray:p1];
@@ -456,7 +454,7 @@
-(TestOperationsStringMyEnumDS*) opStringMyEnumDS:(TestOperationsMutableStringMyEnumDS*)p1
p2:(TestOperationsMutableStringMyEnumDS*)p2
p3:(TestOperationsStringMyEnumDS**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableStringMyEnumDS arrayWithArray:p2];
[(TestOperationsMutableStringMyEnumDS *)*p3 addObjectsFromArray:p1];
@@ -472,7 +470,7 @@
-(TestOperationsMyEnumStringDS*) opMyEnumStringDS:(TestOperationsMutableMyEnumStringDS*)p1
p2:(TestOperationsMutableMyEnumStringDS*)p2
p3:(TestOperationsMyEnumStringDS**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableMyEnumStringDS arrayWithArray:p2];
[(TestOperationsMutableMyEnumStringDS *)*p3 addObjectsFromArray:p1];
@@ -488,7 +486,7 @@
-(TestOperationsMyStructMyEnumDS*) opMyStructMyEnumDS:(TestOperationsMutableMyStructMyEnumDS*)p1
p2:(TestOperationsMutableMyStructMyEnumDS*)p2
p3:(TestOperationsMyStructMyEnumDS**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableMyStructMyEnumDS arrayWithArray:p2];
[(TestOperationsMutableMyStructMyEnumDS *)*p3 addObjectsFromArray:p1];
@@ -504,7 +502,7 @@
-(TestOperationsByteByteSD*) opByteByteSD:(TestOperationsMutableByteByteSD*)p1
p2:(TestOperationsMutableByteByteSD*)p2
p3:(TestOperationsByteByteSD**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableByteByteSD dictionaryWithDictionary:p2];
TestOperationsMutableByteByteSD *r = [TestOperationsMutableByteByteSD dictionaryWithDictionary:p1];
@@ -515,7 +513,7 @@
-(TestOperationsBoolBoolSD*) opBoolBoolSD:(TestOperationsMutableBoolBoolSD*)p1
p2:(TestOperationsMutableBoolBoolSD*)p2
p3:(TestOperationsBoolBoolSD**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableBoolBoolSD dictionaryWithDictionary:p2];
TestOperationsMutableBoolBoolSD *r = [TestOperationsMutableBoolBoolSD dictionaryWithDictionary:p1];
@@ -526,7 +524,7 @@
-(TestOperationsShortShortSD*) opShortShortSD:(TestOperationsMutableShortShortSD*)p1
p2:(TestOperationsMutableShortShortSD*)p2
p3:(TestOperationsShortShortSD**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableShortShortSD dictionaryWithDictionary:p2];
TestOperationsMutableShortShortSD *r = [TestOperationsMutableShortShortSD dictionaryWithDictionary:p1];
@@ -537,7 +535,7 @@
-(TestOperationsIntIntSD*) opIntIntSD:(TestOperationsMutableIntIntSD*)p1
p2:(TestOperationsMutableIntIntSD*)p2
p3:(TestOperationsIntIntSD**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableIntIntSD dictionaryWithDictionary:p2];
TestOperationsMutableIntIntSD *r = [TestOperationsMutableIntIntSD dictionaryWithDictionary:p1];
@@ -548,7 +546,7 @@
-(TestOperationsLongLongSD*) opLongLongSD:(TestOperationsMutableLongLongSD*)p1
p2:(TestOperationsMutableLongLongSD*)p2
p3:(TestOperationsLongLongSD**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableLongLongSD dictionaryWithDictionary:p2];
TestOperationsMutableLongLongSD *r = [TestOperationsMutableLongLongSD dictionaryWithDictionary:p1];
@@ -559,7 +557,7 @@
-(TestOperationsStringFloatSD*) opStringFloatSD:(TestOperationsMutableStringFloatSD*)p1
p2:(TestOperationsMutableStringFloatSD*)p2
p3:(TestOperationsStringFloatSD**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableStringFloatSD dictionaryWithDictionary:p2];
TestOperationsMutableStringFloatSD *r = [TestOperationsMutableStringFloatSD dictionaryWithDictionary:p1];
@@ -570,7 +568,7 @@
-(TestOperationsStringDoubleSD*) opStringDoubleSD:(TestOperationsMutableStringDoubleSD*)p1
p2:(TestOperationsMutableStringDoubleSD*)p2
p3:(TestOperationsStringDoubleSD**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableStringDoubleSD dictionaryWithDictionary:p2];
TestOperationsMutableStringDoubleSD *r = [TestOperationsMutableStringDoubleSD dictionaryWithDictionary:p1];
@@ -581,7 +579,7 @@
-(TestOperationsStringStringSD*) opStringStringSD:(TestOperationsMutableStringStringSD*)p1
p2:(TestOperationsMutableStringStringSD*)p2
p3:(TestOperationsStringStringSD**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableStringStringSD dictionaryWithDictionary:p2];
TestOperationsMutableStringStringSD *r = [TestOperationsMutableStringStringSD dictionaryWithDictionary:p1];
@@ -592,7 +590,7 @@
-(TestOperationsMyEnumMyEnumSD*) opMyEnumMyEnumSD:(TestOperationsMutableMyEnumMyEnumSD*)p1
p2:(TestOperationsMutableMyEnumMyEnumSD*)p2
p3:(TestOperationsMyEnumMyEnumSD**)p3
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p3 = [TestOperationsMutableMyEnumMyEnumSD dictionaryWithDictionary:p2];
TestOperationsMutableMyEnumMyEnumSD *r = [TestOperationsMutableMyEnumMyEnumSD dictionaryWithDictionary:p1];
@@ -600,7 +598,7 @@
return r;
}
--(TestOperationsIntS *) opIntS:(TestOperationsMutableIntS *)p1 current:(ICECurrent *)current
+-(TestOperationsIntS *) opIntS:(TestOperationsMutableIntS *)p1 current:(ICECurrent *)__unused current
{
NSUInteger count = [p1 length] / sizeof(ICEInt);
TestOperationsMutableIntS *r = [TestOperationsMutableIntS dataWithLength:[p1 length]];
@@ -613,14 +611,14 @@
return r;
}
--(void) opByteSOneway:(TestOperationsMutableByteS *)p1 current:(ICECurrent *)current
+-(void) opByteSOneway:(TestOperationsMutableByteS *)__unused p1 current:(ICECurrent *)__unused current
{
[_cond lock];
++_opByteSOnewayCallCount;
[_cond unlock];
}
--(ICEInt) opByteSOnewayCallCount:(ICECurrent *)current
+-(ICEInt) opByteSOnewayCallCount:(ICECurrent *)__unused current
{
[_cond lock];
ICEInt count = _opByteSOnewayCallCount;
@@ -635,89 +633,88 @@
}
}
--(ICEContext *) opContext:(ICECurrent *)current
+-(ICEContext *) opContext:(ICECurrent *)__unused current
{
return current.ctx;
}
--(void) opDoubleMarshaling:(ICEDouble)p1 p2:(TestOperationsMutableDoubleS *)p2 current:(ICECurrent *)current
+-(void) opDoubleMarshaling:(ICEDouble)p1 p2:(TestOperationsMutableDoubleS *)p2 current:(ICECurrent *)__unused current
{
ICEDouble d = 1278312346.0 / 13.0;
test(p1 == d);
const ICEDouble *p = [p2 bytes];
- int i;
- for(i = 0; i < [p2 length] / sizeof(ICEDouble); ++i)
+ for(size_t i = 0; i < [p2 length] / sizeof(ICEDouble); ++i)
{
test(p[i] == d);
}
}
--(void) opIdempotent:(ICECurrent*)current
+-(void) opIdempotent:(ICECurrent*)__unused current
{
test([current mode] == ICEIdempotent);
}
--(void) opNonmutating:(ICECurrent*)current
+-(void) opNonmutating:(ICECurrent*)__unused current
{
test([current mode] == ICENonmutating);
}
--(ICEByte) opByte1:(ICEByte)p current:(ICECurrent*)current
+-(ICEByte) opByte1:(ICEByte)p current:(ICECurrent*)__unused current
{
return p;
}
--(ICEShort) opShort1:(ICEShort)p current:(ICECurrent*)current
+-(ICEShort) opShort1:(ICEShort)p current:(ICECurrent*)__unused current
{
return p;
}
--(ICEInt) opInt1:(ICEInt)p current:(ICECurrent*)current
+-(ICEInt) opInt1:(ICEInt)p current:(ICECurrent*)__unused current
{
return p;
}
--(ICELong) opLong1:(ICELong)p current:(ICECurrent*)current
+-(ICELong) opLong1:(ICELong)p current:(ICECurrent*)__unused current
{
return p;
}
--(ICEFloat) opFloat1:(ICEFloat)p current:(ICECurrent*)current
+-(ICEFloat) opFloat1:(ICEFloat)p current:(ICECurrent*)__unused current
{
return p;
}
--(ICEDouble) opDouble1:(ICEDouble)p current:(ICECurrent*)current
+-(ICEDouble) opDouble1:(ICEDouble)p current:(ICECurrent*)__unused current
{
return p;
}
--(NSString*) opString1:(NSString*)p current:(ICECurrent*)current
+-(NSString*) opString1:(NSString*)p current:(ICECurrent*)__unused current
{
return p;
}
--(TestOperationsStringS*) opStringS1:(TestOperationsStringS*)p current:(ICECurrent*)current
+-(TestOperationsStringS*) opStringS1:(TestOperationsStringS*)p current:(ICECurrent*)__unused current
{
return p;
}
--(TestOperationsByteBoolD*) opByteBoolD1:(TestOperationsByteBoolD*)p current:(ICECurrent*)current
+-(TestOperationsByteBoolD*) opByteBoolD1:(TestOperationsByteBoolD*)p current:(ICECurrent*)__unused current
{
return p;
}
--(TestOperationsStringS*) opStringS2:(TestOperationsStringS*)p current:(ICECurrent*)current
+-(TestOperationsStringS*) opStringS2:(TestOperationsStringS*)p current:(ICECurrent*)__unused current
{
return p;
}
--(TestOperationsByteBoolD*) opByteBoolD2:(TestOperationsByteBoolD*)p current:(ICECurrent*)current
+-(TestOperationsByteBoolD*) opByteBoolD2:(TestOperationsByteBoolD*)p current:(ICECurrent*)__unused current
{
return p;
}
--(TestOperationsStringS *) opStringLiterals:(ICECurrent *)current
+-(TestOperationsStringS *) opStringLiterals:(ICECurrent *)__unused current
{
TestOperationsStringS *s = [NSArray arrayWithObjects:TestOperationss0,
TestOperationss1,
@@ -757,79 +754,79 @@
return s;
}
--(TestOperationsStringS *) opWStringLiterals:(ICECurrent *)current
+-(TestOperationsStringS *) opWStringLiterals:(ICECurrent *)__unused current
{
return [self opStringLiterals:current];
}
--(TestOperationsStructure*) opMStruct1:(ICECurrent *)current
+-(TestOperationsStructure*) opMStruct1:(ICECurrent *)__unused current
{
return [TestOperationsStructure structure];
}
-(TestOperationsStructure*) opMStruct2:(TestOperationsStructure*)p1 p2:(TestOperationsStructure**)p2
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p2 = p1;
return p1;
}
--(TestOperationsStringS*) opMSeq1:(ICECurrent *)current
+-(TestOperationsStringS*) opMSeq1:(ICECurrent *)__unused current
{
return [TestOperationsStringS array];
}
-(TestOperationsStringS*) opMSeq2:(TestOperationsMutableStringS*)p1 p2:(TestOperationsStringS**)p2
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p2 = p1;
return p1;
}
--(TestOperationsStringStringD*) opMDict1:(ICECurrent *)current
+-(TestOperationsStringStringD*) opMDict1:(ICECurrent *)__unused current
{
return [TestOperationsStringStringD dictionary];
}
-(TestOperationsStringStringD*) opMDict2:(TestOperationsMutableStringStringD*)p1 p2:(TestOperationsStringStringD**)p2
- current:(ICECurrent *)current
+ current:(ICECurrent *)__unused current
{
*p2 = p1;
return p1;
}
--(TestOperationsMyClass1*) opMyClass1:(TestOperationsMyClass1*)p current:(ICECurrent*)current
+-(TestOperationsMyClass1*) opMyClass1:(TestOperationsMyClass1*)p current:(ICECurrent*)__unused current
{
return p;
}
--(TestOperationsMyStruct1*) opMyStruct1:(TestOperationsMyStruct1*)p current:(ICECurrent*)current
+-(TestOperationsMyStruct1*) opMyStruct1:(TestOperationsMyStruct1*)p current:(ICECurrent*)__unused current
{
return p;
}
--(TestOperationsStringS *) getNSNullStringSeq:(ICECurrent *)current
+-(TestOperationsStringS *) getNSNullStringSeq:(ICECurrent *)__unused current
{
return [NSArray arrayWithObjects:@"first", [NSNull null], nil];
}
--(TestOperationsMyClassS *) getNSNullASeq:(ICECurrent *)current
+-(TestOperationsMyClassS *) getNSNullASeq:(ICECurrent *)__unused current
{
return [NSArray arrayWithObjects:[TestOperationsA a:99], [NSNull null], nil];
}
--(TestOperationsStructS *) getNSNullStructSeq:(ICECurrent *)current
+-(TestOperationsStructS *) getNSNullStructSeq:(ICECurrent *)__unused current
{
TestOperationsStructure *s = [TestOperationsStructure structure:nil e:TestOperationsenum2 s:[TestOperationsAnotherStruct anotherStruct:@"Hello"]];
return [NSArray arrayWithObjects:s, [NSNull null], nil];
}
--(TestOperationsStringSS *) getNSNullStringSeqSeq:(ICECurrent *)current
+-(TestOperationsStringSS *) getNSNullStringSeqSeq:(ICECurrent *)__unused current
{
TestOperationsStringSS *s = [NSArray arrayWithObjects:@"first", nil];
return [NSArray arrayWithObjects:s, [NSNull null], nil];
}
--(TestOperationsStringStringD *) getNSNullStringStringDict:(ICECurrent *)current
+-(TestOperationsStringStringD *) getNSNullStringStringDict:(ICECurrent *)__unused current
{
TestOperationsMutableStringStringD *d = [TestOperationsMutableStringStringD dictionary];
[d setObject:@"ONE" forKey:@"one"];
@@ -837,27 +834,27 @@
return d;
}
--(void) putNSNullStringStringDict:(TestOperationsMutableStringStringD *)d current:(ICECurrent *)current
+-(void) putNSNullStringStringDict:(TestOperationsMutableStringStringD *)__unused d current:(ICECurrent *)__unused current
{
// Nothing to do because this tests that an exception is thrown on the client side.
}
--(void) putNSNullShortIntDict:(TestOperationsMutableShortIntD *)d current:(ICECurrent *)current
+-(void) putNSNullShortIntDict:(TestOperationsMutableShortIntD *)__unused d current:(ICECurrent *)__unused current
{
// Nothing to do because this tests that an exception is thrown on the client side.
}
--(void) putNSNullStringMyEnumDict:(TestOperationsMutableStringMyEnumD *)d current:(ICECurrent *)current
+-(void) putNSNullStringMyEnumDict:(TestOperationsMutableStringMyEnumD *)__unused d current:(ICECurrent *)__unused current
{
// Nothing to do because this tests that an exception is thrown on the client side.
}
--(void) shutdown:(ICECurrent*)current
+-(void) shutdown:(ICECurrent*)__unused current
{
[[current.adapter getCommunicator] shutdown];
}
--(BOOL) supportsCompress:(ICECurrent*)current
+-(BOOL) supportsCompress:(ICECurrent*)__unused current
{
return YES;
}
diff --git a/objective-c/test/Ice/operations/Twoways.m b/objective-c/test/Ice/operations/Twoways.m
index 848783956ba..bdcc7c95beb 100644
--- a/objective-c/test/Ice/operations/Twoways.m
+++ b/objective-c/test/Ice/operations/Twoways.m
@@ -598,32 +598,32 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
rso = [p opByteSS:bsi1 p2:bsi2 p3:&bso];
- const ICEByte *p;
+ const ICEByte *pb;
test([bso count] == 2);
test([[bso objectAtIndex:0] length] / sizeof(ICEByte) == 1);
- p = [[bso objectAtIndex:0] bytes];
- test(p[0] == (ICEByte)0x0ff);
+ pb = [[bso objectAtIndex:0] bytes];
+ test(pb[0] == (ICEByte)0x0ff);
test([[bso objectAtIndex:1] length] / sizeof(ICEByte) == 3);
- p = [[bso objectAtIndex:1] bytes];
- test(p[0] == (ICEByte)0x01);
- test(p[1] == (ICEByte)0x11);
- test(p[2] == (ICEByte)0x12);
+ pb = [[bso objectAtIndex:1] bytes];
+ test(pb[0] == (ICEByte)0x01);
+ test(pb[1] == (ICEByte)0x11);
+ test(pb[2] == (ICEByte)0x12);
test([rso count] == 4);
test([[rso objectAtIndex:0] length] / sizeof(ICEByte) == 3);
- p = [[rso objectAtIndex:0] bytes];
- test(p[0] == (ICEByte)0x01);
- test(p[1] == (ICEByte)0x11);
- test(p[2] == (ICEByte)0x12);
+ pb = [[rso objectAtIndex:0] bytes];
+ test(pb[0] == (ICEByte)0x01);
+ test(pb[1] == (ICEByte)0x11);
+ test(pb[2] == (ICEByte)0x12);
test([[rso objectAtIndex:1] length] / sizeof(ICEByte) == 1);
- p = [[rso objectAtIndex:1] bytes];
- test(p[0] == (ICEByte)0xff);
+ pb = [[rso objectAtIndex:1] bytes];
+ test(pb[0] == (ICEByte)0xff);
test([[rso objectAtIndex:2] length] / sizeof(ICEByte) == 1);
- p = [[rso objectAtIndex:2] bytes];
- test(p[0] == (ICEByte)0x0e);
+ pb = [[rso objectAtIndex:2] bytes];
+ test(pb[0] == (ICEByte)0x0e);
test([[rso objectAtIndex:3] length] / sizeof(ICEByte) == 2);
- p = [[rso objectAtIndex:3] bytes];
- test(p[0] == (ICEByte)0xf2);
- test(p[1] == (ICEByte)0xf1);
+ pb = [[rso objectAtIndex:3] bytes];
+ test(pb[0] == (ICEByte)0xf2);
+ test(pb[1] == (ICEByte)0xf1);
}
{
@@ -1266,24 +1266,24 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
TestOperationsMutableByteByteSD *_do;
TestOperationsByteByteSD *ro = [p opByteByteSD:sdi1 p2:sdi2 p3:&_do];
- const ICEByte *p;
+ const ICEByte *pb;
test([_do count] == 1);
test([[_do objectForKey:[NSNumber numberWithUnsignedChar:(ICEByte)0xf1]] length] / sizeof(ICEByte) == 2);
- p = [[_do objectForKey:[NSNumber numberWithUnsignedChar:(ICEByte)0xf1]] bytes];
- test(p[0] == 0xf2);
- test(p[1] == 0xf3);
+ pb = [[_do objectForKey:[NSNumber numberWithUnsignedChar:(ICEByte)0xf1]] bytes];
+ test(pb[0] == 0xf2);
+ test(pb[1] == 0xf3);
test([ro count] == 3);
test([[ro objectForKey:[NSNumber numberWithUnsignedChar:(ICEByte)0x01]] length] / sizeof(ICEByte) == 2);
- p = [[ro objectForKey:[NSNumber numberWithUnsignedChar:(ICEByte)0x01]] bytes];
- test(p[0] == 0x01);
- test(p[1] == 0x11);
+ pb = [[ro objectForKey:[NSNumber numberWithUnsignedChar:(ICEByte)0x01]] bytes];
+ test(pb[0] == 0x01);
+ test(pb[1] == 0x11);
test([[ro objectForKey:[NSNumber numberWithUnsignedChar:(ICEByte)0x22]] length] / sizeof(ICEByte) == 1);
- p = [[ro objectForKey:[NSNumber numberWithUnsignedChar:(ICEByte)0x22]] bytes];
- test(p[0] == 0x12);
+ pb = [[ro objectForKey:[NSNumber numberWithUnsignedChar:(ICEByte)0x22]] bytes];
+ test(pb[0] == 0x12);
test([[ro objectForKey:[NSNumber numberWithUnsignedChar:(ICEByte)0xf1]] length] / sizeof(ICEByte) == 2);
- p = [[ro objectForKey:[NSNumber numberWithUnsignedChar:(ICEByte)0xf1]] bytes];
- test(p[0] == 0xf2);
- test(p[1] == 0xf3);
+ pb = [[ro objectForKey:[NSNumber numberWithUnsignedChar:(ICEByte)0xf1]] bytes];
+ test(pb[0] == 0xf2);
+ test(pb[1] == 0xf3);
}
{
@@ -1306,22 +1306,22 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
TestOperationsMutableBoolBoolSD *_do;
TestOperationsBoolBoolSD *ro = [p opBoolBoolSD:sdi1 p2:sdi2 p3:&_do];
- const BOOL *p;
+ const BOOL *pb;
test([_do count] == 1);
test([[_do objectForKey:[NSNumber numberWithBool:NO]] length] / sizeof(BOOL) == 2);
- p = [[_do objectForKey:[NSNumber numberWithBool:NO]] bytes];
- test(p[0] == YES);
- test(p[1] == NO);
+ pb = [[_do objectForKey:[NSNumber numberWithBool:NO]] bytes];
+ test(pb[0] == YES);
+ test(pb[1] == NO);
test([ro count] == 2);
test([[ro objectForKey:[NSNumber numberWithBool:NO]] length] / sizeof(BOOL) == 2);
- p = [[ro objectForKey:[NSNumber numberWithBool:NO]] bytes];
- test(p[0] == YES);
- test(p[1] == NO);
+ pb = [[ro objectForKey:[NSNumber numberWithBool:NO]] bytes];
+ test(pb[0] == YES);
+ test(pb[1] == NO);
test([[ro objectForKey:[NSNumber numberWithBool:YES]] length] / sizeof(BOOL) == 3);
- p = [[ro objectForKey:[NSNumber numberWithBool:YES]] bytes];
- test(p[0] == NO);
- test(p[1] == YES);
- test(p[2] == YES);
+ pb = [[ro objectForKey:[NSNumber numberWithBool:YES]] bytes];
+ test(pb[0] == NO);
+ test(pb[1] == YES);
+ test(pb[2] == YES);
}
{
@@ -1347,26 +1347,26 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
TestOperationsMutableShortShortSD *_do;
TestOperationsShortShortSD *ro = [p opShortShortSD:sdi1 p2:sdi2 p3:&_do];
- const ICEShort *p;
+ const ICEShort *ps;
test([_do count] == 1);
test([[_do objectForKey:[NSNumber numberWithShort:4]] length] / sizeof(ICEShort) == 2);
- p = [[_do objectForKey:[NSNumber numberWithShort:4]] bytes];
- test(p[0] == 6);
- test(p[1] == 7);
+ ps = [[_do objectForKey:[NSNumber numberWithShort:4]] bytes];
+ test(ps[0] == 6);
+ test(ps[1] == 7);
test([ro count] == 3);
test([[ro objectForKey:[NSNumber numberWithShort:1]] length] / sizeof(ICEShort) == 3);
- p = [[ro objectForKey:[NSNumber numberWithShort:1]] bytes];
- test(p[0] == 1);
- test(p[1] == 2);
- test(p[2] == 3);
+ ps = [[ro objectForKey:[NSNumber numberWithShort:1]] bytes];
+ test(ps[0] == 1);
+ test(ps[1] == 2);
+ test(ps[2] == 3);
test([[ro objectForKey:[NSNumber numberWithShort:2]] length] / sizeof(ICEShort) == 2);
- p = [[ro objectForKey:[NSNumber numberWithShort:2]] bytes];
- test(p[0] == 4);
- test(p[1] == 5);
+ ps = [[ro objectForKey:[NSNumber numberWithShort:2]] bytes];
+ test(ps[0] == 4);
+ test(ps[1] == 5);
test([[ro objectForKey:[NSNumber numberWithShort:4]] length] / sizeof(ICEShort) == 2);
- p = [[ro objectForKey:[NSNumber numberWithShort:4]] bytes];
- test(p[0] == 6);
- test(p[1] == 7);
+ ps = [[ro objectForKey:[NSNumber numberWithShort:4]] bytes];
+ test(ps[0] == 6);
+ test(ps[1] == 7);
}
{
@@ -1392,26 +1392,26 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
TestOperationsMutableIntIntSD *_do;
TestOperationsIntIntSD *ro = [p opIntIntSD:sdi1 p2:sdi2 p3:&_do];
- const ICEInt *p;
+ const ICEInt *pint;
test([_do count] == 1);
test([[_do objectForKey:[NSNumber numberWithInt:400]] length] / sizeof(ICEInt) == 2);
- p = [[_do objectForKey:[NSNumber numberWithInt:400]] bytes];
- test(p[0] == 600);
- test(p[1] == 700);
+ pint = [[_do objectForKey:[NSNumber numberWithInt:400]] bytes];
+ test(pint[0] == 600);
+ test(pint[1] == 700);
test([ro count] == 3);
test([[ro objectForKey:[NSNumber numberWithInt:100]] length] / sizeof(ICEInt) == 3);
- p = [[ro objectForKey:[NSNumber numberWithInt:100]] bytes];
- test(p[0] == 100);
- test(p[1] == 200);
- test(p[2] == 300);
+ pint = [[ro objectForKey:[NSNumber numberWithInt:100]] bytes];
+ test(pint[0] == 100);
+ test(pint[1] == 200);
+ test(pint[2] == 300);
test([[ro objectForKey:[NSNumber numberWithInt:200]] length] / sizeof(ICEInt) == 2);
- p = [[ro objectForKey:[NSNumber numberWithInt:200]] bytes];
- test(p[0] == 400);
- test(p[1] == 500);
+ pint = [[ro objectForKey:[NSNumber numberWithInt:200]] bytes];
+ test(pint[0] == 400);
+ test(pint[1] == 500);
test([[ro objectForKey:[NSNumber numberWithInt:400]] length] / sizeof(ICEInt) == 2);
- p = [[ro objectForKey:[NSNumber numberWithInt:400]] bytes];
- test(p[0] == 600);
- test(p[1] == 700);
+ pint = [[ro objectForKey:[NSNumber numberWithInt:400]] bytes];
+ test(pint[0] == 600);
+ test(pint[1] == 700);
}
{
@@ -1437,26 +1437,26 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
TestOperationsMutableLongLongSD *_do;
TestOperationsLongLongSD *ro = [p opLongLongSD:sdi1 p2:sdi2 p3:&_do];
- const ICELong *p;
+ const ICELong *pl;
test([_do count] == 1);
test([[_do objectForKey:[NSNumber numberWithLong:999999992]] length] / sizeof(ICELong) == 2);
- p = [[_do objectForKey:[NSNumber numberWithLong:999999992]] bytes];
- test(p[0] == 999999110);
- test(p[1] == 999999120);
+ pl = [[_do objectForKey:[NSNumber numberWithLong:999999992]] bytes];
+ test(pl[0] == 999999110);
+ test(pl[1] == 999999120);
test([ro count] == 3);
test([[ro objectForKey:[NSNumber numberWithLong:999999990]] length] / sizeof(ICELong) == 3);
- p = [[ro objectForKey:[NSNumber numberWithLong:999999990]] bytes];
- test(p[0] == 999999110);
- test(p[1] == 999999111);
- test(p[2] == 999999110);
+ pl = [[ro objectForKey:[NSNumber numberWithLong:999999990]] bytes];
+ test(pl[0] == 999999110);
+ test(pl[1] == 999999111);
+ test(pl[2] == 999999110);
test([[ro objectForKey:[NSNumber numberWithLong:999999991]] length] / sizeof(ICELong) == 2);
- p = [[ro objectForKey:[NSNumber numberWithLong:999999991]] bytes];
- test(p[0] == 999999120);
- test(p[1] == 999999130);
+ pl = [[ro objectForKey:[NSNumber numberWithLong:999999991]] bytes];
+ test(pl[0] == 999999120);
+ test(pl[1] == 999999130);
test([[ro objectForKey:[NSNumber numberWithLong:999999992]] length] / sizeof(ICELong) == 2);
- p = [[ro objectForKey:[NSNumber numberWithLong:999999992]] bytes];
- test(p[0] == 999999110);
- test(p[1] == 999999120);
+ pl = [[ro objectForKey:[NSNumber numberWithLong:999999992]] bytes];
+ test(pl[0] == 999999110);
+ test(pl[1] == 999999120);
}
{
@@ -1482,26 +1482,26 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
TestOperationsMutableStringFloatSD *_do;
TestOperationsStringFloatSD *ro = [p opStringFloatSD:sdi1 p2:sdi2 p3:&_do];
- const ICEFloat *p;
+ const ICEFloat *pf;
test([_do count] == 1);
test([[_do objectForKey:@"aBc"] length] / sizeof(ICEFloat) == 2);
- p = [[_do objectForKey:@"aBc"] bytes];
- test(p[0] == -3.14f);
- test(p[1] == 3.14f);
+ pf = [[_do objectForKey:@"aBc"] bytes];
+ test(pf[0] == -3.14f);
+ test(pf[1] == 3.14f);
test([ro count] == 3);
test([[ro objectForKey:@"abc"] length] / sizeof(ICEFloat) == 3);
- p = [[ro objectForKey:@"abc"] bytes];
- test(p[0] == -1.1f);
- test(p[1] == 123123.2f);
- test(p[2] == 100.0f);
+ pf = [[ro objectForKey:@"abc"] bytes];
+ test(pf[0] == -1.1f);
+ test(pf[1] == 123123.2f);
+ test(pf[2] == 100.0f);
test([[ro objectForKey:@"ABC"] length] / sizeof(ICEFloat) == 2);
- p = [[ro objectForKey:@"ABC"] bytes];
- test(p[0] == 42.24f);
- test(p[1] == -1.61f);
+ pf = [[ro objectForKey:@"ABC"] bytes];
+ test(pf[0] == 42.24f);
+ test(pf[1] == -1.61f);
test([[ro objectForKey:@"aBc"] length] / sizeof(ICEFloat) == 2);
- p = [[ro objectForKey:@"aBc"] bytes];
- test(p[0] == -3.14f);
- test(p[1] == 3.14f);
+ pf = [[ro objectForKey:@"aBc"] bytes];
+ test(pf[0] == -3.14f);
+ test(pf[1] == 3.14f);
}
{
@@ -1527,26 +1527,26 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
TestOperationsMutableStringDoubleSD *_do;
TestOperationsStringDoubleSD *ro = [p opStringDoubleSD:sdi1 p2:sdi2 p3:&_do];
- const ICEDouble *p;
+ const ICEDouble *pd;
test([_do count] == 1);
test([[_do objectForKey:@""] length] / sizeof(ICEDouble) == 2);
- p = [[_do objectForKey:@""] bytes];
- test(p[0] == 1.6E10);
- test(p[1] == 1.7E10);
+ pd = [[_do objectForKey:@""] bytes];
+ test(pd[0] == 1.6E10);
+ test(pd[1] == 1.7E10);
test([ro count] == 3);
test([[ro objectForKey:@"Hello!!"] length] / sizeof(ICEDouble) == 3);
- p = [[ro objectForKey:@"Hello!!"] bytes];
- test(p[0] == 1.1E10);
- test(p[1] == 1.2E10);
- test(p[2] == 1.3E10);
+ pd = [[ro objectForKey:@"Hello!!"] bytes];
+ test(pd[0] == 1.1E10);
+ test(pd[1] == 1.2E10);
+ test(pd[2] == 1.3E10);
test([[ro objectForKey:@"Goodbye"] length] / sizeof(ICEDouble) == 2);
- p = [[ro objectForKey:@"Goodbye"] bytes];
- test(p[0] == 1.4E10);
- test(p[1] == 1.5E10);
+ pd = [[ro objectForKey:@"Goodbye"] bytes];
+ test(pd[0] == 1.4E10);
+ test(pd[1] == 1.5E10);
test([[ro objectForKey:@""] length] / sizeof(ICEDouble) == 2);
- p = [[ro objectForKey:@""] bytes];
- test(p[0] == 1.6E10);
- test(p[1] == 1.7E10);
+ pd = [[ro objectForKey:@""] bytes];
+ test(pd[0] == 1.6E10);
+ test(pd[1] == 1.7E10);
}
{
@@ -1611,26 +1611,26 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
TestOperationsMutableMyEnumMyEnumSD *_do;
TestOperationsMyEnumMyEnumSD *ro = [p opMyEnumMyEnumSD:sdi1 p2:sdi2 p3:&_do];
- const TestOperationsMyEnum *p;
+ const TestOperationsMyEnum *pe;
test([_do count] == 1);
test([[_do objectForKey:@(TestOperationsenum1)] length] / sizeof(TestOperationsMyEnum) == 2);
- p = [[_do objectForKey:@(TestOperationsenum1)] bytes];
- test(p[0] == TestOperationsenum3);
- test(p[1] == TestOperationsenum3);
+ pe = [[_do objectForKey:@(TestOperationsenum1)] bytes];
+ test(pe[0] == TestOperationsenum3);
+ test(pe[1] == TestOperationsenum3);
test([ro count] == 3);
test([[ro objectForKey:@(TestOperationsenum3)] length] / sizeof(TestOperationsMyEnum) == 3);
- p = [[ro objectForKey:@(TestOperationsenum3)] bytes];
- test(p[0] == TestOperationsenum1);
- test(p[1] == TestOperationsenum1);
- test(p[2] == TestOperationsenum2);
+ pe = [[ro objectForKey:@(TestOperationsenum3)] bytes];
+ test(pe[0] == TestOperationsenum1);
+ test(pe[1] == TestOperationsenum1);
+ test(pe[2] == TestOperationsenum2);
test([[ro objectForKey:@(TestOperationsenum2)] length] / sizeof(TestOperationsMyEnum) == 2);
- p = [[ro objectForKey:@(TestOperationsenum2)] bytes];
- test(p[0] == TestOperationsenum1);
- test(p[1] == TestOperationsenum2);
+ pe = [[ro objectForKey:@(TestOperationsenum2)] bytes];
+ test(pe[0] == TestOperationsenum1);
+ test(pe[1] == TestOperationsenum2);
test([[ro objectForKey:@(TestOperationsenum1)] length] / sizeof(TestOperationsMyEnum) == 2);
- p = [[ro objectForKey:@(TestOperationsenum1)] bytes];
- test(p[0] == TestOperationsenum3);
- test(p[1] == TestOperationsenum3);
+ pe = [[ro objectForKey:@(TestOperationsenum1)] bytes];
+ test(pe[0] == TestOperationsenum3);
+ test(pe[1] == TestOperationsenum3);
}
{
@@ -1649,8 +1649,7 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
TestOperationsIntS *r = [p opIntS:s];
test([r length] == lengths[l] * sizeof(ICEInt));
const ICEInt *rp = [r bytes];
- int j;
- for(j = 0; j < [r length] / sizeof(ICEInt); ++j)
+ for(int j = 0; j < (int)([r length] / sizeof(ICEInt)); ++j)
{
test(rp[j] == -j);
}
@@ -1702,18 +1701,18 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
[ctx setObject:@"TWO" forKey:@"two" ];
[ctx setObject:@"THREE" forKey:@"three"];
- id<TestOperationsMyClassPrx> p = [TestOperationsMyClassPrx uncheckedCast:[ic stringToProxy:@"test:default -p 12010"]];
+ id<TestOperationsMyClassPrx> pc = [TestOperationsMyClassPrx uncheckedCast:[ic stringToProxy:@"test:default -p 12010"]];
[[ic getImplicitContext] setContext:ctx];
test([[[ic getImplicitContext] getContext] isEqual:ctx]);
- test([[p opContext] isEqual:ctx]);
+ test([[pc opContext] isEqual:ctx]);
test([[ic getImplicitContext] get:@"zero"] == nil);
[[ic getImplicitContext] put:@"zero" value:@"ZERO"];
test([[[ic getImplicitContext] get:@"zero"] isEqualToString:@"ZERO"]);
ctx = [[ic getImplicitContext] getContext];
- test([[p opContext] isEqual:ctx]);
+ test([[pc opContext] isEqual:ctx]);
ICEMutableContext *prxContext = [ICEMutableContext dictionary];
[prxContext setObject:@"UN" forKey:@"one"];
@@ -1722,20 +1721,20 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
ICEMutableContext *combined = [ICEMutableContext dictionaryWithDictionary:ctx];
[combined addEntriesFromDictionary:prxContext];
- p = [TestOperationsMyClassPrx uncheckedCast:[p ice_context:prxContext]];
+ pc = [TestOperationsMyClassPrx uncheckedCast:[pc ice_context:prxContext]];
[[ic getImplicitContext] setContext:[ICEContext dictionary]];
- test([[p opContext] isEqualToDictionary:prxContext]);
+ test([[pc opContext] isEqualToDictionary:prxContext]);
[[ic getImplicitContext] setContext:ctx];
- test([[p opContext] isEqualToDictionary:combined]);
+ test([[pc opContext] isEqualToDictionary:combined]);
test([[[ic getImplicitContext] get:@"one"] isEqualToString:@"ONE"]);
[[ic getImplicitContext] remove:@"one"];
if([impls[i] isEqualToString:@"PerThread"])
{
- PerThreadContextInvokeThread* thread = [PerThreadContextInvokeThread create:[p ice_context:[ICEMutableContext dictionary]]];
+ PerThreadContextInvokeThread* thread = [PerThreadContextInvokeThread create:[pc ice_context:[ICEMutableContext dictionary]]];
[thread start];
[thread join];
}
@@ -1769,21 +1768,23 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
test([p opDouble1:1.0] == 1.0);
test([[p opString1:@"opString1"] isEqualToString:@"opString1"]);
- id<TestOperationsMyDerivedClassPrx> d = [TestOperationsMyDerivedClassPrx uncheckedCast:p];
-
- TestOperationsMyStruct1* s =
- [TestOperationsMyStruct1 myStruct1:@"Test::MyStruct1::s" myClass:nil myStruct1:@"Test::MyStruct1::myStruct1"];
- s = [d opMyStruct1:s];
- test([s.tesT isEqualToString:@"Test::MyStruct1::s"]);
- test(s.myClass == 0);
- test([s.myStruct1 isEqualToString:@"Test::MyStruct1::myStruct1"]);
-
- TestOperationsMyClass1* c =
- [TestOperationsMyClass1 myClass1:@"Test::MyClass1::testT" myClass:nil myClass1:@"Test::MyClass1::myClass1"];
- c = [d opMyClass1:c];
- test([c.tesT isEqualToString:@"Test::MyClass1::testT"]);
- test(c.myClass == nil);
- test([c.myClass1 isEqualToString:@"Test::MyClass1::myClass1"]);
+ id<TestOperationsMyDerivedClassPrx> derived = [TestOperationsMyDerivedClassPrx uncheckedCast:p];
+
+ {
+ TestOperationsMyStruct1* s =
+ [TestOperationsMyStruct1 myStruct1:@"Test::MyStruct1::s" myClass:nil myStruct1:@"Test::MyStruct1::myStruct1"];
+ s = [derived opMyStruct1:s];
+ test([s.tesT isEqualToString:@"Test::MyStruct1::s"]);
+ test(s.myClass == 0);
+ test([s.myStruct1 isEqualToString:@"Test::MyStruct1::myStruct1"]);
+
+ TestOperationsMyClass1* c =
+ [TestOperationsMyClass1 myClass1:@"Test::MyClass1::testT" myClass:nil myClass1:@"Test::MyClass1::myClass1"];
+ c = [derived opMyClass1:c];
+ test([c.tesT isEqualToString:@"Test::MyClass1::testT"]);
+ test(c.myClass == nil);
+ test([c.myClass1 isEqualToString:@"Test::MyClass1::myClass1"]);
+ }
[p opStringS1:[TestOperationsStringS array]];
[p opByteBoolD1:[TestOperationsByteBoolD dictionary]];
diff --git a/objective-c/test/Ice/operations/TwowaysAMI.m b/objective-c/test/Ice/operations/TwowaysAMI.m
index e723dcab060..ace69a24511 100644
--- a/objective-c/test/Ice/operations/TwowaysAMI.m
+++ b/objective-c/test/Ice/operations/TwowaysAMI.m
@@ -83,24 +83,24 @@
{
[self called];
}
--(void) opVoidException:(ICEException*)ex
+-(void) opVoidException:(ICEException*)__unused ex
{
test(NO);
}
--(void) opByteExResponse:(ICEByte)ret p3:(ICEByte)p3
+-(void) opByteExResponse:(ICEByte)__unused ret p3:(ICEByte)__unused p3
{
test(NO);
}
--(void) opByteExException:(ICEException*)ex
+-(void) opByteExException:(ICEException*)__unused ex
{
test([ex isKindOfClass:[ICENoEndpointException class]]);
[self called];
}
--(void) opByteResponse:(ICEByte)ret p3:(ICEByte)p3
+-(void) opByteResponse:(ICEByte)__unused ret p3:(ICEByte)__unused p3
{
[self called];
}
--(void) opByteException:(ICEException*)ex
+-(void) opByteException:(ICEException*)__unused ex
{
test(NO);
}
@@ -110,7 +110,7 @@
test(!r);
[self called];
}
--(void) opBoolException:(ICEException*)ex
+-(void) opBoolException:(ICEException*)__unused ex
{
test(NO);
}
@@ -122,7 +122,7 @@
test(r == 12);
[self called];
}
--(void) opShortIntLongException:(ICEException*)ex
+-(void) opShortIntLongException:(ICEException*)__unused ex
{
test(NO);
}
@@ -133,7 +133,7 @@
test(r == 1.1E10);
[self called];
}
--(void) opFloatDoubleException:(ICEException*)ex
+-(void) opFloatDoubleException:(ICEException*)__unused ex
{
test(NO);
}
@@ -144,7 +144,7 @@
[self called];
}
--(void) opStringException:(ICEException*)ex
+-(void) opStringException:(ICEException*)__unused ex
{
test(NO);
};
@@ -156,7 +156,7 @@
[self called];
}
--(void) opMyEnumException:(ICEException*)ex
+-(void) opMyEnumException:(ICEException*)__unused ex
{
test(NO);
}
@@ -183,7 +183,7 @@
[self called];
}
--(void) opMyClassException:(ICEException*)ex
+-(void) opMyClassException:(ICEException*)__unused ex
{
test(NO);
}
@@ -204,7 +204,7 @@
[self called];
}
--(void) opStructException:(ICEException*)ex
+-(void) opStructException:(ICEException*)__unused ex
{
test(NO);
}
@@ -230,7 +230,7 @@
[self called];
}
--(void) opByteSException:(ICEException*)ex
+-(void) opByteSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -251,7 +251,7 @@
[self called];
}
--(void) opBoolSException:(ICEException*)ex
+-(void) opBoolSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -285,7 +285,7 @@
[self called];
}
--(void) opShortIntLongSException:(ICEException*)ex
+-(void) opShortIntLongSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -311,7 +311,7 @@
[self called];
}
--(void) opFloatDoubleSException:(ICEException*)ex
+-(void) opFloatDoubleSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -330,7 +330,7 @@
[self called];
}
--(void) opStringSException:(ICEException*)ex
+-(void) opStringSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -366,27 +366,27 @@
[self called];
}
--(void) opByteSSException:(ICEException*)ex
+-(void) opByteSSException:(ICEException*)__unused ex
{
test(NO);
}
--(void) opBoolSSResponse:(TestOperationsBoolSS*)sso p3:(TestOperationsBoolSS*)bso
+-(void) opBoolSSResponse:(TestOperationsBoolSS*)__unused sso p3:(TestOperationsBoolSS*)__unused bso
{
[self called];
}
--(void) opBoolSSException:(ICEException*)ex
+-(void) opBoolSSException:(ICEException*)__unused ex
{
test(NO);
}
--(void) opShortIntLongSSResponse:(TestOperationsLongSS*)a p4:(TestOperationsShortSS*)p4 p5:(TestOperationsIntSS*)p5 p6:(TestOperationsLongSS*)p6
+-(void) opShortIntLongSSResponse:(TestOperationsLongSS*)__unused a p4:(TestOperationsShortSS*)__unused p4 p5:(TestOperationsIntSS*)__unused p5 p6:(TestOperationsLongSS*)__unused p6
{
[self called];
}
--(void) opShortIntLongSSException:(ICEException*)ex
+-(void) opShortIntLongSSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -424,7 +424,7 @@
[self called];
}
--(void) opFloatDoubleSSException:(ICEException*)ex
+-(void) opFloatDoubleSSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -449,7 +449,7 @@
[self called];
}
--(void) opStringSSException:(ICEException*)ex
+-(void) opStringSSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -490,7 +490,7 @@
test([[[[rsso objectAtIndex:2] objectAtIndex:1] objectAtIndex:0] isEqualToString:@"abcd"]);
[self called];
}
--(void) opStringSSSException:(ICEException*)ex
+-(void) opStringSSSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -506,7 +506,7 @@
test([[ro objectForKey:[NSNumber numberWithUnsignedChar:101]] boolValue] == YES);
[self called];
}
--(void) opByteBoolDException:(ICEException*)ex
+-(void) opByteBoolDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -522,7 +522,7 @@
test([[ro objectForKey:[NSNumber numberWithShort:1101]] intValue] == 0);
[self called];
}
--(void) opShortIntDException:(ICEException*)ex
+-(void) opShortIntDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -538,7 +538,7 @@
test((ICEFloat)[[ro objectForKey:[NSNumber numberWithLong:999999130]] floatValue] == 0.5f);
[self called];
}
--(void) opLongFloatDException:(ICEException*)ex
+-(void) opLongFloatDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -554,7 +554,7 @@
test([[ro objectForKey:@"BAR"] isEqualToString:@"abc 0.5"]);
[self called];
}
--(void) opStringStringDException:(ICEException*)ex
+-(void) opStringStringDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -570,7 +570,7 @@
test([[ro objectForKey:@"Hello!!"] intValue] == TestOperationsenum2);
[self called];
}
--(void) opStringMyEnumDException:(ICEException*)ex
+-(void) opStringMyEnumDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -583,7 +583,7 @@
test([[ro objectForKey:@(TestOperationsenum3)] isEqualToString:@"querty"]);
[self called];
}
--(void) opMyEnumStringDException:(ICEException*)ex
+-(void) opMyEnumStringDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -599,7 +599,7 @@
test([[ro objectForKey:s23] isEqual:@(TestOperationsenum2)]);
[self called];
}
--(void) opMyStructMyEnumDException:(ICEException*)ex
+-(void) opMyStructMyEnumDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -626,7 +626,7 @@
test([[[_do objectAtIndex:2] objectForKey:[NSNumber numberWithUnsignedChar:101]] boolValue] == YES);
[self called];
}
--(void) opByteBoolDSException:(ICEException*)ex
+-(void) opByteBoolDSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -652,7 +652,7 @@
test([[[_do objectAtIndex:2] objectForKey:[NSNumber numberWithShort:1101]] intValue] == 0);
[self called];
}
--(void) opShortIntDSException:(ICEException*)ex
+-(void) opShortIntDSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -678,7 +678,7 @@
test([[[_do objectAtIndex:2] objectForKey:[NSNumber numberWithLong:999999130]] floatValue] == 0.5f);
[self called];
}
--(void) opLongFloatDSException:(ICEException*)ex
+-(void) opLongFloatDSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -704,7 +704,7 @@
test([[[_do objectAtIndex:2] objectForKey:@"BAR"] isEqualToString:@"abc 0.5"]);
[self called];
}
--(void) opStringStringDSException:(ICEException*)ex
+-(void) opStringStringDSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -730,7 +730,7 @@
test([[[_do objectAtIndex:2] objectForKey:@"Hello!!"] intValue] == TestOperationsenum2);
[self called];
}
--(void) opStringMyEnumDSException:(ICEException*)ex
+-(void) opStringMyEnumDSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -752,7 +752,7 @@
test([[[_do objectAtIndex:2] objectForKey:@(TestOperationsenum3)] isEqualToString:@"querty"]);
[self called];
}
--(void) opMyEnumStringDSException:(ICEException*)ex
+-(void) opMyEnumStringDSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -780,7 +780,7 @@
test([[[_do objectAtIndex:2] objectForKey:s23] intValue] == TestOperationsenum2);
[self called];
}
--(void) opMyStructMyEnumDSException:(ICEException*)ex
+-(void) opMyStructMyEnumDSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -806,7 +806,7 @@
test(p[1] == 0xf3);
[self called];
}
--(void) opByteByteSDException:(ICEException*)ex
+-(void) opByteByteSDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -830,7 +830,7 @@
test(p[2] == YES);
[self called];
}
--(void) opBoolBoolSDException:(ICEException*)ex
+-(void) opBoolBoolSDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -858,7 +858,7 @@
test(p[1] == 7);
[self called];
}
--(void) opShortShortSDException:(ICEException*)ex
+-(void) opShortShortSDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -886,7 +886,7 @@
test(p[1] == 700);
[self called];
}
--(void) opIntIntSDException:(ICEException*)ex
+-(void) opIntIntSDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -914,7 +914,7 @@
test(p[1] == 999999120);
[self called];
}
--(void) opLongLongSDException:(ICEException*)ex
+-(void) opLongLongSDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -942,7 +942,7 @@
test(p[1] == 3.14f);
[self called];
}
--(void) opStringFloatSDException:(ICEException*)ex
+-(void) opStringFloatSDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -970,7 +970,7 @@
test(p[1] == 1.7E10);
[self called];
}
--(void) opStringDoubleSDException:(ICEException*)ex
+-(void) opStringDoubleSDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -992,7 +992,7 @@
test([[[ro objectForKey:@"ghi"] objectAtIndex:1] isEqualToString:@"xor"]);
[self called];
}
--(void) opStringStringSDException:(ICEException*)ex
+-(void) opStringStringSDException:(ICEException*)__unused ex
{
test(NO);
}
@@ -1020,21 +1020,20 @@
test(p[1] == TestOperationsenum3);
[self called];
}
--(void) opMyEnumMyEnumSDException:(ICEException*)ex
+-(void) opMyEnumMyEnumSDException:(ICEException*)__unused ex
{
test(NO);
}
-(void) opIntSResponse:(TestOperationsIntS*)r
{
const ICEInt *rp = [r bytes];
- int j;
- for(j = 0; j < [r length] / sizeof(ICEInt); ++j)
+ for(int j = 0; j < (int)([r length] / sizeof(ICEInt)); ++j)
{
test(rp[j] == -j);
}
[self called];
}
--(void) opIntSException:(ICEException*)ex
+-(void) opIntSException:(ICEException*)__unused ex
{
test(NO);
}
@@ -1051,7 +1050,7 @@
test([[ctx objectForKey:@"three"] isEqualToString:@"THREE"]);
[self called];
}
--(void) opContextException:(ICEException*)ex
+-(void) opContextException:(ICEException*)__unused ex
{
test(NO);
}
@@ -1059,7 +1058,7 @@
{
[self called];
}
--(void) opDoubleMarshalingException:(ICEException*)ex
+-(void) opDoubleMarshalingException:(ICEException*)__unused ex
{
test(NO);
}
@@ -1960,23 +1959,23 @@ twowaysAMI(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
[ctx setObject:@"THREE" forKey:@"three"];
{
TestAMIOperationsCallback* cb = [TestAMIOperationsCallback create];
- [p begin_opContext:^(ICEMutableContext* ctx) { [cb opEmptyContextResponse:ctx]; } exception:^(ICEException* ex) { [cb opContextException:ex]; }];
+ [p begin_opContext:^(ICEMutableContext* ctxP) { [cb opEmptyContextResponse:ctxP]; } exception:^(ICEException* ex) { [cb opContextException:ex]; }];
test([cb check]);
}
{
TestAMIOperationsCallback* cb = [TestAMIOperationsCallback create];
- [p begin_opContext:ctx response:^(ICEMutableContext* ctx) { [cb opNonEmptyContextResponse:ctx]; } exception:^(ICEException* ex) { [cb opContextException:ex]; }];
+ [p begin_opContext:ctx response:^(ICEMutableContext* ctxP) { [cb opNonEmptyContextResponse:ctxP]; } exception:^(ICEException* ex) { [cb opContextException:ex]; }];
test([cb check]);
}
{
id<TestOperationsMyClassPrx> p2 = [TestOperationsMyClassPrx checkedCast:[p ice_context:ctx]];
test([[p2 ice_getContext] isEqual:ctx]);
TestAMIOperationsCallback* cb = [TestAMIOperationsCallback create];
- [p2 begin_opContext:^(ICEMutableContext* ctx) { [cb opNonEmptyContextResponse:ctx]; } exception:^(ICEException* ex) { [cb opContextException:ex]; }];
+ [p2 begin_opContext:^(ICEMutableContext* ctxP) { [cb opNonEmptyContextResponse:ctxP]; } exception:^(ICEException* ex) { [cb opContextException:ex]; }];
test([cb check]);
cb = [TestAMIOperationsCallback create];
- [p2 begin_opContext:ctx response:^(ICEMutableContext* ctx) { [cb opNonEmptyContextResponse:ctx]; } exception:^(ICEException* ex) { [cb opContextException:ex]; }];
+ [p2 begin_opContext:ctx response:^(ICEMutableContext* ctxP) { [cb opNonEmptyContextResponse:ctxP]; } exception:^(ICEException* ex) { [cb opContextException:ex]; }];
test([cb check]);
}
}
@@ -2001,14 +2000,14 @@ twowaysAMI(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
[ctx setObject:@"TWO" forKey:@"two" ];
[ctx setObject:@"THREE" forKey:@"three"];
- id<TestOperationsMyClassPrx> p = [TestOperationsMyClassPrx uncheckedCast:
+ id<TestOperationsMyClassPrx> pc = [TestOperationsMyClassPrx uncheckedCast:
[ic stringToProxy:@"test:default -p 12010"]];
[[ic getImplicitContext] setContext:(ctx)];
test([[[ic getImplicitContext] getContext] isEqualToDictionary:ctx]);
{
- id<ICEAsyncResult> r = [p begin_opContext];
- ICEContext* c = [p end_opContext:r];
+ id<ICEAsyncResult> r = [pc begin_opContext];
+ ICEContext* c = [pc end_opContext:r];
test([c isEqualToDictionary:ctx]);
}
@@ -2018,8 +2017,8 @@ twowaysAMI(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
ctx = [[ic getImplicitContext] getContext];
{
- id<ICEAsyncResult> r = [p begin_opContext];
- ICEContext* c = [p end_opContext:r];
+ id<ICEAsyncResult> r = [pc begin_opContext];
+ ICEContext* c = [pc end_opContext:r];
test([c isEqualToDictionary:ctx]);
}
@@ -2030,19 +2029,19 @@ twowaysAMI(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
ICEMutableContext *combined = [ICEMutableContext dictionaryWithDictionary:ctx];
[combined addEntriesFromDictionary:prxContext];
- p = [TestOperationsMyClassPrx uncheckedCast:[p ice_context:prxContext]];
+ pc = [TestOperationsMyClassPrx uncheckedCast:[pc ice_context:prxContext]];
[[ic getImplicitContext] setContext:[ICEMutableContext dictionary]];
{
- id<ICEAsyncResult> r = [p begin_opContext];
- ICEContext* c = [p end_opContext:r];
+ id<ICEAsyncResult> r = [pc begin_opContext];
+ ICEContext* c = [pc end_opContext:r];
test([c isEqualToDictionary:prxContext]);
}
[[ic getImplicitContext] setContext:ctx];
{
- id<ICEAsyncResult> r = [p begin_opContext];
- ICEContext* c = [p end_opContext:r];
+ id<ICEAsyncResult> r = [pc begin_opContext];
+ ICEContext* c = [pc end_opContext:r];
test([c isEqualToDictionary:combined]);
}
diff --git a/objective-c/test/Ice/optional/AllTests.m b/objective-c/test/Ice/optional/AllTests.m
index e66b3f4eae0..73b6a7dcbda 100644
--- a/objective-c/test/Ice/optional/AllTests.m
+++ b/objective-c/test/Ice/optional/AllTests.m
@@ -688,18 +688,18 @@ optionalAllTests(id<ICECommunicator> communicator)
tprintf("ok\n");
tprintf("testing tag marshalling... ");
- TestOptionalB* b = [TestOptionalB b];
- TestOptionalB* b2 = (TestOptionalB*)[initial pingPong:b];
+ TestOptionalB* b1 = [TestOptionalB b];
+ TestOptionalB* b2 = (TestOptionalB*)[initial pingPong:b1];
test(![b2 hasMa]);
test(![b2 hasMb]);
test(![b2 hasMc]);
- b.ma = 10;
- b.mb = 11;
- b.mc = 12;
- b.md = 13;
+ b1.ma = 10;
+ b1.mb = 11;
+ b1.mc = 12;
+ b1.md = 13;
- b2 = (TestOptionalB*)[initial pingPong:b];
+ b2 = (TestOptionalB*)[initial pingPong:b1];
test(b2.ma == 10);
test(b2.mb == 11);
test(b2.mc == 12);
@@ -708,7 +708,7 @@ optionalAllTests(id<ICECommunicator> communicator)
[factory setEnabled:YES];
os = [ICEUtil createOutputStream:communicator];
[os startEncapsulation];
- [os writeValue:b];
+ [os writeValue:b1];
[os endEncapsulation];
inEncaps = [os finished];
test([initial ice_invoke:@"pingPong" mode:ICENormal inEncaps:inEncaps outEncaps:&outEncaps]);
diff --git a/objective-c/test/Ice/optional/TestI.m b/objective-c/test/Ice/optional/TestI.m
index 05adcf1c8f3..c858764f171 100644
--- a/objective-c/test/Ice/optional/TestI.m
+++ b/objective-c/test/Ice/optional/TestI.m
@@ -17,19 +17,19 @@
{
[[current.adapter getCommunicator] shutdown];
}
--(ICEObject*) pingPong:(ICEObject*)obj current:(ICECurrent*)current
+-(ICEObject*) pingPong:(ICEObject*)obj current:(ICECurrent*)__unused current
{
return obj;
}
--(void) opOptionalException:(id)a b:(id)b o:(id)o current:(ICECurrent *)current
+-(void) opOptionalException:(id)a b:(id)b o:(id)o current:(ICECurrent *)__unused current
{
@throw [TestOptionalOptionalException optionalException:NO a:a b:b o:o];
}
--(void) opDerivedException:(id)a b:(id)b o:(id)o current:(ICECurrent *)current
+-(void) opDerivedException:(id)a b:(id)b o:(id)o current:(ICECurrent *)__unused current
{
@throw [TestOptionalDerivedException derivedException:NO a:a b:b o:o ss:b o2:o];
}
--(void) opRequiredException:(id)a b:(id)b o:(id)o current:(ICECurrent *)current
+-(void) opRequiredException:(id)a b:(id)b o:(id)o current:(ICECurrent *)__unused current
{
TestOptionalRequiredException* ex = [TestOptionalRequiredException requiredException];
if(a != ICENone)
@@ -63,231 +63,231 @@
}
@throw ex;
}
--(id) opByte:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opByte:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opBool:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opBool:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opShort:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opShort:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opInt:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opInt:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opLong:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opLong:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opFloat:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opFloat:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opDouble:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opDouble:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opString:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opString:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opMyEnum:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opMyEnum:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opSmallStruct:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opSmallStruct:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opFixedStruct:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opFixedStruct:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opVarStruct:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opVarStruct:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opOneOptional:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opOneOptional:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opOneOptionalProxy:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opOneOptionalProxy:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opByteSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opByteSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opBoolSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opBoolSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opShortSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opShortSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opIntSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opIntSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opLongSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opLongSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opFloatSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opFloatSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opDoubleSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opDoubleSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opStringSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opStringSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opSmallStructSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opSmallStructSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opSmallStructList:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opSmallStructList:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opFixedStructSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opFixedStructSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opFixedStructList:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opFixedStructList:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opVarStructSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opVarStructSeq:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opSerializable:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opSerializable:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opIntIntDict:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opIntIntDict:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opStringIntDict:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opStringIntDict:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(id) opIntOneOptionalDict:(id)p1 p3:(id *)p3 current:(ICECurrent *)current
+-(id) opIntOneOptionalDict:(id)p1 p3:(id *)p3 current:(ICECurrent *)__unused current
{
*p3 = p1;
return p1;
}
--(void) opClassAndUnknownOptional:(TestOptionalA *)p current:(ICECurrent *)current
+-(void) opClassAndUnknownOptional:(TestOptionalA *)__unused p current:(ICECurrent *)__unused current
{
}
--(void) sendOptionalClass:(BOOL)req o:(id)o current:(ICECurrent *)current
+-(void) sendOptionalClass:(BOOL)__unused req o:(id)__unused o current:(ICECurrent *)__unused current
{
}
--(void) returnOptionalClass:(BOOL)req o:(id *)o current:(ICECurrent *)current
+-(void) returnOptionalClass:(BOOL)__unused req o:(id *)o current:(ICECurrent *)__unused current
{
*o = [TestOptionalOneOptional oneOptional:@53];
}
--(id) opG:(id)g current:(ICECurrent*)current
+-(id) opG:(id)g current:(ICECurrent*)__unused current
{
return g;
}
--(void) opVoid:(ICECurrent*)current
+-(void) opVoid:(ICECurrent*)__unused current
{
}
--(id) opMStruct1:(ICECurrent *)current
+-(id) opMStruct1:(ICECurrent *)__unused current
{
return [TestOptionalSmallStruct smallStruct];
}
--(id) opMStruct2:(id)p1 p2:(id*)p2 current:(ICECurrent *)current
+-(id) opMStruct2:(id)p1 p2:(id*)p2 current:(ICECurrent *)__unused current
{
*p2 = p1;
return p1;
}
--(id) opMSeq1:(ICECurrent *)current
+-(id) opMSeq1:(ICECurrent *)__unused current
{
return [TestOptionalStringSeq array];
}
--(id) opMSeq2:(id)p1 p2:(id*)p2 current:(ICECurrent *)current
+-(id) opMSeq2:(id)p1 p2:(id*)p2 current:(ICECurrent *)__unused current
{
*p2 = p1;
return p1;
}
--(id) opMDict1:(ICECurrent *)current
+-(id) opMDict1:(ICECurrent *)__unused current
{
return [TestOptionalStringIntDict dictionary];
}
--(id) opMDict2:(id)p1 p2:(id*)p2 current:(ICECurrent *)current
+-(id) opMDict2:(id)p1 p2:(id*)p2 current:(ICECurrent *)__unused current
{
*p2 = p1;
return p1;
}
--(id) opMG1:(ICECurrent *)current
+-(id) opMG1:(ICECurrent *)__unused current
{
return [TestOptionalG g];
}
--(id) opMG2:(id)p1 p2:(id*)p2 current:(ICECurrent *)current
+-(id) opMG2:(id)p1 p2:(id*)p2 current:(ICECurrent *)__unused current
{
*p2 = p1;
return p1;
}
--(BOOL) supportsRequiredParams:(ICECurrent*)current
+-(BOOL) supportsRequiredParams:(ICECurrent*)__unused current
{
return NO;
}
--(BOOL) supportsJavaSerializable:(ICECurrent*)current
+-(BOOL) supportsJavaSerializable:(ICECurrent*)__unused current
{
return NO;
}
--(BOOL) supportsCsharpSerializable:(ICECurrent*)current
+-(BOOL) supportsCsharpSerializable:(ICECurrent*)__unused current
{
return NO;
}
--(BOOL) supportsCppStringView:(ICECurrent*)current
+-(BOOL) supportsCppStringView:(ICECurrent*)__unused current
{
return NO;
}
--(BOOL) supportsNullOptional:(ICECurrent*)current
+-(BOOL) supportsNullOptional:(ICECurrent*)__unused current
{
return YES;
}
diff --git a/objective-c/test/Ice/proxy/AllTests.m b/objective-c/test/Ice/proxy/AllTests.m
index 273ef6cb05d..f8ca1237129 100644
--- a/objective-c/test/Ice/proxy/AllTests.m
+++ b/objective-c/test/Ice/proxy/AllTests.m
@@ -1043,15 +1043,15 @@ proxyAllTests(id<ICECommunicator> communicator)
tprintf("testing communicator shutdown/destroy... ");
{
- id<ICECommunicator> c = [ICEUtil createCommunicator];
- [c shutdown];
- test([c isShutdown]);
- [c waitForShutdown];
- [c destroy];
- [c shutdown];
- test([c isShutdown]);
- [c waitForShutdown];
- [c destroy];
+ id<ICECommunicator> com = [ICEUtil createCommunicator];
+ [com shutdown];
+ test([com isShutdown]);
+ [com waitForShutdown];
+ [com destroy];
+ [com shutdown];
+ test([com isShutdown]);
+ [com waitForShutdown];
+ [com destroy];
}
tprintf("ok\n");
diff --git a/objective-c/test/Ice/proxy/TestI.m b/objective-c/test/Ice/proxy/TestI.m
index 602cef3020e..5169e2cf39d 100644
--- a/objective-c/test/Ice/proxy/TestI.m
+++ b/objective-c/test/Ice/proxy/TestI.m
@@ -20,17 +20,17 @@
}
#endif
--(id<ICEObjectPrx>) echo:(id<ICEObjectPrx>)obj current:(ICECurrent*)current
+-(id<ICEObjectPrx>) echo:(id<ICEObjectPrx>)obj current:(ICECurrent*)__unused current
{
return obj;
}
--(void) shutdown:(ICECurrent*)c
+-(void) shutdown:(ICECurrent*)current
{
- [[[c adapter] getCommunicator] shutdown];
+ [[[current adapter] getCommunicator] shutdown];
}
--(ICEContext*) getContext:(ICECurrent*)c
+-(ICEContext*) getContext:(ICECurrent*)__unused current
{
return ICE_AUTORELEASE(ICE_RETAIN(_ctx));
}
diff --git a/objective-c/test/Ice/retry/AllTests.m b/objective-c/test/Ice/retry/AllTests.m
index ae8cf134e30..e73cf1c0f0e 100644
--- a/objective-c/test/Ice/retry/AllTests.m
+++ b/objective-c/test/Ice/retry/AllTests.m
@@ -63,7 +63,7 @@
{
[self called];
}
--(void) retryOpException:(ICEException*)ex
+-(void) retryOpException:(ICEException*)__unused ex
{
test(NO);
}
diff --git a/objective-c/test/Ice/retry/TestI.m b/objective-c/test/Ice/retry/TestI.m
index 78c897ec92e..ff3a3b43a98 100644
--- a/objective-c/test/Ice/retry/TestI.m
+++ b/objective-c/test/Ice/retry/TestI.m
@@ -37,7 +37,7 @@
}
}
--(ICEInt) opIdempotent:(ICEInt)nRetry current:(ICECurrent*)current
+-(ICEInt) opIdempotent:(ICEInt)nRetry current:(ICECurrent*)__unused current
{
if(nRetry < 0)
{
@@ -55,7 +55,7 @@
return counter;
}
--(void) opNotIdempotent:(ICECurrent*)current
+-(void) opNotIdempotent:(ICECurrent*)__unused current
{
@throw [ICEConnectionLostException connectionLostException:__FILE__ line:__LINE__];
}
diff --git a/objective-c/test/Ice/servantLocator/Collocated.m b/objective-c/test/Ice/servantLocator/Collocated.m
index 9b52abb246e..9bf25bc99e3 100644
--- a/objective-c/test/Ice/servantLocator/Collocated.m
+++ b/objective-c/test/Ice/servantLocator/Collocated.m
@@ -28,7 +28,7 @@
test([[co message] isEqual:@"blahblah"]);
}
--(void) throwTestIntfUserException;
+-(void) throwTestIntfUserException
{
@throw [TestServantLocatorTestIntfUserException testIntfUserException];
}
diff --git a/objective-c/test/Ice/servantLocator/ServantLocatorI.m b/objective-c/test/Ice/servantLocator/ServantLocatorI.m
index fc8c705d96b..32f0ce3fd5a 100644
--- a/objective-c/test/Ice/servantLocator/ServantLocatorI.m
+++ b/objective-c/test/Ice/servantLocator/ServantLocatorI.m
@@ -55,7 +55,7 @@
return [self newServantAndCookie:cookie];
}
--(void) finished:(ICECurrent*)current servant:(ICEObject*)servant cookie:(id)cookie
+-(void) finished:(ICECurrent*)current servant:(ICEObject*)__unused servant cookie:(id)cookie
{
test(!_deactivated);
@@ -75,18 +75,18 @@
[self checkCookie:cookie];
}
--(void) deactivate:(NSString*)category
+-(void) deactivate:(NSString*)__unused category
{
test(!_deactivated);
_deactivated = YES;
}
--(ICEObject*) newServantAndCookie:(id*)cookie
+-(ICEObject*) newServantAndCookie:(id*)__unused cookie
{
NSAssert(NO, @"Subclasses need to overwrite this method");
return nil; // To keep compiler happy
}
--(void) checkCookie:(id)cookie
+-(void) checkCookie:(id)__unused cookie
{
NSAssert(NO, @"Subclasses need to overwrite this method");
}
diff --git a/objective-c/test/Ice/servantLocator/Server.m b/objective-c/test/Ice/servantLocator/Server.m
index a16df680838..fe59848e00e 100644
--- a/objective-c/test/Ice/servantLocator/Server.m
+++ b/objective-c/test/Ice/servantLocator/Server.m
@@ -28,7 +28,7 @@
test([[co message] isEqual:@"blahblah"]);
}
--(void) throwTestIntfUserException;
+-(void) throwTestIntfUserException
{
@throw [TestServantLocatorTestIntfUserException testIntfUserException];
}
diff --git a/objective-c/test/Ice/servantLocator/TestI.m b/objective-c/test/Ice/servantLocator/TestI.m
index 7168cfde3cb..e39b81d3119 100644
--- a/objective-c/test/Ice/servantLocator/TestI.m
+++ b/objective-c/test/Ice/servantLocator/TestI.m
@@ -10,34 +10,34 @@
#import <servantLocator/TestI.h>
@implementation TestServantLocatorTestIntfI
--(void) requestFailedException:(ICECurrent*)current
+-(void) requestFailedException:(ICECurrent*)__unused current
{
}
--(void) unknownUserException:(ICECurrent*)current
+-(void) unknownUserException:(ICECurrent*)__unused current
{
}
--(void) unknownLocalException:(ICECurrent*)current
+-(void) unknownLocalException:(ICECurrent*)__unused current
{
}
--(void) unknownException:(ICECurrent*)current
+-(void) unknownException:(ICECurrent*)__unused current
{
}
--(void) userException:(ICECurrent*)current
+-(void) userException:(ICECurrent*)__unused current
{
}
--(void) localException:(ICECurrent*)current
+-(void) localException:(ICECurrent*)__unused current
{
}
--(void) stdException:(ICECurrent*)current
+-(void) stdException:(ICECurrent*)__unused current
{
}
--(void) cppException:(ICECurrent*)current
+-(void) cppException:(ICECurrent*)__unused current
{
}
--(void) unknownExceptionWithServantException:(ICECurrent*)current
+-(void) unknownExceptionWithServantException:(ICECurrent*)__unused current
{
}
--(NSString*) impossibleException:(BOOL)throw current:(ICECurrent*)current
+-(NSString*) impossibleException:(BOOL)throw current:(ICECurrent*)__unused current
{
if(throw)
{
@@ -49,7 +49,7 @@
//
return @"Hello";
}
--(NSString*) intfUserException:(BOOL)throw current:(ICECurrent*)current
+-(NSString*) intfUserException:(BOOL)throw current:(ICECurrent*)__unused current
{
if(throw)
{
@@ -61,10 +61,10 @@
//
return @"Hello";
}
--(void) asyncResponse:(ICECurrent*)current
+-(void) asyncResponse:(ICECurrent*)__unused current
{
}
--(void) asyncException:(ICECurrent*)current
+-(void) asyncException:(ICECurrent*)__unused current
{
}
-(void) shutdown:(ICECurrent*)current
diff --git a/objective-c/test/Ice/services/AllTests.m b/objective-c/test/Ice/services/AllTests.m
index 26c25b315ab..d513e8beeef 100644
--- a/objective-c/test/Ice/services/AllTests.m
+++ b/objective-c/test/Ice/services/AllTests.m
@@ -27,7 +27,7 @@
self = [super init];
return self;
}
--(void)tick:(NSString*)time current:(ICECurrent*)current
+-(void)tick:(NSString*)time current:(ICECurrent*)__unused current
{
NSLog(@"%@", time);
}
diff --git a/objective-c/test/Ice/slicing/exceptions/AllTests.m b/objective-c/test/Ice/slicing/exceptions/AllTests.m
index f8f5bfd0a06..522cce44f43 100644
--- a/objective-c/test/Ice/slicing/exceptions/AllTests.m
+++ b/objective-c/test/Ice/slicing/exceptions/AllTests.m
@@ -18,21 +18,21 @@
@implementation RelayI
--(void) knownPreservedAsBase:(ICECurrent*)current
+-(void) knownPreservedAsBase:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsClientKnownPreservedDerived knownPreservedDerived:@"base"
kp:@"preserved"
kpd:@"derived"];
}
--(void) knownPreservedAsKnownPreserved:(ICECurrent*)current
+-(void) knownPreservedAsKnownPreserved:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsClientKnownPreservedDerived knownPreservedDerived:@"base"
kp:@"preserved"
kpd:@"derived"];
}
--(void) unknownPreservedAsBase:(ICECurrent*)current
+-(void) unknownPreservedAsBase:(ICECurrent*)__unused current
{
TestSlicingExceptionsClientPreserved2* ex = ICE_AUTORELEASE([TestSlicingExceptionsClientPreserved2 alloc]);
ex.b = @"base";
@@ -43,7 +43,7 @@
@throw ex;
}
--(void) unknownPreservedAsKnownPreserved:(ICECurrent*)current
+-(void) unknownPreservedAsKnownPreserved:(ICECurrent*)__unused current
{
TestSlicingExceptionsClientPreserved2* ex = ICE_AUTORELEASE([TestSlicingExceptionsClientPreserved2 alloc]);
ex.b = @"base";
diff --git a/objective-c/test/Ice/slicing/exceptions/TestI.m b/objective-c/test/Ice/slicing/exceptions/TestI.m
index 9355a961b2b..af1efea09b3 100644
--- a/objective-c/test/Ice/slicing/exceptions/TestI.m
+++ b/objective-c/test/Ice/slicing/exceptions/TestI.m
@@ -12,97 +12,97 @@
#import <objc/Ice.h>
@implementation TestSlicingExceptionsServerI
--(void) baseAsBase:(ICECurrent*)current
+-(void) baseAsBase:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerBase base:@"Base.b"];
}
--(void) unknownDerivedAsBase:(ICECurrent*)current
+-(void) unknownDerivedAsBase:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerUnknownDerived unknownDerived:@"UnknownDerived.b" ud:@"UnknownDerived.ud"];
}
--(void) knownDerivedAsBase:(ICECurrent*)current
+-(void) knownDerivedAsBase:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerKnownDerived knownDerived:@"KnownDerived.b" kd:@"KnownDerived.kd"];
}
--(void) knownDerivedAsKnownDerived:(ICECurrent*)current
+-(void) knownDerivedAsKnownDerived:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerKnownDerived knownDerived:@"KnownDerived.b" kd:@"KnownDerived.kd"];
}
--(void) unknownIntermediateAsBase:(ICECurrent*)current
+-(void) unknownIntermediateAsBase:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerUnknownIntermediate unknownIntermediate:@"UnknownIntermediate.b" ui:@"UnknownIntermediate.ui"];
}
--(void) knownIntermediateAsBase:(ICECurrent*)current
+-(void) knownIntermediateAsBase:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerKnownIntermediate knownIntermediate:@"KnownIntermediate.b" ki:@"KnownIntermediate.ki"];
}
--(void) knownMostDerivedAsBase:(ICECurrent*)current
+-(void) knownMostDerivedAsBase:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerKnownMostDerived knownMostDerived:@"KnownMostDerived.b" ki:@"KnownMostDerived.ki" kmd:@"KnownMostDerived.kmd"];
}
--(void) knownIntermediateAsKnownIntermediate:(ICECurrent*)current
+-(void) knownIntermediateAsKnownIntermediate:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerKnownIntermediate knownIntermediate:@"KnownIntermediate.b" ki:@"KnownIntermediate.ki"];
}
--(void) knownMostDerivedAsKnownIntermediate:(ICECurrent*)current
+-(void) knownMostDerivedAsKnownIntermediate:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerKnownMostDerived knownMostDerived:@"KnownMostDerived.b" ki:@"KnownMostDerived.ki" kmd:@"KnownMostDerived.kmd"];
}
--(void) knownMostDerivedAsKnownMostDerived:(ICECurrent*)current
+-(void) knownMostDerivedAsKnownMostDerived:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerKnownMostDerived knownMostDerived:@"KnownMostDerived.b" ki:@"KnownMostDerived.ki" kmd:@"KnownMostDerived.kmd"];
}
--(void) unknownMostDerived1AsBase:(ICECurrent*)current
+-(void) unknownMostDerived1AsBase:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerUnknownMostDerived1 unknownMostDerived1:@"UnknownMostDerived1.b" ki:@"UnknownMostDerived1.ki" umd1:@"UnknownMostDerived1.umd1"];
}
--(void) unknownMostDerived1AsKnownIntermediate:(ICECurrent*)current
+-(void) unknownMostDerived1AsKnownIntermediate:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerUnknownMostDerived1 unknownMostDerived1:@"UnknownMostDerived1.b"
ki:@"UnknownMostDerived1.ki"
umd1:@"UnknownMostDerived1.umd1"];
}
--(void) unknownMostDerived2AsBase:(ICECurrent*)current
+-(void) unknownMostDerived2AsBase:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerUnknownMostDerived2 unknownMostDerived2:@"UnknownMostDerived2.b"
ui:@"UnknownMostDerived2.ui"
umd2:@"UnknownMostDerived2.umd2"];
}
--(void) unknownMostDerived2AsBaseCompact:(ICECurrent*)current
+-(void) unknownMostDerived2AsBaseCompact:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerUnknownMostDerived2 unknownMostDerived2:@"UnknownMostDerived2.b"
ui:@"UnknownMostDerived2.ui"
umd2:@"UnknownMostDerived2.umd2"];
}
--(void) knownPreservedAsBase:(ICECurrent*)current
+-(void) knownPreservedAsBase:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerKnownPreservedDerived knownPreservedDerived:@"base"
kp:@"preserved"
kpd:@"derived"];
}
--(void) knownPreservedAsKnownPreserved:(ICECurrent*)current
+-(void) knownPreservedAsKnownPreserved:(ICECurrent*)__unused current
{
@throw [TestSlicingExceptionsServerKnownPreservedDerived knownPreservedDerived:@"base"
kp:@"preserved"
kpd:@"derived"];
}
--(void) relayKnownPreservedAsBase:(TestSlicingExceptionsServerRelayPrx*)relay current:(ICECurrent*)current
+-(void) relayKnownPreservedAsBase:(TestSlicingExceptionsServerRelayPrx*)relay current:(ICECurrent*)__unused current
{
TestSlicingExceptionsServerRelayPrx* p =
[TestSlicingExceptionsServerRelayPrx uncheckedCast:[current.con createProxy:[relay ice_getIdentity]]];
@@ -110,7 +110,7 @@
test(NO);
}
--(void) relayKnownPreservedAsKnownPreserved:(TestSlicingExceptionsServerRelayPrx*)relay current:(ICECurrent*)current
+-(void) relayKnownPreservedAsKnownPreserved:(TestSlicingExceptionsServerRelayPrx*)relay current:(ICECurrent*)__unused current
{
TestSlicingExceptionsServerRelayPrx* p =
[TestSlicingExceptionsServerRelayPrx uncheckedCast:[current.con createProxy:[relay ice_getIdentity]]];
@@ -118,7 +118,7 @@
test(NO);
}
--(void) unknownPreservedAsBase:(ICECurrent*)current
+-(void) unknownPreservedAsBase:(ICECurrent*)__unused current
{
TestSlicingExceptionsServerSPreserved2* ex = [TestSlicingExceptionsServerSPreserved2 sPreserved2];
ex.b = @"base";
@@ -129,7 +129,7 @@
@throw ex;
}
--(void) unknownPreservedAsKnownPreserved:(ICECurrent*)current
+-(void) unknownPreservedAsKnownPreserved:(ICECurrent*)__unused current
{
TestSlicingExceptionsServerSPreserved2* ex = [TestSlicingExceptionsServerSPreserved2 sPreserved2];
ex.b = @"base";
@@ -140,7 +140,7 @@
@throw ex;
}
--(void) relayUnknownPreservedAsBase:(TestSlicingExceptionsServerRelayPrx*)relay current:(ICECurrent*)current
+-(void) relayUnknownPreservedAsBase:(TestSlicingExceptionsServerRelayPrx*)relay current:(ICECurrent*)__unused current
{
TestSlicingExceptionsServerRelayPrx* p =
[TestSlicingExceptionsServerRelayPrx uncheckedCast:[current.con createProxy:[relay ice_getIdentity]]];
@@ -148,7 +148,7 @@
test(NO);
}
--(void) relayUnknownPreservedAsKnownPreserved:(TestSlicingExceptionsServerRelayPrx*)relay current:(ICECurrent*)current
+-(void) relayUnknownPreservedAsKnownPreserved:(TestSlicingExceptionsServerRelayPrx*)relay current:(ICECurrent*)__unused current
{
TestSlicingExceptionsServerRelayPrx* p =
[TestSlicingExceptionsServerRelayPrx uncheckedCast:[current.con createProxy:[relay ice_getIdentity]]];
diff --git a/objective-c/test/Ice/slicing/objects/AllTests.m b/objective-c/test/Ice/slicing/objects/AllTests.m
index a9dced3f777..5275f3f76e5 100644
--- a/objective-c/test/Ice/slicing/objects/AllTests.m
+++ b/objective-c/test/Ice/slicing/objects/AllTests.m
@@ -202,7 +202,7 @@ static void breakCycles(id o)
[self called];
}
--(void) SBaseAsObjectException:(ICEException*)exc
+-(void) SBaseAsObjectException:(ICEException*)__unused exc
{
test(NO);
}
@@ -213,7 +213,7 @@ static void breakCycles(id o)
[self called];
}
--(void) SBaseAsSBaseException:(ICEException*)exc
+-(void) SBaseAsSBaseException:(ICEException*)__unused exc
{
test(NO);
}
@@ -226,7 +226,7 @@ static void breakCycles(id o)
[self called];
}
--(void) SBSKnownDerivedAsSBaseException:(ICEException*)exc
+-(void) SBSKnownDerivedAsSBaseException:(ICEException*)__unused exc
{
test(NO);
}
@@ -237,7 +237,7 @@ static void breakCycles(id o)
[self called];
}
--(void) SBSKnownDerivedAsSBSKnownDerivedException:(ICEException*)exc
+-(void) SBSKnownDerivedAsSBSKnownDerivedException:(ICEException*)__unused exc
{
test(NO);
}
@@ -248,28 +248,28 @@ static void breakCycles(id o)
[self called];
}
--(void) SBSUnknownDerivedAsSBaseException:(ICEException*)exc
+-(void) SBSUnknownDerivedAsSBaseException:(ICEException*)__unused exc
{
test(NO);
}
--(void) SBSUnknownDerivedAsSBaseCompactResponse:(TestSlicingObjectsClientSBase*)sb
+-(void) SBSUnknownDerivedAsSBaseCompactResponse:(TestSlicingObjectsClientSBase*)__unused sb
{
test(NO);
}
--(void) SBSUnknownDerivedAsSBaseCompactException:(ICEException*)exc
+-(void) SBSUnknownDerivedAsSBaseCompactException:(ICEException*)__unused exc
{
test([[exc ice_id] isEqualToString:@"::Ice::NoValueFactoryException"]);
[self called];
}
--(void) SUnknownAsObjectResponse10:(ICEObject*)o
+-(void) SUnknownAsObjectResponse10:(ICEObject*)__unused o
{
test(NO);
}
--(void) SUnknownAsObjectException10:(ICEException*)exc
+-(void) SUnknownAsObjectException10:(ICEException*)__unused exc
{
test([[exc ice_id] isEqualToString:@"::Ice::NoValueFactoryException"]);
[self called];
@@ -281,7 +281,7 @@ static void breakCycles(id o)
[[o ice_getSlicedData] clear];
}
--(void) SUnknownAsObjectException11:(ICEException*)exc
+-(void) SUnknownAsObjectException11:(ICEException*)__unused exc
{
test(NO);
}
@@ -296,7 +296,7 @@ static void breakCycles(id o)
[self called];
}
--(void) oneElementCycleException:(ICEException*)exc
+-(void) oneElementCycleException:(ICEException*)__unused exc
{
test(NO);
}
@@ -317,7 +317,7 @@ static void breakCycles(id o)
[self called];
}
--(void) twoElementCycleException:(ICEException*)exc
+-(void) twoElementCycleException:(ICEException*)__unused exc
{
test(NO);
}
@@ -347,7 +347,7 @@ static void breakCycles(id o)
[self called];
}
--(void) D1AsBException:(ICEException*)exc
+-(void) D1AsBException:(ICEException*)__unused exc
{
test(NO);
}
@@ -371,7 +371,7 @@ static void breakCycles(id o)
[self called];
}
--(void) D1AsD1Exception:(ICEException*)exc
+-(void) D1AsD1Exception:(ICEException*)__unused exc
{
test(NO);
}
@@ -399,7 +399,7 @@ static void breakCycles(id o)
[self called];
}
--(void) D2AsBException:(ICEException*)exc
+-(void) D2AsBException:(ICEException*)__unused exc
{
test(NO);
}
@@ -425,7 +425,7 @@ static void breakCycles(id o)
[self called];
}
--(void) paramTest1Exception:(ICEException*)exc
+-(void) paramTest1Exception:(ICEException*)__unused exc
{
test(NO);
}
@@ -439,7 +439,7 @@ static void breakCycles(id o)
breakCycles(p2);
}
--(void) returnTest1Exception:(ICEException*)exc
+-(void) returnTest1Exception:(ICEException*)__unused exc
{
test(NO);
}
@@ -453,7 +453,7 @@ static void breakCycles(id o)
breakCycles(p2);
}
--(void) returnTest2Exception:(ICEException*)exc
+-(void) returnTest2Exception:(ICEException*)__unused exc
{
test(NO);
}
@@ -464,7 +464,7 @@ static void breakCycles(id o)
[self called];
}
--(void) returnTest3Exception:(ICEException*)exc
+-(void) returnTest3Exception:(ICEException*)__unused exc
{
test(NO);
}
@@ -492,7 +492,7 @@ static void breakCycles(id o)
breakCycles(p2);
}
--(void) paramTest3Exception:(ICEException*)exc
+-(void) paramTest3Exception:(ICEException*)__unused exc
{
test(NO);
}
@@ -514,7 +514,7 @@ static void breakCycles(id o)
breakCycles(b);
}
--(void) paramTest4Exception:(ICEException*)exc
+-(void) paramTest4Exception:(ICEException*)__unused exc
{
test(NO);
}
@@ -525,7 +525,7 @@ static void breakCycles(id o)
[self called];
}
--(void) sequenceTestException:(ICEException*)exc
+-(void) sequenceTestException:(ICEException*)__unused exc
{
test(NO);
}
@@ -537,7 +537,7 @@ static void breakCycles(id o)
[self called];
}
--(void) dictionaryTestException:(ICEException*)exc
+-(void) dictionaryTestException:(ICEException*)__unused exc
{
test(NO);
}
@@ -631,7 +631,7 @@ static void breakCycles(id o)
breakCycles(f);
}
--(void) useForwardException:(ICEException*)exc
+-(void) useForwardException:(ICEException*)__unused exc
{
test(NO);
}
@@ -1974,7 +1974,7 @@ slicingObjectsAllTests(id<ICECommunicator> communicator)
}
TestSlicingObjectsClientCallback* cb = [TestSlicingObjectsClientCallback create];
- [test begin_dictionaryTest:bin response:^(TestSlicingObjectsClientMutableBDict* o, TestSlicingObjectsClientMutableBDict* bout) { [cb dictionaryTestResponse:o bout:bout]; } exception:^(ICEException* e) { [cb dictionaryTestException:e]; }];
+ [test begin_dictionaryTest:bin response:^(TestSlicingObjectsClientMutableBDict* o, TestSlicingObjectsClientMutableBDict* boutP) { [cb dictionaryTestResponse:o bout:boutP]; } exception:^(ICEException* e) { [cb dictionaryTestException:e]; }];
[cb check];
bout = cb.bout;
r = cb.r;
diff --git a/objective-c/test/Ice/slicing/objects/TestI.m b/objective-c/test/Ice/slicing/objects/TestI.m
index 9b79a3f2853..d8a5958831f 100644
--- a/objective-c/test/Ice/slicing/objects/TestI.m
+++ b/objective-c/test/Ice/slicing/objects/TestI.m
@@ -159,41 +159,41 @@ static void breakCycles(id o)
[super dealloc];
#endif
}
--(ICEObject*) SBaseAsObject:(ICECurrent*)current
+-(ICEObject*) SBaseAsObject:(ICECurrent*)__unused current
{
return [TestSlicingObjectsServerSBase sBase:@"SBase.sb"];
}
--(TestSlicingObjectsServerSBase*) SBaseAsSBase:(ICECurrent*)current
+-(TestSlicingObjectsServerSBase*) SBaseAsSBase:(ICECurrent*)__unused current
{
return [TestSlicingObjectsServerSBase sBase:@"SBase.sb"];
}
--(TestSlicingObjectsServerSBase*) SBSKnownDerivedAsSBase:(ICECurrent*)current
+-(TestSlicingObjectsServerSBase*) SBSKnownDerivedAsSBase:(ICECurrent*)__unused current
{
return [TestSlicingObjectsServerSBSKnownDerived sbsKnownDerived:@"SBSKnownDerived.sb"
sbskd:@"SBSKnownDerived.sbskd"];
}
--(TestSlicingObjectsServerSBSKnownDerived*) SBSKnownDerivedAsSBSKnownDerived:(ICECurrent*)current
+-(TestSlicingObjectsServerSBSKnownDerived*) SBSKnownDerivedAsSBSKnownDerived:(ICECurrent*)__unused current
{
return [TestSlicingObjectsServerSBSKnownDerived sbsKnownDerived:@"SBSKnownDerived.sb"
sbskd:@"SBSKnownDerived.sbskd"];
}
--(TestSlicingObjectsServerSBase*) SBSUnknownDerivedAsSBase:(ICECurrent*)current
+-(TestSlicingObjectsServerSBase*) SBSUnknownDerivedAsSBase:(ICECurrent*)__unused current
{
return [TestSlicingObjectsServerSBSUnknownDerived sbsUnknownDerived:@"SBSUnknownDerived.sb"
sbsud:@"SBSUnknownDerived.sbsud"];
}
--(TestSlicingObjectsServerSBase*) SBSUnknownDerivedAsSBaseCompact:(ICECurrent*)current
+-(TestSlicingObjectsServerSBase*) SBSUnknownDerivedAsSBaseCompact:(ICECurrent*)__unused current
{
return [TestSlicingObjectsServerSBSUnknownDerived sbsUnknownDerived:@"SBSUnknownDerived.sb"
sbsud:@"SBSUnknownDerived.sbsud"];
}
--(ICEObject*) SUnknownAsObject:(ICECurrent*)current
+-(ICEObject*) SUnknownAsObject:(ICECurrent*)__unused current
{
TestSlicingObjectsServerSUnknown* s = [TestSlicingObjectsServerSUnknown sUnknown:@"SUnknown.su" cycle:nil];
s.cycle = s;
@@ -201,7 +201,7 @@ static void breakCycles(id o)
return s;
}
--(void) checkSUnknown:(ICEObject*)object current:(ICECurrent*)current
+-(void) checkSUnknown:(ICEObject*)object current:(ICECurrent*)__unused current
{
if([current encoding] == ICEEncoding_1_0)
{
@@ -216,7 +216,7 @@ static void breakCycles(id o)
[objects_ addObject:object];
}
--(TestSlicingObjectsServerB*) oneElementCycle:(ICECurrent*)current
+-(TestSlicingObjectsServerB*) oneElementCycle:(ICECurrent*)__unused current
{
TestSlicingObjectsServerB* b1 = [TestSlicingObjectsServerB b];
b1.sb = @"B1.sb";
@@ -224,7 +224,7 @@ static void breakCycles(id o)
[objects_ addObject:b1];
return b1;
}
--(TestSlicingObjectsServerB*) twoElementCycle:(ICECurrent*)current
+-(TestSlicingObjectsServerB*) twoElementCycle:(ICECurrent*)__unused current
{
TestSlicingObjectsServerB* b1 = [TestSlicingObjectsServerB b];
b1.sb = @"B1.sb";
@@ -235,7 +235,7 @@ static void breakCycles(id o)
[objects_ addObject:b1];
return b1;
}
--(TestSlicingObjectsServerB*) D1AsB:(ICECurrent*)current
+-(TestSlicingObjectsServerB*) D1AsB:(ICECurrent*)__unused current
{
TestSlicingObjectsServerD1* d1 = [TestSlicingObjectsServerD1 d1];
d1.sb = @"D1.sb";
@@ -252,7 +252,7 @@ static void breakCycles(id o)
[objects_ addObject:d1];
return d1;
}
--(TestSlicingObjectsServerD1*) D1AsD1:(ICECurrent*)current
+-(TestSlicingObjectsServerD1*) D1AsD1:(ICECurrent*)__unused current
{
TestSlicingObjectsServerD1* d1 = [TestSlicingObjectsServerD1 d1];
d1.sb = @"D1.sb";
@@ -268,7 +268,7 @@ static void breakCycles(id o)
[objects_ addObject:d1];
return d1;
}
--(TestSlicingObjectsServerB*) D2AsB:(ICECurrent*)current
+-(TestSlicingObjectsServerB*) D2AsB:(ICECurrent*)__unused current
{
TestSlicingObjectsServerD2* d2 = [TestSlicingObjectsServerD2 d2];
d2.sb = @"D2.sb";
@@ -284,7 +284,7 @@ static void breakCycles(id o)
[objects_ addObject:d2];
return d2;
}
--(void) paramTest1:(TestSlicingObjectsServerB**)p1 p2:(TestSlicingObjectsServerB**)p2 current:(ICECurrent*)current
+-(void) paramTest1:(TestSlicingObjectsServerB**)p1 p2:(TestSlicingObjectsServerB**)p2 current:(ICECurrent*)__unused current
{
TestSlicingObjectsServerD1* d1 = [TestSlicingObjectsServerD1 d1];
d1.sb = @"D1.sb";
@@ -302,11 +302,11 @@ static void breakCycles(id o)
[objects_ addObject:d1];
[objects_ addObject:d2];
}
--(void) paramTest2:(TestSlicingObjectsServerB**)p1 p1:(TestSlicingObjectsServerB**)p2 current:(ICECurrent*)current
+-(void) paramTest2:(TestSlicingObjectsServerB**)p1 p1:(TestSlicingObjectsServerB**)p2 current:(ICECurrent*)__unused current
{
[self paramTest1:p2 p2:p1 current:current];
}
--(TestSlicingObjectsServerB*) paramTest3:(TestSlicingObjectsServerB**)p1 p2:(TestSlicingObjectsServerB**)p2 current:(ICECurrent*)current
+-(TestSlicingObjectsServerB*) paramTest3:(TestSlicingObjectsServerB**)p1 p2:(TestSlicingObjectsServerB**)p2 current:(ICECurrent*)__unused current
{
TestSlicingObjectsServerD2* d2 = [TestSlicingObjectsServerD2 d2];
d2.sb = @"D2.sb (p1 1)";
@@ -339,7 +339,7 @@ static void breakCycles(id o)
[objects_ addObject:d4];
return d3;
}
--(TestSlicingObjectsServerB*) paramTest4:(TestSlicingObjectsServerB**)p1 current:(ICECurrent*)current
+-(TestSlicingObjectsServerB*) paramTest4:(TestSlicingObjectsServerB**)p1 current:(ICECurrent*)__unused current
{
TestSlicingObjectsServerD4* d4 = [TestSlicingObjectsServerD4 d4];
d4.sb = @"D4.sb (1)";
@@ -352,23 +352,23 @@ static void breakCycles(id o)
[objects_ addObject:d4];
return d4.p2;
}
--(TestSlicingObjectsServerB*) returnTest1:(TestSlicingObjectsServerB**)p1 p2:(TestSlicingObjectsServerB**)p2 current:(ICECurrent*)current
+-(TestSlicingObjectsServerB*) returnTest1:(TestSlicingObjectsServerB**)p1 p2:(TestSlicingObjectsServerB**)p2 current:(ICECurrent*)__unused current
{
[self paramTest1:p1 p2:p2 current:current];
return *p1;
}
--(TestSlicingObjectsServerB*) returnTest2:(TestSlicingObjectsServerB**)p1 p1:(TestSlicingObjectsServerB**)p2 current:(ICECurrent*)current
+-(TestSlicingObjectsServerB*) returnTest2:(TestSlicingObjectsServerB**)p1 p1:(TestSlicingObjectsServerB**)p2 current:(ICECurrent*)__unused current
{
[self paramTest1:p2 p2:p1 current:current];
return *p1;
}
--(TestSlicingObjectsServerB*) returnTest3:(TestSlicingObjectsServerB*)p1 p2:(TestSlicingObjectsServerB*)p2 current:(ICECurrent*)current
+-(TestSlicingObjectsServerB*) returnTest3:(TestSlicingObjectsServerB*)p1 p2:(TestSlicingObjectsServerB*)p2 current:(ICECurrent*)__unused current
{
[objects_ addObject:p1];
[objects_ addObject:p2];
return p1;
}
--(TestSlicingObjectsServerSS*) sequenceTest:(TestSlicingObjectsServerSS1*)p1 p2:(TestSlicingObjectsServerSS2*)p2 current:(ICECurrent*)current
+-(TestSlicingObjectsServerSS*) sequenceTest:(TestSlicingObjectsServerSS1*)p1 p2:(TestSlicingObjectsServerSS2*)p2 current:(ICECurrent*)__unused current
{
TestSlicingObjectsServerSS* ss = [TestSlicingObjectsServerSS ss];
ss.c1 = p1;
@@ -379,7 +379,7 @@ static void breakCycles(id o)
return ss;
}
-(TestSlicingObjectsServerBDict*) dictionaryTest:(TestSlicingObjectsServerMutableBDict*)bin
- bout:(TestSlicingObjectsServerBDict**)bout current:(ICECurrent*)current
+ bout:(TestSlicingObjectsServerBDict**)bout current:(ICECurrent*)__unused current
{
int i;
*bout = [TestSlicingObjectsServerMutableBDict dictionary];
@@ -409,13 +409,13 @@ static void breakCycles(id o)
}
-(TestSlicingObjectsServerPBase*) exchangePBase:(TestSlicingObjectsServerPBase*)pb
- current:(ICECurrent*)current
+ current:(ICECurrent*)__unused current
{
[objects_ addObject:pb];
return pb;
}
--(TestSlicingObjectsServerPreserved*) PBSUnknownAsPreserved:(ICECurrent*)current
+-(TestSlicingObjectsServerPreserved*) PBSUnknownAsPreserved:(ICECurrent*)__unused current
{
if([current.encoding isEqual:ICEEncoding_1_0])
{
@@ -439,7 +439,7 @@ static void breakCycles(id o)
}
}
--(void) checkPBSUnknown:(TestSlicingObjectsServerPreserved*)p current:(ICECurrent*)current
+-(void) checkPBSUnknown:(TestSlicingObjectsServerPreserved*)p current:(ICECurrent*)__unused current
{
if([current.encoding isEqual:ICEEncoding_1_0])
{
@@ -459,7 +459,7 @@ static void breakCycles(id o)
}
}
--(TestSlicingObjectsServerPreserved*) PBSUnknownAsPreservedWithGraph:(ICECurrent*)current
+-(TestSlicingObjectsServerPreserved*) PBSUnknownAsPreservedWithGraph:(ICECurrent*)__unused current
{
TestSlicingObjectsServerPSUnknown* r = [TestSlicingObjectsServerPSUnknown alloc];
r.pi = 5;
@@ -473,7 +473,7 @@ static void breakCycles(id o)
return r;
}
--(void) checkPBSUnknownWithGraph:(TestSlicingObjectsServerPreserved*) p current:(ICECurrent*)current
+-(void) checkPBSUnknownWithGraph:(TestSlicingObjectsServerPreserved*) p current:(ICECurrent*)__unused current
{
if([current.encoding isEqual:ICEEncoding_1_0])
{
@@ -496,7 +496,7 @@ static void breakCycles(id o)
[objects_ addObject:p];
}
--(TestSlicingObjectsServerPreserved*) PBSUnknown2AsPreservedWithGraph:(ICECurrent*)current
+-(TestSlicingObjectsServerPreserved*) PBSUnknown2AsPreservedWithGraph:(ICECurrent*)__unused current
{
TestSlicingObjectsServerPSUnknown2* r = [TestSlicingObjectsServerPSUnknown2 alloc];
r.pi = 5;
@@ -506,7 +506,7 @@ static void breakCycles(id o)
return r;
}
--(void) checkPBSUnknown2WithGraph:(TestSlicingObjectsServerPreserved*)p current:(ICECurrent*)current
+-(void) checkPBSUnknown2WithGraph:(TestSlicingObjectsServerPreserved*)p current:(ICECurrent*)__unused current
{
if([current.encoding isEqual:ICEEncoding_1_0])
{
@@ -526,13 +526,13 @@ static void breakCycles(id o)
[objects_ addObject:p];
}
--(TestSlicingObjectsServerPNode*) exchangePNode:(TestSlicingObjectsServerPNode*)pn current:(ICECurrent*)current
+-(TestSlicingObjectsServerPNode*) exchangePNode:(TestSlicingObjectsServerPNode*)pn current:(ICECurrent*)__unused current
{
[objects_ addObject:pn];
return pn;
}
--(void) throwBaseAsBase:(ICECurrent*)current
+-(void) throwBaseAsBase:(ICECurrent*)__unused current
{
TestSlicingObjectsServerBaseException* be = [TestSlicingObjectsServerBaseException baseException];
be.sbe = @"sbe";
@@ -542,7 +542,7 @@ static void breakCycles(id o)
[objects_ addObject:be];
@throw be;
}
--(void) throwDerivedAsBase:(ICECurrent*)current
+-(void) throwDerivedAsBase:(ICECurrent*)__unused current
{
TestSlicingObjectsServerDerivedException* de = [TestSlicingObjectsServerDerivedException derivedException];
de.sbe = @"sbe";
@@ -558,7 +558,7 @@ static void breakCycles(id o)
[objects_ addObject:de];
@throw de;
}
--(void) throwDerivedAsDerived:(ICECurrent*)current
+-(void) throwDerivedAsDerived:(ICECurrent*)__unused current
{
TestSlicingObjectsServerDerivedException* de = [TestSlicingObjectsServerDerivedException derivedException];
de.sbe = @"sbe";
@@ -574,7 +574,7 @@ static void breakCycles(id o)
[objects_ addObject:de];
@throw de;
}
--(void) throwUnknownDerivedAsBase:(ICECurrent*)current
+-(void) throwUnknownDerivedAsBase:(ICECurrent*)__unused current
{
TestSlicingObjectsServerD2* d2 = [TestSlicingObjectsServerD2 d2];
d2.sb = @"sb d2";
@@ -590,7 +590,7 @@ static void breakCycles(id o)
[objects_ addObject:ude];
@throw ude;
}
--(void) throwPreservedException:(ICECurrent*)current
+-(void) throwPreservedException:(ICECurrent*)__unused current
{
TestSlicingObjectsServerPSUnknownException* ue = [TestSlicingObjectsServerPSUnknownException psUnknownException];
ue.p = [TestSlicingObjectsServerPSUnknown2 psUnknown2];
@@ -600,7 +600,7 @@ static void breakCycles(id o)
[objects_ addObject:ue];
@throw ue;
}
--(void) useForward:(TestSlicingObjectsServerForward**)f current:(ICECurrent*)current
+-(void) useForward:(TestSlicingObjectsServerForward**)f current:(ICECurrent*)__unused current
{
*f = [TestSlicingObjectsServerForward forward];
(*f).h = [TestSlicingObjectsServerHidden hidden];
diff --git a/objective-c/test/Ice/stream/Client.m b/objective-c/test/Ice/stream/Client.m
index 3bb25f6cf78..cd121a36e99 100644
--- a/objective-c/test/Ice/stream/Client.m
+++ b/objective-c/test/Ice/stream/Client.m
@@ -482,7 +482,7 @@ run(id<ICECommunicator> communicator)
TestStreamSmallStructS* arr2 = [TestStreamSmallStructSHelper read:in];
[in readPendingValues];
test([arr2 count] == [arr count]);
- for(int j = 0; j < [arr2 count]; ++j)
+ for(int j = 0; j < (int)[arr2 count]; ++j)
{
test([[arr objectAtIndex:j] isEqual:[arr2 objectAtIndex:j]]);
}
@@ -553,7 +553,7 @@ run(id<ICECommunicator> communicator)
[in readPendingValues];
test([arr2 count] > 0);
test([arr2 count] == [arr count]);
- for(int j = 0; j < [arr2 count]; ++j)
+ for(int j = 0; j < (int)[arr2 count]; ++j)
{
TestStreamMyClass* e = [arr2 objectAtIndex:j];
TestStreamMyClass* f = [arr objectAtIndex:j];
diff --git a/objective-c/test/Ice/timeout/AllTests.m b/objective-c/test/Ice/timeout/AllTests.m
index 59225603e37..3ac38752e2f 100644
--- a/objective-c/test/Ice/timeout/AllTests.m
+++ b/objective-c/test/Ice/timeout/AllTests.m
@@ -68,7 +68,7 @@
{
[self called];
}
--(void) exception:(ICEException*)ex
+-(void) exception:(ICEException*)__unused ex
{
test(NO);
}
@@ -184,8 +184,8 @@ timeoutAllTests(id<ICECommunicator> communicator)
[controller holdAdapter:200];
@try
{
- TestTimeoutByteSeq* seq = [TestTimeoutMutableByteSeq dataWithLength:1000000];
- [to sendData:seq];
+ TestTimeoutByteSeq* seq2 = [TestTimeoutMutableByteSeq dataWithLength:1000000];
+ [to sendData:seq2];
}
@catch(ICETimeoutException*)
{
diff --git a/objective-c/test/Ice/timeout/TestI.m b/objective-c/test/Ice/timeout/TestI.m
index 5dbc1a4dd90..41cc385fdca 100644
--- a/objective-c/test/Ice/timeout/TestI.m
+++ b/objective-c/test/Ice/timeout/TestI.m
@@ -59,15 +59,15 @@
@end
@implementation TimeoutI
--(void) op:(ICECurrent*)current
+-(void) op:(ICECurrent*)__unused current
{
}
--(void) sendData:(TestTimeoutMutableByteSeq*)seq current:(ICECurrent*)current
+-(void) sendData:(TestTimeoutMutableByteSeq*)__unused seq current:(ICECurrent*)__unused current
{
}
--(void) sleep:(ICEInt)to current:(ICECurrent*)current
+-(void) sleep:(ICEInt)to current:(ICECurrent*)__unused current
{
[NSThread sleepForTimeInterval:to / 1000.0];
}
@@ -109,7 +109,7 @@
}
#endif
--(void) holdAdapter:(ICEInt)to current:(ICECurrent*)current
+-(void) holdAdapter:(ICEInt)to current:(ICECurrent*)__unused current
{
[adapter_ hold];
if(to >= 0)
@@ -119,7 +119,7 @@
}
}
--(void) resumeAdapter:(ICECurrent*)current
+-(void) resumeAdapter:(ICECurrent*)__unused current
{
[adapter_ activate];
}
diff --git a/objective-c/test/Slice/escape/Client.m b/objective-c/test/Slice/escape/Client.m
index e98f1b2fb11..4b28816d134 100644
--- a/objective-c/test/Slice/escape/Client.m
+++ b/objective-c/test/Slice/escape/Client.m
@@ -164,7 +164,7 @@ testSymbols()
}
static int
-run(id<ICECommunicator> communicator)
+run(id<ICECommunicator>__unused communicator)
{
if(0)
{
diff --git a/php/config/Make.rules b/php/config/Make.rules
index 09a78930f9f..d00121f3628 100644
--- a/php/config/Make.rules
+++ b/php/config/Make.rules
@@ -79,10 +79,14 @@ ifeq ($(shell [ $$($(PHP_CONFIG) --vernum) -lt 50400 ] && echo 0),0)
endif
ifeq ($(os),Darwin)
+ cppflags := $(filter-out -Wshadow,$(cppflags))
+ php_cppflags := $(php_cppflags) -Wno-unused-parameter -Wno-missing-field-initializers
php_ldflags := ${wl}-flat_namespace ${wl}-undefined ${wl}suppress
endif
ifeq ($(os),Linux)
+ cppflags := $(filter-out -Wshadow,$(cppflags))
+ php_cppflags := $(php_cppflags) -Wno-unused-parameter -Wno-missing-field-initializers
allow-undefined-symbols := yes
endif
diff --git a/python/config/Make.rules b/python/config/Make.rules
index 9fbc4e2a5ea..90be72aec00 100644
--- a/python/config/Make.rules
+++ b/python/config/Make.rules
@@ -41,7 +41,7 @@ endif
# Remove the -Wstrict-prototypes option which is not valid with C++ and
# -Wunreachable-code which is causing a compilation error with Slice/Parser.cpp
-python_cppflags := $(filter-out -Wunreachable-code -Wstrict-prototypes,$(python_cppflags))
+python_cppflags := $(filter-out -Wunreachable-code -Wstrict-prototypes,$(python_cppflags)) -Wno-missing-field-initializers
#
# Python installation directory
diff --git a/python/modules/IcePy/Communicator.cpp b/python/modules/IcePy/Communicator.cpp
index df6af7330a1..71b1a96d44f 100644
--- a/python/modules/IcePy/Communicator.cpp
+++ b/python/modules/IcePy/Communicator.cpp
@@ -936,9 +936,9 @@ communicatorBeginFlushBatchRequests(CommunicatorObject* self, PyObject* args, Py
result = (*self->communicator)->begin_flushBatchRequests(cb);
}
}
- catch(const Ice::Exception& ex)
+ catch(const Ice::Exception& e)
{
- setPythonException(ex);
+ setPythonException(e);
return 0;
}
diff --git a/python/modules/IcePy/Connection.cpp b/python/modules/IcePy/Connection.cpp
index f083e6ced6b..9f0b54de55c 100644
--- a/python/modules/IcePy/Connection.cpp
+++ b/python/modules/IcePy/Connection.cpp
@@ -107,20 +107,9 @@ public:
Py_DECREF(_con);
}
- virtual void closed(const Ice::ConnectionPtr& con)
- {
- invoke(con);
- }
-
-private:
-
- void invoke(const Ice::ConnectionPtr& con)
+ virtual void closed(const Ice::ConnectionPtr&)
{
AdoptThread adoptThread; // Ensure the current thread is able to call into Python.
-#ifndef NDEBUG
- ConnectionObject* c = reinterpret_cast<ConnectionObject*>(_con);
- assert(con == *(c->connection));
-#endif
PyObjectHandle args = Py_BuildValue(STRCAST("(O)"), _con);
assert(_cb);
@@ -141,6 +130,8 @@ private:
}
}
+private:
+
PyObject* _cb;
PyObject* _con;
};
@@ -164,20 +155,9 @@ public:
Py_DECREF(_con);
}
- virtual void heartbeat(const Ice::ConnectionPtr& con)
- {
- invoke(con);
- }
-
-private:
-
- void invoke(const Ice::ConnectionPtr& con)
+ virtual void heartbeat(const Ice::ConnectionPtr&)
{
AdoptThread adoptThread; // Ensure the current thread is able to call into Python.
-#ifndef NDEBUG
- ConnectionObject* c = reinterpret_cast<ConnectionObject*>(_con);
- assert(con == *(c->connection));
-#endif
PyObjectHandle args = Py_BuildValue(STRCAST("(O)"), _con);
assert(_cb);
@@ -198,6 +178,8 @@ private:
}
}
+private:
+
PyObject* _cb;
PyObject* _con;
};
@@ -642,9 +624,9 @@ connectionBeginFlushBatchRequests(ConnectionObject* self, PyObject* args, PyObje
result = (*self->connection)->begin_flushBatchRequests(cb);
}
}
- catch(const Ice::Exception& ex)
+ catch(const Ice::Exception& e)
{
- setPythonException(ex);
+ setPythonException(e);
return 0;
}
@@ -845,9 +827,9 @@ connectionBeginHeartbeat(ConnectionObject* self, PyObject* args, PyObject* kwds)
result = (*self->connection)->begin_heartbeat();
}
}
- catch(const Ice::Exception& ex)
+ catch(const Ice::Exception& e)
{
- setPythonException(ex);
+ setPythonException(e);
return 0;
}
diff --git a/python/modules/IcePy/ConnectionInfo.cpp b/python/modules/IcePy/ConnectionInfo.cpp
index 97ea121c07c..14b6ae61f7a 100644
--- a/python/modules/IcePy/ConnectionInfo.cpp
+++ b/python/modules/IcePy/ConnectionInfo.cpp
@@ -158,7 +158,7 @@ udpConnectionInfoGetMcastAddress(ConnectionInfoObject* self)
extern "C"
#endif
static PyObject*
-udpConnectionInfoGetMcastPort(ConnectionInfoObject* self, void* member)
+udpConnectionInfoGetMcastPort(ConnectionInfoObject* self, void* /*member*/)
{
Ice::UDPConnectionInfoPtr info = Ice::UDPConnectionInfoPtr::dynamicCast(*self->connectionInfo);
assert(info);
diff --git a/python/modules/IcePy/ObjectAdapter.cpp b/python/modules/IcePy/ObjectAdapter.cpp
index ec06cce6961..7506aa08d4f 100644
--- a/python/modules/IcePy/ObjectAdapter.cpp
+++ b/python/modules/IcePy/ObjectAdapter.cpp
@@ -219,7 +219,7 @@ IcePy::ServantLocatorWrapper::locate(const Ice::Current& current, Ice::LocalObje
}
void
-IcePy::ServantLocatorWrapper::finished(const Ice::Current& current, const Ice::ObjectPtr&,
+IcePy::ServantLocatorWrapper::finished(const Ice::Current&, const Ice::ObjectPtr&,
const Ice::LocalObjectPtr& cookie)
{
AdoptThread adoptThread; // Ensure the current thread is able to call into Python.
diff --git a/python/modules/IcePy/Operation.cpp b/python/modules/IcePy/Operation.cpp
index 2e2657839ba..7898b52daeb 100644
--- a/python/modules/IcePy/Operation.cpp
+++ b/python/modules/IcePy/Operation.cpp
@@ -1172,11 +1172,12 @@ extern "C"
static int
marshaledResultInit(MarshaledResultObject* self, PyObject* args, PyObject* /*kwds*/)
{
+ PyObject* versionType = IcePy::lookupType("Ice.EncodingVersion");
PyObject* result;
OperationObject* opObj;
PyObject* communicatorObj;
PyObject* encodingObj;
- if(!PyArg_ParseTuple(args, STRCAST("OOOO"), &result, &opObj, &communicatorObj, &encodingObj))
+ if(!PyArg_ParseTuple(args, STRCAST("OOOO!"), &result, &opObj, &communicatorObj, versionType, &encodingObj))
{
return -1;
}
@@ -3214,12 +3215,12 @@ IcePy::SyncBlobjectInvocation::invoke(PyObject* args, PyObject* /* kwds */)
if(!out.empty())
{
void* buf;
- Py_ssize_t sz;
- if(PyObject_AsWriteBuffer(op.get(), &buf, &sz))
+ Py_ssize_t ssz;
+ if(PyObject_AsWriteBuffer(op.get(), &buf, &ssz))
{
throwPythonException();
}
- memcpy(buf, &out[0], sz);
+ memcpy(buf, &out[0], ssz);
}
#endif
@@ -3403,12 +3404,12 @@ IcePy::AsyncBlobjectInvocation::invoke(PyObject* args, PyObject* kwds)
}
}
}
- catch(const Ice::CommunicatorDestroyedException& ex)
+ catch(const Ice::CommunicatorDestroyedException& e)
{
//
// CommunicatorDestroyedException is the only exception that can propagate directly.
//
- setPythonException(ex);
+ setPythonException(e);
return 0;
}
catch(const Ice::Exception&)
@@ -4026,9 +4027,9 @@ IcePy::TypedUpcall::exception(PyException& ex)
throwPythonException();
}
}
- catch(const Ice::Exception& ex)
+ catch(const Ice::Exception& e)
{
- exception(ex);
+ exception(e);
}
}
@@ -4193,9 +4194,9 @@ IcePy::BlobjectUpcall::exception(PyException& ex)
ex.raise();
}
- catch(const Ice::Exception& ex)
+ catch(const Ice::Exception& e)
{
- exception(ex);
+ exception(e);
}
}
diff --git a/python/modules/IcePy/Proxy.cpp b/python/modules/IcePy/Proxy.cpp
index f406b6a8137..fccd0ebef6d 100644
--- a/python/modules/IcePy/Proxy.cpp
+++ b/python/modules/IcePy/Proxy.cpp
@@ -1997,9 +1997,9 @@ proxyBeginIceGetConnection(ProxyObject* self, PyObject* args, PyObject* kwds)
result = (*self->proxy)->begin_ice_getConnection();
}
}
- catch(const Ice::Exception& ex)
+ catch(const Ice::Exception& e)
{
- setPythonException(ex);
+ setPythonException(e);
return 0;
}
@@ -2196,9 +2196,9 @@ proxyBeginIceFlushBatchRequests(ProxyObject* self, PyObject* args, PyObject* kwd
result = (*self->proxy)->begin_ice_flushBatchRequests();
}
}
- catch(const Ice::Exception& ex)
+ catch(const Ice::Exception& e)
{
- setPythonException(ex);
+ setPythonException(e);
return 0;
}
diff --git a/python/modules/IcePy/Types.cpp b/python/modules/IcePy/Types.cpp
index 753e45b514b..dd6bc1069d4 100644
--- a/python/modules/IcePy/Types.cpp
+++ b/python/modules/IcePy/Types.cpp
@@ -483,10 +483,10 @@ IcePy::StreamUtil::setSlicedDataMember(PyObject* obj, const Ice::SlicedDataPtr&
assert(*q);
ObjectReaderPtr r = ObjectReaderPtr::dynamicCast(*q);
assert(r);
- PyObject* obj = r->getObject();
- assert(obj != Py_None); // Should be non-nil.
- PyTuple_SET_ITEM(instances.get(), j++, obj);
- Py_INCREF(obj); // PyTuple_SET_ITEM steals a reference.
+ PyObject* pobj = r->getObject();
+ assert(pobj != Py_None); // Should be non-nil.
+ PyTuple_SET_ITEM(instances.get(), j++, pobj);
+ Py_INCREF(pobj); // PyTuple_SET_ITEM steals a reference.
}
//
@@ -582,15 +582,15 @@ IcePy::StreamUtil::getSlicedDataMember(PyObject* obj, ObjectMap* objectMap)
Ice::ObjectPtr writer;
- ObjectMap::iterator i = objectMap->find(o);
- if(i == objectMap->end())
+ ObjectMap::iterator k = objectMap->find(o);
+ if(k == objectMap->end())
{
writer = new ObjectWriter(o, objectMap, 0);
objectMap->insert(ObjectMap::value_type(o, writer));
}
else
{
- writer = i->second;
+ writer = k->second;
}
info->instances.push_back(writer);
@@ -1115,7 +1115,7 @@ IcePy::EnumInfo::optionalFormat() const
}
void
-IcePy::EnumInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap*, bool optional, const Ice::StringSeq*)
+IcePy::EnumInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap*, bool /*optional*/, const Ice::StringSeq*)
{
//
// Validate value.
@@ -1567,7 +1567,7 @@ IcePy::SequenceInfo::usesClasses() const
void
IcePy::SequenceInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* objectMap, bool optional,
- const Ice::StringSeq* metaData)
+ const Ice::StringSeq* /*metaData*/)
{
PrimitiveInfoPtr pi = PrimitiveInfoPtr::dynamicCast(elementType);
@@ -2467,8 +2467,8 @@ IcePy::CustomInfo::usesClasses() const
}
void
-IcePy::CustomInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* objectMap, bool,
- const Ice::StringSeq* metaData)
+IcePy::CustomInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* /*objectMap*/, bool,
+ const Ice::StringSeq* /*metaData*/)
{
assert(PyObject_IsInstance(p, pythonType) == 1); // validate() should have caught this.
@@ -2503,7 +2503,7 @@ IcePy::CustomInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* object
void
IcePy::CustomInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, PyObject* target,
- void* closure, bool, const Ice::StringSeq* metaData)
+ void* closure, bool, const Ice::StringSeq* /*metaData*/)
{
//
// Unmarshal the raw byte sequence.
@@ -2567,7 +2567,7 @@ IcePy::CustomInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& c
}
void
-IcePy::CustomInfo::print(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory* history)
+IcePy::CustomInfo::print(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory*)
{
if(!validate(value))
{
@@ -2858,7 +2858,7 @@ IcePy::ClassInfo::getId() const
}
bool
-IcePy::ClassInfo::validate(PyObject* val)
+IcePy::ClassInfo::validate(PyObject*)
{
assert(false);
return true;
@@ -2890,7 +2890,7 @@ IcePy::ClassInfo::usesClasses() const
}
void
-IcePy::ClassInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* objectMap, bool,
+IcePy::ClassInfo::marshal(PyObject*, Ice::OutputStream*, ObjectMap*, bool,
const Ice::StringSeq*)
{
assert(false);
@@ -2898,8 +2898,8 @@ IcePy::ClassInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* objectM
}
void
-IcePy::ClassInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, PyObject* target,
- void* closure, bool, const Ice::StringSeq*)
+IcePy::ClassInfo::unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*,
+ void*, bool, const Ice::StringSeq*)
{
assert(false);
throw AbortMarshaling();
@@ -3679,10 +3679,10 @@ IcePy::ExceptionInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* obj
}
void
-IcePy::ExceptionInfo::writeMembers(PyObject* p, Ice::OutputStream* os, const DataMemberList& members,
+IcePy::ExceptionInfo::writeMembers(PyObject* p, Ice::OutputStream* os, const DataMemberList& membersP,
ObjectMap* objectMap) const
{
- for(DataMemberList::const_iterator q = members.begin(); q != members.end(); ++q)
+ for(DataMemberList::const_iterator q = membersP.begin(); q != membersP.end(); ++q)
{
DataMemberPtr member = *q;
diff --git a/python/modules/IcePy/Util.cpp b/python/modules/IcePy/Util.cpp
index 289fab58f93..f3f2b56e1ff 100644
--- a/python/modules/IcePy/Util.cpp
+++ b/python/modules/IcePy/Util.cpp
@@ -25,18 +25,9 @@ using namespace Slice::Python;
namespace IcePy
{
-bool
-checkIsInstance(PyObject* p, const char* type)
-{
- PyObject* pyType = lookupType(type);
- return PyObject_IsInstance(p, pyType) == 1;
-}
-
template<typename T> bool
-setVersion(PyObject* p, const T& version, const char* type)
+setVersion(PyObject* p, const T& version)
{
- assert(checkIsInstance(p, type));
-
PyObjectHandle major = PyLong_FromLong(version.major);
PyObjectHandle minor = PyLong_FromLong(version.minor);
if(!major.get() || !minor.get())
@@ -52,9 +43,8 @@ setVersion(PyObject* p, const T& version, const char* type)
}
template<typename T> bool
-getVersion(PyObject* p, T& v, const char* type)
+getVersion(PyObject* p, T& v)
{
- assert(checkIsInstance(p, type));
PyObjectHandle major = getAttr(p, "major", false);
PyObjectHandle minor = getAttr(p, "minor", false);
if(major.get())
@@ -112,7 +102,7 @@ createVersion(const T& version, const char* type)
return 0;
}
- if(!setVersion<T>(obj.get(), version, type))
+ if(!setVersion<T>(obj.get(), version))
{
return 0;
}
@@ -131,7 +121,7 @@ versionToString(PyObject* args, const char* type)
}
T v;
- if(!getVersion<T>(p, v, type))
+ if(!getVersion<T>(p, v))
{
return ICE_NULLPTR;
}
@@ -1109,7 +1099,7 @@ IcePy::createEncodingVersion(const Ice::EncodingVersion& v)
bool
IcePy::getEncodingVersion(PyObject* p, Ice::EncodingVersion& v)
{
- if(!getVersion<Ice::EncodingVersion>(p, v, Ice_EncodingVersion))
+ if(!getVersion<Ice::EncodingVersion>(p, v))
{
return false;
}
diff --git a/ruby/config/Make.rules b/ruby/config/Make.rules
index 6441a012bb3..44dfd44ff62 100644
--- a/ruby/config/Make.rules
+++ b/ruby/config/Make.rules
@@ -39,6 +39,10 @@ ifeq ($(shell uname),Darwin)
endif
endif
+ifeq ($(os),Linux)
+ cppflags := $(filter-out -Wredundant-decls -Wshadow,$(cppflags))
+endif
+
# Ruby linker flags
ruby_ldflags := $(call ruby-call,$$(LIBRUBYARG))
ruby_libdir := $(call ruby-call,$(if $(findstring MINGW,$(shell uname)),$$(bindir),$$(libdir)))
diff --git a/ruby/src/IceRuby/Communicator.cpp b/ruby/src/IceRuby/Communicator.cpp
index ff658c8ed1a..9a2df07c127 100644
--- a/ruby/src/IceRuby/Communicator.cpp
+++ b/ruby/src/IceRuby/Communicator.cpp
@@ -79,7 +79,7 @@ private:
extern "C"
VALUE
-IceRuby_initialize(int argc, VALUE* argv, VALUE self)
+IceRuby_initialize(int argc, VALUE* argv, VALUE /*self*/)
{
ICE_RUBY_TRY
{
@@ -333,7 +333,7 @@ IceRuby_initialize(int argc, VALUE* argv, VALUE self)
extern "C"
VALUE
-IceRuby_stringToIdentity(VALUE self, VALUE str)
+IceRuby_stringToIdentity(VALUE /*self*/, VALUE str)
{
ICE_RUBY_TRY
{
@@ -347,7 +347,7 @@ IceRuby_stringToIdentity(VALUE self, VALUE str)
extern "C"
VALUE
-IceRuby_identityToString(int argc, VALUE* argv, VALUE self)
+IceRuby_identityToString(int argc, VALUE* argv, VALUE /*self*/)
{
ICE_RUBY_TRY
{
diff --git a/ruby/src/IceRuby/Properties.cpp b/ruby/src/IceRuby/Properties.cpp
index 9035965734b..2eaacd85a76 100644
--- a/ruby/src/IceRuby/Properties.cpp
+++ b/ruby/src/IceRuby/Properties.cpp
@@ -27,7 +27,7 @@ IceRuby_Properties_free(Ice::PropertiesPtr* p)
extern "C"
VALUE
-IceRuby_createProperties(int argc, VALUE* argv, VALUE self)
+IceRuby_createProperties(int argc, VALUE* argv, VALUE /*self*/)
{
ICE_RUBY_TRY
{
diff --git a/ruby/src/IceRuby/Proxy.cpp b/ruby/src/IceRuby/Proxy.cpp
index 856053fe3d0..8206bdb0ab1 100644
--- a/ruby/src/IceRuby/Proxy.cpp
+++ b/ruby/src/IceRuby/Proxy.cpp
@@ -1057,7 +1057,7 @@ checkedCastImpl(const Ice::ObjectPrx& p, const string& id, VALUE facet, VALUE ct
extern "C"
VALUE
-IceRuby_ObjectPrx_checkedCast(int argc, VALUE* args, VALUE self)
+IceRuby_ObjectPrx_checkedCast(int argc, VALUE* args, VALUE /*self*/)
{
//
// ice_checkedCast is called from generated code, therefore we always expect
@@ -1123,7 +1123,7 @@ IceRuby_ObjectPrx_checkedCast(int argc, VALUE* args, VALUE self)
extern "C"
VALUE
-IceRuby_ObjectPrx_uncheckedCast(int argc, VALUE* args, VALUE self)
+IceRuby_ObjectPrx_uncheckedCast(int argc, VALUE* args, VALUE /*self*/)
{
ICE_RUBY_TRY
{
@@ -1249,7 +1249,7 @@ IceRuby_ObjectPrx_ice_uncheckedCast(VALUE self, VALUE obj, VALUE facet)
extern "C"
VALUE
-IceRuby_ObjectPrx_ice_staticId(VALUE self)
+IceRuby_ObjectPrx_ice_staticId(VALUE /*self*/)
{
ICE_RUBY_TRY
{
@@ -1261,7 +1261,7 @@ IceRuby_ObjectPrx_ice_staticId(VALUE self)
extern "C"
VALUE
-IceRuby_ObjectPrx_new(int /*argc*/, VALUE* /*args*/, VALUE self)
+IceRuby_ObjectPrx_new(int /*argc*/, VALUE* /*args*/, VALUE /*self*/)
{
ICE_RUBY_TRY
{
diff --git a/ruby/src/IceRuby/Slice.cpp b/ruby/src/IceRuby/Slice.cpp
index 679b040291c..204b81c7197 100644
--- a/ruby/src/IceRuby/Slice.cpp
+++ b/ruby/src/IceRuby/Slice.cpp
@@ -21,7 +21,7 @@ using namespace Slice::Ruby;
extern "C"
VALUE
-IceRuby_loadSlice(int argc, VALUE* argv, VALUE self)
+IceRuby_loadSlice(int argc, VALUE* argv, VALUE /*self*/)
{
ICE_RUBY_TRY
{
@@ -163,7 +163,7 @@ IceRuby_loadSlice(int argc, VALUE* argv, VALUE self)
extern "C"
VALUE
-IceRuby_compile(int argc, VALUE* argv, VALUE self)
+IceRuby_compile(int argc, VALUE* argv, VALUE /*self*/)
{
ICE_RUBY_TRY
{
diff --git a/ruby/src/IceRuby/Types.cpp b/ruby/src/IceRuby/Types.cpp
index b5632c9b22f..17e16c3a454 100644
--- a/ruby/src/IceRuby/Types.cpp
+++ b/ruby/src/IceRuby/Types.cpp
@@ -370,15 +370,15 @@ IceRuby::StreamUtil::getSlicedDataMember(VALUE obj, ObjectMap* objectMap)
Ice::ObjectPtr writer;
- ObjectMap::iterator i = objectMap->find(o);
- if(i == objectMap->end())
+ ObjectMap::iterator k = objectMap->find(o);
+ if(k == objectMap->end())
{
writer = new ObjectWriter(o, objectMap, 0);
objectMap->insert(ObjectMap::value_type(o, writer));
}
else
{
- writer = i->second;
+ writer = k->second;
}
info->instances.push_back(writer);
@@ -1157,8 +1157,8 @@ IceRuby::SequenceInfo::validate(VALUE val)
return true;
}
}
- ID id = rb_intern("to_ary");
- return callRuby(rb_respond_to, val, id) != 0;
+ ID rbid = rb_intern("to_ary");
+ return callRuby(rb_respond_to, val, rbid) != 0;
}
bool
@@ -1705,8 +1705,8 @@ IceRuby::DictionaryInfo::validate(VALUE val)
{
return true;
}
- ID id = rb_intern("to_hash");
- return callRuby(rb_respond_to, val, id) != 0;
+ ID rbid = rb_intern("to_hash");
+ return callRuby(rb_respond_to, val, rbid) != 0;
}
bool
@@ -3174,17 +3174,17 @@ IceRuby_stringify(VALUE /*self*/, VALUE obj, VALUE type)
extern "C"
VALUE
-IceRuby_stringifyException(VALUE /*self*/, VALUE ex)
+IceRuby_stringifyException(VALUE /*self*/, VALUE exc)
{
ICE_RUBY_TRY
{
- volatile VALUE cls = CLASS_OF(ex);
+ volatile VALUE cls = CLASS_OF(exc);
volatile VALUE type = callRuby(rb_const_get, cls, rb_intern("ICE_TYPE"));
ExceptionInfoPtr info = getException(type);
ostringstream ostr;
IceUtilInternal::Output out(ostr);
- info->print(ex, out);
+ info->print(exc, out);
string str = ostr.str();
return createString(str);
diff --git a/ruby/src/IceRuby/Util.cpp b/ruby/src/IceRuby/Util.cpp
index 1e042914306..dc151808771 100644
--- a/ruby/src/IceRuby/Util.cpp
+++ b/ruby/src/IceRuby/Util.cpp
@@ -22,22 +22,10 @@ using namespace IceRuby;
namespace
{
-#ifndef NDEBUG
-bool
-checkIsInstance(VALUE p, const char* type)
-{
- volatile VALUE rbType = callRuby(rb_path2class, type);
- assert(!NIL_P(rbType));
- return callRuby(rb_obj_is_instance_of, p, rbType) == Qtrue;
-}
-#endif
-
template<typename T>
bool
-setVersion(VALUE p, const T& version, const char* type)
+setVersion(VALUE p, const T& version)
{
- assert(checkIsInstance(p, type));
-
volatile VALUE major = callRuby(rb_int2inum, version.major);
volatile VALUE minor = callRuby(rb_int2inum, version.minor);
rb_ivar_set(p, rb_intern("@major"), major);
@@ -48,9 +36,8 @@ setVersion(VALUE p, const T& version, const char* type)
template<typename T>
bool
-getVersion(VALUE p, T& v, const char* type)
+getVersion(VALUE p, T& v)
{
- assert(checkIsInstance(p, type));
volatile VALUE major = callRuby(rb_ivar_get, p, rb_intern("@major"));
volatile VALUE minor = callRuby(rb_ivar_get, p, rb_intern("@minor"));
@@ -84,7 +71,7 @@ createVersion(const T& version, const char* type)
volatile VALUE obj = callRuby(rb_class_new_instance, 0, static_cast<VALUE*>(0), rbType);
- if(!setVersion<T>(obj, version, type))
+ if(!setVersion<T>(obj, version))
{
return Qnil;
}
@@ -104,7 +91,7 @@ versionToString(VALUE p, const char* type)
}
T v;
- if(!getVersion<T>(p, v, type))
+ if(!getVersion<T>(p, v))
{
return Qnil;
}
@@ -552,7 +539,7 @@ IceRuby::getEncodingVersion(VALUE p, Ice::EncodingVersion& v)
throw RubyException(rb_eTypeError, "value is not an Ice::EncodingVersion");
}
- if(!getVersion<Ice::EncodingVersion>(p, v, Ice_EncodingVersion))
+ if(!getVersion<Ice::EncodingVersion>(p, v))
{
return false;
}