diff --git a/ChangeLog b/ChangeLog index 87ceb27..f7e74ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c index 3927d2c..5349475 100644 --- a/src/pcre2_jit_compile.c +++ b/src/pcre2_jit_compile.c @@ -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