From: Steve Hay Date: Wed, 1 Nov 2006 13:07:37 +0000 (+0000) Subject: Silence VC++ compiler warnings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=86413ec05edbed389a8f74a82fd028f2d16de4b8;p=p5sagit%2Fp5-mst-13.2.git Silence VC++ compiler warnings See: http://www.nntp.perl.org/group/perl.daily-build.reports/42208 p4raw-id: //depot/perl@29180 --- diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs index bb64141..eac8a64 100644 --- a/ext/IO/IO.xs +++ b/ext/IO/IO.xs @@ -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; } diff --git a/ext/Time/HiRes/HiRes.xs b/ext/Time/HiRes/HiRes.xs index f1029f0..a33e190 100644 --- a/ext/Time/HiRes/HiRes.xs +++ b/ext/Time/HiRes/HiRes.xs @@ -1209,7 +1209,7 @@ clock() #endif /* #if defined(TIME_HIRES_CLOCK) && defined(CLOCKS_PER_SEC) */ -IV +void stat(...) PROTOTYPE: ;$ PPCODE: diff --git a/regexec.c b/regexec.c index 7950805..9f28e3e 100644 --- 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; } {