From 954578644f12ba1e098c2a1376d8b480320bdcea Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Wed, 24 Nov 2021 16:54:26 +0000 Subject: [PATCH 1/2] Fix compilation errors. 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 --- ChangeLog.d/fix_compilation_ssl_tests.txt | 3 +++ tests/suites/test_suite_ssl.function | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 ChangeLog.d/fix_compilation_ssl_tests.txt diff --git a/ChangeLog.d/fix_compilation_ssl_tests.txt b/ChangeLog.d/fix_compilation_ssl_tests.txt new file mode 100644 index 000000000..0db5bf225 --- /dev/null +++ b/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 diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index b18ed423d..74e60ae08 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -2248,8 +2248,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 ); From 14148c4fbe5d8cf6e72bd1e6e7b0bc67e645cca7 Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Wed, 24 Nov 2021 17:45:43 +0000 Subject: [PATCH 2/2] Fix Changelog Signed-off-by: Paul Elliott --- ChangeLog.d/fix_compilation_ssl_tests.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog.d/fix_compilation_ssl_tests.txt b/ChangeLog.d/fix_compilation_ssl_tests.txt index 0db5bf225..202e5c439 100644 --- a/ChangeLog.d/fix_compilation_ssl_tests.txt +++ b/ChangeLog.d/fix_compilation_ssl_tests.txt @@ -1,3 +1,3 @@ Bugfix - * Fix an uninitialized variable warning in test_suite_ssl.function with GCC - version 11 + * Fix an uninitialized variable warning in test_suite_ssl.function with GCC + version 11.