Skip to content

Fix two clang findings: dead recv-frame helpers, DPK status test that always warned - #43

Merged
adeepn merged 2 commits into
jethome-iot:tune_for_jethubfrom
iav:fix/clang-findings
Aug 20, 2026
Merged

Fix two clang findings: dead recv-frame helpers, DPK status test that always warned#43
adeepn merged 2 commits into
jethome-iot:tune_for_jethubfrom
iav:fix/clang-findings

Conversation

@iav

@iav iav commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

A clang build (LLVM=1, arm64, 7.1 headers) turned up two defects:

  • include/rtw_recv.h: rxmem_to_recvframe(), pkt_to_recvframe(),
    pkt_to_recvmem() and pkt_to_recvdata() have no callers, and
    pkt_to_recvframe() derives its result from a local that is never
    assigned (-Wuninitialized in every TU that includes the header). Removed.
  • hal_halmac.c:630: status != DONE || status != ERROR is always true, so
    every completed DPK command logged "unexpected status". Use && as the
    sibling cases do.

gcc + clang builds: no errors; clang -Wuninitialized 152 -> 0,
-Wtautological-overlap-compare 1 -> 0, every other class unchanged.
Does not overlap #41 / #42.

iav added 2 commits August 16, 2026 16:42
rxmem_to_recvframe(), pkt_to_recvframe(), pkt_to_recvmem() and
pkt_to_recvdata() have no callers, and pkt_to_recvframe() returns a
value derived from a local that is never assigned (clang -Wuninitialized
on every translation unit that includes the header). Remove them.
status != DONE || status != ERROR is always true, so every completed
DPK command logged "unexpected status". Use && as the sibling cases do.
@adeepn
adeepn merged commit 2c7d018 into jethome-iot:tune_for_jethub Aug 20, 2026
7 of 10 checks passed
@iav
iav deleted the fix/clang-findings branch August 20, 2026 16:24
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.

2 participants