From 3faff02596d2c4d6222b99284bb84ca272a6956a Mon Sep 17 00:00:00 2001 From: "Philip.Hazel" Date: Fri, 5 Jun 2020 16:11:01 +0000 Subject: [PATCH] Add cast to prevent a compiler warning. --- ChangeLog | 2 ++ src/pcre2_compile.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0ce683f..eb24858 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,6 +38,8 @@ Moreover, these functions come from specific header files, which need to be specified (and, thankfully, are the same on both the Linux and WinXX platforms.) +6. Added a (uint32_t) cast to prevent a compiler warning in pcre2_compile.c. + Version 10.35 09-May-2020 --------------------------- diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c index 62393be..136d583 100644 --- a/src/pcre2_compile.c +++ b/src/pcre2_compile.c @@ -2344,7 +2344,7 @@ if (ptr > *nameptr + MAX_NAME_SIZE) *errorcodeptr = ERR48; goto FAILED; } -*namelenptr = ptr - *nameptr; +*namelenptr = (uint32_t)(ptr - *nameptr); /* Subpattern names must not be empty, and their terminator is checked here. (What follows a verb or alpha assertion name is checked separately.) */