emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 7cd8236d35c: Pacify --enable-gcc-warnings with emacs_fdopen


From: Paul Eggert
Subject: Re: master 7cd8236d35c: Pacify --enable-gcc-warnings with emacs_fdopen
Date: Mon, 7 Aug 2023 21:29:39 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 2023-08-07 18:07, Po Lu wrote:

now I receive warnings during the automated daily build of
the Android port:

../../emacs/src/xfaces.c: In function ‘Fx_load_color_file’:
../../emacs/src/xfaces.c:7007:7: warning: ‘emacs_fclose’ called on pointer 
returned from a mismatched allocation function [-Wmismatched-dealloc]
  7007 |       emacs_fclose (fp);
       |       ^~~~~~~~~~~~~~~~~
../../emacs/src/xfaces.c:6984:8: note: returned from ‘emacs_fopen’
  6984 |   fp = emacs_fopen (SSDATA (abspath), "r" FOPEN_TEXT);

I gave a shot at fixing that by installing the attached. It works for me on Fedora 38, but then again the old version worked too. If this doesn't 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 create a new include file for use only by the parts of Emacs that need to deal with stdio streams? We could move some of the stuff out of lisp.h, which is bulging a bit at the seams nowadays.

Attachment: 0001-Fix-some-emacs_fopen-confusion.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]