summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-04-26 17:18:27 +0000
committerJim Meyering <jim@meyering.net>1995-04-26 17:18:27 +0000
commit9c5392e4af467a0e6a1cc11a708fa51b763b86c3 (patch)
treeda9728ce835c8e66c09995e953fc5f9fbec748c8 /lib
parentfd3bfce0cc4765c90e04fd1ef545ecc315f8c20f (diff)
downloadcoreutils-9c5392e4af467a0e6a1cc11a708fa51b763b86c3.tar.xz
(REGEX_FREE): Define to `while (0) /* empty */' rather than nothing.
Otherwise, some uses got warnings about empty if-clause. Declare failure_stack_ptr only #ifdef REL_ALLOC.
Diffstat (limited to 'lib')
-rw-r--r--lib/regex.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/regex.c b/lib/regex.c
index e275c3b7c..7cb8da8b1 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -240,7 +240,7 @@ char *alloca ();
destination)
/* No need to do anything to free, after alloca. */
-#define REGEX_FREE(arg)
+#define REGEX_FREE(arg) while (0) /* empty */
#endif /* not REGEX_MALLOC */
@@ -2857,9 +2857,11 @@ re_compile_fastmap (bufp)
unsigned char *p = pattern;
register unsigned char *pend = pattern + size;
+#ifdef REL_ALLOC
/* This holds the pointer to the failure stack, when
it is allocated relocatably. */
fail_stack_elt_t *failure_stack_ptr;
+#endif
/* Assume that each path through the pattern can be null until
proven otherwise. We set this false at the bottom of switch
@@ -3508,9 +3510,11 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0;
#endif
+#ifdef REL_ALLOC
/* This holds the pointer to the failure stack, when
it is allocated relocatably. */
fail_stack_elt_t *failure_stack_ptr;
+#endif
/* We fill all the registers internally, independent of what we
return, for use in backreferences. The number here includes