From b0cf73efa930f585e62f34246848ecbfc7012435 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 28 Nov 2006 08:35:51 +0000 Subject: [PATCH] * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid warning from "gcc -Wshadow" about shadowing the builtin. --- ChangeLog | 5 +++++ lib/regcomp.c | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2919ff8a06..863be20f32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-28 Jim Meyering + + * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid + warning from "gcc -Wshadow" about shadowing the builtin. + 2006-11-27 Bruno Haible * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of diff --git a/lib/regcomp.c b/lib/regcomp.c index 6e317f5134..8df6bb8092 100644 --- a/lib/regcomp.c +++ b/lib/regcomp.c @@ -2177,7 +2177,7 @@ static bin_tree_t * parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { - bin_tree_t *tree, *exp; + bin_tree_t *tree, *expr; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; tree = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) @@ -2186,14 +2186,14 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, while (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { - exp = parse_expression (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && exp == NULL, 0)) + expr = parse_expression (regexp, preg, token, syntax, nest, err); + if (BE (*err != REG_NOERROR && expr == NULL, 0)) { return NULL; } - if (tree != NULL && exp != NULL) + if (tree != NULL && expr != NULL) { - tree = create_tree (dfa, tree, exp, CONCAT); + tree = create_tree (dfa, tree, expr, CONCAT); if (tree == NULL) { *err = REG_ESPACE; @@ -2201,8 +2201,8 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, } } else if (tree == NULL) - tree = exp; - /* Otherwise exp == NULL, we don't need to create new tree. */ + tree = expr; + /* Otherwise expr == NULL, we don't need to create new tree. */ } return tree; } -- 2.30.2