Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I disable "Add explicit braces to avoid dangling else" in new xCode?

Just updated to latest xCode 4.41 and now I'm getting a ton of warnings about perfectly fine code (see subject line). These warnings are in 3rd party source code that I'm using, I don't feel like going into that code and editing (I'd have to do it again next time I update that code) so I'd rather just disable that particular warning.

By the way, I'm using xcode4.41 but apparently I don't have a good enough reputation to be able to create a new tag (interesting though that 4.41 is not already in there)

like image 883
David Avatar asked Aug 19 '12 01:08

David


1 Answers

This worked for me:

#ifdef __llvm__
#pragma GCC diagnostic ignored "-Wdangling-else"
#endif
like image 141
PatchyFog Avatar answered Sep 30 '22 15:09

PatchyFog