From unknown Sat Jun 21 03:14:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#51503 <51503@debbugs.gnu.org> To: bug#51503 <51503@debbugs.gnu.org> Subject: Status: [PATCH 1/1] Silly patch to avoid some gcc 11.2 warnings Reply-To: bug#51503 <51503@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:14:18 +0000 retitle 51503 [PATCH 1/1] Silly patch to avoid some gcc 11.2 warnings reassign 51503 grep submitter 51503 Duncan Roe severity 51503 normal tag 51503 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 30 06:16:56 2021 Received: (at submit) by debbugs.gnu.org; 30 Oct 2021 10:16:56 +0000 Received: from localhost ([127.0.0.1]:56658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mglPy-0001i1-IO for submit@debbugs.gnu.org; Sat, 30 Oct 2021 06:16:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:52644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgjvh-0007Xw-SW for submit@debbugs.gnu.org; Sat, 30 Oct 2021 04:41:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgjvh-0007Ze-L2 for bug-grep@gnu.org; Sat, 30 Oct 2021 04:41:33 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:40711) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgjvc-000511-Ux for bug-grep@gnu.org; Sat, 30 Oct 2021 04:41:33 -0400 Received: by mail-pg1-x52b.google.com with SMTP id a9so1671215pgg.7 for ; Sat, 30 Oct 2021 01:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6mtP3YDogRzyIjns3fsxisCdCrvb+OsqH3ojdYXeQZs=; b=KG658wIh+E0Z8a1XJuIl/F9Vq9Y+WAVQLuu+07AlVihkaEUirFy5OILCUMfY1eKmyA EwX4Zi4LheWrqb4D6FrbQH9oFVCHkPEVQK27Lo8ZcixrCCfBFzt7h27y98ggWRGpSTWl NfTYN9UCc2gnL1mUSE8TIg/nbpRzp7Q0L6of7sVjkbb3eMoup3zroN90zlZaGBNKvOma 1K3VCnwSK+oJjq4DR86IjRRoDZm5+YTYrCFDFJQ0u/gSwYPqUW/dfm59PtJE5Ilbtcev c5iQNQjndvVqZCND7AJtO18l+/SwXMbG9G5uDeIqrOE3TEa6RPGjLafgFevQ9Q+FGW/3 9mNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6mtP3YDogRzyIjns3fsxisCdCrvb+OsqH3ojdYXeQZs=; b=UlEkFRp0MoENL5QVd90Y+efvvfbNP/a0mYQrk3Re737LApskj3Gd76fCPNhM78GYnw LxjCLJHKf4TuL25A1rNfLfZt3mHloH2dv3cxVZ1lQCsfRutXPE5a4VIO5ZfIMyPF5HH0 u7xiJDmjcF67Hl0OCZTFtfA5MOK/42PIAZmCwLf5Glu+x/r5/pOUTFuz7vVSEtVJ5gaK QCyNLA+0Q+UgxLyBX4ByNxBpNbOTKoyOJnLgDk0vJhLuBPI6mjVouq5qUDqxbn5kvYeJ q9RrHNQDsvepEyRJtUGv/U3c/HwyQ6bpPSgFisMQyT1v+KwwdCo+ApXOUEkCk9imfYNM KpRQ== X-Gm-Message-State: AOAM532CdKAbfcqaEkZxtHY9SmqYx1RMUds8d2Iv+EhJK++wM6ydMEny sIKRhX1aYupEtLTCkl9sPxew2GHZhp8= X-Google-Smtp-Source: ABdhPJxcdgJTJEMWgEwXWlOInUVk9o8ZME/yFQlLTkOY1yGMt8dt22/dwn5XIraSXDBhZcAgLuxbTQ== X-Received: by 2002:a05:6a00:1a47:b0:47c:2da4:15b1 with SMTP id h7-20020a056a001a4700b0047c2da415b1mr15996367pfv.63.1635583287242; Sat, 30 Oct 2021 01:41:27 -0700 (PDT) Received: from slk1.local.net (n110-23-108-30.sun3.vic.optusnet.com.au. [110.23.108.30]) by smtp.gmail.com with ESMTPSA id 125sm8974378pfv.155.2021.10.30.01.41.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Oct 2021 01:41:26 -0700 (PDT) From: Duncan Roe To: bug-grep@gnu.org Subject: [PATCH 1/1] Silly patch to avoid some gcc 11.2 warnings Date: Sat, 30 Oct 2021 19:40:26 +1100 Message-Id: <20211030084026.21464-2-duncan_roe@optusnet.com.au> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211030084026.21464-1-duncan_roe@optusnet.com.au> References: <20211030084026.21464-1-duncan_roe@optusnet.com.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=duncan.roe2@gmail.com; helo=mail-pg1-x52b.google.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 30 Oct 2021 06:16:53 -0400 Cc: duncan.roe2@gmail.com, Duncan Roe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.6 (-) DO NOT APPLY THIS PATCH. The patch is to highlight code constructs that gcc can't analyse adequately. Signed-off-by: Duncan Roe --- lib/exclude.c | 9 +++++++-- lib/fts.c | 2 +- lib/regex_internal.c | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/exclude.c b/lib/exclude.c index 417ab23d1..cf9a17bb1 100644 --- a/lib/exclude.c +++ b/lib/exclude.c @@ -676,7 +676,7 @@ add_exclude_file (void (*add_func) (struct exclude *, char const *, int), { bool use_stdin = file_name[0] == '-' && !file_name[1]; FILE *in; - int rc = 0; + int rc = 0, rc2; if (use_stdin) in = stdin; @@ -685,7 +685,12 @@ add_exclude_file (void (*add_func) (struct exclude *, char const *, int), rc = add_exclude_fp (call_addfn, ex, in, options, line_end, &add_func); - if (!use_stdin && fclose (in) != 0) + if (use_stdin) + return rc; + + rc2 = fclose (in); + + if (rc2) rc = -1; return rc; diff --git a/lib/fts.c b/lib/fts.c index 31ff21d00..54f29e99b 100644 --- a/lib/fts.c +++ b/lib/fts.c @@ -1494,7 +1494,7 @@ mem1: saved_errno = errno; /* Build a file name for fts_stat to stat. */ if (ISSET(FTS_NOCHDIR)) { p->fts_accpath = p->fts_path; - memmove(cp, p->fts_name, p->fts_namelen + 1); + if(cp)memmove(cp, p->fts_name, p->fts_namelen + 1); } else p->fts_accpath = p->fts_name; diff --git a/lib/regex_internal.c b/lib/regex_internal.c index aefcfa2f5..0ace61cc9 100644 --- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -984,7 +984,7 @@ re_node_set_init_1 (re_node_set *set, Idx elem) set->alloc = 1; set->nelem = 1; set->elems = re_malloc (Idx, 1); - if (__glibc_unlikely (set->elems == NULL)) + if (set->elems == NULL) { set->alloc = set->nelem = 0; return REG_ESPACE; @@ -999,7 +999,7 @@ re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2) { set->alloc = 2; set->elems = re_malloc (Idx, 2); - if (__glibc_unlikely (set->elems == NULL)) + if (set->elems == NULL) return REG_ESPACE; if (elem1 == elem2) { @@ -1032,7 +1032,7 @@ re_node_set_init_copy (re_node_set *dest, const re_node_set *src) { dest->alloc = dest->nelem; dest->elems = re_malloc (Idx, dest->alloc); - if (__glibc_unlikely (dest->elems == NULL)) + if (dest->elems == NULL) { dest->alloc = dest->nelem = 0; return REG_ESPACE; -- 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 01 01:39:10 2021 Received: (at control) by debbugs.gnu.org; 1 Nov 2021 05:39:10 +0000 Received: from localhost ([127.0.0.1]:33543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhQ2I-0000II-Hg for submit@debbugs.gnu.org; Mon, 01 Nov 2021 01:39:10 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:51442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhQ2H-0000I5-QS for control@debbugs.gnu.org; Mon, 01 Nov 2021 01:39:10 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 568391600BB for ; Sun, 31 Oct 2021 22:39:04 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id woOxa9yQS2Oe for ; Sun, 31 Oct 2021 22:39:03 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BFAD31600B8 for ; Sun, 31 Oct 2021 22:39:03 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kqPOxbJuVG8b for ; Sun, 31 Oct 2021 22:39:03 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9E6B716005C for ; Sun, 31 Oct 2021 22:39:03 -0700 (PDT) Message-ID: <1b904893-fc12-cf11-6c43-14f66bfe583c@cs.ucla.edu> Date: Sun, 31 Oct 2021 22:39:03 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Content-Language: en-US To: control@debbugs.gnu.org From: Paul Eggert Subject: close 51503 Organization: UCLA Computer Science Department Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 51503 From unknown Sat Jun 21 03:14:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 29 Nov 2021 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator