Why is this an issue?
This rule is a strict implementation of a MISRA (Motor Industry Software Reliability Association) rule. MISRA defines best practices for developing
safety-critical software. You can learn more about this rule in the MISRA documents referenced below.
If you are not concerned with MISRA compliance or with safety-critical software, you might consider using rule S1301 instead ; it
targets the same kind of issue for general-purpose software.
Resources
- MISRA C 2004, 15.5 - Every switch statement shall have at least one case clause.
- MISRA C++ 2008, 6-4-8 - Every switch statement shall have at least one case-clause.