Use ICONV_CONST to avoid type warning for iconv()

* src/iri.c (do_conversion): Cast 2. param of iconv() to
 'ICONV_CONST char **'
* src/url.c (convert_fname): Likewise
This commit is contained in:
Tim Rühsen 2016-06-12 21:51:34 +02:00
parent 7e585fe23d
commit e1e7afb210
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ do_conversion (const char *tocode, const char *fromcode, char const *in_org, siz
for (;;)
{
if (iconv (cd, &in, &inlen, out, &outlen) != (size_t)(-1) &&
if (iconv (cd, (ICONV_CONST char **) &in, &inlen, out, &outlen) != (size_t)(-1) &&
iconv (cd, NULL, NULL, out, &outlen) != (size_t)(-1))
{
*out = s;

View File

@ -1564,7 +1564,7 @@ convert_fname (char *fname)
for (;;)
{
if (iconv (cd, &fname, &inlen, &s, &outlen) != (size_t)(-1)
if (iconv (cd, (ICONV_CONST char **) &fname, &inlen, &s, &outlen) != (size_t)(-1)
&& iconv (cd, NULL, NULL, &s, &outlen) != (size_t)(-1))
{
*(converted_fname + len - outlen - done) = '\0';