unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Moreton <andrewjmoreton@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Warnings in mingw64 build on emacs-28 branch
Date: Sun, 07 Nov 2021 19:41:51 +0000	[thread overview]
Message-ID: <86tugnlpmo.fsf@gmail.com> (raw)
In-Reply-To: 86zgqflu0g.fsf@gmail.com

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






  reply	other threads:[~2021-11-07 19:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-07 14:46 Warnings in mingw64 build on emacs-28 branch Andy Moreton
2021-11-07 15:05 ` Eli Zaretskii
2021-11-07 15:51   ` Óscar Fuentes
2021-11-07 18:39     ` Eli Zaretskii
2021-11-07 19:25       ` Óscar Fuentes
2021-11-07 19:30         ` Eli Zaretskii
2021-11-07 19:57           ` Óscar Fuentes
2021-11-07 20:02             ` Eli Zaretskii
2021-11-07 18:07   ` Andy Moreton
2021-11-07 19:41     ` Andy Moreton [this message]
2021-11-07 19:59       ` Eli Zaretskii
2021-11-07 20:55         ` Andy Moreton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86tugnlpmo.fsf@gmail.com \
    --to=andrewjmoreton@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).