diff --git a/ChangeLog b/ChangeLog index e58c18f..188ab3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -232,6 +232,9 @@ not doing so for [\d-X] (and similar escapes), as is documented. 54. Fixed a MIPS issue in the JIT compiler reported by Joshua Kinard. +55. Fixed a "maybe uninitialized" warning for class_uchardata in \p handling in +pcre2_compile() which could never actually trigger (code should have been cut +out when Unicode support is disabled). Version 10.23 14-February-2017 diff --git a/maint/ManyConfigTests b/maint/ManyConfigTests index e14f871..5860b39 100755 --- a/maint/ManyConfigTests +++ b/maint/ManyConfigTests @@ -124,6 +124,7 @@ if [ $? -eq 0 ] && grep GCC /tmp/pcre2ccversion >/dev/null; then CFLAGS="$CFLAGS -Wnested-externs" CFLAGS="$CFLAGS -pedantic" CFLAGS="$CFLAGS -Wuninitialized" + CFLAGS="$CFLAGS -Wmaybe-uninitialized" CFLAGS="$CFLAGS -Wmissing-prototypes" CFLAGS="$CFLAGS -Wstrict-prototypes" fi diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c index c801ee4..44ee250 100644 --- a/src/pcre2_compile.c +++ b/src/pcre2_compile.c @@ -5356,6 +5356,10 @@ for (;; pptr++) options & ~PCRE2_CASELESS, cb, PRIV(vspace_list)); break; + /* If Unicode is not supported, \P and \p are not allowed and are + faulted at parse time, so will never appear here. */ + +#ifdef SUPPORT_UNICODE case ESC_p: case ESC_P: { @@ -5364,12 +5368,11 @@ for (;; pptr++) *class_uchardata++ = (escape == ESC_p)? XCL_PROP : XCL_NOTPROP; *class_uchardata++ = ptype; *class_uchardata++ = pdata; -#ifdef SUPPORT_WIDE_CHARS xclass_has_prop = TRUE; -#endif class_has_8bitchar--; /* Undo! */ } break; +#endif } goto CONTINUE_CLASS;