diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2021-12-02 11:01:47 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-05 15:31:03 +0100 |
commit | b138070da92158ba5db3476feb67678765645573 (patch) | |
tree | 3f60a7b58eb718fc2542e7b8772656ebb49e01d5 /Userland/Shell/Shell.cpp | |
parent | 9e3a786a64bf8fa568754d9a3db697aa60e1e20d (diff) | |
download | serenity-b138070da92158ba5db3476feb67678765645573.zip |
Shell: Cast unused smart-pointer return values to void
Diffstat (limited to 'Userland/Shell/Shell.cpp')
-rw-r--r-- | Userland/Shell/Shell.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Shell/Shell.cpp b/Userland/Shell/Shell.cpp index 499e94eb2d..2d24d5c811 100644 --- a/Userland/Shell/Shell.cpp +++ b/Userland/Shell/Shell.cpp @@ -466,7 +466,7 @@ bool Shell::invoke_function(const AST::Command& command, int& retval) Core::EventLoop loop; setup_signals(); - function.body->run(*this); + (void)function.body->run(*this); retval = last_return_code; return true; @@ -491,7 +491,7 @@ Shell::Frame Shell::push_frame(String name) void Shell::pop_frame() { VERIFY(m_local_frames.size() > 1); - m_local_frames.take_last(); + (void)m_local_frames.take_last(); } Shell::Frame::~Frame() @@ -505,7 +505,7 @@ Shell::Frame::~Frame() dbgln("- {:p}: {}", &frame, frame.name); VERIFY_NOT_REACHED(); } - frames.take_last(); + (void)frames.take_last(); } String Shell::resolve_alias(const String& name) const @@ -570,7 +570,7 @@ int Shell::run_command(StringView cmd, Optional<SourcePosition> source_position_ tcgetattr(0, &termios); tcsetattr(0, TCSANOW, &default_termios); - command->run(*this); + (void)command->run(*this); tcsetattr(0, TCSANOW, &termios); @@ -930,13 +930,13 @@ void Shell::run_tail(const AST::Command& invoking_command, const AST::NodeWithAc } auto evaluate = [&] { if (next_in_chain.node->would_execute()) { - next_in_chain.node->run(*this); + (void)next_in_chain.node->run(*this); return; } auto node = next_in_chain.node; if (!invoking_command.should_wait) node = adopt_ref(static_cast<AST::Node&>(*new AST::Background(next_in_chain.node->position(), move(node)))); - adopt_ref(static_cast<AST::Node&>(*new AST::Execute(next_in_chain.node->position(), move(node))))->run(*this); + (void)adopt_ref(static_cast<AST::Node&>(*new AST::Execute(next_in_chain.node->position(), move(node))))->run(*this); }; switch (next_in_chain.action) { case AST::NodeWithAction::And: |