This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Move statements properly within #if
authorKarl Williamson <khw@cpan.org>
Sat, 7 Mar 2015 18:10:13 +0000 (11:10 -0700)
committerKarl Williamson <khw@cpan.org>
Sat, 7 Mar 2015 18:28:28 +0000 (11:28 -0700)
The variables in these statments were undefined when compiled with
ccflag -DNO_LOCALE, because the declarations are skipped then.  Just
move them a few lines up so are within the same #if.

locale.c

index 6c62c1f..4f0f447 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -1080,10 +1080,6 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
     Safefree(curnum);
 #endif /* USE_LOCALE_NUMERIC */
 
-#else  /* !USE_LOCALE */
-    PERL_UNUSED_ARG(printwarn);
-#endif /* USE_LOCALE */
-
 #ifdef __GLIBC__
     Safefree(language);
 #endif
@@ -1091,6 +1087,10 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
     Safefree(lc_all);
     Safefree(lang);
 
+#else  /* !USE_LOCALE */
+    PERL_UNUSED_ARG(printwarn);
+#endif /* USE_LOCALE */
+
     return ok;
 }