diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-12 11:03:42 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-10-12 11:03:42 +0100 |
commit | f8279d106847c47fc5a4092b27d4f24faffd84cd (patch) | |
tree | e36616e909cfe0519a412096b03cca63f17a1271 /util.c | |
parent | 073063bbd8679b4a7ad10dcbff312e11f75cd917 (diff) | |
download | perl-f8279d106847c47fc5a4092b27d4f24faffd84cd.tar.gz |
In Perl_ckwarn(), simplify the check of isLEXWARN_on/isLEXWARN_off.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -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 */ |