emacs-devel
[Top][All Lists]
Advanced

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

Re: New warnings on emacs-26 branch with gcc 8.2.0


From: Andy Moreton
Subject: Re: New warnings on emacs-26 branch with gcc 8.2.0
Date: Tue, 14 Aug 2018 13:59:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

On Sat 11 Aug 2018, Eli Zaretskii wrote:

>> From: Andy Moreton <address@hidden>
>> Date: Sat, 11 Aug 2018 20:04:26 +0100
>> 
>> >> Or maybe we should introduce our ownj get_proc_address, which returns
>> >> a (void (*)(void)) pointer.  But that's not for emacs-26, sorry.
>
> Yes, that's what I had in mind, just with a comment explaining why we
> need to jump through that particular hoop.

The attached patch fixes the -Wcast-function-type warnings when building
on Windows MSYS2 64bit (GCC 8.2.0) with "-Og". Theere is one remaining
compiler warning:

C:/emacs/git/emacs/master/src/w32fns.c: In function 'Fw32_read_registry':
C:/emacs/git/emacs/master/src/w32fns.c:10142:21: warning: 'rootkey' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
   Lisp_Object val = w32_read_registry (NILP (root)
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            ? HKEY_CURRENT_USER
            ~~~~~~~~~~~~~~~~~~~
            : rootkey,
            ~~~~~~~~~~
            key, name);
            ~~~~~~~~~~


Attachment: cast-function-type-warning.patch
Description: Text Data


reply via email to

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