From: Rafael Garcia-Suarez Date: Wed, 27 Apr 2005 20:24:30 +0000 (+0000) Subject: A couple of warning fixes by Gisle X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8569b9dcecd37c8ddfb10cf00cd3f0a1d60426a0;p=p5sagit%2Fp5-mst-13.2.git A couple of warning fixes by Gisle p4raw-id: //depot/perl@24339 --- diff --git a/pp.c b/pp.c index e3773b2..ca4f61d 100644 --- a/pp.c +++ b/pp.c @@ -1493,7 +1493,7 @@ PP(pp_repeat) if (len > ((MEM_SIZE)~0)/count) Perl_croak(aTHX_ oom_string_extend); MEM_WRAP_CHECK_1(max, char, oom_string_extend); - SvGROW(TARG, (count * len) + 1); + SvGROW(TARG, max + 1); repeatcpy(SvPVX(TARG) + len, SvPVX(TARG), len, count - 1); SvCUR_set(TARG, SvCUR(TARG) * count); } diff --git a/pp_sys.c b/pp_sys.c index 135ae01..c127b64 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -1702,7 +1702,7 @@ PP(pp_sysread) SvCUR_set(bufsv, offset); read_target = sv_newmortal(); - SvUPGRADE(read_target, SVt_PV); + (void)SvUPGRADE(read_target, SVt_PV); buffer = SvGROW(read_target, (STRLEN)(length + 1)); }