# HG changeset patch # User Jim Meyering # Date 798916707 0 # Node ID be13a2d356fe911963cb2f94e6b5cb28a57ff159 # Parent 1aef6914aecd05631676a44a836174b6ba36e756 (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. diff --git a/lib/regex.c b/lib/regex.c --- a/lib/regex.c +++ b/lib/regex.c @@ -240,7 +240,7 @@ 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 @@ 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 @@ 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