Commit 952db0d7 authored by Paul Eggert's avatar Paul Eggert
Browse files

* regex.c (FREE_VAR): Rewrite so as not to use empty "else",

which gcc can warn about.
parent 8fb31792
......@@ -5,6 +5,8 @@
(regex_compile, re_match_2_internal): Move locals to avoid shadowing.
(regex_compile, re_search_2, re_match_2_internal):
Remove unused local vars.
(FREE_VAR): Rewrite so as not to use empty "else",
which gcc can warn about.
 
* search.c (boyer_moore): Rename locals to avoid shadowing.
* character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise.
......@@ -4666,7 +4666,14 @@ static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2,
/* Free everything we malloc. */
#ifdef MATCH_MAY_ALLOCATE
# define FREE_VAR(var) if (var) { REGEX_FREE (var); var = NULL; } else
# define FREE_VAR(var) \
do { \
if (var) \
{ \
REGEX_FREE (var); \
var = NULL; \
} \
} while (0)
# define FREE_VARIABLES() \
do { \
REGEX_FREE_STACK (fail_stack.stack); \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment