diff --git a/fsw/src/cf_cfdp_types.h b/fsw/src/cf_cfdp_types.h index 188fd76f..9b3c53f4 100644 --- a/fsw/src/cf_cfdp_types.h +++ b/fsw/src/cf_cfdp_types.h @@ -250,7 +250,7 @@ typedef struct CF_TxState_Data typedef struct CF_RxS2_Data { uint32 eof_crc; - uint32 eof_size; + size_t eof_size; uint32 rx_crc_calc_bytes; CF_CFDP_FinDeliveryCode_t dc; CF_CFDP_FinFileStatus_t fs; diff --git a/fsw/src/cf_cmd.c b/fsw/src/cf_cmd.c index 024a2d90..06018011 100644 --- a/fsw/src/cf_cmd.c +++ b/fsw/src/cf_cmd.c @@ -898,7 +898,7 @@ void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg) * See description in cf_cmd.h for argument/return detail * *-----------------------------------------------------------------*/ -CFE_Status_t CF_CmdValidateChunkSize(uint32 val, uint8 chan_num /* ignored */) +CFE_Status_t CF_CmdValidateChunkSize(CF_ChunkSize_t val, uint8 chan_num /* ignored */) { CFE_Status_t ret = CFE_SUCCESS; if (val > sizeof(CF_CFDP_PduFileDataContent_t)) @@ -941,7 +941,7 @@ void CF_CmdGetSetParam(uint8 is_set, CF_GetSet_ValueID_t param_id, uint32 value, struct { void * ptr; - uint32 size; + size_t size; int (*fn)(uint32, uint8 chan_num); } item; diff --git a/fsw/src/cf_cmd.h b/fsw/src/cf_cmd.h index 9b6660f4..c59b3fbe 100644 --- a/fsw/src/cf_cmd.h +++ b/fsw/src/cf_cmd.h @@ -472,7 +472,7 @@ void CF_CmdWriteQueue(CFE_SB_Buffer_t *msg); * @retval CF_ERROR if failed (val is greater than max PDU) * */ -CFE_Status_t CF_CmdValidateChunkSize(uint32 val, uint8 chan_num); +CFE_Status_t CF_CmdValidateChunkSize(CF_ChunkSize_t val, uint8 chan_num); /************************************************************************/ /** @brief Checks if the value is within allowable range as outgoing packets per wakeup diff --git a/fsw/src/cf_crc.c b/fsw/src/cf_crc.c index 0031f9ad..b95bf4c6 100644 --- a/fsw/src/cf_crc.c +++ b/fsw/src/cf_crc.c @@ -50,9 +50,9 @@ void CF_CRC_Start(CF_Crc_t *crc) * See description in cf_crc.h for argument/return detail * *-----------------------------------------------------------------*/ -void CF_CRC_Digest(CF_Crc_t *crc, const uint8 *data, int len) +void CF_CRC_Digest(CF_Crc_t *crc, const uint8 *data, size_t len) { - int i = 0; + uint32 i = 0; for (; i < len; ++i) { diff --git a/fsw/src/cf_crc.h b/fsw/src/cf_crc.h index 043efaa8..7fbc6537 100644 --- a/fsw/src/cf_crc.h +++ b/fsw/src/cf_crc.h @@ -63,7 +63,7 @@ void CF_CRC_Start(CF_Crc_t *crc); * @param len Length of data to digest * */ -void CF_CRC_Digest(CF_Crc_t *crc, const uint8 *data, int len); +void CF_CRC_Digest(CF_Crc_t *crc, const uint8 *data, size_t len); /************************************************************************/ /** @brief Finalize a CRC calculation. diff --git a/fsw/src/cf_utils.c b/fsw/src/cf_utils.c index b2a91d01..473d5199 100644 --- a/fsw/src/cf_utils.c +++ b/fsw/src/cf_utils.c @@ -175,7 +175,7 @@ CFE_Status_t CF_WriteHistoryEntryToFile(osal_id_t fd, const CF_History_t *histor int i; CFE_Status_t ret; - int32 len; + size_t len; char linebuf[(CF_FILENAME_MAX_LEN * 2) + 128]; /* buffer for line data */ for (i = 0; i < 3; ++i) diff --git a/unit-test/cf_cmd_tests.c b/unit-test/cf_cmd_tests.c index 852c90b6..1913c18b 100644 --- a/unit-test/cf_cmd_tests.c +++ b/unit-test/cf_cmd_tests.c @@ -3383,7 +3383,7 @@ void Test_CF_CmdValidateChunkSize_val_GreaterThan_pdu_fd_data_t_FailAndReturn_1( { /* Arrange */ uint8 arg_chan_num = Any_uint8(); /* value labeled as 'ignored' in func def */ - uint32 arg_val = sizeof(CF_CFDP_PduFileDataContent_t) + 1; + size_t arg_val = sizeof(CF_CFDP_PduFileDataContent_t) + 1; CFE_Status_t local_result; /* Act */ @@ -3413,7 +3413,7 @@ void Test_CF_CmdValidateChunkSize_val_SizeOf_pdu_fd_data_t_SuccessAndReturn_0(vo { /* Arrange */ uint8 arg_chan_num = Any_uint8(); /* value labeled as 'ignored' in func def */ - uint32 arg_val = sizeof(CF_CFDP_PduFileDataContent_t); + size_t arg_val = sizeof(CF_CFDP_PduFileDataContent_t); CFE_Status_t local_result; /* Act */ diff --git a/unit-test/stubs/cf_cmd_stubs.c b/unit-test/stubs/cf_cmd_stubs.c index 2224cda9..f4e3d10d 100644 --- a/unit-test/stubs/cf_cmd_stubs.c +++ b/unit-test/stubs/cf_cmd_stubs.c @@ -302,11 +302,11 @@ void CF_CmdTxFile(CFE_SB_Buffer_t *msg) * Generated stub function for CF_CmdValidateChunkSize() * ---------------------------------------------------- */ -CFE_Status_t CF_CmdValidateChunkSize(uint32 val, uint8 chan_num) +CFE_Status_t CF_CmdValidateChunkSize(CF_ChunkSize_t val, uint8 chan_num) { UT_GenStub_SetupReturnBuffer(CF_CmdValidateChunkSize, CFE_Status_t); - UT_GenStub_AddParam(CF_CmdValidateChunkSize, uint32, val); + UT_GenStub_AddParam(CF_CmdValidateChunkSize, CF_ChunkSize_t, val); UT_GenStub_AddParam(CF_CmdValidateChunkSize, uint8, chan_num); UT_GenStub_Execute(CF_CmdValidateChunkSize, Basic, NULL); diff --git a/unit-test/stubs/cf_crc_stubs.c b/unit-test/stubs/cf_crc_stubs.c index 05396bd0..7f408f31 100644 --- a/unit-test/stubs/cf_crc_stubs.c +++ b/unit-test/stubs/cf_crc_stubs.c @@ -31,11 +31,11 @@ * Generated stub function for CF_CRC_Digest() * ---------------------------------------------------- */ -void CF_CRC_Digest(CF_Crc_t *crc, const uint8 *data, int len) +void CF_CRC_Digest(CF_Crc_t *crc, const uint8 *data, size_t len) { UT_GenStub_AddParam(CF_CRC_Digest, CF_Crc_t *, crc); UT_GenStub_AddParam(CF_CRC_Digest, const uint8 *, data); - UT_GenStub_AddParam(CF_CRC_Digest, int, len); + UT_GenStub_AddParam(CF_CRC_Digest, size_t, len); UT_GenStub_Execute(CF_CRC_Digest, Basic, NULL); }