mirror of
https://github.com/mirror/wget.git
synced 2024-12-28 05:40:08 +08:00
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:
parent
7e585fe23d
commit
e1e7afb210
@ -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;
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user