summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doio.c7
-rw-r--r--pp_hot.c4
-rw-r--r--toke.c6
3 files changed, 9 insertions, 8 deletions
diff --git a/doio.c b/doio.c
index 61a5371958..e9c40a7694 100644
--- a/doio.c
+++ b/doio.c
@@ -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;
}
diff --git a/pp_hot.c b/pp_hot.c
index 35558f17cb..1e3d5ead22 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -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",
diff --git a/toke.c b/toke.c
index ae56a6fec6..19bac4f6af 100644
--- a/toke.c
+++ b/toke.c
@@ -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++) ;