< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

RE: [reSIProcate] Closer to release


That looks fairly relevant - char is generally unsigned on PPC, but signed
on most other platforms. The base64Lookup[] array in Data::base64decode()
should be declared as either signed char or int.

There may be related bugs nearby. For example, Data::isHex() seems to have
the opposite problem: it does not work as intended when char is signed.
There are also a few calls to <cctype> functions with arguments that may be
negative.

Tim

> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On 
> Behalf Of Nils Ohlmeier
> Sent: Thursday, 12 May 2005 7:12 AM
> To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [reSIProcate] Closer to release
> 
> I get a bunch of warnings for Data.cxx on PPC Linux:
> 
> os/Data.cxx:1679: warning: converting of negative value 
> `-0x00000000000000001´ to `char´ [...]
> os/Data.cxx:1679: warning: converting of negative value 
> `-0x00000000000000001´ to `char´
> os/data.cxx:1713: warning: comparison is always false due to 
> limited range of data type
> os/data.cxx:1723: warning: comparison is always false due to 
> limited range of data type
> 
> I dont know how relevant this is. In case I can try to fix 
> it, although I currently do not understand well enough what 
> the function base64decode() is doing how.
> 
> Regards
>   Nils