summaryrefslogtreecommitdiff
path: root/compat/regex/regexec.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2010-08-19 18:30:01 +0000
committerJunio C Hamano <gitster@pobox.com>2010-08-19 13:00:44 -0700
commitb50f37098fcf7efb097c01daa3d60df8b9704025 (patch)
tree13cf3d4ae4662badd0b3a83ce2767830741e4113 /compat/regex/regexec.c
parentde831726decd9c2fcaf7c71136560cf6f5c38a59 (diff)
downloadgit-b50f37098fcf7efb097c01daa3d60df8b9704025.tar.gz
compat/regex: define out variables only used under RE_ENABLE_I18N
Wrap variables that were only used RE_ENABLE_I18N in `#ifdef RE_ENABLE_I18N`. This eliminates compiler warnings when compiling with NO_REGEX=YesPlease. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/regex/regexec.c')
-rw-r--r--compat/regex/regexec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/compat/regex/regexec.c b/compat/regex/regexec.c
index aee502d299..0c2b054bce 100644
--- a/compat/regex/regexec.c
+++ b/compat/regex/regexec.c
@@ -3059,7 +3059,9 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx,
const re_dfa_t *const dfa = mctx->dfa;
int result;
int cur_idx;
+#ifdef RE_ENABLE_I18N
reg_errcode_t err = REG_NOERROR;
+#endif
re_node_set union_set;
re_node_set_init_empty (&union_set);
for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx)