From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 51172@debbugs.gnu.org
Subject: bug#51172: Fix null-dereference warnings when compiling Emacs with GCC
Date: Wed, 13 Oct 2021 15:14:34 +0300 [thread overview]
Message-ID: <834k9lp1ed.fsf@gnu.org> (raw)
In-Reply-To: <8f0a62f5-dd46-ca3b-a1e7-3a1b9b85da49@cs.ucla.edu> (message from Paul Eggert on Tue, 12 Oct 2021 17:34:11 -0700)
> Date: Tue, 12 Oct 2021 17:34:11 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
>
> The attached patch against emacs-28 suppresses the final remaining GCC
> 11.2.1 diagnostics that are emitted after emacs-28 is configured with
> --enable-gcc-warnings on x86-64.
>
> The patch is benign, and it's conceivable that changing xmalloc etc. to
> always return nonnull fixes unlikely and obscure bugs (though I haven't
> checked this). However, I didn't install the patch into the emacs-28
> branch on the off-chance that Eli would prefer this sort of thing to be
> installed into the master branch.
Yes, please install on master. We don't expect users to configure the
released Emacs with --enable-gcc-warnings, and the changes are
non-trivial.
> - /* We must call malloc explicitly when BLOCK is 0, since some
> - reallocs don't do this. */
> + /* Call malloc when BLOCK is null,
> + since lrealloc does not allow a null BLOCK. */
Typo in this comment: "malloc" should be "lmalloc".
Thanks.
next prev parent reply other threads:[~2021-10-13 12:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 0:34 bug#51172: Fix null-dereference warnings when compiling Emacs with GCC Paul Eggert
2021-10-13 12:14 ` Eli Zaretskii [this message]
2021-10-13 18:49 ` Paul Eggert
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=834k9lp1ed.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=51172@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.