summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: de83172)
raw | patch | inline | side by side (parent: de83172)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Thu, 19 Aug 2010 18:30:01 +0000 (18:30 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 19 Aug 2010 20:00:44 +0000 (13:00 -0700) |
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>
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>
compat/regex/regex_internal.c | patch | blob | history | |
compat/regex/regexec.c | patch | blob | history |
index dad17a8131cf780e4d88029c6e81e87098a0ce2c..193854cf5b609d714b03218bd507af840d478c6e 100644 (file)
}
else
{
+#ifdef RE_ENABLE_I18N
/* No, skip all characters until IDX. */
int prev_valid_len = pstr->valid_len;
-#ifdef RE_ENABLE_I18N
if (BE (pstr->offsets_needed, 0))
{
pstr->len = pstr->raw_len - idx + offset;
diff --git a/compat/regex/regexec.c b/compat/regex/regexec.c
index aee502d2998e0a2ee5b51b417898ce0e09b58670..0c2b054bce02cd433fa2a015feca3d1d52067964 100644 (file)
--- a/compat/regex/regexec.c
+++ b/compat/regex/regexec.c
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)