提交 dc46b3c3 编写于 作者: A Andreas Rheinhardt 提交者: 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: NAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: NPaul B Mahol <onemda@gmail.com>
Signed-off-by: NJames Almer <jamrial@gmail.com>
上级 5fe6c6b8
......@@ -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++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册