Avoid gcc warnings on cygwin.
authorEric Blake <ebb9@byu.net>
Mon, 22 Dec 2008 13:11:32 +0000 (06:11 -0700)
committerEric Blake <ebb9@byu.net>
Mon, 22 Dec 2008 13:11:32 +0000 (06:11 -0700)
* lib/regex_internal.c (re_string_reconstruct) [!RE_ENABLE_I18N]:
Avoid unused variable.
* lib/regexec.c (check_arrival_add_next_nodes) [!RE_ENABLE_I18N]:
Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/regex_internal.c
lib/regexec.c

index 798c04e..29322df 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-22  Eric Blake  <ebb9@byu.net>
+
+       Avoid gcc warnings on cygwin.
+       * lib/regex_internal.c (re_string_reconstruct) [!RE_ENABLE_I18N]:
+       Avoid unused variable.
+       * lib/regexec.c (check_arrival_add_next_nodes) [!RE_ENABLE_I18N]:
+       Likewise.
+
 2008-12-22  Bruno Haible  <bruno@clisp.org>
 
        Remove HAVE_MBRTOWC conditionals.
index 7f9a3ae..977b15a 100644 (file)
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software
+   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -687,10 +687,10 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
        }
       else
        {
+#ifdef RE_ENABLE_I18N
          /* No, skip all characters until IDX.  */
          Idx prev_valid_len = pstr->valid_len;
 
-#ifdef RE_ENABLE_I18N
          if (BE (pstr->offsets_needed, 0))
            {
              pstr->len = pstr->raw_len - idx + offset;
index 3e51b49..2afa5b3 100644 (file)
@@ -3079,7 +3079,9 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
   const re_dfa_t *const dfa = mctx->dfa;
   bool ok;
   Idx 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)