qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 10/22] hw/sdhci: fix -Werror=maybe-uninitialized false-pos


From: Alex Bennée
Subject: Re: [PATCH v3 10/22] hw/sdhci: fix -Werror=maybe-uninitialized false-positive
Date: Mon, 30 Sep 2024 13:59:17 +0100
User-agent: mu4e 1.12.6; emacs 29.4

marcandre.lureau@redhat.com writes:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> ../hw/sd/sdhci.c:846:16: error: ‘res’ may be used uninitialized 
> [-Werror=maybe-uninitialized]
>
> False-positive, because "length" is non-null.

I certainly get that:

  length = dscr.length ? dscr.length : 64 * KiB;

means we always have something. Although get_adma_description() is
deserving of a g_assert_not_reached() lest we end up re-using a previous
descr.

I guess wider re-factoring is out of scope for this series though:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro



reply via email to

[Prev in Thread] Current Thread [Next in Thread]