diff options
author | Andy Lester <andy@petdance.com> | 2006-04-19 18:44:01 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-04-20 09:04:46 +0000 |
commit | f0a09b71ee2ff28fc55a602c80790be291e62898 (patch) | |
tree | a339c5a42618b657686c7a1ac23eb6fe9d5277d0 /util.c | |
parent | 0cadcf80572b885a4a6b7680439582b19fd09887 (diff) | |
download | perl-f0a09b71ee2ff28fc55a602c80790be291e62898.tar.gz |
Localizing vars
Message-ID: <20060420044401.GA2792@petdance.com>
p4raw-id: //depot/perl@27908
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -3427,15 +3427,6 @@ Perl_my_fflush_all(pTHX) void Perl_report_evil_fh(pTHX_ const GV *gv, const IO *io, I32 op) { - const char * const func = - op == OP_READLINE ? "readline" : /* "<HANDLE>" not nice */ - op == OP_LEAVEWRITE ? "write" : /* "write exit" not nice */ - op < 0 ? "" : /* handle phoney cases */ - PL_op_desc[op]; - const char * const pars = OP_IS_FILETEST(op) ? "" : "()"; - const char * const type = OP_IS_SOCKET(op) - || (gv && io && IoTYPE(io) == IoTYPE_SOCKET) - ? "socket" : "filehandle"; const char * const name = gv && isGV(gv) ? GvENAME(gv) : NULL; if (op == OP_phoney_OUTPUT_ONLY || op == OP_phoney_INPUT_ONLY) { @@ -3464,6 +3455,15 @@ Perl_report_evil_fh(pTHX_ const GV *gv, const IO *io, I32 op) } if (ckWARN(warn_type)) { + const char * const pars = OP_IS_FILETEST(op) ? "" : "()"; + const char * const func = + op == OP_READLINE ? "readline" : /* "<HANDLE>" not nice */ + op == OP_LEAVEWRITE ? "write" : /* "write exit" not nice */ + op < 0 ? "" : /* handle phoney cases */ + PL_op_desc[op]; + const char * const type = OP_IS_SOCKET(op) + || (gv && io && IoTYPE(io) == IoTYPE_SOCKET) + ? "socket" : "filehandle"; if (name && *name) { Perl_warner(aTHX_ packWARN(warn_type), "%s%s on %s %s %s", func, pars, vile, type, name); |