I get the following warning from gcc:
labs.c:760:2: error: array subscript has type ‘char’ [-Werror=char-subscripts]
wrbuf[cmdlen++]=(unsigned char)(basictoken[from]>>8);
^
cc1: all warnings being treated as errors
Debugging with gdb it reports both side of similar type:
760 wrbuf[cmdlen++]=(unsigned char)(token[from]>>8);
(gdb) whatis wrbuf[cmdlen]
type = unsigned char
(gdb) whatis (unsigned char)(token[from]>>8)
type = unsigned char
Why is this warning? It disturbs me because if I want to make available format for ctypes the warning is turned to error.