From 5cabc68ccb42cdd0976f522c83ba3c9c5b347031 Mon Sep 17 00:00:00 2001 From: takase1121 <20792268+takase1121@users.noreply.github.com> Date: Mon, 14 Nov 2022 21:59:32 +0800 Subject: [PATCH] fix utfconv.h duplicate functions --- src/utfconv.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/utfconv.h b/src/utfconv.h index 059b3071..59f98e4a 100644 --- a/src/utfconv.h +++ b/src/utfconv.h @@ -1,6 +1,12 @@ #ifndef MBSEC_H #define MBSEC_H +#ifdef __GNUC__ +#define UNUSED __attribute__((__unused__)) +#else +#define UNUSED +#endif + #ifdef _WIN32 #include @@ -8,7 +14,7 @@ #define UTFCONV_ERROR_INVALID_CONVERSION "Input contains invalid byte sequences." -LPWSTR utfconv_utf8towc(const char *str) { +static UNUSED LPWSTR utfconv_utf8towc(const char *str) { LPWSTR output; int len; @@ -30,7 +36,7 @@ LPWSTR utfconv_utf8towc(const char *str) { return output; } -char *utfconv_wctoutf8(LPCWSTR str) { +static UNUSED char *utfconv_wctoutf8(LPCWSTR str) { char *output; int len;