[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warnings in mingw64 builds on master
From: |
Andy Moreton |
Subject: |
Re: Warnings in mingw64 builds on master |
Date: |
Sat, 15 Aug 2020 19:48:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt) |
On Sat 15 Aug 2020, Eli Zaretskii wrote:
>> From: Andy Moreton <andrewjmoreton@gmail.com>
>> Date: Fri, 14 Aug 2020 23:37:27 +0100
>>
>> Building master for 64bit mingw64 gives the following warnings:
>>
>> 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.
>> C:/emacs/git/emacs/master/src/w32menu.c: In function 'set_frame_menubar':
>> C:/emacs/git/emacs/master/src/w32menu.c:326:2: warning: 'memcpy' offset [3,
>> 10] from the object at '<unknown>' is out of the bounds of referenced
>> subobject 'contents' with type 'union Lisp_X *[]' at offset 3
>> [-Warray-bounds]
>> 326 | memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents,
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 327 | previous_menu_items_used * word_size);
>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from C:/emacs/git/emacs/master/src/w32menu.c:26:
>> C:/emacs/git/emacs/master/src/lisp.h:1631:17: note: subobject 'contents'
>> declared here
>> 1631 | Lisp_Object contents[FLEXIBLE_ARRAY_MEMBER];
>> | ^~~~~~~~
>
> Likewise.
>
>> 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. More silly warnings that it would be better to disable.
>> C:/emacs/git/emacs/master/src/image.c:116: warning: macro "PIX_MASK_DRAW" is
>> not used [-Wunused-macros]
>> 116 | #define PIX_MASK_DRAW 1
>> |
>
> This macro is used in the PNG code. Are you building without PNG
> support?
Yes, as the native image support handles PNG.
>> These must have been introduced fairly recently, as the build was clean
>> earlier this year.
>
> Actually, this code was not touched in years, so I'm guessing you
> upgraded to a later version of the compiler lately.
Yes - it is whatever is current in in the MSYS distro.
AndyM
- 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 <=
- 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, 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/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