diff options
author | Yuriy Kolerov <ykolerov@synopsys.com> | 2024-06-14 18:15:34 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2024-06-15 10:36:08 +0200 |
commit | d1c744fbde608f69a180b5c161f6a437e4779e83 (patch) | |
tree | be645f208a906ecef3143ce9b750d93831f5655d /libc/misc/wchar | |
parent | d3a86aa756f17e0afd5d4ec634c88fc2f3f1587a (diff) |
libc: cast free() argument to void * in wchar.c
iconv_close() accepts iconv_t type (which is void *) and passes
it to free() which accepts void *. However, GCC 14 raises a
-Wint-conversion warning if it is not casted to void * because
GCC cannot unwind typedef of iconv_t.
Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
Diffstat (limited to 'libc/misc/wchar')
-rw-r--r-- | libc/misc/wchar/wchar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c index 2714d47d7..782b67f93 100644 --- a/libc/misc/wchar/wchar.c +++ b/libc/misc/wchar/wchar.c @@ -1298,7 +1298,7 @@ iconv_t weak_function iconv_open(const char *tocode, const char *fromcode) int weak_function iconv_close(iconv_t cd) { - free(cd); + free((void *) cd); return 0; } |