[MPlayer-cvslog] r31233 - trunk/libmpdemux/demux_mkv.c

Aurelien Jacobs aurel at gnuage.org
Sun May 30 00:06:48 CEST 2010


On Thu, May 27, 2010 at 06:13:53PM +0200, diego wrote:
> Author: diego
> Date: Thu May 27 18:13:53 2010
> New Revision: 31233
> 
> Log:
> Remove two pointless void* casts.
> 
> Modified:
>    trunk/libmpdemux/demux_mkv.c
> 
> Modified: trunk/libmpdemux/demux_mkv.c
> ==============================================================================
> --- trunk/libmpdemux/demux_mkv.c	Thu May 27 18:05:30 2010	(r31232)
> +++ trunk/libmpdemux/demux_mkv.c	Thu May 27 18:13:53 2010	(r31233)
> @@ -1963,14 +1963,13 @@ demux_mkv_open_audio (demuxer_t *demuxer
>  
>        if (track->a_formattag == mmioFOURCC('f', 'L', 'a', 'C'))
>          {
> -          ptr = (unsigned char *)track->private_data;
> +          ptr = track->private_data;
>            size = track->private_size;
>          }
>        else
>          {
>            sh_a->format = mmioFOURCC('f', 'L', 'a', 'C');
> -          ptr = (unsigned char *) track->private_data
> -            + sizeof (WAVEFORMATEX);
> +          ptr = track->private_data + sizeof (WAVEFORMATEX);

This one was not pointless. Arithmetic with void pointer is undefined.
This should generate a warning...

Aurel


More information about the MPlayer-cvslog mailing list