Symbol of the char Data Type
Symptom
warning: comparison is always false due to limited range of data type.
Cause
The default symbol of the char variable varies depending on the CPU architecture. In the x86 architecture, the default symbol is signed char. In the ARM64 architecture, the default symbol is unsigned char. During the porting process, you need to set the char variable to signed char.
Procedure
Add the -fsigned-char compilation option and set the char variable in the ARM64 platform to signed char.
Parent topic: Compilation Scripts