]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - optee/ti-optee-client.git/commit
tee-supplicant: rpmb.c: add __attribute__((fallthrough))
authorJerome Forissier <jerome.forissier@linaro.org>
Thu, 5 Jul 2018 15:13:15 +0000 (17:13 +0200)
committerJérôme Forissier <jerome.forissier@linaro.org>
Fri, 10 Aug 2018 09:20:08 +0000 (11:20 +0200)
commit9c5e24cfd60009188194e49202884082c2112c4f
tree042f535d89d6c18f53245f4fa85b6a1470d2dc58
parent0361f9b21bb1acfaf23323a121f542fe03dcd2c8
tee-supplicant: rpmb.c: add __attribute__((fallthrough))

Fix the following error reported by GCC 8.1:

src/rpmb.c: In function ‘rpmb_data_req’:
src/rpmb.c:683:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
   if (rsp_nfrm != 1) {
      ^
src/rpmb.c:689:2: note: here
  case RPMB_MSG_TYPE_REQ_AUTH_DATA_READ:
  ^~~~

I could not silence this warning using any of the special comments
documented on the GCC Warning Options page [1]. It is weird, because we
use -Wextra which is supposed to enable -Wimplicit-fallthrough=3, which is
supposed to recognize the comment we had already (/* Fall through */).

Link: [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
tee-supplicant/src/rpmb.c