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

Vitor Sessak vitor1001
Thu May 21 22:03:25 CEST 2009


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.

-Vitor



More information about the ffmpeg-devel mailing list