summaryrefslogtreecommitdiffstats
path: root/src/mbyte.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-06-09 20:53:54 +0100
committerBram Moolenaar <Bram@vim.org>2022-06-09 20:53:54 +0100
commit35d7a2fb13fc833aa1b654ca6fd6e429e72e6b49 (patch)
tree257dbf4040c59cf01a5072d35f0c9e5264bba09d /src/mbyte.c
parent63f32603789d1a27c559fc440325955fd0b8b500 (diff)
patch 8.2.5073: clang on MS-Windows produces warningsv8.2.5073
Problem: Clang on MS-Windows produces warnings. Solution: Avoid the warnings. (Yegappan Lakshmanan, closes #10546)
Diffstat (limited to 'src/mbyte.c')
-rw-r--r--src/mbyte.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index a01a051402..3656880e23 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -4922,13 +4922,18 @@ iconv_enabled(int verbose)
return FALSE;
}
- iconv = (void *)GetProcAddress(hIconvDLL, "libiconv");
- iconv_open = (void *)GetProcAddress(hIconvDLL, "libiconv_open");
- iconv_close = (void *)GetProcAddress(hIconvDLL, "libiconv_close");
- iconvctl = (void *)GetProcAddress(hIconvDLL, "libiconvctl");
- iconv_errno = get_dll_import_func(hIconvDLL, "_errno");
+ iconv = (size_t (*)(iconv_t, const char **,
+ size_t *, char **, size_t *))
+ GetProcAddress(hIconvDLL, "libiconv");
+ iconv_open = (iconv_t (*)(const char *, const char *))
+ GetProcAddress(hIconvDLL, "libiconv_open");
+ iconv_close = (int (*)(iconv_t))
+ GetProcAddress(hIconvDLL, "libiconv_close");
+ iconvctl = (int (*)(iconv_t, int, void *))
+ GetProcAddress(hIconvDLL, "libiconvctl");
+ iconv_errno = (int *(*)(void))get_dll_import_func(hIconvDLL, "_errno");
if (iconv_errno == NULL)
- iconv_errno = (void *)GetProcAddress(hMsvcrtDLL, "_errno");
+ iconv_errno = (int *(*)(void))GetProcAddress(hMsvcrtDLL, "_errno");
if (iconv == NULL || iconv_open == NULL || iconv_close == NULL
|| iconvctl == NULL || iconv_errno == NULL)
{