方法一:编译器属性__attribute__
type varname __attribute__((unused))
//精简版
type varname __unused = ...
方法二:全局控制
Paste_Image.png方法三:#pragma unused()
type varname = ...
#pragma unused(varname)
方法四:
type varname = ...
(void)varname;
方法一:编译器属性__attribute__
type varname __attribute__((unused))
//精简版
type varname __unused = ...
方法二:全局控制
Paste_Image.png方法三:#pragma unused()
type varname = ...
#pragma unused(varname)
方法四:
type varname = ...
(void)varname;
本文标题:如何屏蔽Unused variable
本文链接:https://www.haomeiwen.com/subject/cyzajttx.html
网友评论