base: mark Parent::Close_result with [[nodiscard]]

This commit is contained in:
Norman Feske 2020-01-02 20:23:03 +01:00
parent ffc099eb54
commit 6ae98e2e6d
2 changed files with 3 additions and 3 deletions

View File

@ -200,7 +200,7 @@ class Genode::Parent
virtual Upgrade_result upgrade(Client::Id to_session,
Upgrade_args const &args) = 0;
enum Close_result { CLOSE_DONE, CLOSE_PENDING };
enum [[nodiscard]] Close_result { CLOSE_DONE, CLOSE_PENDING };
/**
* Close session

View File

@ -867,7 +867,7 @@ void Child::close_all_sessions()
* running.
*/
while (unsigned long id_value = any_cpu_session_id(_id_space).value)
close(Parent::Client::Id{id_value});
(void)close(Parent::Client::Id{id_value});
_initial_thread.destruct();
@ -921,7 +921,7 @@ void Child::close_all_sessions()
auto close_fn = [&] (Session_state &session) {
session.closed_callback = nullptr;
session.ready_callback = nullptr;
_close(session);
(void)_close(session);
};
while (_id_space.apply_any<Session_state>(close_fn));