From 6fa560930c943fd841e738aab4fd51011b138b67 Mon Sep 17 00:00:00 2001 From: Cruz Monrreal Date: Tue, 12 Jun 2018 22:09:51 -0500 Subject: [PATCH] Corrected casting issue with an assert within the error_handling test Discovered via https://github.com/ARMmbed/mbed-os/pull/7105. If both values are negative values, they are casted in such a way that -1 != -1. This small commit fixes that. --- TESTS/mbed_platform/error_handling/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TESTS/mbed_platform/error_handling/main.cpp b/TESTS/mbed_platform/error_handling/main.cpp index 008033c3da7..a09493d23dc 100644 --- a/TESTS/mbed_platform/error_handling/main.cpp +++ b/TESTS/mbed_platform/error_handling/main.cpp @@ -124,7 +124,7 @@ void test_error_context_capture() mbed_error_status_t status = mbed_get_last_error_info( &error_ctx ); TEST_ASSERT(status == MBED_SUCCESS); TEST_ASSERT_EQUAL_UINT(error_value, error_ctx.error_value); - TEST_ASSERT_EQUAL_UINT(osThreadGetId(), error_ctx.thread_id); + TEST_ASSERT_EQUAL_UINT((uint32_t)osThreadGetId(), error_ctx.thread_id); //Capture thread info and compare osRtxThread_t *current_thread = osRtxInfo.thread.run.curr;