mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-01 11:20:41 -08:00
(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'.
This commit is contained in:
parent
2601d12ed9
commit
6c3fe73934
1 changed files with 16 additions and 14 deletions
30
src/regex.c
30
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue