From f87a4c5a688b0a27a14e2488d03594702296694a Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 11 Nov 2023 13:22:30 -0700 Subject: [PATCH] locale.c: Silence some compiler warnings --- locale.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/locale.c b/locale.c index 197e484c87f8..2b0ad9dc1173 100644 --- a/locale.c +++ b/locale.c @@ -449,17 +449,24 @@ static int debug_initialization = 0; # define _configthreadlocale(arg) NOOP # define MultiByteToWideChar(cp, flags, byte_string, m1, wstring, req_size) \ - (mbsrtowcs(wstring, &(byte_string), req_size, NULL) + 1) + (PERL_UNUSED_ARG(cp), \ + mbsrtowcs(wstring, &(byte_string), req_size, NULL) + 1) # define WideCharToMultiByte(cp, flags, wstring, m1, byte_string, \ req_size, default_char, found_default_char) \ - (wcsrtombs(byte_string, &(wstring), req_size, NULL) + 1) + (PERL_UNUSED_ARG(cp), \ + wcsrtombs(byte_string, &(wstring), req_size, NULL) + 1) # ifdef USE_LOCALE static const wchar_t * wsetlocale_buf = NULL; static Size_t wsetlocale_buf_size = 0; + +# ifdef MULTIPLICITY + static PerlInterpreter * wsetlocale_buf_aTHX = NULL; +# endif + STATIC const wchar_t * S_wsetlocale(const int category, const wchar_t * wlocale) @@ -5215,6 +5222,7 @@ Perl_get_win32_message_utf8ness(pTHX_ const char * string) NULL, LC_CTYPE_INDEX_); # else + PERL_UNUSED_ARG(string); return false; # endif