From 3ef419dde6ef470b911fbdc2b55e32d40761752c Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Wed, 9 Dec 2020 14:24:37 -0500 Subject: [PATCH] Fix #542, Avoid UT failure if SEM_VALUE_MAX = UINT32_MAX --- src/unit-tests/oscore-test/ut_oscore_countsem_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unit-tests/oscore-test/ut_oscore_countsem_test.c b/src/unit-tests/oscore-test/ut_oscore_countsem_test.c index b76651b9e..855d5e9f5 100644 --- a/src/unit-tests/oscore-test/ut_oscore_countsem_test.c +++ b/src/unit-tests/oscore-test/ut_oscore_countsem_test.c @@ -125,7 +125,7 @@ void UT_os_count_sem_create_test() * The OSAL should define this for itself, but it currently does not. * (This macro is not currently defined in RTEMS) */ -#ifdef SEM_VALUE_MAX +#if defined SEM_VALUE_MAX && SEM_VALUE_MAX < UINT32_MAX res = OS_CountSemCreate(&count_sem_ids[0], "CountSem1", ((uint32)SEM_VALUE_MAX) + 1, 0); if (res == OS_INVALID_SEM_VALUE) UT_OS_TEST_RESULT(testDesc, UTASSERT_CASETYPE_PASS);