Silence VC++ compiler warnings
authorSteve Hay <SteveHay@planit.com>
Wed, 1 Nov 2006 13:07:37 +0000 (13:07 +0000)
committerSteve Hay <SteveHay@planit.com>
Wed, 1 Nov 2006 13:07:37 +0000 (13:07 +0000)
See: http://www.nntp.perl.org/group/perl.daily-build.reports/42208

p4raw-id: //depot/perl@29180

ext/IO/IO.xs
ext/Time/HiRes/HiRes.xs
regexec.c

index bb64141..eac8a64 100644 (file)
@@ -132,10 +132,10 @@ fgetpos(handle)
        InputStream     handle
     CODE:
        if (handle) {
-           Fpos_t pos;
 #ifdef PerlIO
-           ST(0) = sv_newmortal();
 #if PERL_VERSION < 8
+           Fpos_t pos;
+           ST(0) = sv_newmortal();
            if (PerlIO_getpos(handle, &pos) != 0) {
                ST(0) = &PL_sv_undef;
            }
@@ -143,6 +143,7 @@ fgetpos(handle)
                sv_setpvn(ST(0), (char *)&pos, sizeof(Fpos_t));
            }
 #else
+           ST(0) = sv_newmortal();
            if (PerlIO_getpos(handle, ST(0)) != 0) {
                ST(0) = &PL_sv_undef;
            }
index f1029f0..a33e190 100644 (file)
@@ -1209,7 +1209,7 @@ clock()
 
 #endif /*  #if defined(TIME_HIRES_CLOCK) && defined(CLOCKS_PER_SEC) */
 
-IV
+void
 stat(...)
 PROTOTYPE: ;$
     PPCODE:
index 7950805..9f28e3e 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -3622,7 +3622,7 @@ S_regmatch(pTHX_ const regmatch_info *reginfo, regnode *prog)
            break;
         case INSUBP:
             n = ARG(scan);
-            sw = (cur_eval && (!n || cur_eval->u.eval.close_paren == n));
+            sw = (cur_eval && (!n || cur_eval->u.eval.close_paren == (U32)n));
             break;
         case DEFINEP:
             sw = 0;
@@ -4209,7 +4209,7 @@ NULL
            ST.min = ARG1(scan);  /* min to match */
            ST.max = ARG2(scan);  /* max to match */
            if (cur_eval && cur_eval->u.eval.close_paren &&
-               cur_eval->u.eval.close_paren == ST.paren) {
+               cur_eval->u.eval.close_paren == (U32)ST.paren) {
                ST.min=1;
                ST.max=1;
            }
@@ -4419,7 +4419,7 @@ NULL
                PL_reginput = locinput;
                CURLY_SETPAREN(ST.paren, ST.count);
                if (cur_eval && cur_eval->u.eval.close_paren && 
-                   cur_eval->u.eval.close_paren == ST.paren) {
+                   cur_eval->u.eval.close_paren == (U32)ST.paren) {
                    goto fake_end;
                }
                PUSH_STATE_GOTO(CURLY_B_min_known, ST.B);
@@ -4444,7 +4444,7 @@ NULL
                  curly_try_B_min:
                    CURLY_SETPAREN(ST.paren, ST.count);
                    if (cur_eval && cur_eval->u.eval.close_paren &&
-                       cur_eval->u.eval.close_paren == ST.paren) {
+                       cur_eval->u.eval.close_paren == (U32)ST.paren) {
                         goto fake_end;
                     }
                    PUSH_STATE_GOTO(CURLY_B_min, ST.B);
@@ -4457,7 +4457,7 @@ NULL
        curly_try_B_max:
            /* a successful greedy match: now try to match B */
             if (cur_eval && cur_eval->u.eval.close_paren &&
-                cur_eval->u.eval.close_paren == ST.paren) {
+                cur_eval->u.eval.close_paren == (U32)ST.paren) {
                 goto fake_end;
             }
            {