summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/ami/AllTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/ami/AllTests.cpp')
-rw-r--r--cpp/test/Ice/ami/AllTests.cpp44
1 files changed, 22 insertions, 22 deletions
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&)
{