warning: comparison is always false due to limited range of data type [-Wtype-limits] s is Common::String. s[i] is thus a "char". If char is signed 8bit then the comparison will indeed always be false.