From 599cee73f2261c5e09cde7ceba3f9a896989e117 Mon Sep 17 00:00:00 2001 From: Paul Marquess Date: Wed, 29 Jul 1998 10:28:45 +0100 Subject: lexical warnings; tweaks to places that didn't apply correctly Message-Id: <9807290828.AA26286@claudius.bfsec.bt.co.uk> Subject: lexical warnings patch for 5.005_50 p4raw-id: //depot/perl@1773 --- regexec.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'regexec.c') diff --git a/regexec.c b/regexec.c index 59aabdfcdb..33b50eefeb 100644 --- a/regexec.c +++ b/regexec.c @@ -1668,10 +1668,10 @@ regmatch(regnode *prog) PL_regcc = cc; if (n >= cc->max) { /* Maximum greed exceeded? */ - if (PL_dowarn && n >= REG_INFTY + if (ckWARN(WARN_UNSAFE) && n >= REG_INFTY && !(PL_reg_flags & RF_warned)) { PL_reg_flags |= RF_warned; - warn("%s limit (%d) exceeded", + warner(WARN_UNSAFE, "%s limit (%d) exceeded", "Complex regular subexpression recursion", REG_INFTY - 1); } @@ -1725,9 +1725,10 @@ regmatch(regnode *prog) REPORT_CODE_OFF+PL_regindent*2, "") ); } - if (PL_dowarn && n >= REG_INFTY && !(PL_reg_flags & RF_warned)) { + if (ckWARN(WARN_UNSAFE) && n >= REG_INFTY + && !(PL_reg_flags & RF_warned)) { PL_reg_flags |= RF_warned; - warn("%s limit (%d) exceeded", + warner(WARN_UNSAFE, "%s limit (%d) exceeded", "Complex regular subexpression recursion", REG_INFTY - 1); } -- cgit v1.2.1