Reputation: 101
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 doing!
So has anyone figured out how to do this? Thanks if you can tell me.
Upvotes: 0
Views: 880
Reputation: 101
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.
Upvotes: 0
Reputation: 14419
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.
Upvotes: 1