Defeat some miscellaneous warnings in the g++ build

This commit is contained in:
ridiculousfish
2017-01-26 17:28:46 -08:00
parent e78cefd759
commit a40f491c93
7 changed files with 14 additions and 13 deletions

View File

@@ -1326,10 +1326,12 @@ bool parse_node_tree_t::argument_list_is_root(const parse_node_t &node) const {
enum parse_statement_decoration_t parse_node_tree_t::decoration_for_plain_statement(
const parse_node_t &node) const {
assert(node.type == symbol_plain_statement);
parse_statement_decoration_t decoration = parse_statement_decoration_none;
const parse_node_t *decorated_statement = this->get_parent(node, symbol_decorated_statement);
parse_node_tag_t tag =
decorated_statement ? decorated_statement->tag : parse_statement_decoration_none;
return static_cast<parse_statement_decoration_t>(tag);
if (decorated_statement) {
decoration = static_cast<parse_statement_decoration_t>(decorated_statement->tag);
}
return decoration;
}
bool parse_node_tree_t::command_for_plain_statement(const parse_node_t &node, const wcstring &src,