From: Hugo van der Sanden Date: Sat, 22 Nov 1997 12:52:16 +0000 (+0000) Subject: [win32] yet another maintpatch X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4b74e3fbc56175eeb65af1e5ad28a26e76ba64d9;p=p5sagit%2Fp5-mst-13.2.git [win32] yet another maintpatch Message-Id: <199711221252.MAA14000@crypt.compulink.co.uk> Subject: Re: [PERL] Unexpected output p4raw-id: //depot/win32/perl@630 --- diff --git a/doio.c b/doio.c index cc038e2..af65e6e 100644 --- a/doio.c +++ b/doio.c @@ -839,6 +839,7 @@ my_stat(ARGSproto) } else { SV* sv = POPs; + char *s; PUTBACK; if (SvTYPE(sv) == SVt_PVGV) { tmpgv = (GV*)sv; @@ -849,11 +850,12 @@ my_stat(ARGSproto) goto do_fstat; } + s = SvPV(sv, na); statgv = Nullgv; - sv_setpv(statname,SvPV(sv, na)); + sv_setpv(statname, s); laststype = OP_STAT; - laststatval = PerlLIO_stat(SvPV(sv, na),&statcache); - if (laststatval < 0 && dowarn && strchr(SvPV(sv, na), '\n')) + laststatval = PerlLIO_stat(s, &statcache); + if (laststatval < 0 && dowarn && strchr(s, '\n')) warn(warn_nl, "stat"); return laststatval; } diff --git a/t/pragma/warn-1global b/t/pragma/warn-1global index 3325273..07b5bc8 100644 --- a/t/pragma/warn-1global +++ b/t/pragma/warn-1global @@ -144,3 +144,8 @@ my $a ; chop $a ; my $c ; chop $c ; EXPECT Use of uninitialized value at - line 5. +######## +-w +-e undef +EXPECT +Use of uninitialized value at - line 2.