[FFmpeg-devel] [PATCH] Fix warnings in graphparser.c

Stefano Sabatini stefano.sabatini-lala
Mon Jun 1 18:06:42 CEST 2009


On date Sunday 2009-05-31 19:11:23 +0200, Stefano Sabatini encoded:
> On date Sunday 2009-05-24 11:49:00 +0200, Stefano Sabatini encoded:
> > On date Thursday 2009-05-21 22:03:25 +0200, Vitor Sessak encoded:
> > > Stefano Sabatini wrote:
> > >> On date Tuesday 2009-05-19 23:01:45 +0200, Stefano Sabatini encoded:
> > >>> Hi,
> > >>> fixes the warnings in graphparser.c:
> > >>> graphparser.c: In function ?free_inout?:
> > >>> graphparser.c:141: warning: passing argument 1 of ?av_free? discards qualifiers from pointer target type
> > >>> graphparser.c: In function ?link_filter_inouts?:
> > >>> graphparser.c:188: warning: passing argument 1 of ?av_free? discards qualifiers from pointer target type
> > >>> graphparser.c: In function ?parse_outputs?:
> > >>> graphparser.c:271: warning: passing argument 1 of ?av_free? discards qualifiers from pointer target type
> > >>>
> > >>> Since name is supposed to be freed it shouldn't be declared const (but
> > >>> maybe it should be const since it is not supposed to be changed, but
> > >>> the "const" keyword cannot express the constraint "don't change it but
> > >>> free it if you want").
> > >>>
> > >>> Anyway IMO it looks more correct this way, also removes these
> > >>> fastidious warnings.
> > >>>
> > >>> Regards.
> > >>> -- 
> > >>> FFmpeg = Faithless and Fantastic Multimedia Proud Elected Geisha
> > >>
> > >>> Index: libavfilter/graphparser.h
> > >>> ===================================================================
> > >>> --- libavfilter/graphparser.h	(revision 18854)
> > >>> +++ libavfilter/graphparser.h	(working copy)
> > >>> @@ -29,7 +29,7 @@
> > >>>   * A linked-list of the inputs/outputs of the filter chain.
> > >>>   */
> > >>>  typedef struct AVFilterInOut {
> > >>> -    const char *name;
> > >>> +    char *name;
> > >>>      AVFilterContext *filter;
> > >>>      int pad_idx;
> > >>
> > >> Ping.
> > >
> > > Fine for me.
> > 
> > OK to apply?
> 
> I'll apply it tomorrow.

Applied.
-- 
FFmpeg = Foolish Faithless Mysterious Patchable Enhanced Gargoyle



More information about the ffmpeg-devel mailing list