mirror of
https://github.com/cuberite/polarssl.git
synced 2025-10-02 01:50:33 -04:00
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
@ -103,7 +103,14 @@ int main(int argc, char *argv[])
|
|||||||
list = mbedtls_cipher_list();
|
list = mbedtls_cipher_list();
|
||||||
while (*list) {
|
while (*list) {
|
||||||
cipher_info = mbedtls_cipher_info_from_type(*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++;
|
list++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user