# HG changeset patch # User Jim Meyering # Date 1275890329 -7200 # Node ID 089c783c3e9455a46d91e584130d46ba17634a57 # Parent ec7b10127e929d6c65db87313e8912777187245d 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. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-06-07 Jim Meyering + + 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 * doc/posix-functions/strcoll.texi: Mention Solaris limitation. diff --git a/lib/regex_internal.c b/lib/regex_internal.c --- 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));