Hi,
I would like some advice on whether I should be using plain "chars"
for strings. I have instead been using "unsigned char" in my code (for
embedded systems). In general the strings contain ASCII characters in
the 0-127 range, although I had thought that I might want to use the
128-255 range for special symbols or foreign character codes.
This all worked OK for a long time, but a recent update to the
compiler on my system has resulted in a lot of errors such as:
"pointer targets in passing argument 1 of 'strcpy' differ in
signedness"
Basically, the compiler is now protesting about me passing strings of
"unsigned char" to standard library functions that expect "char"
(which seems to be most of them).
I can rewrite my code to use plain chars. Or, I can cast the string
pointers in the standard library function calls. Both of these will
need quite a lot of (fairly trivial) changes. Or I expect I can turn
the warnings off.
(I would think this topic must be beaten to death, but I did not see
anything in the FAQ!).
Thanks,
--
John Devereux