diff options
-rw-r--r-- | doio.c | 7 | ||||
-rw-r--r-- | pp_hot.c | 4 | ||||
-rw-r--r-- | toke.c | 6 |
3 files changed, 9 insertions, 8 deletions
@@ -566,8 +566,9 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw, } } if (!fp) { - if (IoTYPE(io) == IoTYPE_RDONLY && strchr(name, '\n') - && ckWARN(WARN_NEWLINE) + if (IoTYPE(io) == IoTYPE_RDONLY && ckWARN(WARN_NEWLINE) + && strchr(name, '\n') + ) Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "open"); goto say_false; @@ -1394,7 +1395,7 @@ Perl_my_stat(pTHX) s = SvPVX_const(PL_statname); /* s now NUL-terminated */ PL_laststype = OP_STAT; PL_laststatval = PerlLIO_stat(s, &PL_statcache); - if (PL_laststatval < 0 && strchr(s, '\n') && ckWARN(WARN_NEWLINE)) + if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && strchr(s, '\n')) Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "stat"); return PL_laststatval; } @@ -1611,8 +1611,8 @@ Perl_do_readline(pTHX) const STRLEN len = SvCUR(sv) - offset; const U8 *f; - if (!Perl_is_utf8_string_loc(aTHX_ s, len, &f) - && ckWARN(WARN_UTF8)) + if (ckWARN(WARN_UTF8) && + !Perl_is_utf8_string_loc(aTHX_ s, len, &f)) /* Emulate :encoding(utf8) warning in the same case. */ Perl_warner(aTHX_ packWARN(WARN_UTF8), "utf8 \"\\x%02X\" does not map to Unicode", @@ -3515,7 +3515,7 @@ Perl_yylex(pTHX) OPERATOR(','); if (tmp == '~') PMop(OP_MATCH); - if (tmp && isSPACE(*s) && strchr("+-*/%.^&|<",tmp) && ckWARN(WARN_SYNTAX)) + if (tmp && isSPACE(*s) && ckWARN(WARN_SYNTAX) && strchr("+-*/%.^&|<",tmp)) Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "Reversed %c= operator",(int)tmp); s--; if (PL_expect == XSTATE && isALPHA(tmp) && @@ -3685,8 +3685,8 @@ Perl_yylex(pTHX) else if (*s == '{') { char *t; PL_tokenbuf[0] = '%'; - if (strEQ(PL_tokenbuf+1, "SIG") && (t = strchr(s, '}')) - && (t = strchr(t, '=')) && ckWARN(WARN_SYNTAX)) + if (strEQ(PL_tokenbuf+1, "SIG") && ckWARN(WARN_SYNTAX) + && (t = strchr(s, '}')) && (t = strchr(t, '='))) { char tmpbuf[sizeof PL_tokenbuf]; for (t++; isSPACE(*t); t++) ; |