char数据类型的符号
现象描述
告警信息:warning: comparison is always false due to limitedrange of data type
问题原因
char变量在不同CPU架构下默认符号不一致,在x86架构下为signed char,在ARM64平台为unsigned char,移植时需要指定char变量为signed char。
处理步骤
在编译选项中加入“-fsigned-char”选项,指定ARM64平台下的char为有符号数。
父主题: 编译脚本移植类问题