On 11/6/2016 2:39 PM, Bjarni Ingi Gislason wrote: > "These functions check whether c, which must have the value of an > unsigned char or EOF, ...". > > When the code is compiled with "-funsigned-char" the output is correct. > > This is a fundamental flaw in the cc-standard. The program "less" (Debian > bug #594260 (-i)) has also shown it.
Should be easy enough to fix: first cast to an unsigned char, then cast to an int. You need to do this to make lint like tools happy anyhow.