Skip to content

Commit

Permalink
Fix compilation errors.
Browse files Browse the repository at this point in the history
Under gcc11(+) both message and received would cause errors for
potentially being used uninitialised. We fixed many of these issues in
another PR, but this one is only seen under certain configs.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
  • Loading branch information
paul-elliott-arm committed Nov 24, 2021
1 parent b92b88c commit 21c8fe5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.d/fix_compilation_ssl_tests.txt
@@ -0,0 +1,3 @@
Bugfix
* Fix an uninitialized variable warning in test_suite_ssl.function with GCC
version 11
4 changes: 2 additions & 2 deletions tests/suites/test_suite_ssl.function
Expand Up @@ -2236,8 +2236,8 @@ exit:
void ssl_mock_sanity( )
{
enum { MSGLEN = 105 };
unsigned char message[MSGLEN];
unsigned char received[MSGLEN];
unsigned char message[MSGLEN] = { 0 };
unsigned char received[MSGLEN] = { 0 };
mbedtls_mock_socket socket;

mbedtls_mock_socket_init( &socket );
Expand Down

0 comments on commit 21c8fe5

Please sign in to comment.