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: serious compiler warnings in mingw64 build of master Date: Sat, 14 Aug 2021 20:42:00 +0300 Message-ID: <83wnonapp3.fsf@gnu.org> References: <86fsvcgd1b.fsf@stephe-leake.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35223"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 14 19:43:05 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 1mExgW-0008wN-5l for ged-emacs-devel@m.gmane-mx.org; Sat, 14 Aug 2021 19:43:04 +0200 Original-Received: from localhost ([::1]:43566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mExgU-0003LE-8i for ged-emacs-devel@m.gmane-mx.org; Sat, 14 Aug 2021 13:43:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mExfu-0002fp-IT for emacs-devel@gnu.org; Sat, 14 Aug 2021 13:42:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55580) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mExfu-0007Ij-2O; Sat, 14 Aug 2021 13:42:26 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1929 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 1mExfr-0007rK-IW; Sat, 14 Aug 2021 13:42:25 -0400 In-Reply-To: <86fsvcgd1b.fsf@stephe-leake.org> (message from Stephen Leake on Sat, 14 Aug 2021 10:18:56 -0700) 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:272393 Archived-At: > From: Stephen Leake > Date: Sat, 14 Aug 2021 10:18:56 -0700 > > I just updated emacs/master (to > bf55b5ac17cd5a40ad5ff2e25af7e050602180bb), and it's giving these > compiler warnings: > > CC process.o > In file included from process.c:33: > process.c: In function 'Fmake_process': > lisp.h:1561:31: warning: null pointer dereference [-Wnull-dereference] > 1561 | return XSTRING (string)->u.s.data; > | ~~~~~~~~~~~~~~~~~~~~~^~~~~ > > This is from line 1990 in process.c: > new_argv[i] = SSDATA (XCAR (tem)); > > I have not tried to figure out a fix. Neither did I. > CC w32.o > w32.c: In function '_sys_read_ahead': > w32.c:8858:10: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized] > 8858 | if (rc == sizeof (char)) > | ~~~^~~~~~~~~~~~~~~~ > > The preceding if/elsif block has no final 'else', so rc may not be set. This is bogus: the compiler isn't smart enough to understand that the 3 possible flag bits are the only ones that can happen: a descriptor is either for a pipe, or a serial connection, or a socket, because _sys_read_ahead is only ever used for reading process output. I added an initialization to pacify the compiler. > I've been getting mysterious crashes when mail spawns a process to get > more mail, so I'm hoping these are the root cause of that. Unlikely, because this code hasn't changed in eons.