[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/rtc/twl92230: Add missing 'break'
From: |
Thomas Huth |
Subject: |
Re: [PATCH] hw/rtc/twl92230: Add missing 'break' |
Date: |
Fri, 11 Dec 2020 16:53:22 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 |
On 11/12/2020 16.46, Philippe Mathieu-Daudé wrote:
> Add missing 'break' to fix:
>
> hw/rtc/twl92230.c: In function ‘menelaus_write’:
> hw/rtc/twl92230.c:713:5: error: label at end of compound statement
> 713 | default:
> | ^~~~~~~
... which occurs when disabling the "VERBOSE" switch in this file (that is
enabled by default - that's why we've not noticed this before).
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> I noticed Thomas "Compile QEMU with -Wimplicit-fallthrough" series
> and remembered this old patch.
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/rtc/twl92230.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/rtc/twl92230.c b/hw/rtc/twl92230.c
> index f838913b378..28656cb0e59 100644
> --- a/hw/rtc/twl92230.c
> +++ b/hw/rtc/twl92230.c
> @@ -714,6 +714,7 @@ static void menelaus_write(void *opaque, uint8_t addr,
> uint8_t value)
> #ifdef VERBOSE
> printf("%s: unknown register %02x\n", __func__, addr);
> #endif
> + break;
> }
> }
Reviewed-by: Thomas Huth <thuth@redhat.com>