From b5e9cd3fd586cf74b207d189d7a4e1c0b003e3d8 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 17 Nov 2020 23:35:19 -0500 Subject: [PATCH] Fix #663, unit test support functions Update use of uint32 to size_t in UT support code --- fsw/cfe-core/unit-test/ut_support.c | 14 +++++++------- fsw/cfe-core/unit-test/ut_support.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fsw/cfe-core/unit-test/ut_support.c b/fsw/cfe-core/unit-test/ut_support.c index b3de436ee..b23d5ba6d 100644 --- a/fsw/cfe-core/unit-test/ut_support.c +++ b/fsw/cfe-core/unit-test/ut_support.c @@ -382,8 +382,8 @@ void UT_ClearEventHistory(void) static bool UT_CheckEventHistoryFromFunc(UT_EntryKey_t Func, uint16 EventIDToSearchFor) { bool Result = false; - uint32 Position; - uint32 MaxSize; + size_t Position; + size_t MaxSize; uint16 *EvBuf; UT_GetDataBuffer(Func, (void**)&EvBuf, &MaxSize, &Position); @@ -421,8 +421,8 @@ bool UT_EventIsInHistory(uint16 EventIDToSearchFor) uint16 UT_GetNumEventsSent(void) { uint16 Total = 0; - uint32 Position; - uint32 MaxSize; + size_t Position; + size_t MaxSize; void *EvBuf; UT_GetDataBuffer(UT_KEY(CFE_EVS_SendEvent), &EvBuf, &MaxSize, &Position); @@ -438,11 +438,11 @@ uint16 UT_GetNumEventsSent(void) /* ** Display the contents of a packet */ -void UT_DisplayPkt(CFE_SB_MsgPtr_t ptr, uint32 size) +void UT_DisplayPkt(CFE_SB_MsgPtr_t ptr, size_t size) { uint8 *BytePtr = (uint8 *) ptr; - uint32 i; - uint32 BufSize = UT_MAX_MESSAGE_LENGTH; + size_t i; + size_t BufSize = UT_MAX_MESSAGE_LENGTH; char DisplayMsg[UT_MAX_MESSAGE_LENGTH]; char *msgPtr = DisplayMsg; diff --git a/fsw/cfe-core/unit-test/ut_support.h b/fsw/cfe-core/unit-test/ut_support.h index 60bfa2a1b..6d766fb50 100644 --- a/fsw/cfe-core/unit-test/ut_support.h +++ b/fsw/cfe-core/unit-test/ut_support.h @@ -572,7 +572,7 @@ uint16 UT_GetNumEventsSent(void); ** This function does not return a value. ** ******************************************************************************/ -void UT_DisplayPkt(CFE_SB_MsgPtr_t ptr, uint32 size); +void UT_DisplayPkt(CFE_SB_MsgPtr_t ptr, size_t size); /*****************************************************************************/ /**