* Bob Friesenhahn wrote on Mon, Sep 27, 2004 at 08:32:31PM CEST:
On Mon, 27 Sep 2004, Ralf Wildenhues wrote:
Most systems accept this error, because it's so widespread.
No excuse stating that sign conversion is difficult in C ;)
It seems that the correct answer to this depends on which standard you
are conforming to and whether you are using C or C++. In C '89 these
functions accept an 'int'. Naturally C++ has made things more
correct.
No. It's independent of the standard, except that I forgot C++
compatibility, sorry. At least in C the cast to unsigned char is
required, because in C these functions accept ranges within unsigned
char only. So for C++ we need to add another cast. Sigh.
No. This issue was discovered by reading the code alone. If you think
my change is wrong, I would like backing from some standard which tells
me so. I know the original code can fail on some systems when given
characters with the 8th bit set, whereas the corrected does not.
OK, updated patch below. Does this fix the warnings?