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 win32 builds from trunk Date: Sun, 03 Apr 2022 09:17:29 +0300 Message-ID: <831qye4rnq.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24243"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Corwin Brust Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 03 08:19:57 2022 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 1natae-000673-Mo for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Apr 2022 08:19:56 +0200 Original-Received: from localhost ([::1]:48360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1natad-00080z-1K for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Apr 2022 02:19:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1natYK-0007E6-JK for emacs-devel@gnu.org; Sun, 03 Apr 2022 02:17:32 -0400 Original-Received: from [2001:470:142:3::e] (port=60484 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 1natYK-0006lK-26; Sun, 03 Apr 2022 02:17:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=b/XgHjWD57z2tNvEmhKWcxErau0RswCgInXpzf9GurY=; b=HyHtmcq0Soe1 wFICN15cFMM3ZCm68qUxVORuBPeihbuLairnAq0GH0W5JzAH/jf1Bq8EuFx3SbOmjmzaE6+dAyfbi yGYcn887QRE3crctBdH7td05LOqlWFhKypNAg5ezaOqHi16Koy/U4g2vCelwwO86wLNzd6M7FadKx yv1DTkWoSZwKkDHtnl/fN9+YkagpGbp6hcgZao+9vMf02aAduwnxDkLFGmF7tEdvjGn+RCEYIsW1Z CqnFP6YuW0QdqhAObnm9um1lgMQU881Cm5N1FIKvTv0EksvcNbwxbmbhuwfaMQyQ85wTgqAkegSed iVLen2MRoKlD+VEG23FU8A==; Original-Received: from [87.69.77.57] (port=3226 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 1natYJ-0005WJ-HX; Sun, 03 Apr 2022 02:17:31 -0400 In-Reply-To: (message from Corwin Brust on Sat, 2 Apr 2022 18:33:27 -0500) 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:287729 Archived-At: > From: Corwin Brust > Date: Sat, 2 Apr 2022 18:33:27 -0500 > > Attempting to build a snapshot from the master branch today I noticed > some warnings. Here they are; please let me know if there's else I > might helpfully do to troubleshoot/debug these (e.g. open a bug > report). Please file a bug report for each one of them. > In file included from C:/Users/corwi/emacs-build/git/master/src/process.c:33: > C:/Users/corwi/emacs-build/git/master/src/process.c: In function > 'Fmake_process': > C:/Users/corwi/emacs-build/git/master/src/lisp.h:1649:31: warning: > null pointer dereference [-Wnull-dereference] > 1649 | return XSTRING (string)->u.s.data; > | ~~~~~~~~~~~~~~~~~~~~~^~~~~ Line 1649 of lisp.h is inside SDATA. But since Fmake_process doesn't call SDATA directly, I don't know which string object is this about. (Really, the compiler should do a better job when reporting such issues, by showing all the relevant source locations.) > C:/Users/corwi/emacs-build/git/master/src/w32menu.c: In function > 'set_frame_menubar': > C:/Users/corwi/emacs-build/git/master/src/w32menu.c:324:9: warning: > 'memcpy' offset [3, 10] from the object at '' is out of the > bounds of referenced subobject 'contents' with type 'struct Lisp_X > *[]' at offset 3 [-Warray-bounds] > 324 | memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 325 | previous_menu_items_used * word_size); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from C:/Users/corwi/emacs-build/git/master/src/w32menu.c:26: > C:/Users/corwi/emacs-build/git/master/src/lisp.h:1725:17: note: > subobject 'contents' declared here > 1725 | Lisp_Object contents[FLEXIBLE_ARRAY_MEMBER]; > | ^~~~~~~~ This is some general problem with FLEXIBLE_ARRAY_MEMBER, not specific to w32. Sounds like latest compilers don't like that. Are you building with custom compiler switches, per chance? > C:/Users/corwi/emacs-build/git/master/src/w32heap.c: In function 'getrlimit': > C:/Users/corwi/emacs-build/git/master/src/w32heap.c:853:14: warning: > 'm' may be used uninitialized [-Wmaybe-uninitialized] > 853 | if (!VirtualQuery ((LPCVOID) &m, &m, sizeof m)) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a bogus warning, ignore it. The compiler doesn't understand the semantics of VirtualQuery. Thanks.