emacs-devel
[Top][All Lists]
Advanced

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

Re: Warnings in mingw64 builds on master


From: Eli Zaretskii
Subject: Re: Warnings in mingw64 builds on master
Date: Sat, 15 Aug 2020 22:03:42 +0300

> From: Andy Moreton <andrewjmoreton@gmail.com>
> Date: Sat, 15 Aug 2020 19:48:56 +0100
> 
> >> C:/emacs/git/emacs/master/src/w32reg.c:146:1: warning: function might be
> >> candidate for attribute 'malloc' [-Wsuggest-attribute=malloc]
> >>   146 | w32_get_string_resource (void *v_rdb, const char *name, const char 
> >> *class)
> >>       | ^~~~~~~~~~~~~~~~~~~~~~~
> >
> > That's just noise.  There's nothing wrong with the code.
> 
> Agreed. However it is better to have a clean build than to have
> pointless warnings, so the real errors stand out.

I'd rather we removed -Wsuggest-attribute=malloc from the options we
use.
> >> C:/emacs/git/emacs/master/src/w32.c: In function '_sys_read_ahead':
> >> C:/emacs/git/emacs/master/src/w32.c:8785:10: warning: 'rc' may be used 
> >> uninitialized in this function [-Wmaybe-uninitialized]
> >>  8785 |   if (rc == sizeof (char))
> >>       |       ~~~^~~~~~~~~~~~~~~~
> >
> > This is a bug in the compiler you are using: rc _is_ initialized.
> 
> The is "gcc version 10.2.0 (Rev1, Built by MSYS2 project)" so not
> exactly old.

Let's hope GCC 10.3 will fix this.



reply via email to

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