summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-10-09 13:21:04 -0600
committerKarl Williamson <khw@cpan.org>2022-10-15 12:42:12 -0600
commit4e362c65163fdc38ae2e9739a37d12aed3de18f0 (patch)
tree440451aa3ca04e37a9b16fe45ec6e8dd338aec65 /locale.c
parent4fd4a5042361a0252bfb76c807e598eba55801a2 (diff)
downloadperl-4e362c65163fdc38ae2e9739a37d12aed3de18f0.tar.gz
locale.c: Silence unused var warning on freebsd
This just moves some code out of #ifdefs so that the compiler sees it, decides it is always false, and almost certainly won't generate any code for it, but stops warning.
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/locale.c b/locale.c
index 373b0887ee..a17c969243 100644
--- a/locale.c
+++ b/locale.c
@@ -3122,25 +3122,20 @@ S_my_localeconv(pTHX_ const int item, const locale_utf8ness_t locale_is_utf8)
PERL_UNUSED_ARG(item);
PERL_UNUSED_ARG(locale_is_utf8);
-# ifdef USE_LOCALE_NUMERIC
-
/* When there is a nl_langinfo, we will only be called for localeconv
* numeric purposes. */
const bool is_localeconv_call = true;
-# endif
-
# else
/* Note we use this sentinel; this works because this only gets compiled
* when our perl_langinfo.h is used, and that uses negative numbers for all
* the items */
const bool is_localeconv_call = (item == 0);
- if (is_localeconv_call)
# endif
- {
+ if (is_localeconv_call) {
copy_localeconv = S_populate_localeconv;
# ifdef USE_LOCALE_NUMERIC