From 433cdd67c56ba42ea0e7133ac9a359fbecdd7f8e Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 15 Sep 2006 16:41:43 +0000 Subject: [PATCH] Avoid a warning about an unused variable. * regex_internal.c (re_dfa_add_node): Move declaration of "type" into the #ifdef block where it's used. --- lib/ChangeLog | 4 ++++ lib/regex_internal.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 9cc7901cd..8a1130605 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,5 +1,9 @@ 2006-09-15 Jim Meyering + Avoid a warning about an unused variable. + * regex_internal.c (re_dfa_add_node): Move declaration of "type" + into the #ifdef block where it's used. + * rename-dest-slash.c: New file. 2006-09-14 Bruno Haible diff --git a/lib/regex_internal.c b/lib/regex_internal.c index 633db7a7f..fa5bfbb5c 100644 --- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -1340,7 +1340,6 @@ static Idx internal_function re_dfa_add_node (re_dfa_t *dfa, re_token_t token) { - int type = token.type; if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) { size_t new_nodes_alloc = dfa->nodes_alloc * 2; @@ -1376,8 +1375,11 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token) dfa->nodes[dfa->nodes_len] = token; dfa->nodes[dfa->nodes_len].constraint = 0; #ifdef RE_ENABLE_I18N + { + int type = token.type; dfa->nodes[dfa->nodes_len].accept_mb = (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET; + } #endif dfa->nexts[dfa->nodes_len] = REG_MISSING; re_node_set_init_empty (dfa->edests + dfa->nodes_len); -- 2.11.0