From 5971bb01df0ff6de480a355eeb06c0e77891ca48 Mon Sep 17 00:00:00 2001 From: OBATA Akio Date: Fri, 8 Dec 2017 17:30:22 +0900 Subject: [PATCH] Fix argment type for iconv --- src/bogo-im.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bogo-im.c b/src/bogo-im.c index 9dc9d9d..8bb7288 100644 --- a/src/bogo-im.c +++ b/src/bogo-im.c @@ -617,7 +617,7 @@ int Utf32ToUtf8Char(const uint32_t c, char buf[UTF8_MAX_LENGTH + 1]) str[0] = c; str[1] = 0; - iconv_t *conv; + iconv_t conv; union { short s; @@ -645,7 +645,7 @@ int Utf32ToUtf8Char(const uint32_t c, char buf[UTF8_MAX_LENGTH + 1]) uint32_t Utf8ToUtf32Char(char *src) { - iconv_t *conv; + iconv_t conv; union { short s; @@ -662,9 +662,9 @@ uint32_t Utf8ToUtf32Char(char *src) size_t inLength = UTF8_MAX_LENGTH + 1; size_t outLength = sizeof(uint32_t); - IconvStr buff = (IconvStr) output; + char* buff = (char*) output; - iconv(conv, &src, &inLength, &buff, &outLength); + iconv(conv, (IconvStr*)&src, &inLength, &buff, &outLength); iconv_close(conv); return output[0];