Jim Fell Jim Fell - 4 months ago 18
C++ Question

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

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?


I think just typing //no break should work just fine.

If you nee 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,