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 22:20:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (windows-nt)

On Tue 14 Aug 2018, Andy Moreton wrote:

> 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);
>             ~~~~~~~~~~

There is also one function cast warning from gnulib code:

C:/emacs/git/emacs/master/lib/gettimeofday.c: In function 'initialize':
C:/emacs/git/emacs/master/lib/gettimeofday.c:48:9: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'void 
(*)(FILETIME *)' {aka 'void (*)(struct _FILETIME *)'} [-Wcast-function-type]
         (GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, 
"GetSystemTimePreciseAsFileTime");
         ^




reply via email to

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