In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/7d769928d688d1662c7e4bda7038ebdc70c42bad?hp=944ff78754da53b01432e183fc56d9a559614115>
- Log ----------------------------------------------------------------- commit 7d769928d688d1662c7e4bda7038ebdc70c42bad Author: David Mitchell <[email protected]> Date: Thu Oct 3 14:13:14 2019 +0100 fix some signed/unsigned warnings Note that utf8_distance returns IV, while STR_LEN is an unsigned value of varying sizes. ----------------------------------------------------------------------- Summary of changes: pp.c | 4 ++-- regexec.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pp.c b/pp.c index 062d0f2e37..d9a7cc3d09 100644 --- a/pp.c +++ b/pp.c @@ -7123,11 +7123,11 @@ PP(pp_argcheck) UV opt_params = aux->opt_params; char slurpy = aux->slurpy; AV *defav = GvAV(PL_defgv); /* @_ */ - IV argc; + UV argc; bool too_few; assert(!SvMAGICAL(defav)); - argc = (AvFILLp(defav) + 1); + argc = (UV)(AvFILLp(defav) + 1); too_few = (argc < (params - opt_params)); if (UNLIKELY(too_few || (!slurpy && argc > params))) diff --git a/regexec.c b/regexec.c index db19a50d86..5228c85fac 100644 --- a/regexec.c +++ b/regexec.c @@ -1472,10 +1472,10 @@ Perl_re_intuit_start(pTHX_ const U8* const str = (U8*)STRING(progi->regstclass); /* XXX this value could be pre-computed */ - const int cl_l = (PL_regkind[OP(progi->regstclass)] == EXACT + const SSize_t cl_l = (PL_regkind[OP(progi->regstclass)] == EXACT ? (reginfo->is_utf8_pat - ? utf8_distance(str + STR_LEN(progi->regstclass), str) - : STR_LEN(progi->regstclass)) + ? (SSize_t)utf8_distance(str + STR_LEN(progi->regstclass), str) + : (SSize_t)STR_LEN(progi->regstclass)) : 1); char * endpos; char *s; -- Perl5 Master Repository
