[FFmpeg-cvslog] avstring: fix "warning: return discards const qualifier from pointer target type"
Michael Niedermayer
git at videolan.org
Wed Jan 30 16:59:33 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan 30 16:54:15 2013 +0100| [32de2831036ae0ecdfa7bfdb3d59c1ae2095bbc8] | committer: Michael Niedermayer
avstring: fix "warning: return discards const qualifier from pointer target type"
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=32de2831036ae0ecdfa7bfdb3d59c1ae2095bbc8
---
libavutil/avstring.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavutil/avstring.c b/libavutil/avstring.c
index 2f00374..e2422c0 100644
--- a/libavutil/avstring.c
+++ b/libavutil/avstring.c
@@ -69,11 +69,11 @@ char *av_strnstr(const char *haystack, const char *needle, size_t hay_length)
{
size_t needle_len = strlen(needle);
if (!needle_len)
- return haystack;
+ return (char*)haystack;
while (hay_length >= needle_len) {
hay_length--;
if (!memcmp(haystack, needle, needle_len))
- return haystack;
+ return (char*)haystack;
haystack++;
}
return NULL;
More information about the ffmpeg-cvslog
mailing list