Skip to content

os_intfs: make the rx_ampdu sz_limit branch chain exhaustive - #47

Merged
adeepn merged 2 commits into
tune_for_jethubfrom
fix/rx-ampdu-sz-limit-warning
Aug 24, 2026
Merged

os_intfs: make the rx_ampdu sz_limit branch chain exhaustive#47
adeepn merged 2 commits into
tune_for_jethubfrom
fix/rx-ampdu-sz-limit-warning

Conversation

@adeepn

@adeepn adeepn commented Aug 20, 2026

Copy link
Copy Markdown
Member

gcc W=2 reports sz_limit maybe-uninitialized in rtw_regsty_init_rx_ampdu_sz_limit (os_intfs.c:1096, the site #41 left open): it cannot prove the else-if chain covers i == 3. Keep the chain explicit and add a defensive final else — rtw_warn_on(1) + continue: an out-of-range index (possible only via a future edit of the loop) warns and skips the row instead of dereferencing an uninitialised pointer.

Verified: os_intfs.o under W=12 — maybe-uninitialized 2 -> 0, the file's other warning classes untouched. Squash on merge.

adeepn added 2 commits August 20, 2026 19:09
gcc W=2 cannot prove the else-if chain covers i == 3 and reports
sz_limit maybe-uninitialized; make the last branch a plain else.
No behavior change (i < 4).
… to 4ss

Keep the i == 3 arm explicit; an out-of-range index (possible only via a
future edit of the loop) trips rtw_warn_on() and skips the row instead
of silently reusing the 4ss limits.
@adeepn
adeepn merged commit ae2cc93 into tune_for_jethub Aug 24, 2026
18 of 22 checks passed
@adeepn
adeepn deleted the fix/rx-ampdu-sz-limit-warning branch August 24, 2026 14:01
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