Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable warning "No break at the end of case" in Eclipse? [duplicate]

I'm using Eclipse (Luna SR 2) to write a C++ application. How do I disable the "No break at the end of case" compile warning, ideally for a specific section of code? It's annoying because our coding standard requires zero warnings and I want my cases to fall through, so I don't have to needlessly duplicate code. Is there a way to do this with pragmas?

like image 487
Jim Fell Avatar asked Sep 09 '16 11:09

Jim Fell


1 Answers

Typing //no break should work just fine.

If you want to change that, you can try going to: Window -> Preferences -> C/C++ -> Code Analysis Then choose No break at the end of case and edit //no break to what you want.

I found this StackOverflow question, that should answer your question.

Hope you found this useful,

Alex

like image 179
Alex P. Avatar answered Sep 28 '22 09:09

Alex P.