From 26732ab942ec85fc79df574542701aab13c6de3e Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Tue, 30 Jun 2009 08:41:34 +0000 Subject: [PATCH] avoid a warning --- cbits/iconv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cbits/iconv.c b/cbits/iconv.c index c7e6ea1..4aedca8 100644 --- a/cbits/iconv.c +++ b/cbits/iconv.c @@ -13,7 +13,9 @@ size_t hs_iconv(iconv_t cd, const char* * inbuf, size_t * inbytesleft, char* * outbuf, size_t * outbytesleft) { - return iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft); + // (void*) cast avoids a warning. Some iconvs use (const + // char**inbuf), other use (char **inbuf). + return iconv(cd, (void*)inbuf, inbytesleft, outbuf, outbytesleft); } int hs_iconv_close(iconv_t cd) { -- 1.7.10.4