develooper Front page | perl.perl5.porters | Postings from January 2008

Re: Change 33106: Fix Win32 compiler warnings introduced by #33081 and #33085

Thread Next
From:
Nicholas Clark
Date:
January 29, 2008 08:41
Subject:
Re: Change 33106: Fix Win32 compiler warnings introduced by #33081 and #33085
Message ID:
20080129164139.GT23790@plum.flirble.org
On Tue, Jan 29, 2008 at 07:15:06AM -0800, Steve Hay wrote:

> ==== //depot/perl/pp_ctl.c#681 (text) ====
> Index: perl/pp_ctl.c
> --- perl/pp_ctl.c#680~33086~	2008-01-28 02:23:21.000000000 -0800
> +++ perl/pp_ctl.c	2008-01-29 07:06:55.000000000 -0800
> @@ -1838,6 +1838,8 @@
>      U8 cxtype = CXt_LOOP_FOR;
>  #ifdef USE_ITHREADS
>      PAD *iterdata;
> +#else
> +    PADOFFSET op;
>  #endif
>  
>      ENTER;
> @@ -1875,7 +1877,8 @@
>  #ifdef USE_ITHREADS
>      PUSHLOOP_FOR(cx, iterdata, MARK, PL_op->op_targ);
>  #else
> -    PUSHLOOP_FOR(cx, svp, MARK, /*Not used*/);
> +    PERL_UNUSED_VAR(op);
> +    PUSHLOOP_FOR(cx, svp, MARK, op/*Not used*/);
>  #endif
>      if (PL_op->op_flags & OPf_STACKED) {
>  	SV *maybe_ary = POPs;

Creating a whole variable so as to ignore it seems a bit overkill. Would this
work as well?

Nicholas Clark

==== //depot/perl/pp_ctl.c#681 - /afs/wu-wien.ac.at/home/ma/nclark/bouvard/perl/pp_ctl.c ====
--- /tmp/tmp.11266.0	2008-01-29 17:40:23.000000000 +0100
+++ /afs/wu-wien.ac.at/home/ma/nclark/bouvard/perl/pp_ctl.c	2008-01-29 17:12:06.000000000 +0100
@@ -1838,8 +1838,6 @@ PP(pp_enteriter)
     U8 cxtype = CXt_LOOP_FOR;
 #ifdef USE_ITHREADS
     PAD *iterdata;
-#else
-    PADOFFSET op;
 #endif
 
     ENTER;
@@ -1877,8 +1875,7 @@ PP(pp_enteriter)
 #ifdef USE_ITHREADS
     PUSHLOOP_FOR(cx, iterdata, MARK, PL_op->op_targ);
 #else
-    PERL_UNUSED_VAR(op);
-    PUSHLOOP_FOR(cx, svp, MARK, op/*Not used*/);
+    PUSHLOOP_FOR(cx, svp, MARK, 0);
 #endif
     if (PL_op->op_flags & OPf_STACKED) {
 	SV *maybe_ary = POPs;

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About