develooper Front page | perl.perl6.internals | Postings from January 2002

[PATCH] Quiet more gcc warnings about shadowing [APPLIED]

From:
Andy Dougherty
Date:
January 22, 2002 09:01
Subject:
[PATCH] Quiet more gcc warnings about shadowing [APPLIED]
Message ID:
Pine.SOL.4.10.10201221201280.13690-100000@maxwell.phys.lafayette.edu
This patch quiets another gcc warning about shadowing variables.  I've
already applied it. 

diff -r -u parrot-cvs/runops_cores.c parrot-andy/runops_cores.c
--- parrot-cvs/runops_cores.c	Mon Jan 14 15:03:52 2002
+++ parrot-andy/runops_cores.c	Tue Jan 22 11:43:10 2002
@@ -45,7 +45,7 @@
     INTVAL     code_size;
     opcode_t * code_end;
     opcode_t * lastpc = NULL;
-    FLOATVAL time = 0;
+    FLOATVAL starttime = 0;
 
     code_start = (opcode_t *)interpreter->code->byte_code;
     code_size  = interpreter->code->byte_code_size;
@@ -59,7 +59,7 @@
         if (interpreter->flags & PARROT_PROFILE_FLAG) {
             interpreter->profile[*pc].numcalls++;
             lastpc=pc;
-            time=Parrot_floatval_time();
+            starttime=Parrot_floatval_time();
         }
 
         DO_OP(pc, interpreter);
@@ -68,7 +68,7 @@
             trace_op(interpreter, code_start, code_end, pc);
         }
         if (interpreter->flags & PARROT_PROFILE_FLAG) {
-            interpreter->profile[*lastpc].time += Parrot_floatval_time() - time;
+            interpreter->profile[*lastpc].time += Parrot_floatval_time() - starttime;
         }
     }
 

-- 
    Andy Dougherty		doughera@lafayette.edu
    Dept. of Physics
    Lafayette College, Easton PA 18042




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