From d1c744fbde608f69a180b5c161f6a437e4779e83 Mon Sep 17 00:00:00 2001 From: Yuriy Kolerov Date: Fri, 14 Jun 2024 18:15:34 +0100 Subject: 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 --- libc/misc/wchar/wchar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/misc/wchar/wchar.c') 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; } -- cgit v1.2.3