[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/39] docs/spin: replace assert(0) with g_assert_not_reached
From: |
Eric Blake |
Subject: |
Re: [PATCH 01/39] docs/spin: replace assert(0) with g_assert_not_reached() |
Date: |
Wed, 11 Sep 2024 07:37:02 -0500 |
User-agent: |
NeoMutt/20240425 |
On Wed, Sep 11, 2024 at 07:33:59AM GMT, Eric Blake wrote:
> On Tue, Sep 10, 2024 at 03:15:28PM GMT, Pierrick Bouvier wrote:
> > Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> > ---
>
> A general suggestion for the entire series: please use a commit
> message that explains why this is a good idea. Even something as
> boiler-plate as "refer to commit XXX for rationale" that can be
> copy-pasted into all the other commits is better than nothing,
> although a self-contained message is best. Maybe:
>
> This patch is part of a series that moves towards a consistent use of
> g_assert_not_reached() rather than an ad hoc mix of different
> assertion mechanisms.
Or summarize your cover letter:
Use of assert(false) can trip spurious control flow warnings from some
versions of gcc:
https://lore.kernel.org/qemu-devel/54bb02a6-1b12-460a-97f6-3f478ef766c6@linaro.org/
Solve that by unifying the code base on g_assert_not_reached()
instead.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
[PATCH 03/39] hw/arm: replace assert(0) with g_assert_not_reached(), Pierrick Bouvier, 2024/09/10
[PATCH 05/39] hw/core: replace assert(0) with g_assert_not_reached(), Pierrick Bouvier, 2024/09/10