From 2fe752f2ef49d99de023c32b7e8f0d7a770a67aa Mon Sep 17 00:00:00 2001 From: Avi Date: Sat, 4 Feb 2023 12:30:06 +1000 Subject: [PATCH] Fix #1109, Remove unimplemented test stub prototype --- src/os/inc/osapi-clock.h | 6 ++--- src/tests/osal-core-test/osal-core-test.c | 2 +- .../shared/src/coveragetest-clock.c | 2 +- ut_assert/inc/utstubs.h | 24 ------------------- 4 files changed, 5 insertions(+), 29 deletions(-) diff --git a/src/os/inc/osapi-clock.h b/src/os/inc/osapi-clock.h index d41291daf..49cc7541b 100644 --- a/src/os/inc/osapi-clock.h +++ b/src/os/inc/osapi-clock.h @@ -168,7 +168,7 @@ static inline int64 OS_TimeGetTotalMilliseconds(OS_time_t tm) /*-------------------------------------------------------------------------------------*/ /** - * @brief Get an OS_time_t interval object from a integer number of milliseconds + * @brief Get an OS_time_t interval object from an integer number of milliseconds * * This is the inverse operation of OS_TimeGetTotalMilliseconds(), converting the * total number of milliseconds into an OS_time_t value. @@ -201,7 +201,7 @@ static inline int64 OS_TimeGetTotalMicroseconds(OS_time_t tm) /*-------------------------------------------------------------------------------------*/ /** - * @brief Get an OS_time_t interval object from a integer number of microseconds + * @brief Get an OS_time_t interval object from an integer number of microseconds * * This is the inverse operation of OS_TimeGetTotalMicroseconds(), converting the * total number of microseconds into an OS_time_t value. @@ -238,7 +238,7 @@ static inline int64 OS_TimeGetTotalNanoseconds(OS_time_t tm) /*-------------------------------------------------------------------------------------*/ /** - * @brief Get an OS_time_t interval object from a integer number of nanoseconds + * @brief Get an OS_time_t interval object from an integer number of nanoseconds * * This is the inverse operation of OS_TimeGetTotalNanoseconds(), converting the * total number of nanoseconds into an OS_time_t value. diff --git a/src/tests/osal-core-test/osal-core-test.c b/src/tests/osal-core-test/osal-core-test.c index 2f07df408..bc5860676 100644 --- a/src/tests/osal-core-test/osal-core-test.c +++ b/src/tests/osal-core-test/osal-core-test.c @@ -552,7 +552,7 @@ void TestGetInfos(void) OS_bin_sem_prop_t bin_prop; OS_mut_sem_prop_t mut_prop; - /* first step is to create an object to to get the properties of */ + /* first step is to create an object to get the properties of */ status = OS_TaskCreate(&task_0_id, "Task 0", task_generic_no_exit, OSAL_STACKPTR_C(task_0_stack), sizeof(task_0_stack), OSAL_PRIORITY_C(TASK_0_PRIORITY), 0); diff --git a/src/unit-test-coverage/shared/src/coveragetest-clock.c b/src/unit-test-coverage/shared/src/coveragetest-clock.c index 8590a0547..6b6a49b89 100644 --- a/src/unit-test-coverage/shared/src/coveragetest-clock.c +++ b/src/unit-test-coverage/shared/src/coveragetest-clock.c @@ -160,7 +160,7 @@ void Test_OS_TimeAccessConversions(void) /* * Confirm reciprocity of the Get/From unit conversions. * Note there is no (easy) way to directly compare a OS_time_t here, - * so this uses both conversions an just confirms the result, subject + * so this uses both conversions and just confirms the result, subject * to rounding from the conversion. In the default configuration the * tick units are 100ns and so the numbers here are chosen such that * the result will not lose precision, and also not overflow a uint32. diff --git a/ut_assert/inc/utstubs.h b/ut_assert/inc/utstubs.h index 351d67b3e..c917bd818 100644 --- a/ut_assert/inc/utstubs.h +++ b/ut_assert/inc/utstubs.h @@ -458,30 +458,6 @@ size_t UT_Stub_CopyFromLocal(UT_EntryKey_t FuncKey, const void *LocalBuffer, siz UT_Stub_RegisterContextWithMetaData(FuncKey, #Parameter, UT_STUBCONTEXT_ARG_TYPE_INDIRECT, &Parameter, \ sizeof(Parameter)) -/** - * Set a stub return value from the handler function - * - * This sets/copies the specified value to the buffer that will be - * returned from the original stub call back to the caller. This - * provides the actual return value and it will override/replace - * any assumed or default return value. - * - * The passed-in buffer should be a pointer to the same data type - * that the stub returns. Any type mismatch is considered an error. - * - * The handler function must call this routine for any stub which - * returns a data type other than int32. - * - * @note If there is no handler function or the handler does not call - * this routine to set a return value, the implementation will use the - * "Int32StatusCode" value as a return if the size matches sizeof(int32). - * - * \param FuncKey The stub function associated with the buffer - * \param BufferPtr Pointer to the local return value - * \param BufferSize Size of the local return value - */ -void UT_Stub_SetReturnValue(UT_EntryKey_t FuncKey, const void *BufferPtr, size_t BufferSize); - /** * Creates a buffer to hold the return value for the stub *