[haiku-development] Re: Mediaplayer use of BList to store indices

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 04 May 2013 13:13:21 +0200

On 05/04/2013 12:23 PM, Axel Dörfler wrote:
On 05/04/2013 11:22 AM, Jérôme Duval wrote:
I went ahead with some 64 bit fixes in MediaPlayer and got stuck with
this:

src/apps/mediaplayer/playlist/ListViews.cpp: In member function 'virtual
void DragSortableListView::MessageReceived(BMessage*)':
src/apps/mediaplayer/playlist/ListViews.cpp:331:28: error: cast to
pointer from integer of different size [-Werror=int-to-pointer-cast]

The code tries to add an int32 in a BList:
indices.AddItem((void*)index);

Any opinions on how to fix this?

It's ugly anyway, so why not just:
indices.AddItem((void*)(long)index);

(addr_t) would be the correct type.

CU, Ingo


Other related posts: