unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stephen Leake <stephen_leake@stephe-leake.org>
Cc: emacs-devel@gnu.org
Subject: Re: serious compiler warnings in mingw64 build of master
Date: Sat, 14 Aug 2021 20:42:00 +0300	[thread overview]
Message-ID: <83wnonapp3.fsf@gnu.org> (raw)
In-Reply-To: <86fsvcgd1b.fsf@stephe-leake.org> (message from Stephen Leake on Sat, 14 Aug 2021 10:18:56 -0700)

> From: Stephen Leake <stephen_leake@stephe-leake.org>
> 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.



      reply	other threads:[~2021-08-14 17:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-14 17:18 serious compiler warnings in mingw64 build of master Stephen Leake
2021-08-14 17:42 ` Eli Zaretskii [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83wnonapp3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=stephen_leake@stephe-leake.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).