This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Use %z to specify printf format for length
authorKarl Williamson <khw@cpan.org>
Fri, 21 Jul 2017 00:21:13 +0000 (18:21 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 10 Sep 2017 05:05:11 +0000 (23:05 -0600)
This is the better way to do this.

locale.c

index 8f64ef7..320de17 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -2712,7 +2712,7 @@ S_print_collxfrm_input_and_return(pTHX_
     PerlIO_printf(Perl_debug_log, "_mem_collxfrm[%" UVuf "]: returning ",
                                                         (UV)PL_collation_ix);
     if (xlen) {
-        PerlIO_printf(Perl_debug_log, "%" UVuf, (UV) *xlen);
+        PerlIO_printf(Perl_debug_log, "%zu", *xlen);
     }
     else {
         PerlIO_printf(Perl_debug_log, "NULL");