From: Nicholas Clark Date: Mon, 12 Oct 2009 10:03:42 +0000 (+0100) Subject: In Perl_ckwarn(), simplify the check of isLEXWARN_on/isLEXWARN_off. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f8279d106847c47fc5a4092b27d4f24faffd84cd;p=p5sagit%2Fp5-mst-13.2.git In Perl_ckwarn(), simplify the check of isLEXWARN_on/isLEXWARN_off. --- diff --git a/util.c b/util.c index ae8c688..6ee5ddf 100644 --- a/util.c +++ b/util.c @@ -1572,11 +1572,9 @@ bool Perl_ckwarn(pTHX_ U32 w) { dVAR; - return - ( - isLEXWARN_on - && PL_curcop->cop_warnings != pWARN_NONE - && ( + return isLEXWARN_on + ? (PL_curcop->cop_warnings != pWARN_NONE + && ( PL_curcop->cop_warnings == pWARN_ALL || isWARN_on(PL_curcop->cop_warnings, unpackWARN1(w)) || (unpackWARN2(w) && @@ -1586,12 +1584,8 @@ Perl_ckwarn(pTHX_ U32 w) || (unpackWARN4(w) && isWARN_on(PL_curcop->cop_warnings, unpackWARN4(w))) ) - ) - || - ( - isLEXWARN_off && PL_dowarn & G_WARN_ON - ) - ; + ) + : (PL_dowarn & G_WARN_ON); } /* implements the ckWARN?_d macro */