Skip to content

Commit

Permalink
Fix nasa#663, unit test support functions
Browse files Browse the repository at this point in the history
Update use of uint32 to size_t in UT support code
  • Loading branch information
jphickey committed Nov 18, 2020
1 parent 4f39bee commit b5e9cd3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions fsw/cfe-core/unit-test/ut_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion fsw/cfe-core/unit-test/ut_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*****************************************************************************/
/**
Expand Down

0 comments on commit b5e9cd3

Please sign in to comment.