[FFmpeg-devel] [PATCH] Fix implicit cast warnings in libavformat/metadata.c
Måns Rullgård
mans
Sat Jun 26 20:48:29 CEST 2010
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
More information about the ffmpeg-devel
mailing list