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

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 04 May 2013 12:23:15 +0200

Hi Jérôme,

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);

Bye,
   Axel.


Other related posts: