From efe5533bee45f82b68bfe58e7df7cf512992f46d Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Mon, 9 May 2022 13:25:59 -0600 Subject: [PATCH] Fix #22, Resolve strict cppcheck warnings --- fsw/src/fm_cmd_utils.h | 8 ++++---- fsw/src/fm_tbl.c | 4 ++-- fsw/src/fm_tbl.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fsw/src/fm_cmd_utils.h b/fsw/src/fm_cmd_utils.h index c5cad39..69fdfaf 100644 --- a/fsw/src/fm_cmd_utils.h +++ b/fsw/src/fm_cmd_utils.h @@ -200,7 +200,7 @@ bool FM_VerifyFileExists(char *Filename, uint32 BufferSize, uint32 EventID, cons * * \par Assumptions, External Events, and Notes: * - * \param [in] Name Pointer to buffer containing name + * \param [in] Filename Pointer to buffer containing name * \param [in] BufferSize Size of name character buffer * \param [in] EventID Error event ID (command specific) * \param [in] CmdText Error event text (command specific) @@ -211,7 +211,7 @@ bool FM_VerifyFileExists(char *Filename, uint32 BufferSize, uint32 EventID, cons * * \sa #FM_GetFilenameState */ -bool FM_VerifyFileNoExist(char *Name, uint32 BufferSize, uint32 EventID, const char *CmdText); +bool FM_VerifyFileNoExist(char *Filename, uint32 BufferSize, uint32 EventID, const char *CmdText); /** * \brief Verify File Is Not Open Function @@ -222,7 +222,7 @@ bool FM_VerifyFileNoExist(char *Name, uint32 BufferSize, uint32 EventID, const c * * \par Assumptions, External Events, and Notes: * - * \param [in] Name Pointer to buffer containing name + * \param [in] Filename Pointer to buffer containing name * \param [in] BufferSize Size of name character buffer * \param [in] EventID Error event ID (command specific) * \param [in] CmdText Error event text (command specific) @@ -233,7 +233,7 @@ bool FM_VerifyFileNoExist(char *Name, uint32 BufferSize, uint32 EventID, const c * * \sa #FM_GetFilenameState */ -bool FM_VerifyFileNotOpen(char *Name, uint32 BufferSize, uint32 EventID, const char *CmdText); +bool FM_VerifyFileNotOpen(char *Filename, uint32 BufferSize, uint32 EventID, const char *CmdText); /** * \brief Verify Directory Exists Function diff --git a/fsw/src/fm_tbl.c b/fsw/src/fm_tbl.c index 68cb60c..e135af1 100644 --- a/fsw/src/fm_tbl.c +++ b/fsw/src/fm_tbl.c @@ -40,7 +40,7 @@ int32 FM_TableInit(void) { - int32 Status = CFE_SUCCESS; + int32 Status; /* Initialize file system free space table pointer */ FM_GlobalData.FreeSpaceTablePtr = (FM_FreeSpaceTable_t *)NULL; @@ -188,7 +188,7 @@ int32 FM_ValidateTable(FM_FreeSpaceTable_t *TablePtr) void FM_AcquireTablePointers(void) { - int32 Status = CFE_TBL_ERR_NEVER_LOADED; + int32 Status; /* Allow cFE an opportunity to make table updates */ CFE_TBL_Manage(FM_GlobalData.FreeSpaceTableHandle); diff --git a/fsw/src/fm_tbl.h b/fsw/src/fm_tbl.h index f2e41e1..1877397 100644 --- a/fsw/src/fm_tbl.h +++ b/fsw/src/fm_tbl.h @@ -62,7 +62,7 @@ int32 FM_TableInit(void); * * \par Assumptions, External Events, and Notes: * - * \param [in] TableData - Pointer to table data for verification. + * \param [in] TablePtr - Pointer to table data for verification. * * \return Validation status * \retval #CFE_SUCCESS \copydoc CFE_SUCCESS @@ -70,7 +70,7 @@ int32 FM_TableInit(void); * * \sa /FM_AppInit */ -int32 FM_ValidateTable(FM_FreeSpaceTable_t *TableData); +int32 FM_ValidateTable(FM_FreeSpaceTable_t *TablePtr); /** * \brief Acquire Table Data Pointer Function