Skip to content

tc6: merge consecutive identical switch cases#76

Open
tkummermehr wants to merge 1 commit intoMicrochipTech:mainfrom
tkummermehr:static-analysis/branch-duplication-async
Open

tc6: merge consecutive identical switch cases#76
tkummermehr wants to merge 1 commit intoMicrochipTech:mainfrom
tkummermehr:static-analysis/branch-duplication-async

Conversation

@tkummermehr
Copy link
Copy Markdown
Collaborator

Summary

Merge REGISTER_OP_READ and REGISTER_OP_READWRITE_STAGE1 cases which both set write = false. Reduces code duplication in switch statement. Fixes clang-tidy bugprone-branch-clone warning.

Test plan

  • Static analysis re-run confirms warning eliminated
  • Code logic unchanged (only case fall-through added)

REGISTER_OP_READ and REGISTER_OP_READWRITE_STAGE1 both set write = false.
Merge into a single case with fall-through to reduce duplication.

Finding: clang-tidy/bugprone-branch-clone at libtc6/src/tc6.c:832
@tkummermehr tkummermehr requested a review from SvenSemmler May 4, 2026 10:41
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.

1 participant