3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-26 18:45:34 +00:00

Merge pull request #2022 from Xiretza/fallthroughs

Avoid switch fall-through warnings
This commit is contained in:
whitequark 2020-05-08 05:30:32 +00:00 committed by GitHub
commit ebfdf61eb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 9 deletions

View file

@ -930,7 +930,7 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint, bool *foun
}
break;
}
/* fall through */
YS_FALLTHROUGH
// everything should have been handled above -> print error if not.
default:
@ -1026,7 +1026,7 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
if (GetSize(children) >= 1 && children[0]->type == AST_CONSTANT) {
current_module->parameter_default_values[str] = children[0]->asParaConst();
}
/* fall through */
YS_FALLTHROUGH
case AST_LOCALPARAM:
if (flag_pwires)
{
@ -1822,7 +1822,8 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
is_signed = sign_hint;
return SigSpec(wire);
}
} /* fall through */
}
YS_FALLTHROUGH
// everything should have been handled above -> print error if not.
default:

View file

@ -91,7 +91,7 @@ std::string AstNode::process_format_str(const std::string &sformat, int next_arg
case 'D':
if (got_len)
goto unsupported_format;
/* fall through */
YS_FALLTHROUGH
case 'x':
case 'X':
if (next_arg >= GetSize(children))