[MPlayer-cvslog] CVS: main/libmpdemux demuxer.h,1.88,1.89
Rich Felker
dalias at aerifal.cx
Wed Mar 8 21:35:18 CET 2006
On Sun, Feb 12, 2006 at 11:51:06AM +0100, Jindrich Makovicka CVS wrote:
> CVS change done by Jindrich Makovicka CVS
>
> Update of /cvsroot/mplayer/main/libmpdemux
> In directory mail:/var2/tmp/cvs-serv18119
>
> Modified Files:
> demuxer.h
> Log Message:
> forgotten cast (blows on gcc4)
>
> Index: demuxer.h
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.h,v
> retrieving revision 1.88
> retrieving revision 1.89
> diff -u -r1.88 -r1.89
> --- demuxer.h 12 Feb 2006 09:28:09 -0000 1.88
> +++ demuxer.h 12 Feb 2006 10:51:04 -0000 1.89
> @@ -190,7 +190,7 @@
> dp->flags=0;
> dp->refcount=1;
> dp->master=NULL;
> - if (len > 0 && (dp->buffer = malloc(len + 8)))
> + if (len > 0 && (dp->buffer = (unsigned char *)malloc(len + 8)))
This is NOT CORRECT! Reverse!
If you're getting a warning it means you forgot to include stdlib.h,
and casting the integer return value of malloc to a pointer will NOT
fix the problem, just hide it!
Rich
More information about the MPlayer-cvslog
mailing list