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 builds on master Date: Sat, 15 Aug 2020 19:24:33 +0300 Message-ID: <83a6yvkhby.fsf@gnu.org> References: <864kp47t20.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23445"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Andy Moreton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 15 18:25:42 2020 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 1k6z02-00060O-4h for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Aug 2020 18:25:42 +0200 Original-Received: from localhost ([::1]:38566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6z01-0002oZ-4O for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Aug 2020 12:25:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6yz9-0001uD-Lu for emacs-devel@gnu.org; Sat, 15 Aug 2020 12:24:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51355) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6yz9-0004fo-B0; Sat, 15 Aug 2020 12:24:47 -0400 Original-Received: from [176.228.60.248] (port=3762 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k6yz8-0000wc-2U; Sat, 15 Aug 2020 12:24:47 -0400 In-Reply-To: <864kp47t20.fsf@gmail.com> (message from Andy Moreton on Fri, 14 Aug 2020 23:37:27 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:253806 Archived-At: > From: Andy Moreton > Date: Fri, 14 Aug 2020 23:37:27 +0100 > > Building master for 64bit mingw64 gives the following warnings: > > C:/emacs/git/emacs/master/src/w32reg.c:146:1: warning: function might be candidate for attribute 'malloc' [-Wsuggest-attribute=malloc] > 146 | w32_get_string_resource (void *v_rdb, const char *name, const char *class) > | ^~~~~~~~~~~~~~~~~~~~~~~ That's just noise. There's nothing wrong with the code. > C:/emacs/git/emacs/master/src/w32menu.c: In function 'set_frame_menubar': > C:/emacs/git/emacs/master/src/w32menu.c:326:2: warning: 'memcpy' offset [3, 10] from the object at '' is out of the bounds of referenced subobject 'contents' with type 'union Lisp_X *[]' at offset 3 [-Warray-bounds] > 326 | memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 327 | previous_menu_items_used * word_size); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from C:/emacs/git/emacs/master/src/w32menu.c:26: > C:/emacs/git/emacs/master/src/lisp.h:1631:17: note: subobject 'contents' declared here > 1631 | Lisp_Object contents[FLEXIBLE_ARRAY_MEMBER]; > | ^~~~~~~~ Likewise. > C:/emacs/git/emacs/master/src/w32.c: In function '_sys_read_ahead': > C:/emacs/git/emacs/master/src/w32.c:8785:10: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized] > 8785 | if (rc == sizeof (char)) > | ~~~^~~~~~~~~~~~~~~~ This is a bug in the compiler you are using: rc _is_ initialized. > C:/emacs/git/emacs/master/src/image.c:116: warning: macro "PIX_MASK_DRAW" is not used [-Wunused-macros] > 116 | #define PIX_MASK_DRAW 1 > | This macro is used in the PNG code. Are you building without PNG support? > These must have been introduced fairly recently, as the build was clean > earlier this year. Actually, this code was not touched in years, so I'm guessing you upgraded to a later version of the compiler lately. Thanks.