gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] cross-compiling for ARM / Angstrom: bugs and problems


From: strk
Subject: Re: [Gnash-dev] cross-compiling for ARM / Angstrom: bugs and problems
Date: Wed, 8 Apr 2009 13:25:10 +0200

On Wed, Apr 08, 2009 at 01:19:11PM +0200, Udo Giacomozzi wrote:
> Hello strk,
> 
> Wednesday, April 8, 2009, 10:53:13 AM, you wrote:
> s> "invalid cast" came from a testcase of mine.
> s> The problem was that htons(short) was returing a 32bit integer
> s> when -O2 was used. Follow file/linenum and use a temp 16bit variable
> s> to hold the return from htons(). If it fixes, it's it.
> 
> 
> Not sure what I have to do, exactly.
> 
> I tried:
> 
>     short int temp
>       = htons(version)
>       + htons(headers)
>       + htons(messages);
> 
>     *buf = temp;        
> 
> But it still gives me the same error on the buf=temp assignment.

Try:

        boost::uint16_t tmp
        tmp = htons(version);
        *buf = tmp;
        tmp = htons(headers);
        *buf += tmp;
        tmp = htons(messages);
        *buf += tmp;

--strk;

 Free GIS & Flash consultant/developer      ()  ASCII Ribbon Campaign
 http://foo.keybit.net/~strk/services.html  /\  Keep it simple! 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]