[FFmpeg-devel] [PATCH] fix warning in libavutil/fifo.c

Diego Biurrun diego
Mon Jan 12 22:33:12 CET 2009


On Mon, Jan 12, 2009 at 09:13:58PM +0100, Michael Niedermayer wrote:
> On Sun, Jan 11, 2009 at 10:17:18PM +0100, Diego Biurrun wrote:
> > Here is a patch to fix
> > 
> > fifo.c:79: warning: cast discards qualifiers from pointer target type
> > 
> > --- libavutil/fifo.c	(revision 16549)
> > +++ libavutil/fifo.c	(working copy)
> > @@ -74,7 +74,7 @@
> >  
> > -void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int size)
> > +void av_fifo_write(AVFifoBuffer *f, uint8_t *buf, int size)
> 
> I belive av_fifo_write does not change the content of buf thus const
> is correct

Umm, I beg to differ. av_fifo_write is just a wrapper for
av_fifo_generic_write, which does modify buf, hence the warning.

Diego




More information about the ffmpeg-devel mailing list