[Pcre-svn] [1055] code/trunk: Cast to get rid of compiler wa…

Page principale
Supprimer ce message
Auteur: Subversion repository
Date:  
À: pcre-svn
Sujet: [Pcre-svn] [1055] code/trunk: Cast to get rid of compiler warning.
Revision: 1055
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1055
Author:   ph10
Date:     2018-12-14 16:02:29 +0000 (Fri, 14 Dec 2018)
Log Message:
-----------
Cast to get rid of compiler warning.


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/src/pcre2_dfa_match.c


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2018-12-14 08:00:49 UTC (rev 1054)
+++ code/trunk/ChangeLog    2018-12-14 16:02:29 UTC (rev 1055)
@@ -100,7 +100,9 @@
 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
-------------------------------


Modified: code/trunk/src/pcre2_dfa_match.c
===================================================================
--- code/trunk/src/pcre2_dfa_match.c    2018-12-14 08:00:49 UTC (rev 1054)
+++ code/trunk/src/pcre2_dfa_match.c    2018-12-14 16:02:29 UTC (rev 1055)
@@ -426,7 +426,7 @@
   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)