Unicode格式编译器警告:Format指定类型'unsigned short'但参数的类型为'int'

NSC*_*der 5 unicode xcode objective-c nsstring ios

这是一个有点强迫症,但我讨厌得到任何编译器警告.当我更新XCode时,我开始收到此编译器警告:

Format指定类型'unsigned short'但参数的类型为'int'

当我尝试使用以下代码包含Unicode字符的度数时:

currentVal = [NSString stringWithFormat:@"%.2f%C", angleDeg, 0x00B0];
Run Code Online (Sandbox Code Playgroud)

如何通过更改代码或关闭特定编译器警告来使编译器警告消失?

tro*_*foe 14

将文字投射到unichar:

currentVal = [NSString stringWithFormat:@"%.2f%C", angleDeg, (unichar)0x00B0];
Run Code Online (Sandbox Code Playgroud)