bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: update regex dependencies


From: Eric Blake
Subject: Re: update regex dependencies
Date: Mon, 22 Dec 2008 06:12:27 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081105 Thunderbird/2.0.0.18 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Paolo Bonzini on 12/22/2008 2:59 AM:
> I'm committing this:
> 
> 2008-12-22  Paolo Bonzini  <address@hidden>
> 
>       * modules/regex: Request emulations for the mb*/wc* functions we
>       need.
>       * m4/regex.m4: Don't look for those functions here.

And some fallout for cygwin, which lacks multibyte locales:

In file included from regex.c:60:
regex_internal.c: In function `re_string_reconstruct':
regex_internal.c:691: warning: unused variable `prev_valid_len'
In file included from regex.c:62:
regexec.c: In function `check_arrival_add_next_nodes':
regexec.c:3082: warning: unused variable `err'

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklPkjsACgkQ84KuGfSFAYCKlQCgzgPbguMUB/Y1X2Ysf5rWVT8X
gmwAn21yTCSKNCc1bvPkcX3k53ZeApjK
=wTnv
-----END PGP SIGNATURE-----
>From d2822d2338678c7deaa404d848ddbcf52fa9de31 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 22 Dec 2008 06:11:32 -0700
Subject: [PATCH] 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.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog            |    8 ++++++++
 lib/regex_internal.c |    4 ++--
 lib/regexec.c        |    2 ++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 798c04e..29322df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-22  Eric Blake  <address@hidden>
+
+       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  <address@hidden>
 
        Remove HAVE_MBRTOWC conditionals.
diff --git a/lib/regex_internal.c b/lib/regex_internal.c
index 7f9a3ae..977b15a 100644
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
@@ -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 <address@hidden>.
@@ -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;
diff --git a/lib/regexec.c b/lib/regexec.c
index 3e51b49..2afa5b3 100644
--- a/lib/regexec.c
+++ b/lib/regexec.c
@@ -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)
-- 
1.6.0.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]