From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: master 7cd8236d35c: Pacify --enable-gcc-warnings with emacs_fdopen Date: Mon, 7 Aug 2023 21:29:39 -0700 Organization: UCLA Computer Science Department Message-ID: <58cd037d-adc1-2e00-9619-17f1ec94a222@cs.ucla.edu> References: <169142519253.1072.8984157919028661320@vcs2.savannah.gnu.org> <20230807161952.C6FF1C038B9@vcs2.savannah.gnu.org> <87tttaz6hc.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------7niuGY3U6010xfkEGbeQbcKQ" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30665"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: Po Lu , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 08 06:30:35 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qTEMc-0007oP-SQ for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Aug 2023 06:30:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTELs-0003ZY-Vk; Tue, 08 Aug 2023 00:29:49 -0400 Original-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 1qTELr-0003ZH-4r for emacs-devel@gnu.org; Tue, 08 Aug 2023 00:29:47 -0400 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTELo-0001fe-OZ for emacs-devel@gnu.org; Tue, 08 Aug 2023 00:29:46 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id B81D33C011BD5; Mon, 7 Aug 2023 21:29:42 -0700 (PDT) Original-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 gMppRAxkg1cF; Mon, 7 Aug 2023 21:29:41 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 687E83C011BD8; Mon, 7 Aug 2023 21:29:41 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 687E83C011BD8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1691468981; bh=ztGO8VB7WB4R2p3PZtX8b/Sb4DPXUllwXZMLYdllx74=; h=Message-ID:Date:MIME-Version:To:From; b=Ds6LOaalrWB2FkWjr6cadV8R+pPbEkNCOAYc6/eLg6OZ+mBh4j9PtagNzIcoTJ0sc x4ir17FEUMlQaTiMI3t1AY34+yISjyoBWfMfeQ0Mj3RMMpkhlYQkikN2VsLLax4Z72 1/80Qv+e02yITJkv35o/Wx95OOKZ++951NAxeROu7WVmotKwe8TL7I6Vzj3ZmUdiLH F1Y+8kSH1nRFKRzMcPQ/SDhHZn4kGKz9rgsOqyC0k+yhoTaVFMdTa0bpreqpOTijsf 5G4jbPXLWu2bsF5DYxuclHy+PRJJvEP48p4xG1YBpg1rtiqw3rxJ7kNJZS1LHO40QP gVDS6RoNKTSSA== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Original-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 1vo8yM_eszPj; Mon, 7 Aug 2023 21:29:41 -0700 (PDT) Original-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 443CC3C011BD5; Mon, 7 Aug 2023 21:29:41 -0700 (PDT) Content-Language: en-US In-Reply-To: <87tttaz6hc.fsf@yahoo.com> Received-SPF: pass client-ip=131.179.128.66; envelope-from=eggert@cs.ucla.edu; helo=mail.cs.ucla.edu X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, NICE_REPLY_A=-1.809, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:308429 Archived-At: This is a multi-part message in MIME format. --------------7niuGY3U6010xfkEGbeQbcKQ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2023-08-07 18:07, Po Lu wrote: > now I receive warnings during the automated daily build of > the Android port: >=20 > ../../emacs/src/xfaces.c: In function =E2=80=98Fx_load_color_file=E2=80= =99: > ../../emacs/src/xfaces.c:7007:7: warning: =E2=80=98emacs_fclose=E2=80=99= called on pointer returned from a mismatched allocation function [-Wmism= atched-dealloc] > 7007 | emacs_fclose (fp); > | ^~~~~~~~~~~~~~~~~ > ../../emacs/src/xfaces.c:6984:8: note: returned from =E2=80=98emacs_fop= en=E2=80=99 > 6984 | fp =3D emacs_fopen (SSDATA (abspath), "r" FOPEN_TEXT); I gave a shot at fixing that by installing the attached. It works for me=20 on Fedora 38, but then again the old version worked too. If this doesn't=20 work on Android, it might help to send the preprocessed output. By the way, I see lisp.h includes stdio.h now. Would it make sense to=20 create a new include file for use only by the parts of Emacs that need=20 to deal with stdio streams? We could move some of the stuff out of=20 lisp.h, which is bulging a bit at the seams nowadays. --------------7niuGY3U6010xfkEGbeQbcKQ Content-Type: text/x-patch; charset=UTF-8; name="0001-Fix-some-emacs_fopen-confusion.patch" Content-Disposition: attachment; filename="0001-Fix-some-emacs_fopen-confusion.patch" Content-Transfer-Encoding: base64 RnJvbSA4NWI2YzE1MGM4YTM1NmViZjM0NDJmZGUyODM2MzY0OTU0YWE5MzhjIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBNb24sIDcgQXVnIDIwMjMgMjE6MjM6MjggLTA3MDAKU3ViamVjdDogW1BBVENI XSBGaXggc29tZSBlbWFjc19mb3BlbiBjb25mdXNpb24KTUlNRS1WZXJzaW9uOiAxLjAKQ29u dGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PVVURi04CkNvbnRlbnQtVHJhbnNmZXIt RW5jb2Rpbmc6IDhiaXQKClByb2JsZW0gcmVwb3J0ZWQgYnkgUG8gTHUgaW46Cmh0dHBzOi8v bGlzdHMuZ251Lm9yZy9yL2VtYWNzLWRldmVsLzIwMjMtMDgvbXNnMDAxOTUuaHRtbAoqIHNy Yy9jb21wLmMgKGNvbXBfaGFzaF9zb3VyY2VfZmlsZSwgRmNvbXBfX3JlbGVhc2VfY3R4dCk6 Ciogc3JjL3N5c2RlcC5jIChnZXRfdXBfdGltZSwgcHJvY2ZzX3R0eW5hbWUsIHByb2Nmc19n ZXRfdG90YWxfbWVtb3J5KToKQmU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