diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2021-12-02 11:17:35 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-05 15:31:03 +0100 |
commit | 92f8514a854233b9b533096006641d57a91d099a (patch) | |
tree | 10429026787fc4e2c0bfb679c8f82ff8ba1eabd3 | |
parent | c67c1b583adec5fd9a40d5d69148c77e7e7acc3a (diff) | |
download | serenity-92f8514a854233b9b533096006641d57a91d099a.zip |
Services: Cast unused IPC::new_client_connection() results to void
These ones all manage their storage internally, whereas the WebContent
and ImageDecoder ones require the caller to manage their lifetime. This
distinction is not obvious to the user without looking through the code,
so an API that makes this clearer would be nice.
-rw-r--r-- | Userland/Services/AudioServer/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/Clipboard/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/ConfigServer/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/FileSystemAccessServer/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/InspectorServer/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/LaunchServer/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/LookupServer/LookupServer.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/NotificationServer/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/RequestServer/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/SQLServer/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/WebSocket/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/WindowServer/EventLoop.cpp | 4 |
12 files changed, 13 insertions, 13 deletions
diff --git a/Userland/Services/AudioServer/main.cpp b/Userland/Services/AudioServer/main.cpp index e3a89fb5ce..72593f9d97 100644 --- a/Userland/Services/AudioServer/main.cpp +++ b/Userland/Services/AudioServer/main.cpp @@ -29,7 +29,7 @@ ErrorOr<int> serenity_main(Main::Arguments) server->on_accept = [&](NonnullRefPtr<Core::LocalSocket> client_socket) { static int s_next_client_id = 0; int client_id = ++s_next_client_id; - IPC::new_client_connection<AudioServer::ClientConnection>(move(client_socket), client_id, *mixer); + (void)IPC::new_client_connection<AudioServer::ClientConnection>(move(client_socket), client_id, *mixer); }; TRY(Core::System::pledge("stdio recvfd thread accept cpath rpath wpath")); diff --git a/Userland/Services/Clipboard/main.cpp b/Userland/Services/Clipboard/main.cpp index 1d97ca9b1e..5e95d376b0 100644 --- a/Userland/Services/Clipboard/main.cpp +++ b/Userland/Services/Clipboard/main.cpp @@ -25,7 +25,7 @@ ErrorOr<int> serenity_main(Main::Arguments) server->on_accept = [&](auto client_socket) { static int s_next_client_id = 0; int client_id = ++s_next_client_id; - IPC::new_client_connection<Clipboard::ClientConnection>(move(client_socket), client_id); + (void)IPC::new_client_connection<Clipboard::ClientConnection>(move(client_socket), client_id); }; Clipboard::Storage::the().on_content_change = [&] { diff --git a/Userland/Services/ConfigServer/main.cpp b/Userland/Services/ConfigServer/main.cpp index 3c4609e004..65bbab3ae1 100644 --- a/Userland/Services/ConfigServer/main.cpp +++ b/Userland/Services/ConfigServer/main.cpp @@ -24,7 +24,7 @@ ErrorOr<int> serenity_main(Main::Arguments) server->on_accept = [&](auto client_socket) { static int s_next_client_id = 0; int client_id = ++s_next_client_id; - IPC::new_client_connection<ConfigServer::ClientConnection>(move(client_socket), client_id); + (void)IPC::new_client_connection<ConfigServer::ClientConnection>(move(client_socket), client_id); }; return event_loop.exec(); diff --git a/Userland/Services/FileSystemAccessServer/main.cpp b/Userland/Services/FileSystemAccessServer/main.cpp index 68ea1730ef..9136fc0fc2 100644 --- a/Userland/Services/FileSystemAccessServer/main.cpp +++ b/Userland/Services/FileSystemAccessServer/main.cpp @@ -19,6 +19,6 @@ ErrorOr<int> serenity_main(Main::Arguments) app->set_quit_when_last_window_deleted(false); auto socket = TRY(Core::LocalSocket::take_over_accepted_socket_from_system_server()); - IPC::new_client_connection<FileSystemAccessServer::ClientConnection>(move(socket), 1); + (void)IPC::new_client_connection<FileSystemAccessServer::ClientConnection>(move(socket), 1); return app->exec(); } diff --git a/Userland/Services/InspectorServer/main.cpp b/Userland/Services/InspectorServer/main.cpp index 9ed33c1b03..79d7f0fe60 100644 --- a/Userland/Services/InspectorServer/main.cpp +++ b/Userland/Services/InspectorServer/main.cpp @@ -24,7 +24,7 @@ ErrorOr<int> serenity_main(Main::Arguments) server->on_accept = [&](auto client_socket) { static int s_next_client_id = 0; int client_id = ++s_next_client_id; - IPC::new_client_connection<InspectorServer::ClientConnection>(move(client_socket), client_id); + (void)IPC::new_client_connection<InspectorServer::ClientConnection>(move(client_socket), client_id); }; auto inspectables_server = TRY(Core::LocalServer::try_create()); diff --git a/Userland/Services/LaunchServer/main.cpp b/Userland/Services/LaunchServer/main.cpp index 7d25a4ee3e..23afe66cf5 100644 --- a/Userland/Services/LaunchServer/main.cpp +++ b/Userland/Services/LaunchServer/main.cpp @@ -32,7 +32,7 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv) server->on_accept = [&](auto client_socket) { static int s_next_client_id = 0; int client_id = ++s_next_client_id; - IPC::new_client_connection<LaunchServer::ClientConnection>(move(client_socket), client_id); + (void)IPC::new_client_connection<LaunchServer::ClientConnection>(move(client_socket), client_id); }; return event_loop.exec(); diff --git a/Userland/Services/LookupServer/LookupServer.cpp b/Userland/Services/LookupServer/LookupServer.cpp index 3147e2c362..8d5f02163a 100644 --- a/Userland/Services/LookupServer/LookupServer.cpp +++ b/Userland/Services/LookupServer/LookupServer.cpp @@ -76,7 +76,7 @@ LookupServer::LookupServer() m_local_server->on_accept = [](auto client_socket) { static int s_next_client_id = 0; int client_id = ++s_next_client_id; - IPC::new_client_connection<ClientConnection>(move(client_socket), client_id); + (void)IPC::new_client_connection<ClientConnection>(move(client_socket), client_id); }; bool ok = m_local_server->take_over_from_system_server(); VERIFY(ok); diff --git a/Userland/Services/NotificationServer/main.cpp b/Userland/Services/NotificationServer/main.cpp index 5980d95192..7a3182166e 100644 --- a/Userland/Services/NotificationServer/main.cpp +++ b/Userland/Services/NotificationServer/main.cpp @@ -23,7 +23,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) server->on_accept = [&](auto client_socket) { static int s_next_client_id = 0; int client_id = ++s_next_client_id; - IPC::new_client_connection<NotificationServer::ClientConnection>(move(client_socket), client_id); + (void)IPC::new_client_connection<NotificationServer::ClientConnection>(move(client_socket), client_id); }; TRY(Core::System::unveil("/res", "r")); diff --git a/Userland/Services/RequestServer/main.cpp b/Userland/Services/RequestServer/main.cpp index 02c0474ddd..a97f26bc9b 100644 --- a/Userland/Services/RequestServer/main.cpp +++ b/Userland/Services/RequestServer/main.cpp @@ -37,7 +37,7 @@ ErrorOr<int> serenity_main(Main::Arguments) [[maybe_unused]] auto https = make<RequestServer::HttpsProtocol>(); auto socket = TRY(Core::LocalSocket::take_over_accepted_socket_from_system_server()); - IPC::new_client_connection<RequestServer::ClientConnection>(move(socket), 1); + (void)IPC::new_client_connection<RequestServer::ClientConnection>(move(socket), 1); auto result = event_loop.exec(); // FIXME: We exit instead of returning, so that protocol destructors don't get called. diff --git a/Userland/Services/SQLServer/main.cpp b/Userland/Services/SQLServer/main.cpp index 353e2ceab7..df3b03a287 100644 --- a/Userland/Services/SQLServer/main.cpp +++ b/Userland/Services/SQLServer/main.cpp @@ -40,7 +40,7 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv) server->on_accept = [&](auto client_socket) { static int s_next_client_id = 0; int client_id = ++s_next_client_id; - IPC::new_client_connection<SQLServer::ClientConnection>(client_socket, client_id); + (void)IPC::new_client_connection<SQLServer::ClientConnection>(client_socket, client_id); }; return event_loop.exec(); diff --git a/Userland/Services/WebSocket/main.cpp b/Userland/Services/WebSocket/main.cpp index c65eada58a..9c29622fc2 100644 --- a/Userland/Services/WebSocket/main.cpp +++ b/Userland/Services/WebSocket/main.cpp @@ -26,6 +26,6 @@ ErrorOr<int> serenity_main(Main::Arguments) TRY(Core::System::unveil(nullptr, nullptr)); auto socket = TRY(Core::LocalSocket::take_over_accepted_socket_from_system_server()); - IPC::new_client_connection<WebSocket::ClientConnection>(move(socket), 1); + (void)IPC::new_client_connection<WebSocket::ClientConnection>(move(socket), 1); return event_loop.exec(); } diff --git a/Userland/Services/WindowServer/EventLoop.cpp b/Userland/Services/WindowServer/EventLoop.cpp index 1986695963..7f9c21c63d 100644 --- a/Userland/Services/WindowServer/EventLoop.cpp +++ b/Userland/Services/WindowServer/EventLoop.cpp @@ -33,13 +33,13 @@ EventLoop::EventLoop() m_window_server->on_accept = [&](auto client_socket) { static int s_next_client_id = 0; int client_id = ++s_next_client_id; - IPC::new_client_connection<ClientConnection>(move(client_socket), client_id); + (void)IPC::new_client_connection<ClientConnection>(move(client_socket), client_id); }; m_wm_server->on_accept = [&](auto client_socket) { static int s_next_wm_id = 0; int wm_id = ++s_next_wm_id; - IPC::new_client_connection<WMClientConnection>(move(client_socket), wm_id); + (void)IPC::new_client_connection<WMClientConnection>(move(client_socket), wm_id); }; if (m_keyboard_fd >= 0) { |