Skip to content

Commit 6fa5609

Browse files
authored
Corrected casting issue with an assert within the error_handling test
Discovered via #7105. If both values are negative values, they are casted in such a way that -1 != -1. This small commit fixes that.
1 parent ed9a1f1 commit 6fa5609

File tree

1 file changed

+1
-1
lines changed
  • TESTS/mbed_platform/error_handling

1 file changed

+1
-1
lines changed

TESTS/mbed_platform/error_handling/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void test_error_context_capture()
124124
mbed_error_status_t status = mbed_get_last_error_info( &error_ctx );
125125
TEST_ASSERT(status == MBED_SUCCESS);
126126
TEST_ASSERT_EQUAL_UINT(error_value, error_ctx.error_value);
127-
TEST_ASSERT_EQUAL_UINT(osThreadGetId(), error_ctx.thread_id);
127+
TEST_ASSERT_EQUAL_UINT((uint32_t)osThreadGetId(), error_ctx.thread_id);
128128

129129
//Capture thread info and compare
130130
osRtxThread_t *current_thread = osRtxInfo.thread.run.curr;

0 commit comments

Comments
 (0)