It's a bit of an OCD, but I hate getting compiler warnings. When I updated Xcode, I started getting a warning from this compiler:
The format indicates the type "unsigned short", but the argument is of type "int"
When I tried to include the Unicode character to get the degree, using the following code:
currentVal = [NSString stringWithFormat:@"%.2f%C", angleDeg, 0x00B0];
How do I get a compiler warning to go away, either by changing the code or by disabling this compiler warning?
source
share