Add some casts to avoid compiler warnings.

This commit is contained in:
Philip.Hazel 2017-09-26 17:01:23 +00:00
parent 14edec2ad7
commit 6f4ee08469
3 changed files with 6 additions and 4 deletions

View File

@ -24,6 +24,8 @@ the public names in pcre2_convert.c.
7. Fixed a small memory leak in pcre2test (convert contexts).
8. Added two casts to compile.c and one to match.c to avoid compiler warnings.
Version 10.30 14-August-2017
----------------------------

View File

@ -2194,8 +2194,8 @@ manage_callouts(PCRE2_SPTR ptr, uint32_t **pcalloutptr, BOOL auto_callout,
{
uint32_t *previous_callout = *pcalloutptr;
if (previous_callout != NULL) previous_callout[2] = ptr - cb->start_pattern -
(PCRE2_SIZE)previous_callout[1];
if (previous_callout != NULL) previous_callout[2] = (uint32_t)(ptr -
cb->start_pattern - (PCRE2_SIZE)previous_callout[1]);
if (!auto_callout) previous_callout = NULL; else
{
@ -3806,7 +3806,7 @@ while (ptr < ptrend)
/* Remember the offset to the next item in the pattern, and set a default
length. This should get updated after the next item is read. */
previous_callout[1] = ptr - cb->start_pattern;
previous_callout[1] = (uint32_t)(ptr - cb->start_pattern);
previous_callout[2] = 0;
break; /* End callout */

View File

@ -729,7 +729,7 @@ for (;;)
fprintf(stderr, "++ op=%d\n", *Fecode);
#endif
Fop = *Fecode;
Fop = (uint8_t)(*Fecode); /* Cast needed for 16-bit and 32-bit modes */
switch(Fop)
{
/* ===================================================================== */