[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warnings in mingw64 builds on master
From: |
Óscar Fuentes |
Subject: |
Re: Warnings in mingw64 builds on master |
Date: |
Sat, 15 Aug 2020 22:36:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> 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.
I'm half-asleep, so excuse me if I'm missing the obvious... but rc is
assigned or its address taken within conditional blocks, so if none of
those conditions are true, rc is not initialized at the warning site.
- Warnings in mingw64 builds on master, Andy Moreton, 2020/08/15
- Re: Warnings in mingw64 builds on master, Eli Zaretskii, 2020/08/15
- Re: Warnings in mingw64 builds on master, Andy Moreton, 2020/08/15
- Re: Warnings in mingw64 builds on master, Eli Zaretskii, 2020/08/15
- Re: Warnings in mingw64 builds on master, Andy Moreton, 2020/08/15
- Re: Warnings in mingw64 builds on master,
Óscar Fuentes <=
- Re: Warnings in mingw64 builds on master, Eli Zaretskii, 2020/08/15
- Re: Warnings in mingw64 builds on master, Andy Moreton, 2020/08/16
- Re: Warnings in mingw64 builds on master, Eli Zaretskii, 2020/08/16
- Re: Warnings in mingw64 builds on master, Óscar Fuentes, 2020/08/16
- Re: Warnings in mingw64 builds on master, Eli Zaretskii, 2020/08/16
- Re: Warnings in mingw64 builds on master, Óscar Fuentes, 2020/08/16
- Re: Warnings in mingw64 builds on master, Paul Eggert, 2020/08/15
- Re: Warnings in mingw64 builds on master, Eli Zaretskii, 2020/08/15
- Re: Warnings in mingw64 builds on master, Paul Eggert, 2020/08/16
- Re: Warnings in mingw64 builds on master, Eli Zaretskii, 2020/08/16