mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:27:43 +00:00
Shell: Cast unused smart-pointer return values to void
This commit is contained in:
parent
9e3a786a64
commit
b138070da9
2 changed files with 7 additions and 7 deletions
|
@ -839,7 +839,7 @@ int Shell::builtin_shift(int argc, const char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto i = 0; i < count; ++i)
|
for (auto i = 0; i < count; ++i)
|
||||||
values.take_first();
|
(void)values.take_first();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -466,7 +466,7 @@ bool Shell::invoke_function(const AST::Command& command, int& retval)
|
||||||
Core::EventLoop loop;
|
Core::EventLoop loop;
|
||||||
setup_signals();
|
setup_signals();
|
||||||
|
|
||||||
function.body->run(*this);
|
(void)function.body->run(*this);
|
||||||
|
|
||||||
retval = last_return_code;
|
retval = last_return_code;
|
||||||
return true;
|
return true;
|
||||||
|
@ -491,7 +491,7 @@ Shell::Frame Shell::push_frame(String name)
|
||||||
void Shell::pop_frame()
|
void Shell::pop_frame()
|
||||||
{
|
{
|
||||||
VERIFY(m_local_frames.size() > 1);
|
VERIFY(m_local_frames.size() > 1);
|
||||||
m_local_frames.take_last();
|
(void)m_local_frames.take_last();
|
||||||
}
|
}
|
||||||
|
|
||||||
Shell::Frame::~Frame()
|
Shell::Frame::~Frame()
|
||||||
|
@ -505,7 +505,7 @@ Shell::Frame::~Frame()
|
||||||
dbgln("- {:p}: {}", &frame, frame.name);
|
dbgln("- {:p}: {}", &frame, frame.name);
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
frames.take_last();
|
(void)frames.take_last();
|
||||||
}
|
}
|
||||||
|
|
||||||
String Shell::resolve_alias(const String& name) const
|
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);
|
tcgetattr(0, &termios);
|
||||||
tcsetattr(0, TCSANOW, &default_termios);
|
tcsetattr(0, TCSANOW, &default_termios);
|
||||||
|
|
||||||
command->run(*this);
|
(void)command->run(*this);
|
||||||
|
|
||||||
tcsetattr(0, TCSANOW, &termios);
|
tcsetattr(0, TCSANOW, &termios);
|
||||||
|
|
||||||
|
@ -930,13 +930,13 @@ void Shell::run_tail(const AST::Command& invoking_command, const AST::NodeWithAc
|
||||||
}
|
}
|
||||||
auto evaluate = [&] {
|
auto evaluate = [&] {
|
||||||
if (next_in_chain.node->would_execute()) {
|
if (next_in_chain.node->would_execute()) {
|
||||||
next_in_chain.node->run(*this);
|
(void)next_in_chain.node->run(*this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto node = next_in_chain.node;
|
auto node = next_in_chain.node;
|
||||||
if (!invoking_command.should_wait)
|
if (!invoking_command.should_wait)
|
||||||
node = adopt_ref(static_cast<AST::Node&>(*new AST::Background(next_in_chain.node->position(), move(node))));
|
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) {
|
switch (next_in_chain.action) {
|
||||||
case AST::NodeWithAction::And:
|
case AST::NodeWithAction::And:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue