From patchwork Fri Dec 22 16:09:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Eggert X-Patchwork-Id: 25076 Received: (qmail 109574 invoked by alias); 22 Dec 2017 16:09:46 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 109565 invoked by uid 89); 22 Dec 2017 16:09:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: zimbra.cs.ucla.edu Subject: Re: [PATCH 06/17] Regex: Use re_malloc / re_free consistently. To: arnold@skeeve.com, libc-alpha@sourceware.org, carlos@redhat.com Cc: bug-gnulib@gnu.org References: <201712080916.vB89GxEG005501@skeeve.com> <80061d8c-a2ae-b617-2b74-9e648d2bfccf@cs.ucla.edu> <201712201848.vBKImPrQ005105@freefriends.org> From: Paul Eggert Message-ID: <12bfdac7-fe63-9759-529d-a1cf4d2574db@cs.ucla.edu> Date: Fri, 22 Dec 2017 08:09:40 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <201712201848.vBKImPrQ005105@freefriends.org> arnold@skeeve.com wrote: > Paul --- I think that you have permission to push the patches you approve > to glibc. Please do so. OK, I just now did that for patch 04/17, using a variant of Eric Blake's original commit message for Gnulib (see attached). Carlos already installed patch 01/17. As discussed, 02, 03, 05, 06, and 07 need thought before they can go in, and the other patches I haven't reviewed yet. I'd like to finish reviewing them all before installing patches that need thought. From bff2701c1234446e4e873bee8894f6650a9dc3b3 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 22 Dec 2017 07:57:25 -0800 Subject: [PATCH] Avoid gcc warnings on cygwin * posix/regex_internal.c (re_string_reconstruct) [!RE_ENABLE_I18N]: * posix/regexec.c (check_arrival_add_next_nodes) [!RE_ENABLE_I18N]: Avoid unused variable. --- ChangeLog | 7 +++++++ posix/regex_internal.c | 2 +- posix/regexec.c | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 14950fe373..b296ec0ad6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-12-22 Eric Blake + + Avoid gcc warnings on cygwin + * posix/regex_internal.c (re_string_reconstruct) [!RE_ENABLE_I18N]: + * posix/regexec.c (check_arrival_add_next_nodes) [!RE_ENABLE_I18N]: + Avoid unused variable. + 2017-12-22 Florian Weimer * io/Makefile (routines): Add copy_file_range. diff --git a/posix/regex_internal.c b/posix/regex_internal.c index a97f703bc7..705d6a4c73 100644 --- a/posix/regex_internal.c +++ b/posix/regex_internal.c @@ -681,10 +681,10 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) } 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/posix/regexec.c b/posix/regexec.c index 95e31d3f80..4cf1eeafc5 100644 --- a/posix/regexec.c +++ b/posix/regexec.c @@ -2988,7 +2988,9 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx, 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) -- 2.14.3