diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-03-05 15:35:57 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-05 13:40:31 +0000 |
commit | 97e322ff169812aac5db3010a41269f2b1e7fae7 (patch) | |
tree | 46dc3b4a31975de97bfa3fa166141ef4ec8aa877 /pp_sys.c | |
parent | dc531b29f28a33eb449c254760d3e2fbf885a3b1 (diff) | |
download | perl-97e322ff169812aac5db3010a41269f2b1e7fae7.tar.gz |
Re: [ID 20020227.024] unexpected warning getc() on unopened filehandle STDIN
Message-ID: <20020305143557.C695@rafael>
p4raw-id: //depot/perl@15044
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1158,7 +1158,8 @@ PP(pp_getc) RETURN; } if (!gv || do_eof(gv)) { /* make sure we have fp with something */ - if (ckWARN2(WARN_UNOPENED,WARN_CLOSED) && IoTYPE(io) != IoTYPE_WRONLY) + if (ckWARN2(WARN_UNOPENED,WARN_CLOSED) + && (!io || (!IoIFP(io) && IoTYPE(io) != IoTYPE_WRONLY))) report_evil_fh(gv, io, PL_op->op_type); RETPUSHUNDEF; } |