Merge pull request #5235 from paul-elliott-arm/fix_test_suite_ssl_2.x

Backport 2.x: Fix test_suite_ssl compilation errors with GCC11
This commit is contained in:
Gilles Peskine 2021-11-25 22:02:46 +01:00 committed by GitHub
commit 3f5c2232f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -0,0 +1,3 @@
Bugfix
* Fix an uninitialized variable warning in test_suite_ssl.function with GCC
version 11.

View file

@ -2248,8 +2248,8 @@ exit:
void ssl_mock_sanity( ) void ssl_mock_sanity( )
{ {
enum { MSGLEN = 105 }; enum { MSGLEN = 105 };
unsigned char message[MSGLEN]; unsigned char message[MSGLEN] = { 0 };
unsigned char received[MSGLEN]; unsigned char received[MSGLEN] = { 0 };
mbedtls_mock_socket socket; mbedtls_mock_socket socket;
mbedtls_mock_socket_init( &socket ); mbedtls_mock_socket_init( &socket );