Skip to content

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

Merged
myc-yang merged 1 commit into
nasa:devfrom
myc-yang:144-fix-useless-assignments
Oct 27, 2026
Merged

myc-yang merged 1 commit into
nasa:devfrom
myc-yang:144-fix-useless-assignments

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 #144

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 requested a review from jphickey September 10, 2026 19:30
@myc-yang
myc-yang force-pushed the 144-fix-useless-assignments branch from f07dac9 to 39dfbb9 Compare September 10, 2026 19:40

@jphickey jphickey left a comment

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.

Coding standards say we should declare variables at the top of the function, not midway at the time of use.

Just keep all declarations at the beginning with no assignment, and assign later.

Comment thread fsw/src/cs_app.c Resolved
@myc-yang
myc-yang force-pushed the 144-fix-useless-assignments branch 2 times, most recently from e1239a3 to 0fb7d88 Compare September 16, 2026 11:16
@myc-yang myc-yang changed the title Fix nasa#144, removed assignments that are never used as detected by CodeSonar and/or Axle Fix nasa#144, removed assignments that are never used as detected by static code analysis Sep 16, 2026
@myc-yang
myc-yang force-pushed the 144-fix-useless-assignments branch from 0fb7d88 to b20c312 Compare October 23, 2026 13:51
@myc-yang
myc-yang merged commit 4702bf6 into nasa:dev Oct 27, 2026
12 checks passed
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.

CS files make variable assignments that prove to be useless

2 participants