summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2019-10-03 14:13:14 +0100
committerDavid Mitchell <davem@iabyn.com>2019-10-03 14:24:19 +0100
commit7d769928d688d1662c7e4bda7038ebdc70c42bad (patch)
tree9e1179e6be2be2af11e528ec6b43aee413eac33d /regexec.c
parent944ff78754da53b01432e183fc56d9a559614115 (diff)
downloadperl-7d769928d688d1662c7e4bda7038ebdc70c42bad.tar.gz
fix some signed/unsigned warnings
Note that utf8_distance returns IV, while STR_LEN is an unsigned value of varying sizes.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c6
1 files changed, 3 insertions, 3 deletions
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;