SecureCoding-5.17¶
Use of an implied default in a switch statement
Required inputs: IR
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
empty_default |
Default clause should contain a statement (in addition to break/return) or a comment. |
None |
False |
missing_default |
Switch has no “default” clause. |
None |
False |
Options¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
allow_complete_enum¶
allow_complete_enum : bool = True
allow_empty_default_case¶
allow_empty_default_case : bool = False
MISRA C:2012 Rule 16.4 requires a comment or statement in addition.
MISRA C++2008 does not.