Skip to content

Fix nasa#166, removed assignments that are never used as detected by static code analysis - #168

Open
myc-yang wants to merge 1 commit into
nasa:devfrom
myc-yang:166-useless-variable-assigments
Open

myc-yang wants to merge 1 commit into
nasa:devfrom
myc-yang:166-useless-variable-assigments

Conversation

@myc-yang

@myc-yang myc-yang commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

For members of the cFS Team
Click the Preview tab and select the pull request template corresponding to the type of change you are submitting:

Checklist (Please check before submitting)

Describe the contribution
Fixes #166

Testing performed
Static code analysis and Unit Tests

Expected behavior changes
No impact to behavior

System(s) tested on

  • Hardware: PC
  • OS: Linux

Additional context
Add any other context about the contribution here.

Third party code
If included, identify any third party code and provide text file of license

Contributor Info - All information REQUIRED for consideration of pull request
Michael Yang / NASA/GSFC

@myc-yang
myc-yang force-pushed the 166-useless-variable-assigments branch from f5c6cab to 222d2fc Compare September 10, 2026 19:08
@myc-yang
myc-yang requested a review from jphickey September 14, 2026 13:28
@myc-yang
myc-yang marked this pull request as draft September 14, 2026 13:28
@myc-yang
myc-yang force-pushed the 166-useless-variable-assigments branch from 8d04234 to c1b2920 Compare September 14, 2026 17:16
@myc-yang
myc-yang marked this pull request as ready for review September 14, 2026 17:26
Comment thread fsw/src/ds_table.c Outdated

/* Get start of linked list (all MID's with same hash result) */
HashLink = DS_AppData.HashTable[HashTableIndex];
DS_HashLink_t *HashLink = DS_AppData.HashTable[HashTableIndex];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep these as separate declarations and assignments?

Try to avoid mixing declarations and logic.

Just remove the assignments on the original declarations, and keep the assignments where they were.

@myc-yang
myc-yang force-pushed the 166-useless-variable-assigments branch from c1b2920 to 9e1a3e4 Compare September 15, 2026 15:06
@myc-yang
myc-yang force-pushed the 166-useless-variable-assigments branch from 9e1a3e4 to 59dbc19 Compare September 16, 2026 11:16
@myc-yang myc-yang changed the title Fix nasa#166, removed assignments that are never used as detected by CodeSonar and/or Axle Fix nasa#166, removed assignments that are never used as detected by static code analysis Sep 16, 2026
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.

DS files make variable assignments that prove to be useless.

3 participants