Minor refactor to avoid "left shift of negative number" warning.

This commit is contained in:
Philip.Hazel 2016-05-21 13:41:24 +00:00
parent bf1587490b
commit 18018db697
2 changed files with 3 additions and 2 deletions

View File

@ -111,6 +111,7 @@ been re-factored and no longer includes pcre2_internal.h.
26. Minor code refactor to avoid "array subscript is below array bounds"
compiler warning.
27. Minor code refactor to avoid "left shift of negative number" warning.
Version 10.21 12-January-2016

View File

@ -539,12 +539,12 @@ the start pointers when the end of the capturing group has not yet reached. */
#define MOV_UCHAR SLJIT_MOV_U16
#define MOVU_UCHAR SLJIT_MOVU_U16
#define UCHAR_SHIFT (1)
#define IN_UCHARS(x) ((x) << UCHAR_SHIFT)
#define IN_UCHARS(x) ((x) * 2)
#elif PCRE2_CODE_UNIT_WIDTH == 32
#define MOV_UCHAR SLJIT_MOV_U32
#define MOVU_UCHAR SLJIT_MOVU_U32
#define UCHAR_SHIFT (2)
#define IN_UCHARS(x) ((x) << UCHAR_SHIFT)
#define IN_UCHARS(x) ((x) * 4)
#else
#error Unsupported compiling mode
#endif