From: Nicholas Clark Date: Sun, 29 Jan 2006 00:25:04 +0000 (+0000) Subject: C compilers don't let you return void. Pay attention gcc, and X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b8c701c15b6657c058ab0dd84c78eb210b7618a6;p=p5sagit%2Fp5-mst-13.2.git C compilers don't let you return void. Pay attention gcc, and stop aping Shildt. p4raw-id: //depot/perl@26991 --- diff --git a/sv.c b/sv.c index 25d6f33..a177947 100644 --- a/sv.c +++ b/sv.c @@ -3188,7 +3188,8 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV *sstr, I32 flags) GvMULTI_on(dstr); return; } - return S_glob_assign(aTHX_ dstr, sstr, dtype); + S_glob_assign(aTHX_ dstr, sstr, dtype); + return; } break; case SVt_PVFM: @@ -3227,7 +3228,8 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV *sstr, I32 flags) case SVt_PVGV: if (dtype <= SVt_PVGV) { - return S_glob_assign(aTHX_ dstr, sstr, dtype); + S_glob_assign(aTHX_ dstr, sstr, dtype); + return; } /* FALL THROUGH */ @@ -3236,8 +3238,10 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV *sstr, I32 flags) mg_get(sstr); if ((int)SvTYPE(sstr) != stype) { stype = SvTYPE(sstr); - if (stype == SVt_PVGV && dtype <= SVt_PVGV) - return S_glob_assign(aTHX_ dstr, sstr, dtype); + if (stype == SVt_PVGV && dtype <= SVt_PVGV) { + S_glob_assign(aTHX_ dstr, sstr, dtype); + return; + } } } if (stype == SVt_PVLV) @@ -3250,8 +3254,10 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV *sstr, I32 flags) if (sflags & SVf_ROK) { if (dtype >= SVt_PV) { - if (dtype == SVt_PVGV) - return S_pvgv_assign(aTHX_ dstr, sstr); + if (dtype == SVt_PVGV) { + S_pvgv_assign(aTHX_ dstr, sstr); + return; + } if (SvPVX_const(dstr)) { SvPV_free(dstr); SvLEN_set(dstr, 0);