Skip to content

Conversation

@thnkslprpt
Copy link
Contributor

@thnkslprpt thnkslprpt commented Oct 12, 2024

Checklist

Describe the contribution

Dead Code removed (along with their accompanying tests):

  • bufptr cannot be NULL after a successful return from CFE_SB_ReceiveBuffer
  • status check for CFE_ES_RunStatus_SYS_EXCEPTION not necessary (and impossible to reach other than through forced test conditions) given that the code setting that status was removed at some point in the past

Minor changes to improve consistency and use the preferred symbol naming conventions:

  • rename CmdCounter to ComandCounter
  • rename CmdErrCounter to CommandErrorCounter
  • rename CS_ResetCmd to CS_ResetCountersCmd

Testing performed
GitHub CI actions all passing successfully (incl. Build + Run, Unit/Functional Tests etc.).

Expected behavior changes
Remove dead code to reduce unnecessary clutter.

System(s) tested on
Debian 12 using the current main branch of cFS bundle.

Contributor Info
Avi Weiss   @thnkslprpt

/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void CS_ResetCmd(const CS_NoArgsCmd_t *CmdPtr)
void CS_ResetCountersCmd(const CS_NoArgsCmd_t *CmdPtr)

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dead code checking for CFE_ES_RunStatus_SYS_EXCEPTION and NULL bufptr

1 participant