On 02/10/15 12:43, Vittorio Giovara wrote:
> Fix a warning from clang incompatible-pointer-types-discards-qualifiers.
> ---
>  libavutil/dict.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/libavutil/dict.c b/libavutil/dict.c
> index 7213bf2..6a8a06e 100644
> --- a/libavutil/dict.c
> +++ b/libavutil/dict.c
> @@ -80,8 +80,10 @@ int av_dict_set(AVDictionary **pm, const char *key, const 
> char *value,
>  
>      if (tag) {
>          if (flags & AV_DICT_DONT_OVERWRITE) {
> -            if (flags & AV_DICT_DONT_STRDUP_KEY) av_free(key);
> -            if (flags & AV_DICT_DONT_STRDUP_VAL) av_free(value);
> +            if (flags & AV_DICT_DONT_STRDUP_KEY)
> +                av_freep(&key);
> +            if (flags & AV_DICT_DONT_STRDUP_VAL)
> +                av_freep(&value);
>              return 0;
>          }
>          if (flags & AV_DICT_APPEND)
> 

Shouldn't hurt.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to