iOS Treating Unicode character as whitespace 警告解决方法

部署运行你感兴趣的模型镜像

   联系人:石虎 QQ:1224614774  昵称: 嗡嘛呢叭咪哄

                       QQ群:807236138  群称: iOS 技术交流学习群

                       QQ群:713799633   群称:iOS技术交流学习群-2

 

一、概念

黄色一般有以下几种常见的问题:
    变量定义,但是没有被使用
    方法定义,但是没有被使用
    好像还有强制类型转换
    最好自己看信息,多分析下,尽量去掉黄色警告

二、黄色警告

图:

 

三、解决警告的方法

    Treating Unicode character as whitespace   == 将Unicode字符处理为空格。

代码:

    if([platform isEqualToString:@"iPhone9,2"])return @"iPhone 7 Plus";

    if([platform isEqualToString:@"iPhone10,1"]) return@"iPhone 8";

    空格删除就可以了.

图:

 

谢谢!!!

您可能感兴趣的与本文相关的镜像

ACE-Step

ACE-Step

音乐合成
ACE-Step

ACE-Step是由中国团队阶跃星辰(StepFun)与ACE Studio联手打造的开源音乐生成模型。 它拥有3.5B参数量,支持快速高质量生成、强可控性和易于拓展的特点。 最厉害的是,它可以生成多种语言的歌曲,包括但不限于中文、英文、日文等19种语言

compileOutput: main.cpp:2:9: warning: treating Unicode character as identifier character rather than as '<' symbol [-Wunicode-homoglyph] #include<string> ^~ main.cpp:2:18: warning: treating Unicode character as identifier character rather than as '>' symbol [-Wunicode-homoglyph] #include<string> ^~ main.cpp:2:2: error: invalid preprocessing directive #include<string> ^ main.cpp:5:1: warning: treating Unicode character as identifier character rather than as '{' symbol [-Wunicode-homoglyph] { ^~ main.cpp:6:7: warning: treating Unicode character as identifier character rather than as ':' symbol [-Wunicode-homoglyph] public: ^~ main.cpp:5:1: error: variable has incomplete type 'class Welcome' { ^ main.cpp:4:7: note: forward declaration of 'Welcome' class Welcome ^ main.cpp:5:4: error: expected ';' after top level declarator { ^ ; main.cpp:7:13: warning: treating Unicode character as identifier character rather than as '(' symbol [-Wunicode-homoglyph] void welcome(); ^~ main.cpp:7:16: warning: treating Unicode character as identifier character rather than as ')' symbol [-Wunicode-homoglyph] void welcome(); ^~ main.cpp:7:19: warning: treating Unicode character as identifier character rather than as ';' symbol [-Wunicode-homoglyph] void welcome(); ^~ main.cpp:9:1: warning: treating Unicode character as identifier character rather than as '}' symbol [-Wunicode-homoglyph] }; ^~ main.cpp:11:9: warning: treating Unicode character as identifier character rather than as '(' symbol [-Wunicode-homoglyph] int main() ^~ main.cpp:11:12: warning: treating Unicode character as identifier character rather than as ')' symbol [-Wunicode-homoglyph] int main() ^~ main.cpp:12:1: warning: treating Unicode character as identifier character rather than as '{' symbol [-Wunicode-homoglyph] { ^~ main.cpp:11:15: error: expected ';' after top level declarator int main() ^ ; main.cpp:15:1: error: expected unqualified-id return 0; ^ main.cpp:16:1: warning: treating Unicode character as identifier character rather than as '}' symbol [-Wunicode-homoglyph] }; ^~ main.cpp:16:1: error: C++ requires a type specifier for all declarations main.cpp:17:12: warning: treating Unicode character as identifier character rather than as ':' symbol [-Wunicode-homoglyph] void welcom::Welcome() ^~ main.cpp:17:15: warning: treating Unicode character as identifier character rather than as ':' symbol [-Wunicode-homoglyph] void welcom::Welcome() ^~ main.cpp:17:25: warning: treating Unicode character as identifier character rather than as '(' symbol [-Wunicode-homoglyph] void welcom::Welcome() ^~ main.cpp:17:28: warning: treating Unicode character as identifier character rather than as ')' symbol [-Wunicode-homoglyph] void welcom::Welcome() ^~ main.cpp:18:1: warning: treating Unicode character as identifier character rather than as '{' symbol [-Wunicode-homoglyph] { ^~ main.cpp:17:6: error: variable has incomplete type 'void' void welcom::Welcome() ^ main.cpp:17:31: error: expected ';' after top level declarator void welcom::Welcome() ^ ; main.cpp:20:1: warning: treating Unicode character as identifier character rather than as '}' symbol [-Wunicode-homoglyph] }; ^~ main.cpp:20:1: error: C++ requires a type specifier for all declarations 18 warnings and 9 errors generated.
最新发布
09-18
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值