Skip to content

Commit

Permalink
locale.c: Silence some compiler warnings
Browse files Browse the repository at this point in the history
These only occur when pretending that this is a MingW compilation, which
is a development-only tool to catch errors before they show up on a real
MingW box.  This would never get compiled for real.
  • Loading branch information
khwilliamson committed Nov 22, 2023
1 parent 0cd795d commit 7823b45
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions locale.c
Expand Up @@ -439,17 +439,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)
Expand Down Expand Up @@ -5205,6 +5212,7 @@ Perl_get_win32_message_utf8ness(pTHX_ const char * string)
NULL, LC_CTYPE_INDEX_);
# else

PERL_UNUSED_ARG(string);
return false;

# endif
Expand Down

0 comments on commit 7823b45

Please sign in to comment.