[mplayer-dev at kernel.dk: [MPlayer-dev-eng] [PATCH] sizeof(int) != sizeof(pointer)]

Jens Axboe mplayer-dev at kernel.dk
Wed Mar 12 13:24:52 CET 2003


On Wed, Mar 12 2003, D Richard Felker III wrote:
> On Wed, Mar 12, 2003 at 11:46:10AM +0100, Jens Axboe wrote:
> > 
> > Is someone going to commit this or not? It's clearly a bug.
> > 
> > ----- Forwarded message from Jens Axboe <mplayer-dev at kernel.dk> -----
> > 
> > From: Jens Axboe <mplayer-dev at kernel.dk>
> > Reply-To: mplayer-dev-eng at mplayerhq.hu
> > Date: Tue, 11 Mar 2003 10:39:28 +0100
> > To: mplayer-dev-eng at mplayerhq.hu
> > Subject: [MPlayer-dev-eng] [PATCH] sizeof(int) != sizeof(pointer)
> > 
> > Hi,
> > 
> > Should not need a lot of comments, this is pretty basic. Though shallt
> > not cast pointers to ints, on 64-bit archs this is really bad. Below
> > patch fixes segfault on volume up/down for me with mplayer cvs.
> 
> There is definitely a bug but this is not the correct fix. A quick
> glance seems to indicate that the second argument to control() is
> always a pointer, so it should just be declared to take a void *!!!
> 1000l to whoever wrote that mess!

Well that is fine, fix it that way if you want. As long as it will hold
a pointer. void * is just as, if not more so, ugly as unsigned long,
though :)

-- 
Jens Axboe



More information about the MPlayer-dev-eng mailing list