Skip to content

reflection: remove unused loop counter in packed_decl_setup#293

Open
heitbaum wants to merge 1 commit intopantoniou:masterfrom
heitbaum:unused
Open

reflection: remove unused loop counter in packed_decl_setup#293
heitbaum wants to merge 1 commit intopantoniou:masterfrom
heitbaum:unused

Conversation

@heitbaum
Copy link
Copy Markdown

@heitbaum heitbaum commented May 9, 2026

i was incremented alongside declpf in the field/enum-value iteration loop but its value was never read after assignment. declpf already tracks position via pointer arithmetic, making i entirely redundant.

Drop i from the local declaration and simplify the for loop.

Fixes -Wunused-but-set-variable warning from GCC.

`i` was incremented alongside `declpf` in the field/enum-value
iteration loop but its value was never read after assignment.
`declpf` already tracks position via pointer arithmetic, making
`i` entirely redundant.

Drop `i` from the local declaration and simplify the for loop.

Fixes -Wunused-but-set-variable warning from GCC.
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