From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Warnings in mingw64 build on emacs-28 branch Date: Sun, 07 Nov 2021 22:02:35 +0200 Message-ID: <83sfw77mzo.fsf@gnu.org> References: <86y260c9b8.fsf@gmail.com> <83fss880qc.fsf@gnu.org> <87r1bsezfn.fsf@telefonica.net> <8335o795e6.fsf@gnu.org> <87ilx3g44e.fsf@telefonica.net> <83y25z7oh6.fsf@gnu.org> <87ee7rg2ml.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36724"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?Q?=C3=93scar?= Fuentes Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 07 21:04:47 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjoPH-0009Hc-1I for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Nov 2021 21:04:47 +0100 Original-Received: from [::1] (port=49354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjoPF-0006b2-KJ for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Nov 2021 15:04:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjoNL-0004vc-Rr for emacs-devel@gnu.org; Sun, 07 Nov 2021 15:02:52 -0500 Original-Received: from [2001:470:142:3::e] (port=54640 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjoNK-0002Tb-Lm; Sun, 07 Nov 2021 15:02:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=dgiKTBypFVI5oqXbCkqqq7EItJ/hzzM55twuz3qfPWU=; b=WO01PMnfqXKw6oP+wPXn 2QXv6o/+wiNjfU/QDrpwp8Af/6I2zDeZ+gnnNCUhp7uhFUEVwAKnRX5A8Jd0EWkzxzwYq10rKqRM0 1Et2JmTeW90b/e5OKc++QhFB1xcUcN8qYmff5k8XTYDMTkM+T9ae3sMfNmlI6BV8bnD+LIe5J/PYc VTLbdwAZnIvApD2jYewgXzSxl2vLyXuAIFwi7T4Drw9lIf5J78+TgXKbyC0uAW6RFdx4JCwUcD4dx JsmDxU81y4PksTkRBlaGjwDkuZD4nss4Y93HO5GtGid5Ah6G9MrAkooH+eOCY3D1npC3a3Dp7750v 9FKK9KSamqrDwQ==; Original-Received: from [87.69.77.57] (port=4804 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjoNK-0003PD-7S; Sun, 07 Nov 2021 15:02:46 -0500 In-Reply-To: <87ee7rg2ml.fsf@telefonica.net> (message from =?utf-8?Q?=C3=93scar?= Fuentes on Sun, 07 Nov 2021 20:57:38 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:278984 Archived-At: > From: Óscar Fuentes > 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.