Mercurial > vim
comparison src/mbyte.c @ 29105:faf7fcd1c8d5 v8.2.5073
patch 8.2.5073: clang on MS-Windows produces warnings
Commit: https://github.com/vim/vim/commit/35d7a2fb13fc833aa1b654ca6fd6e429e72e6b49
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 9 20:53:54 2022 +0100
patch 8.2.5073: clang on MS-Windows produces warnings
Problem: Clang on MS-Windows produces warnings.
Solution: Avoid the warnings. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/10546)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 09 Jun 2022 22:00:07 +0200 |
parents | a161c262e947 |
children | 9dce192d1ac2 |
comparison
equal
deleted
inserted
replaced
29104:c58baa6d6dda | 29105:faf7fcd1c8d5 |
---|---|
4920 } | 4920 } |
4921 iconv_end(); | 4921 iconv_end(); |
4922 return FALSE; | 4922 return FALSE; |
4923 } | 4923 } |
4924 | 4924 |
4925 iconv = (void *)GetProcAddress(hIconvDLL, "libiconv"); | 4925 iconv = (size_t (*)(iconv_t, const char **, |
4926 iconv_open = (void *)GetProcAddress(hIconvDLL, "libiconv_open"); | 4926 size_t *, char **, size_t *)) |
4927 iconv_close = (void *)GetProcAddress(hIconvDLL, "libiconv_close"); | 4927 GetProcAddress(hIconvDLL, "libiconv"); |
4928 iconvctl = (void *)GetProcAddress(hIconvDLL, "libiconvctl"); | 4928 iconv_open = (iconv_t (*)(const char *, const char *)) |
4929 iconv_errno = get_dll_import_func(hIconvDLL, "_errno"); | 4929 GetProcAddress(hIconvDLL, "libiconv_open"); |
4930 iconv_close = (int (*)(iconv_t)) | |
4931 GetProcAddress(hIconvDLL, "libiconv_close"); | |
4932 iconvctl = (int (*)(iconv_t, int, void *)) | |
4933 GetProcAddress(hIconvDLL, "libiconvctl"); | |
4934 iconv_errno = (int *(*)(void))get_dll_import_func(hIconvDLL, "_errno"); | |
4930 if (iconv_errno == NULL) | 4935 if (iconv_errno == NULL) |
4931 iconv_errno = (void *)GetProcAddress(hMsvcrtDLL, "_errno"); | 4936 iconv_errno = (int *(*)(void))GetProcAddress(hMsvcrtDLL, "_errno"); |
4932 if (iconv == NULL || iconv_open == NULL || iconv_close == NULL | 4937 if (iconv == NULL || iconv_open == NULL || iconv_close == NULL |
4933 || iconvctl == NULL || iconv_errno == NULL) | 4938 || iconvctl == NULL || iconv_errno == NULL) |
4934 { | 4939 { |
4935 iconv_end(); | 4940 iconv_end(); |
4936 if (verbose && p_verbose > 0) | 4941 if (verbose && p_verbose > 0) |