From: Jarkko Hietaniemi Date: Fri, 1 Jan 1999 13:53:31 +0000 (+0000) Subject: From: Hugo van der Sanden X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=68c734842396ee490e3f1243c6050bbadc602253;p=p5sagit%2Fp5-mst-13.2.git From: Hugo van der Sanden To: perl5-porters@perl.org cc: hv@crypt0.demon.co.uk Subject: [bug 5.004_54] duplicate error message Date: Thu, 31 Dec 1998 04:05:25 +0000 Message-Id: <199812310405.EAA00386@crypt.compulink.co.uk> Message-ID: <13963.60672.134591.383377@alias-2.pr.mcs.net> From: Stephen McCamant To: hv@crypt0.demon.co.uk Cc: perl5-porters@perl.org Subject: [PATCH _54] Re: duplicate error message Date: Thu, 31 Dec 1998 16:10:13 -0600 (CST) Message-Id: <199901010732.HAA02926@crypt.compulink.co.uk> From: Hugo van der Sanden To: Stephen McCamant cc: hv@crypt0.demon.co.uk, perl5-porters@perl.org Subject: [TEST PATCH _54] Re: duplicate error message Date: Fri, 01 Jan 1999 07:32:14 +0000 p4raw-id: //depot/cfgperl@2548 --- diff --git a/op.c b/op.c index 003614e..58f26e1 100644 --- a/op.c +++ b/op.c @@ -827,7 +827,8 @@ scalarvoid(OP *o) SV* sv; /* assumes no premature commitment */ - if (!o || (o->op_flags & OPf_WANT) == OPf_WANT_LIST || PL_error_count + U8 want = o->op_flags & OPf_WANT; + if (!o || (want && want != OPf_WANT_SCALAR) || PL_error_count || o->op_type == OP_RETURN) return o; diff --git a/t/pragma/warn/op b/t/pragma/warn/op index f60a9fa..b0202f7 100644 --- a/t/pragma/warn/op +++ b/t/pragma/warn/op @@ -230,6 +230,12 @@ Useless use of getpwuid in void context at - line 53. ######## # op.c use warning 'void' ; +for (@{[0]}) { "$_" } # check warning isn't duplicated +EXPECT +Useless use of string in void context at - line 3. +######## +# op.c +use warning 'void' ; use Config ; BEGIN { if ( ! $Config{d_telldir}) {