From 7b0eb0b818a1e6a78e2d2fc8de6c6aec637cf47f Mon Sep 17 00:00:00 2001 From: Lukas Mai Date: Sun, 29 Sep 2013 00:12:44 +0200 Subject: fix a few warnings (format strings, unused variable) During compilation gcc complains about the following: perl.c:4970: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'U32' [-Wformat=] perl.c:5075: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'I32' [-Wformat=] mg.c:1972: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'ssize_t' [-Wformat=] pp_ctl.c:2610: warning: unused variable 'mark' [-Wunused-variable] regexec.c:2275: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Wformat=] This patch fixes all of them. Tony: warning: unused variable 'mark' was fixed in 481c819b --- perl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl.c') diff --git a/perl.c b/perl.c index e4310cdce8..b551d45ed6 100644 --- a/perl.c +++ b/perl.c @@ -4902,7 +4902,7 @@ Perl_my_exit(pTHX_ U32 status) } if (PL_exit_flags & PERL_EXIT_WARN) { PL_exit_flags |= PERL_EXIT_ABORT; /* Protect against reentrant calls */ - Perl_warn(aTHX_ "Unexpected exit %u", status); + Perl_warn(aTHX_ "Unexpected exit %lu", (unsigned long)status); PL_exit_flags &= ~PERL_EXIT_ABORT; } switch (status) { @@ -5007,7 +5007,7 @@ Perl_my_failure_exit(pTHX) } if (PL_exit_flags & PERL_EXIT_WARN) { PL_exit_flags |= PERL_EXIT_ABORT; /* Protect against reentrant calls */ - Perl_warn(aTHX_ "Unexpected exit failure %u", PL_statusvalue); + Perl_warn(aTHX_ "Unexpected exit failure %ld", (long)PL_statusvalue); PL_exit_flags &= ~PERL_EXIT_ABORT; } my_exit_jump(); -- cgit v1.2.1