Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #97, Remove dead code checks: NULL bufptr and RunStatus_SYS_EXCEPTION #98

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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

@@ -59,10 +59,10 @@
/* CS Reset Application counters command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
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 Note

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