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

compiler-warnings, syntax, warnings, xcode

Solution

This worked for me:

#ifdef __llvm__
#pragma GCC diagnostic ignored "-Wdangling-else"
#endif

Problem

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)

Original source