aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-03-15 11:40:00 -0700
committerPaul Eggert2011-03-15 11:40:00 -0700
commit952db0d7ad3872dd675d23f7e60ae3298a8d8d52 (patch)
tree1518fd13c523f18ac79accf594532614547caf9e /src
parent8fb3179241c11eef948f612d959521ac31af1560 (diff)
downloademacs-952db0d7ad3872dd675d23f7e60ae3298a8d8d52.tar.gz
emacs-952db0d7ad3872dd675d23f7e60ae3298a8d8d52.zip
* regex.c (FREE_VAR): Rewrite so as not to use empty "else",
which gcc can warn about.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/regex.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2bcca8b0562..e533b07d41a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -5,6 +5,8 @@
5 (regex_compile, re_match_2_internal): Move locals to avoid shadowing. 5 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
6 (regex_compile, re_search_2, re_match_2_internal): 6 (regex_compile, re_search_2, re_match_2_internal):
7 Remove unused local vars. 7 Remove unused local vars.
8 (FREE_VAR): Rewrite so as not to use empty "else",
9 which gcc can warn about.
8 10
9 * search.c (boyer_moore): Rename locals to avoid shadowing. 11 * search.c (boyer_moore): Rename locals to avoid shadowing.
10 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise. 12 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise.
diff --git a/src/regex.c b/src/regex.c
index 0187a103b32..9c950a42b22 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -4666,7 +4666,14 @@ static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2,
4666 4666
4667/* Free everything we malloc. */ 4667/* Free everything we malloc. */
4668#ifdef MATCH_MAY_ALLOCATE 4668#ifdef MATCH_MAY_ALLOCATE
4669# define FREE_VAR(var) if (var) { REGEX_FREE (var); var = NULL; } else 4669# define FREE_VAR(var) \
4670 do { \
4671 if (var) \
4672 { \
4673 REGEX_FREE (var); \
4674 var = NULL; \
4675 } \
4676 } while (0)
4670# define FREE_VARIABLES() \ 4677# define FREE_VARIABLES() \
4671 do { \ 4678 do { \
4672 REGEX_FREE_STACK (fail_stack.stack); \ 4679 REGEX_FREE_STACK (fail_stack.stack); \