[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/rtc/twl92230: Silence warnings about missing fallthrough
From: |
Peter Maydell |
Subject: |
Re: [PATCH] hw/rtc/twl92230: Silence warnings about missing fallthrough statements |
Date: |
Thu, 1 Oct 2020 21:43:10 +0100 |
On Thu, 1 Oct 2020 at 19:21, Thomas Huth <thuth@redhat.com> wrote:
>
> When compiling with -Werror=implicit-fallthrough, gcc complains about
> missing fallthrough annotations in this file. Looking at the code,
> the fallthrough is indeed wanted here, but instead of adding the
> annotations, it can be done more efficiently by simply calculating
> the offset with a subtraction instead of increasing a local variable
> one by one.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> hw/rtc/twl92230.c | 50 +++++++++++++++++++++++------------------------
> 1 file changed, 24 insertions(+), 26 deletions(-)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM