summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perl.c2
-rw-r--r--t/op/filetest.t5
2 files changed, 5 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index 74e7470069..28795110b8 100644
--- a/perl.c
+++ b/perl.c
@@ -4088,7 +4088,7 @@ S_init_predump_symbols(pTHX)
GvMULTI_on(tmpgv);
GvIOp(tmpgv) = MUTABLE_IO(SvREFCNT_inc_simple(io));
- PL_statname = newSV(0); /* last filename we did stat on */
+ PL_statname = newSVpvs(""); /* last filename we did stat on */
}
void
diff --git a/t/op/filetest.t b/t/op/filetest.t
index 5cc83d7107..647bd9d9a6 100644
--- a/t/op/filetest.t
+++ b/t/op/filetest.t
@@ -10,7 +10,7 @@ BEGIN {
}
use Config;
-plan(tests => 35 + 27*14);
+plan(tests => 36 + 27*14);
ok( -d 'op' );
ok( -f 'TEST' );
@@ -257,3 +257,6 @@ SKIP: {
like $@, qr/^The stat preceding -l _ wasn't an lstat at /,
'-T HANDLE sets the stat type';
}
+
+is runperl(prog => '-T _', switches => ['-w'], stderr => 1), "",
+ 'no uninit warnings from -T with no preceding stat';