all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: emacs-devel@gnu.org
Subject: Re: Warnings in mingw64 build on emacs-28 branch
Date: Sun, 07 Nov 2021 22:02:35 +0200	[thread overview]
Message-ID: <83sfw77mzo.fsf@gnu.org> (raw)
In-Reply-To: <87ee7rg2ml.fsf@telefonica.net> (message from Óscar Fuentes on Sun, 07 Nov 2021 20:57:38 +0100)

> From: Óscar Fuentes <ofv@wanadoo.es>
> Date: Sun, 07 Nov 2021 20:57:38 +0100
> 
> > I don't understand why the compiler thinks the object must be
> > initialized for its pointer to be valid.  Does the compiler assume
> > something about what VirtualQuery does?  Why does it think the
> > function will dereference the pointer?
> 
> The warning says "may be used uninitialized". The compiler doesn't know,
> it sees something suspicious and speaks up. That's with -Wall, without
> it, the compiler remains silent.
> 
> I guess the MinGW headers should be annotated with whatever decoration
> gcc uses to convey that the pointer is not dereferenced.
> 
> Or we can initialize `m' to zero, which will silence the warning and is
> a good practice in general when working with the Windows API.

I actually tend to think that this is a compiler bug that should be
reported to the GCC folks.



  reply	other threads:[~2021-11-07 20:02 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 [this message]
2021-11-07 18:07   ` Andy Moreton
2021-11-07 19:41     ` Andy Moreton
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

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

  git send-email \
    --in-reply-to=83sfw77mzo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ofv@wanadoo.es \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.