From: Karl Williamson Date: Mon, 18 Oct 2010 04:32:07 +0000 (-0600) Subject: regcomp.c: Get rid of compiler warning. X-Git-Tag: v5.13.7~563 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/d53d27f973b3f4329ad8aa1e1a11554c8e19c3e3?hp=ffd08bbf4eee59b6c86c374289d59dfad26344ad regcomp.c: Get rid of compiler warning. This patch should remove a compiler warning that is currently only showing up in one compiler. It declares a debug-only variable to be volatile, so should silence the warning that it is getting clobbered. Since this variable is only used for debugging purposes, when DEBUGGING is defined, performance should not be an issue. --- diff --git a/regcomp.h b/regcomp.h index dcb449f..9e1a4e3 100644 --- a/regcomp.h +++ b/regcomp.h @@ -787,7 +787,7 @@ re.pm, especially to the documentation. #ifdef DEBUGGING -#define GET_RE_DEBUG_FLAGS_DECL IV re_debug_flags = 0; GET_RE_DEBUG_FLAGS; +#define GET_RE_DEBUG_FLAGS_DECL VOL IV re_debug_flags = 0; GET_RE_DEBUG_FLAGS; #define RE_PV_COLOR_DECL(rpv,rlen,isuni,dsv,pv,l,m,c1,c2) \ const char * const rpv = \