Re: warning in 'base64' module

2006-01-12 Thread Simon Josefsson
Paul Eggert <[EMAIL PROTECTED]> writes: > Simon Josefsson <[EMAIL PROTECTED]> writes: > >> Is there a clean fix? > > How about something like this? > > #if UCHAR_MAX == 255 > # define uchar_in_range(c) true > #else > # define uchar_in_range(c) ((c) <= 255) > #endif > > and then use uchar_in_range

Re: warning in 'base64' module

2006-01-11 Thread Paul Eggert
Simon Josefsson <[EMAIL PROTECTED]> writes: > Is there a clean fix? How about something like this? #if UCHAR_MAX == 255 # define uchar_in_range(c) true #else # define uchar_in_range(c) ((c) <= 255) #endif and then use uchar_in_range in the rest of your code. __

Re: warning in 'base64' module

2006-01-11 Thread Bruno Haible
Simon Josefsson wrote: > bool > isbase64 (char ch) > { > return to_uchar (ch) <= 255 && 0 <= b64[to_uchar (ch)]; > } > ... > Presumably the warning is because gcc believe an unsigned char cannot > be larger than 255, but we didn't want to assume that since I don't > think C89 guarantee it. Corre

Re: warning in 'base64' module

2006-01-11 Thread Simon Josefsson
Bruno Haible <[EMAIL PROTECTED]> writes: > The base64 module has a warning on Linux/glibc: > > gcc -DHAVE_CONFIG_H -I. -I/packages/megatestdir/base64/lib -I.. -g -O2 -c > /packages/megatestdir/base64/lib/base64.c > /packages/megatestdir/base64/lib/base64.c: In function `isbase64': > /packages

Re: warning in 'base64' module

2006-01-11 Thread Ralf Wildenhues
* Bruno Haible wrote on Wed, Jan 11, 2006 at 01:56:51PM CET: > The base64 module has a warning on Linux/glibc: > > gcc -DHAVE_CONFIG_H -I. -I/packages/megatestdir/base64/lib -I.. -g -O2 -c > /packages/megatestdir/base64/lib/base64.c > /packages/megatestdir/base64/lib/base64.c: In function `is

warning in 'base64' module

2006-01-11 Thread Bruno Haible
The base64 module has a warning on Linux/glibc: gcc -DHAVE_CONFIG_H -I. -I/packages/megatestdir/base64/lib -I.. -g -O2 -c /packages/megatestdir/base64/lib/base64.c /packages/megatestdir/base64/lib/base64.c: In function `isbase64': /packages/megatestdir/base64/lib/base64.c:284: warning: compar