From 9938684b7ba21e43a116d19a94e1ea283c45dd15 Mon Sep 17 00:00:00 2001 From: "Philip.Hazel" Date: Fri, 14 Dec 2018 16:02:29 +0000 Subject: [PATCH] Cast to get rid of compiler warning. --- ChangeLog | 2 ++ src/pcre2_dfa_match.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7f3dbce..cf04444 100644 --- a/ChangeLog +++ b/ChangeLog @@ -100,6 +100,8 @@ it was reported not to on other systems, causing the tests to fail. 25. In the RunTest script, make the test for stack setting use the same value for the stack as it needs for -bigstack. +26. Insert a cast in pcre2_dfa_match.c to suppress a compiler warning. + Version 10.32 10-September-2018 ------------------------------- diff --git a/src/pcre2_dfa_match.c b/src/pcre2_dfa_match.c index e724aeb..3f7d04e 100644 --- a/src/pcre2_dfa_match.c +++ b/src/pcre2_dfa_match.c @@ -426,7 +426,7 @@ else uint32_t newsizeK = newsize/(1024/sizeof(int)); if (newsizeK + mb->heap_used > mb->heap_limit) - newsizeK = mb->heap_limit - mb->heap_used; + newsizeK = (uint32_t)(mb->heap_limit - mb->heap_used); newsize = newsizeK*(1024/sizeof(int)); if (newsize < RWS_RSIZE + ovecsize + RWS_ANCHOR_SIZE)