Commit 6ef72177 authored by Marian Triebe's avatar Marian Triebe

Fix shadowing and conversion warnings on clang

 These warnings were triggered by clang with `--more-warnings`
 specified.
parent 48a48dad
...@@ -217,7 +217,7 @@ int main(int argc, char** argv) { ...@@ -217,7 +217,7 @@ int main(int argc, char** argv) {
print_on_exit(server_actor, "server"); print_on_exit(server_actor, "server");
print_on_exit(pong_actor, "pong"); print_on_exit(pong_actor, "pong");
} else if (res.opts.count("client") > 0) { } else if (res.opts.count("client") > 0) {
auto ping_actor = spawn(ping, 20); auto ping_actor = spawn(ping, size_t{20});
auto io_actor = spawn_io_client(broker_impl, host, port, ping_actor); auto io_actor = spawn_io_client(broker_impl, host, port, ping_actor);
print_on_exit(io_actor, "protobuf_io"); print_on_exit(io_actor, "protobuf_io");
print_on_exit(ping_actor, "ping"); print_on_exit(ping_actor, "ping");
......
...@@ -108,7 +108,7 @@ int main(int, char**) { ...@@ -108,7 +108,7 @@ int main(int, char**) {
return -1; return -1;
} }
// spawn a testee that receives two messages of user-defined type // spawn a testee that receives two messages of user-defined type
auto t = spawn(testee, 2); auto t = spawn(testee, size_t{2});
{ // lifetime scope of self { // lifetime scope of self
scoped_actor self; scoped_actor self;
// send t a foo // send t a foo
......
...@@ -123,7 +123,7 @@ int main(int, char**) { ...@@ -123,7 +123,7 @@ int main(int, char**) {
// compound member that has a compound member // compound member that has a compound member
compound_member(&baz::b, meta_bar_f(), &bar::i)); compound_member(&baz::b, meta_bar_f(), &bar::i));
// spawn a testee that receives two messages // spawn a testee that receives two messages
auto t = spawn(testee, 2); auto t = spawn(testee, size_t{2});
{ {
scoped_actor self; scoped_actor self;
self->send(t, bar{foo{1, 2}, 3}); self->send(t, bar{foo{1, 2}, 3});
......
...@@ -199,7 +199,7 @@ int main() { ...@@ -199,7 +199,7 @@ int main() {
scoped_actor self; scoped_actor self;
// spawn a testee that receives two messages // spawn a testee that receives two messages
auto t = spawn(testee, 2); auto t = spawn(testee, size_t{2});
// send a tree // send a tree
self->send(t, t0); self->send(t, t0);
......
...@@ -859,7 +859,7 @@ CAF_TEST(exit_reason_in_scoped_actor) { ...@@ -859,7 +859,7 @@ CAF_TEST(exit_reason_in_scoped_actor) {
CAF_TEST(move_only_argument) { CAF_TEST(move_only_argument) {
using unique_int = std::unique_ptr<int>; using unique_int = std::unique_ptr<int>;
unique_int ptr{new int(42)}; unique_int uptr{new int(42)};
auto f = [](event_based_actor* self, unique_int ptr) -> behavior { auto f = [](event_based_actor* self, unique_int ptr) -> behavior {
auto i = *ptr; auto i = *ptr;
return { return {
...@@ -869,7 +869,7 @@ CAF_TEST(move_only_argument) { ...@@ -869,7 +869,7 @@ CAF_TEST(move_only_argument) {
} }
}; };
}; };
auto testee = spawn(f, std::move(ptr)); auto testee = spawn(f, std::move(uptr));
scoped_actor self; scoped_actor self;
self->sync_send(testee, 1.f).await( self->sync_send(testee, 1.f).await(
[](int i) { [](int i) {
......
...@@ -230,7 +230,7 @@ CAF_TEST(test_broker) { ...@@ -230,7 +230,7 @@ CAF_TEST(test_broker) {
# endif // CAF_USE_ASIO # endif // CAF_USE_ASIO
} }
if (r.opts.count("client-port") > 0) { if (r.opts.count("client-port") > 0) {
auto p = spawn(ping, 10); auto p = spawn(ping, size_t{10});
CAF_MESSAGE("spawn_io_client..."); CAF_MESSAGE("spawn_io_client...");
auto cl = spawn_io_client(peer_fun, "localhost", port, p); auto cl = spawn_io_client(peer_fun, "localhost", port, p);
CAF_MESSAGE("spawn_io_client finished"); CAF_MESSAGE("spawn_io_client finished");
......
...@@ -235,7 +235,7 @@ CAF_TEST(test_typed_broker) { ...@@ -235,7 +235,7 @@ CAF_TEST(test_typed_broker) {
# endif // CAF_USE_ASIO # endif // CAF_USE_ASIO
} }
if (r.opts.count("client-port") > 0) { if (r.opts.count("client-port") > 0) {
auto p = spawn(ping, 10); auto p = spawn(ping, size_t{10});
CAF_MESSAGE("spawn_io_client_typed..."); CAF_MESSAGE("spawn_io_client_typed...");
auto cl = spawn_io_client(peer_fun, "localhost", port, p); auto cl = spawn_io_client(peer_fun, "localhost", port, p);
CAF_MESSAGE("spawn_io_client_typed finished"); CAF_MESSAGE("spawn_io_client_typed finished");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment