aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Meyering1995-02-28 13:46:40 +0000
committerJim Meyering1995-02-28 13:46:40 +0000
commit6c3fe7393479e8552fb92a0599fe548331bd65a3 (patch)
tree9d4172a03d6ae62ed5869b997a89e6321af388e0 /src
parent2601d12ed96cef83ff4bf57fa63e126fcc1aee19 (diff)
downloademacs-6c3fe7393479e8552fb92a0599fe548331bd65a3.tar.gz
emacs-6c3fe7393479e8552fb92a0599fe548331bd65a3.zip
(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'.
Diffstat (limited to 'src')
-rw-r--r--src/regex.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/regex.c b/src/regex.c
index 645b661c208..e02f0fefb4e 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -1241,20 +1241,22 @@ typedef union
1241/* Call this when have matched a real character; it sets `matched' flags 1241/* Call this when have matched a real character; it sets `matched' flags
1242 for the subexpressions which we are currently inside. Also records 1242 for the subexpressions which we are currently inside. Also records
1243 that those subexprs have matched. */ 1243 that those subexprs have matched. */
1244#define SET_REGS_MATCHED() \ 1244#define SET_REGS_MATCHED() \
1245 if (!set_regs_matched_done) \ 1245 do \
1246 { \ 1246 { \
1247 unsigned r; \ 1247 if (!set_regs_matched_done) \
1248 set_regs_matched_done = 1; \ 1248 { \
1249 for (r = lowest_active_reg; r <= highest_active_reg; r++) \ 1249 unsigned r; \
1250 { \ 1250 set_regs_matched_done = 1; \
1251 MATCHED_SOMETHING (reg_info[r]) \ 1251 for (r = lowest_active_reg; r <= highest_active_reg; r++) \
1252 = EVER_MATCHED_SOMETHING (reg_info[r]) \ 1252 { \
1253 = 1; \ 1253 MATCHED_SOMETHING (reg_info[r]) \
1254 } \ 1254 = EVER_MATCHED_SOMETHING (reg_info[r]) \
1255 } \ 1255 = 1; \
1256 else 1256 } \
1257 1257 } \
1258 } \
1259 while (0)
1258 1260
1259/* Registers are set to a sentinel when they haven't yet matched. */ 1261/* Registers are set to a sentinel when they haven't yet matched. */
1260static char reg_unset_dummy; 1262static char reg_unset_dummy;