It's a tad OCD, but I hate getting any compiler warnings. When I updated XCode, I started getting this compiler warning:
Format specifies type 'unsigned short' but the argument has type 'int'
When I tried including the Unicode character for degree using the following code:
currentVal = [NSString stringWithFormat:@"%.2f%C", angleDeg, 0x00B0];
How do I make the compiler warning go away, either by changing the code or turning off that particular compiler warning?
Cast the literal to unichar
:
currentVal = [NSString stringWithFormat:@"%.2f%C", angleDeg, (unichar)0x00B0];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With