mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-11-09 15:14:53 +00:00
psa_utils: Make fallthrough clear for compilers
Silence a compiler warning about implicit fallthrough by using a comment
format the compiler understand to mean that the fallthrough is
intentional.
In file included from library/cipher.c:63:0:
include/mbedtls/psa_util.h: In function ‘mbedtls_psa_translate_cipher_mode’:
include/mbedtls/psa_util.h:91:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
if( taglen == 0 )
^
include/mbedtls/psa_util.h:94:9: note: here
default:
^~~~~~~
cc1: all warnings being treated as errors
$ gcc --version
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This commit is contained in:
parent
eb5087126f
commit
2d7926674d
|
|
@ -91,6 +91,7 @@ static inline psa_algorithm_t mbedtls_psa_translate_cipher_mode(
|
||||||
if( taglen == 0 )
|
if( taglen == 0 )
|
||||||
return( PSA_ALG_CBC_NO_PADDING );
|
return( PSA_ALG_CBC_NO_PADDING );
|
||||||
/* Intentional fallthrough for taglen != 0 */
|
/* Intentional fallthrough for taglen != 0 */
|
||||||
|
/* fallthrough */
|
||||||
default:
|
default:
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue