Mercurial > hg > octave-nkf > gnulib-hg
changeset 13391:089c783c3e94
regex: avoid new dead-code warning with gcc-4.6.0
* lib/regex_internal.c (re_string_reconstruct): #if-0-out a dead
if-block containing a while-loop. It's been unused for at least
5 years.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Mon, 07 Jun 2010 07:58:49 +0200 |
parents | ec7b10127e92 |
children | e1ecf2c01266 |
files | ChangeLog lib/regex_internal.c |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-06-07 Jim Meyering <meyering@redhat.com> + + regex: avoid new dead-code warning with gcc-4.6.0 + * lib/regex_internal.c (re_string_reconstruct): #if-0-out a dead + if-block containing a while-loop. It's been unused for at least + 5 years. + 2010-06-05 Bruno Haible <bruno@clisp.org> * doc/posix-functions/strcoll.texi: Mention Solaris limitation.
--- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -733,15 +733,17 @@ mbstate_t cur_state; wchar_t wc2; Idx mlen = raw + pstr->len - p; - unsigned char buf[6]; size_t mbclen; +#if 0 /* dead code: buf is set but never used */ + unsigned char buf[6]; if (BE (pstr->trans != NULL, 0)) { int i = mlen < 6 ? mlen : 6; while (--i >= 0) buf[i] = pstr->trans[p[i]]; } +#endif /* XXX Don't use mbrtowc, we know which conversion to use (UTF-8 -> UCS4). */ memset (&cur_state, 0, sizeof (cur_state));