[x] I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.
Describe the bug
Looking at code coverage for https://github.com/nasa/FM/issues/17, there are several functions in fm_cmd_utils.c that have else statements that can never be reached. These functions check the return value of FM_GetFilenameState.
Total uncovered here is 7 lines 7 branches.
To Reproduce
Functions with else statements that can never be reached:
Checklist (Please check before submitting)
Describe the bug Looking at code coverage for https://github.com/nasa/FM/issues/17, there are several functions in fm_cmd_utils.c that have else statements that can never be reached. These functions check the return value of FM_GetFilenameState.
Total uncovered here is 7 lines 7 branches.
To Reproduce Functions with else statements that can never be reached:
FM_VerifyFileClosed https://github.com/nasa/FM/blob/51707f20350e4ea909842acb3597fff8da3ab18e/fsw/src/fm_cmd_utils.c#L315-L320
FM_VerifyFileExists https://github.com/nasa/FM/blob/51707f20350e4ea909842acb3597fff8da3ab18e/fsw/src/fm_cmd_utils.c#L361-L366
FM_VerifyFileNoExists https://github.com/nasa/FM/blob/51707f20350e4ea909842acb3597fff8da3ab18e/fsw/src/fm_cmd_utils.c#L407-L412
FM_VerifyFileNotOpen https://github.com/nasa/FM/blob/51707f20350e4ea909842acb3597fff8da3ab18e/fsw/src/fm_cmd_utils.c#L458-L462
FM_VerifyDirExists https://github.com/nasa/FM/blob/51707f20350e4ea909842acb3597fff8da3ab18e/fsw/src/fm_cmd_utils.c#L503-L510
FM_VerifyDirNoExists https://github.com/nasa/FM/blob/51707f20350e4ea909842acb3597fff8da3ab18e/fsw/src/fm_cmd_utils.c#L549-L556
Function if an if statement that can't be reached
Expected behavior 100% coverage
Code snips See above
System observed on: CI
Additional context None
Reporter Info Haven Carlson, NASA