开发者

Turn Off Xcode 4's Annoying Fix-it Feature

I wonder if there is a way to stop Xcode 4 warning me about using the assignment operator inside, for example, an if-statement and suggesting me to either place parentheses around the assignment or use the equality comparison operator. There is no need to warn me about these kind of things, I know what I'm doin开发者_如何学Cg!

So has anyone figured out how to do this? Thanks if you can tell me.


That might depends on the compiler you use, but you can tune compilation warnings using the Build Setting "Other Warning Flags".

Adding -Wno-idiomatic-parentheses is supposed to suppress this particular warning.

Look at this very similar SO question

An see this one and this Apple documentations for more details.

And avoid using LLVM2.0, it is bugged.


Thanks, Vincent! Another way to silence this warning is by setting "Missing Braces and Parenthesis" to "No" under "LLVM compiler 2.0 - Warnings" in your project's build settings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜