This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
A couple of warning fixes by Gisle
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 27 Apr 2005 20:24:30 +0000 (20:24 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 27 Apr 2005 20:24:30 +0000 (20:24 +0000)
p4raw-id: //depot/perl@24339

pp.c
pp_sys.c

diff --git a/pp.c b/pp.c
index e3773b2..ca4f61d 100644 (file)
--- 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);
            }
index 135ae01..c127b64 100644 (file)
--- 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));
     }