hw/rtc/twl92230: Silence warnings about missing fallthrough statements
commit216776099b087edfdf8cca3cb3cbfee1edbb12e2
authorThomas Huth <thuth@redhat.com>
Fri, 11 Dec 2020 15:24:17 +0000 (11 16:24 +0100)
committerThomas Huth <thuth@redhat.com>
Fri, 18 Dec 2020 08:14:22 +0000 (18 09:14 +0100)
tree190883e650b7c4cc3196b5ca7d953dfff91244f5
parent51c915674d8cf9de596d96ac31226c4a374fcb95
hw/rtc/twl92230: Silence warnings about missing fallthrough statements

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>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20201211152426.350966-4-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/rtc/twl92230.c