aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Meyering <[email protected]>1995-02-28 13:46:40 +0000
committerJim Meyering <[email protected]>1995-02-28 13:46:40 +0000
commit6c3fe7393479e8552fb92a0599fe548331bd65a3 (patch)
tree9d4172a03d6ae62ed5869b997a89e6321af388e0
parent2601d12ed96cef83ff4bf57fa63e126fcc1aee19 (diff)
(SET_REGS_MATCHED): Enclose if-stmt in `do {...} while(0)'
instead of using trailing `else' -- otherwise, gcc -Wall complains of `empty body in an else-statement'.
-rw-r--r--src/regex.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/regex.c b/src/regex.c
index 645b661c20..e02f0fefb4 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -1241,20 +1241,22 @@ typedef union
/* Call this when have matched a real character; it sets `matched' flags
for the subexpressions which we are currently inside. Also records
that those subexprs have matched. */
-#define SET_REGS_MATCHED() \
- if (!set_regs_matched_done) \
- { \
- unsigned r; \
- set_regs_matched_done = 1; \
- for (r = lowest_active_reg; r <= highest_active_reg; r++) \
- { \
- MATCHED_SOMETHING (reg_info[r]) \
- = EVER_MATCHED_SOMETHING (reg_info[r]) \
- = 1; \
- } \
- } \
- else
-
+#define SET_REGS_MATCHED() \
+ do \
+ { \
+ if (!set_regs_matched_done) \
+ { \
+ unsigned r; \
+ set_regs_matched_done = 1; \
+ for (r = lowest_active_reg; r <= highest_active_reg; r++) \
+ { \
+ MATCHED_SOMETHING (reg_info[r]) \
+ = EVER_MATCHED_SOMETHING (reg_info[r]) \
+ = 1; \
+ } \
+ } \
+ } \
+ while (0)
/* Registers are set to a sentinel when they haven't yet matched. */
static char reg_unset_dummy;