changeset 10850:0794141677db

(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'.
author Jim Meyering <jim@meyering.net>
date Tue, 28 Feb 1995 13:46:40 +0000
parents eb6af491e98f
children 8064f933eed7
files src/regex.c
diffstat 1 files changed, 16 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/regex.c	Tue Feb 28 09:51:49 1995 +0000
+++ b/src/regex.c	Tue Feb 28 13:46:40 1995 +0000
@@ -1241,20 +1241,22 @@
 /* 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;