ffmpeg | branch: master | Andreas Rheinhardt <[email protected]> |
Fri Feb 14 12:24:03 2020 +0100| [dc46b3c34e0651215a9357bcc0aba04e2bad9721] |
committer: James Almer
avcodec/dvdsub: Fix warning about incompatible pointer type
Fixes "passing argument 2 of ‘strtoul’ from incompatible pointer
type [-Wincompatible-pointer-types]" ("expected ‘char ** restrict’ but
argument is of type ‘const char **’") for GCC and "passing 'const char
**' to parameter of type 'char **' discards qualifiers in nested pointer
types [-Wincompatible-pointer-types-discards-qualifiers]" for Clang.
The cast itself is safe; it is only needed because strtoul itself is not
const-correct.
Signed-off-by: Andreas Rheinhardt <[email protected]>
Reviewed-by: Paul B Mahol <[email protected]>
Signed-off-by: James Almer <[email protected]>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc46b3c34e0651215a9357bcc0aba04e2bad9721
---
libavcodec/dvdsub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/dvdsub.c b/libavcodec/dvdsub.c
index a03ff27754..87215d2bd1 100644
--- a/libavcodec/dvdsub.c
+++ b/libavcodec/dvdsub.c
@@ -26,7 +26,7 @@
void ff_dvdsub_parse_palette(uint32_t *palette, const char *p)
{
for (int i = 0; i < 16; i++) {
- palette[i] = strtoul(p, &p, 16);
+ palette[i] = strtoul(p, (char **)&p, 16);
while (*p == ',' || av_isspace(*p))
p++;
}
_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".