[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-dev] Problem compiling on amd64
From: |
strk |
Subject: |
Re: [Gnash-dev] Problem compiling on amd64 |
Date: |
Wed, 2 Aug 2006 01:24:26 +0200 |
On Wed, Aug 02, 2006 at 12:41:37AM +0200, annonygmouse wrote:
>
> Hi.
>
> My machine is an amd64 and today gnash from CVS does not compile anymore.
> The problem is in "libamf/amf.cpp", there are to places where a
> char* is casted to an int.
> I supose you already know, but on 64bits architectures in linux the data
> model used is LP64 [1], that means that
> * ints are 32-bit
> * longs are 64-bit
> * long-longs are also 64-bit
> * pointers are 64-bit
> and when doing :
> char *x = something;
>
> return (int)x-(int)strchr(x,SOMECHAR);
>
> each casting looses information as gcc informs:
> amf.cpp:467: error: cast from 'char*' to 'int' loses precision
I dont' know about AMF internals, but that cast seems really
useless at first glance. Does it compile fine with you if you
remove it ?
return x - strchr(x,SOMECHAR);
--strk;