diff options
author | Jim Meyering <jim@meyering.net> | 2001-01-21 09:40:43 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-01-21 09:40:43 +0000 |
commit | ad41cbff8a64a28a522db894ff28d6ca14b539b2 (patch) | |
tree | c49290611f7c61f2fbb7372cf5c939cc36298de1 /lib | |
parent | 71611d94f385d259a617e10da29445dcff6b3d27 (diff) | |
download | coreutils-ad41cbff8a64a28a522db894ff28d6ca14b539b2.tar.xz |
(print_unicode_char): Cast the second iconv() arg,
to avoid a warning. Add back 'const' to inptr.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicodeio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/unicodeio.c b/lib/unicodeio.c index 2d11db22b..2771132d8 100644 --- a/lib/unicodeio.c +++ b/lib/unicodeio.c @@ -158,7 +158,7 @@ print_unicode_char (FILE *stream, unsigned int code) { #if HAVE_ICONV char outbuf[25]; - char *inptr; + const char *inptr; size_t inbytesleft; char *outptr; size_t outbytesleft; @@ -170,7 +170,9 @@ print_unicode_char (FILE *stream, unsigned int code) outbytesleft = sizeof (outbuf); /* Convert the character from UTF-8 to the locale's charset. */ - res = iconv (utf8_to_local, &inptr, &inbytesleft, &outptr, &outbytesleft); + res = iconv (utf8_to_local, + (ICONV_CONST char **)&inptr, &inbytesleft, + &outptr, &outbytesleft); if (inbytesleft > 0 || res == (size_t)(-1) /* Irix iconv() inserts a NUL byte if it cannot convert. */ # if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi) |