Fix compiler warning in doio.c
Jerry D. Hedden [Thu, 9 Jul 2009 20:29:23 +0000 (16:29 -0400)]
doio.c

diff --git a/doio.c b/doio.c
index 1e9d7d9..2b2caa5 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1726,10 +1726,11 @@ nothing in the core.
             * CRTL's emulation of Unix-style signals and kill()
             */
            while (++mark <= sp) {
+               I32 proc;
+               register unsigned long int __vmssts;
                if (!(SvIOK(*mark) || SvNOK(*mark) || looks_like_number(*mark)))
                    Perl_croak(aTHX_ "Can't kill a non-numeric process ID");
-               I32 proc = SvIV(*mark);
-               register unsigned long int __vmssts;
+               proc = SvIV(*mark);
                APPLY_TAINT_PROPER();
                if (!((__vmssts = sys$delprc(&proc,0)) & 1)) {
                    tot--;
@@ -1752,9 +1753,10 @@ nothing in the core.
        if (val < 0) {
            val = -val;
            while (++mark <= sp) {
+               I32 proc;
                if (!(SvIOK(*mark) || SvNOK(*mark) || looks_like_number(*mark)))
                    Perl_croak(aTHX_ "Can't kill a non-numeric process ID");
-               const I32 proc = SvIV(*mark);
+               proc = SvIV(*mark);
                APPLY_TAINT_PROPER();
 #ifdef HAS_KILLPG
                if (PerlProc_killpg(proc,val))  /* BSD */
@@ -1766,9 +1768,10 @@ nothing in the core.
        }
        else {
            while (++mark <= sp) {
+               I32 proc;
                if (!(SvIOK(*mark) || SvNOK(*mark) || looks_like_number(*mark)))
                    Perl_croak(aTHX_ "Can't kill a non-numeric process ID");
-               const I32 proc = SvIV(*mark);
+               proc = SvIV(*mark);
                APPLY_TAINT_PROPER();
                if (PerlProc_kill(proc, val))
                    tot--;