[FFmpeg-devel] [PATCH 5/5] Fix constness for the return value of av_stristr().
Måns Rullgård
mans
Sun Jun 13 12:29:35 CEST 2010
Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> Fix gcc warnings:
> avstring.c: In function `av_stristr':
> avstring.c:54: warning: return discards qualifiers from pointer target type
> avstring.c:58: warning: return discards qualifiers from pointer target type
> ---
> libavutil/avstring.c | 2 +-
> libavutil/avstring.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavutil/avstring.c b/libavutil/avstring.c
> index 4844e28..c9751da 100644
> --- a/libavutil/avstring.c
> +++ b/libavutil/avstring.c
> @@ -48,7 +48,7 @@ int av_stristart(const char *str, const char *pfx, const char **ptr)
> return !*pfx;
> }
>
> -char *av_stristr(const char *s1, const char *s2)
> +const char *av_stristr(const char *s1, const char *s2)
This will introduce warnings in many places where the function is used
instead. There is no solution.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list