From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 14 18:58:29 2023 Received: (at submit) by debbugs.gnu.org; 14 Sep 2023 22:58:29 +0000 Received: from localhost ([127.0.0.1]:41438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgvI4-0007aI-Hw for submit@debbugs.gnu.org; Thu, 14 Sep 2023 18:58:28 -0400 Received: from lists.gnu.org ([2001:470:142::17]:57400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgti7-0007r7-TB for submit@debbugs.gnu.org; Thu, 14 Sep 2023 17:17:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgths-0000oI-K0 for bug-diffutils@gnu.org; Thu, 14 Sep 2023 17:17:02 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgthq-0006wK-Fd for bug-diffutils@gnu.org; Thu, 14 Sep 2023 17:17:00 -0400 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 55FA172C8E4 for ; Fri, 15 Sep 2023 00:16:55 +0300 (MSK) Received: from localhost (localhost.localdomain [127.0.0.1]) by imap.altlinux.org (Postfix) with ESMTP id 3209536D00B7; Fri, 15 Sep 2023 00:16:55 +0300 (MSK) From: Gleb Fotengauer-Malinovskiy To: bug-diffutils@gnu.org Subject: [PATCH] diff: fix regression affecting the counting of diff context lines Date: Thu, 14 Sep 2023 21:16:51 +0000 Message-Id: <20230914211651.1435649-1-glebfm@altlinux.org> X-Mailer: git-send-email 2.33.8 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=194.107.17.57; envelope-from=glebfm@altlinux.org; helo=vmicros1.altlinux.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 14 Sep 2023 18:58:25 -0400 Cc: Gleb Fotengauer-Malinovskiy 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: -0.1 (/) This regression was introduced on 2023-05-22 in commit v3.10-9-gda1697dcb6 ("diff: C99 decl style in context.c") during a code style change. This regression was discovered using the GNU patch testsuite: FAIL: preserve-c-function-names FAIL: reject-format * src/context.c (minus_prefix_lines): Initialize with a reversed value. Tiny-change: yes --- src/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/context.c b/src/context.c index 8ee49ae961..34f046384c 100644 --- a/src/context.c +++ b/src/context.c @@ -186,7 +186,7 @@ pr_context_hunk (struct change *hunk) /* Include a context's width before and after. */ - lin minus_prefix_lines = curr.file[0].prefix_lines; + lin minus_prefix_lines = - curr.file[0].prefix_lines; first0 = MAX (first0 - context, minus_prefix_lines); first1 = MAX (first1 - context, minus_prefix_lines); if (last0 < curr.file[0].valid_lines - context) -- glebfm From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 15 22:44:56 2023 Received: (at 65984-done) by debbugs.gnu.org; 16 Sep 2023 02:44:56 +0000 Received: from localhost ([127.0.0.1]:45136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhLIm-0002dJ-0i for submit@debbugs.gnu.org; Fri, 15 Sep 2023 22:44:56 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:58324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhLIg-0002d1-Ea for 65984-done@debbugs.gnu.org; Fri, 15 Sep 2023 22:44:54 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 146E53C00F586; Fri, 15 Sep 2023 19:44:37 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id xmg9k-s3axTP; Fri, 15 Sep 2023 19:44:36 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id BBC793C00D186; Fri, 15 Sep 2023 19:44:36 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu BBC793C00D186 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1694832276; bh=D6EE9//K+ID7no33QklLF+ly32zSzXB/Xi7wTJP3t70=; h=Message-ID:Date:MIME-Version:To:From; b=eFzVGuOaiTepCdTvQC5pLegoYuOXPoqQVPiuow6M9c3+wPh4VX4ipYp2jwn2Q7zrO a7VoT7Uvpz9/SqQCAkg9KEIsEj8s5HdF833NDEefjTMTky5VzxH5vTIevpCrm2pdE3 NhiCeKS282hqcrm+F1hCF05tXhLG5WArdy8uYK4H17MzfiZ76MmMm6OSeLJQ5FLi+i 8Ft6lJKJ30guvfW65acVXIe1NJmXTkkJ6jEHvzY++3W73jVp883DkC+ZvL5glFi+y5 qGh+VMEuWdJ6CB7ZjocRE0HLK1LKJa3uFPGH/hjoDjwWnX8UDc5zLoo7o8z7kTo0zo 5FbNXNPr24uuw== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id V45UNFezikpi; Fri, 15 Sep 2023 19:44:36 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 943123C00F586; Fri, 15 Sep 2023 19:44:36 -0700 (PDT) Message-ID: Date: Fri, 15 Sep 2023 19:44:36 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: PATCH] diff: fix regression affecting the counting of diff context lines Content-Language: en-US To: Gleb Fotengauer-Malinovskiy References: <20230914211651.1435649-1-glebfm@altlinux.org> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <20230914211651.1435649-1-glebfm@altlinux.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 65984-done Cc: 65984-done@debbugs.gnu.org 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: -2.5 (--) Thanks for the fix. I installed it on Savannah. From unknown Wed Jun 18 00:23:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 14 Oct 2023 11:24:12 +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