Skip to content

Fix #288, Remove unnecessary CF_UnionArgs_Payload_t union#341

Merged
dzbaker merged 1 commit intonasa:mainfrom
thnkslprpt:fix-288-remove-CF_UnionArgs_Payload_t-union
Mar 13, 2023
Merged

Fix #288, Remove unnecessary CF_UnionArgs_Payload_t union#341
dzbaker merged 1 commit intonasa:mainfrom
thnkslprpt:fix-288-remove-CF_UnionArgs_Payload_t-union

Conversation

@thnkslprpt
Copy link
Copy Markdown
Contributor

Checklist

Describe the contribution
Fixes #288
CF_UnionArgs_Payload_t has been removed, given that only a single member of the 3 is used in CF. That member variable - byte - has been moved into the CF_UnionArgsCmd_t struct, which was the only place where CF_UnionArgs_Payload_t was used.

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

Expected behavior changes
No impact on logic.

Contributor Info
Avi Weiss @thnkslprpt

Comment thread fsw/src/cf_cmd.c
else if (cmd->byte[0] < CF_NUM_CHANNELS)
{
ret = fn(cmd->data.byte[0], context);
ret = fn(cmd->byte[0], context);

Check notice

Code scanning / CodeQL-coding-standard

Use of non-constant function pointer

This call does not go through a const function pointer.
@dzbaker dzbaker added this to the Fornax milestone Nov 21, 2022
@dzbaker dzbaker modified the milestones: Fornax, Equuleus Dec 7, 2022
@dzbaker dzbaker requested a review from havencarlson March 2, 2023 19:34
@chillfig
Copy link
Copy Markdown
Contributor

chillfig commented Mar 9, 2023

CCB:2023.03.09: Note that padding may not be aligned from this change.

@dzbaker
Copy link
Copy Markdown
Contributor

dzbaker commented Mar 9, 2023

Hey @thnkslprpt, would you be able to resolve the conflicts? Thanks!

@thnkslprpt thnkslprpt force-pushed the fix-288-remove-CF_UnionArgs_Payload_t-union branch from 6d4e366 to 7c1a590 Compare March 12, 2023 07:31
@thnkslprpt thnkslprpt force-pushed the fix-288-remove-CF_UnionArgs_Payload_t-union branch from 7c1a590 to d3af9ca Compare March 12, 2023 07:34
@thnkslprpt
Copy link
Copy Markdown
Contributor Author

Hey @thnkslprpt, would you be able to resolve the conflicts? Thanks!

Should be done now @dzbaker

@dzbaker dzbaker merged commit 70eb257 into nasa:main Mar 13, 2023
@thnkslprpt thnkslprpt deleted the fix-288-remove-CF_UnionArgs_Payload_t-union branch March 13, 2023 20:29
@dzbaker dzbaker mentioned this pull request Jul 11, 2023
2 tasks
dzbaker added a commit that referenced this pull request Jul 11, 2023
This reverts commit 70eb257, reversing
changes made to cb2977c.
@dzbaker dzbaker mentioned this pull request Jul 11, 2023
2 tasks
dzbaker added a commit that referenced this pull request Jul 11, 2023
dzbaker added a commit to dzbaker/CF that referenced this pull request Jul 11, 2023
@dzbaker dzbaker modified the milestones: Equuleus, v7.0.0 Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CF_UnionArgs_Payload_t elements dword and hword not used, union not necessary

4 participants