summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorRobin Barker <rmbarker@cpan.org>2011-05-15 14:40:46 +0100
committerFather Chrysostomos <sprout@cpan.org>2011-05-19 12:56:07 -0700
commit9c4fdda15e362ce5accd8f03629d2bbb7bb40027 (patch)
tree84f513d790eae22420b5977235c8c3a09f228fa6 /regexec.c
parent9410e98db2629cb1014040562236ba42a308f939 (diff)
downloadperl-9c4fdda15e362ce5accd8f03629d2bbb7bb40027.tar.gz
use __attribute__unused__ to silence -Wunused-but-set-variable
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/regexec.c b/regexec.c
index fd90ad7aa3..6b32aa2ba3 100644
--- a/regexec.c
+++ b/regexec.c
@@ -123,11 +123,19 @@
/* these are unrolled below in the CCC_TRY_XXX defined */
#define LOAD_UTF8_CHARCLASS(class,str) STMT_START { \
- if (!CAT2(PL_utf8_,class)) { bool ok; ENTER; save_re_context(); ok=CAT2(is_utf8_,class)((const U8*)str); assert(ok); LEAVE; } } STMT_END
+ if (!CAT2(PL_utf8_,class)) { \
+ bool ok; \
+ ENTER; save_re_context(); \
+ ok=CAT2(is_utf8_,class)((const U8*)str); \
+ assert(ok); LEAVE; } } STMT_END
/* Doesn't do an assert to verify that is correct */
#define LOAD_UTF8_CHARCLASS_NO_CHECK(class) STMT_START { \
- if (!CAT2(PL_utf8_,class)) { bool throw_away; ENTER; save_re_context(); throw_away = CAT2(is_utf8_,class)((const U8*)" "); LEAVE; } } STMT_END
+ if (!CAT2(PL_utf8_,class)) { \
+ bool throw_away __attribute__unused__; \
+ ENTER; save_re_context(); \
+ throw_away = CAT2(is_utf8_,class)((const U8*)" "); \
+ LEAVE; } } STMT_END
#define LOAD_UTF8_CHARCLASS_ALNUM() LOAD_UTF8_CHARCLASS(alnum,"a")
#define LOAD_UTF8_CHARCLASS_DIGIT() LOAD_UTF8_CHARCLASS(digit,"0")