qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] target/arm/m_helper: Silence GCC 10 maybe-uninitialized erro


From: Peter Maydell
Subject: Re: [PATCH] target/arm/m_helper: Silence GCC 10 maybe-uninitialized error
Date: Tue, 19 Jan 2021 13:53:25 +0000

On Tue, 19 Jan 2021 at 06:27, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> When building with GCC 10.2 configured with --extra-cflags=-Os, we get:
>
>   target/arm/m_helper.c: In function ‘arm_v7m_cpu_do_interrupt’:
>   target/arm/m_helper.c:1811:16: error: ‘restore_s16_s31’ may be used 
> uninitialized in this function [-Werror=maybe-uninitialized]
>    1811 |             if (restore_s16_s31) {
>         |                ^
>   target/arm/m_helper.c:1350:10: note: ‘restore_s16_s31’ was declared here
>    1350 |     bool restore_s16_s31;
>         |          ^~~~~~~~~~~~~~~
>   cc1: all warnings being treated as errors
>
> Initialize the 'restore_s16_s31' variable to silence the warning.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/arm/m_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)



Applied to target-arm.next, thanks.

-- PMM



reply via email to

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