mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibCpp: Cast unused smart-pointer return values to void
This commit is contained in:
parent
b138070da9
commit
081d9bd010
Notes:
sideshowbarker
2024-07-17 23:09:38 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/081d9bd0102 Pull-request: https://github.com/SerenityOS/serenity/pull/11151
1 changed files with 8 additions and 8 deletions
|
@ -252,7 +252,7 @@ bool Parser::match_template_arguments()
|
||||||
while (!eof() && peek().type() != Token::Type::Greater) {
|
while (!eof() && peek().type() != Token::Type::Greater) {
|
||||||
if (!match_named_type())
|
if (!match_named_type())
|
||||||
return false;
|
return false;
|
||||||
parse_type(get_dummy_node());
|
(void)parse_type(get_dummy_node());
|
||||||
}
|
}
|
||||||
|
|
||||||
return peek().type() == Token::Type::Greater;
|
return peek().type() == Token::Type::Greater;
|
||||||
|
@ -285,13 +285,13 @@ bool Parser::match_variable_declaration()
|
||||||
}
|
}
|
||||||
|
|
||||||
VERIFY(m_root_node);
|
VERIFY(m_root_node);
|
||||||
parse_type(get_dummy_node());
|
(void)parse_type(get_dummy_node());
|
||||||
|
|
||||||
// Identifier
|
// Identifier
|
||||||
if (!match_name())
|
if (!match_name())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
parse_name(get_dummy_node());
|
(void)parse_name(get_dummy_node());
|
||||||
|
|
||||||
if (match(Token::Type::Equals)) {
|
if (match(Token::Type::Equals)) {
|
||||||
consume(Token::Type::Equals);
|
consume(Token::Type::Equals);
|
||||||
|
@ -303,7 +303,7 @@ bool Parser::match_variable_declaration()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match_braced_init_list())
|
if (match_braced_init_list())
|
||||||
parse_braced_init_list(get_dummy_node());
|
(void)parse_braced_init_list(get_dummy_node());
|
||||||
|
|
||||||
return match(Token::Type::Semicolon);
|
return match(Token::Type::Semicolon);
|
||||||
}
|
}
|
||||||
|
@ -695,7 +695,7 @@ bool Parser::match_class_declaration()
|
||||||
|
|
||||||
if (!match_name())
|
if (!match_name())
|
||||||
return false;
|
return false;
|
||||||
parse_name(get_dummy_node());
|
(void)parse_name(get_dummy_node());
|
||||||
} while (peek().type() == Token::Type::Comma);
|
} while (peek().type() == Token::Type::Comma);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -718,7 +718,7 @@ bool Parser::match_function_declaration()
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
VERIFY(m_root_node);
|
VERIFY(m_root_node);
|
||||||
parse_type(get_dummy_node());
|
(void)parse_type(get_dummy_node());
|
||||||
|
|
||||||
if (!peek(Token::Type::Identifier).has_value())
|
if (!peek(Token::Type::Identifier).has_value())
|
||||||
return false;
|
return false;
|
||||||
|
@ -1157,7 +1157,7 @@ NonnullRefPtr<StructOrClassDeclaration> Parser::parse_class_declaration(ASTNode&
|
||||||
while (match_keyword("private") || match_keyword("public") || match_keyword("protected") || match_keyword("virtual"))
|
while (match_keyword("private") || match_keyword("public") || match_keyword("protected") || match_keyword("virtual"))
|
||||||
consume();
|
consume();
|
||||||
|
|
||||||
parse_name(get_dummy_node());
|
(void)parse_name(get_dummy_node());
|
||||||
} while (peek().type() == Token::Type::Comma);
|
} while (peek().type() == Token::Type::Comma);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1479,7 +1479,7 @@ bool Parser::match_c_style_cast_expression()
|
||||||
|
|
||||||
if (!match_type())
|
if (!match_type())
|
||||||
return false;
|
return false;
|
||||||
parse_type(get_dummy_node());
|
(void)parse_type(get_dummy_node());
|
||||||
|
|
||||||
if (consume().type() != Token::Type::RightParen)
|
if (consume().type() != Token::Type::RightParen)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue