u8-istream: Add cast to iconv() to suppress warnings on some systems.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 9 Apr 2011 17:55:53 +0000 (10:55 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 9 Apr 2011 17:55:53 +0000 (10:55 -0700)
Problem reported by Harry Thijssen <harry.thijssen@gmail.com>.
Fix suggested by John Darrington <john@darrington.wattle.id.au>.

src/libpspp/u8-istream.c

index 9318d59eefcedb9a7de50d1dbbab162480a7e069..c11163435f04bcf53d54c55f94960cc8de972955 100644 (file)
@@ -253,7 +253,8 @@ convert_iconv (iconv_t converter,
                char **inbufp, size_t *inbytesleft,
                char **outbufp, size_t *outbytesleft)
 {
-  size_t n = iconv (converter, inbufp, inbytesleft, outbufp, outbytesleft);
+  size_t n = iconv (converter, (ICONV_CONST char **) inbufp, inbytesleft,
+                    outbufp, outbytesleft);
   return n == SIZE_MAX ? errno : 0;
 }