From c4f719b1831e35663163e09a0d692c909c09d95f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 3 Feb 2023 14:42:49 -0500 Subject: Suppress/fix new warnings in clang-tidy 15 --- test/socket_test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/socket_test.cpp') diff --git a/test/socket_test.cpp b/test/socket_test.cpp index ff2e7d7..46d4209 100644 --- a/test/socket_test.cpp +++ b/test/socket_test.cpp @@ -19,8 +19,8 @@ main() { using Socket = raul::Socket; - std::string unix_uri("unix:///tmp/raul_test_sock"); - std::string tcp_uri("tcp://127.0.0.1:12345"); + const std::string unix_uri{"unix:///tmp/raul_test_sock"}; + const std::string tcp_uri{"tcp://127.0.0.1:12345"}; Socket unix_server_sock(Socket::Type::UNIX); Socket tcp_server_sock(Socket::Type::TCP); @@ -58,12 +58,12 @@ main() } if (pfds[0].revents & POLLIN) { - std::shared_ptr conn = unix_server_sock.accept(); + const std::shared_ptr conn = unix_server_sock.accept(); ++n_received; } if (pfds[1].revents & POLLIN) { - std::shared_ptr conn = tcp_server_sock.accept(); + const std::shared_ptr conn = tcp_server_sock.accept(); ++n_received; } } -- cgit v1.2.1