[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warnings in mingw64 build on emacs-28 branch
From: |
Andy Moreton |
Subject: |
Re: Warnings in mingw64 build on emacs-28 branch |
Date: |
Sun, 07 Nov 2021 19:41:51 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt) |
On Sun 07 Nov 2021, Andy Moreton wrote:
> On Sun 07 Nov 2021, Eli Zaretskii wrote:
>
>>> From: Andy Moreton <andrewjmoreton@gmail.com>
>>> Date: Sun, 07 Nov 2021 14:46:51 +0000
>>>
>>> 1) In w32.h, "prepare_standard_handles" and "reset_standard_handles"
>>> have "HANDLE handles[4]" argument, but the handle array has 3 elements
>>> in the definitions and callers.
>>
>> I hope I fixed this now.
>
> Yes, thanks.
>
>>> 2) This warning has been present for a long time, and seems to be
>>> confusion over the flexible array handling.
>>
>> I'm not sure what this is about. We use memcpy to copy from a Lisp
>> vector's contents in gazillion other places, and I understand they
>> don't cause any warnings? How is this place different?
>
> No idea. I think this may have been discussed previously, but I cannot
> find it in the mail archives. xvector_contents_addr in lisp.h mentions
> gcc bug 95072 (filed by Paul Eggert with a similar code example).
>
> Should this be using xvector_contents or vcopy to placate this warning ?
In set_frame_menubar from w32menu.c, this shows the warning:
memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents,
previous_menu_items_used * word_size);
...and this placates the compiler:
memcpy (previous_items, xvector_contents (f->menu_bar_vector),
previous_menu_items_used * word_size);
- Warnings in mingw64 build on emacs-28 branch, Andy Moreton, 2021/11/07
- Re: Warnings in mingw64 build on emacs-28 branch, Eli Zaretskii, 2021/11/07
- Re: Warnings in mingw64 build on emacs-28 branch, Óscar Fuentes, 2021/11/07
- Re: Warnings in mingw64 build on emacs-28 branch, Eli Zaretskii, 2021/11/07
- Re: Warnings in mingw64 build on emacs-28 branch, Óscar Fuentes, 2021/11/07
- Re: Warnings in mingw64 build on emacs-28 branch, Eli Zaretskii, 2021/11/07
- Re: Warnings in mingw64 build on emacs-28 branch, Óscar Fuentes, 2021/11/07
- Re: Warnings in mingw64 build on emacs-28 branch, Eli Zaretskii, 2021/11/07
Re: Warnings in mingw64 build on emacs-28 branch, Andy Moreton, 2021/11/07