Community
Participate
Working Groups
Example: int main() { int x; switch (x) { case 1: { break; } case 2: { break; } default: { x = 0; } // WARNING HERE: "No break at the end of case" } } I think warning about no break at the end of a "default" case that occurs as the last case in a switch statement (or even more generally, about no break at the end of *any* case that is the last case in a switch statement) is unnecessary and should be removed.
Hi Nathan, You can disable this option by going in the project properties under C/C++ General / Code Analysis / No break at end of case / Customize Selected... / Check also the last "case" statement
Thanks Simon, I didn't know about these "Customize" settings. I've marked the issue as resolved.