[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-dev] [PATCH] libamf/lcshm.cpp: fix "cast loses precision" err
From: |
Benjamin Wolsey |
Subject: |
Re: [Gnash-dev] [PATCH] libamf/lcshm.cpp: fix "cast loses precision" error |
Date: |
Thu, 23 Jul 2009 13:13:37 +0100 |
Am Donnerstag, den 23.07.2009, 09:18 +0200 schrieb Melchior FRANZ:
> Hi,
>
> gnash from today doesn't compile for me. g++ complains about an invalid
> cast of a pointer to "unsigned int", which doesn't quite fit on 64 bit
> systems.
>
> lcshm.cpp: In member function ‘uint8_t* amf::LcShm::formatHeader(const
> std::string&, \
> const std::string&, bool)’:
> lcshm.cpp:416: error: cast from ‘uint8_t*’ to ‘unsigned int’ loses precision
> lcshm.cpp:416: error: cast from ‘uint8_t*’ to ‘unsigned int’ loses precision
> lcshm.cpp: In member function ‘bool amf::LcShm::connect(const
> std::string&)’:
> lcshm.cpp:487: error: cast from ‘char*’ to ‘unsigned int’ loses precision
> lcshm.cpp:487: error: cast from ‘uint8_t*’ to ‘unsigned int’ loses precision
> lcshm.cpp: In member function ‘void amf::LcShm::send(const std::string&, \
> const std::string&, std::vector<amf::Element*,
> std::allocator<amf::Element*> >&)’:
> lcshm.cpp:568: error: cast from ‘uint8_t*’ to ‘unsigned int’ loses precision
> lcshm.cpp:568: error: cast from ‘uint8_t*’ to ‘unsigned int’ loses precision
>
>
>
> I suggest to use printf's %p format instead:
>
>
Boost format doesn't care what format you use; it depends on the type.
Casting a pointer to an integer type is the error there, not the format
string.
bwy
--
Free Flash, use Gnash
http://www.gnu.org/software/gnash/
Benjamin Wolsey, Software Developer - http://benjaminwolsey.de
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil