Remove warning with GCC 12 and TSan
Compiler is unhappy that the return from mbedtls_cipher_get_name() could be NULL as this is used in a printf statement. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
356597f077
commit
80fa88e2fa
1 changed files with 8 additions and 1 deletions
|
@ -103,7 +103,14 @@ int main(int argc, char *argv[])
|
|||
list = mbedtls_cipher_list();
|
||||
while (*list) {
|
||||
cipher_info = mbedtls_cipher_info_from_type(*list);
|
||||
mbedtls_printf(" %s\n", mbedtls_cipher_info_get_name(cipher_info));
|
||||
if (cipher_info) {
|
||||
const char *name = mbedtls_cipher_info_get_name(cipher_info);
|
||||
|
||||
if (name) {
|
||||
mbedtls_printf(" %s\n", mbedtls_cipher_info_get_name(cipher_info));
|
||||
}
|
||||
}
|
||||
|
||||
list++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue