[FFmpeg-devel] [PATCH] Fix implicit cast warnings in libavformat/metadata.c
Eli Friedman
eli.friedman
Sat Jun 26 21:01:37 CEST 2010
On Sat, Jun 26, 2010 at 11:55 AM, Eli Friedman <eli.friedman at gmail.com> wrote:
> Sorry; I was compiling with clang, and didn't realize ffmpeg uses
> -Wcast-qual (which clang doesn't support at the moment).
>
> -Eli
Oops, I didn't mean to top-post.
-Eli
> 2010/6/26 M?ns Rullg?rd <mans at mansr.com>:
>> Eli Friedman <eli.friedman at gmail.com> writes:
>>
>>> Patch attached; the explicit casts are a little ugly, but I don't
>>> think there's a better solution here.
>>>
>>> -Eli
>>>
>>> Index: libavformat/metadata.c
>>> ===================================================================
>>> --- libavformat/metadata.c ? ?(revision 23802)
>>> +++ libavformat/metadata.c ? ?(working copy)
>>> @@ -69,11 +69,11 @@
>>> ? ? ?}
>>> ? ? ?if(value){
>>> ? ? ? ? ?if(flags & AV_METADATA_DONT_STRDUP_KEY){
>>> - ? ? ? ? ? ?m->elems[m->count].key ?= key;
>>> + ? ? ? ? ? ?m->elems[m->count].key ?= (char*)key;
>>> ? ? ? ? ?}else
>>> ? ? ? ? ?m->elems[m->count].key ?= av_strdup(key ?);
>>> ? ? ? ? ?if(flags & AV_METADATA_DONT_STRDUP_VAL){
>>> - ? ? ? ? ? ?m->elems[m->count].value= value;
>>> + ? ? ? ? ? ?m->elems[m->count].value= (char*)value;
>>> ? ? ? ? ?}else
>>> ? ? ? ? ?m->elems[m->count].value= av_strdup(value);
>>> ? ? ? ? ?m->count++;
>>
>> Had you bothered to check, you would have noticed that these casts do
>> not remove the warning.
>>
>> --
>> M?ns Rullg?rd
>> mans at mansr.com
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at mplayerhq.hu
>> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>>
>
More information about the ffmpeg-devel
mailing list