Fix -Wmissing-prototypes warnings across all source files - #366
Open
iav wants to merge 7 commits into
Open
Conversation
1 task
Contributor
Author
iav
marked this pull request as draft
June 18, 2026 15:50
iav
force-pushed
the
fix-wmissing-prototypes
branch
from
June 18, 2026 16:42
a3b096b to
ba8d469
Compare
iav
marked this pull request as ready for review
June 18, 2026 16:44
Assisted-by: Claude:claude-opus-4.8
…ired headers Assisted-by: Claude:claude-opus-4.8
Assisted-by: Claude:claude-opus-4.8
…aders Assisted-by: Claude:claude-opus-4.8
… headers Assisted-by: Claude:claude-opus-4.8
Assisted-by: Claude:claude-opus-4.8
RF_DBG, PHYDM_DBG and DBG_COUNTER expand to nothing in their
debug-disabled branches, so call sites like `if (cond) RF_DBG(...);`
collapse to `if (cond) ;` and gcc reports -Wempty-body. Give those
empty branches a `do {} while (0)` body so they stay valid single
statements; a bare `{}` would break `if (...) MACRO(); else ...`
chains (dangling else). Also brace genuinely empty if-bodies.
Assisted-by: Claude:claude-opus-4.8
iav
force-pushed
the
fix-wmissing-prototypes
branch
from
July 2, 2026 23:14
ba8d469 to
8dae771
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes all
-Wmissing-prototypeswarnings generated when building this driveragainst Linux kernels that enable this warning globally (e.g. Armbian with
kernel 7.x).
Changes across 68 files:
staticto ~121 functions used only within their translation unitinclude/rtw_ioctl.h:rtw_indicate_wx_assoc_event,rtw_indicate_wx_disassoc_event,indicate_wx_scan_complete_eventinclude/rtl8192e_hal.h:UpdateInterruptMask8192EU(inside
#ifdef CONFIG_USB_HCI)hal/phydm/phydm_api.h:config_phydm_read_txagc_n(inside
#ifndef PHYDM_COMMON_API_SUPPORT)platform/platform_ops.h: include added toplatform_ops.cthat lack a natural shared header:
recvbuf2recvframe,netdev_br_init,pm_netdev_open,rtw_hw_suspend,rtw_hw_resume,rtw_resume_process,rtw_change_ifname,phydm_fw_fix_rate,record_ra_info,MgntQuery_NssTxRateexterndeclarations fromos_dep/linux/mlme_linux.c(now covered by
rtw_ioctl.h)#ifdef CONFIG_BT_COEXIST_SOCKET_TRXblock incore/rtw_btcoex.c(three functions were incorrectly outside the guard)
core/rtw_chplan.cfrom CRLF to LFTested: full kernel build with Armbian on rockchip64, no remaining
-Wmissing-prototypeswarnings for this driver.🤖 Generated with Claude Code
Commits are split by subsystem (core / os_dep / hal / phydm / rtl8192e) for independent review. Verified under
x86_64 defconfig(which setsCONFIG_WERROR) on Linux 6.12.93: 0-Wmissing-prototypesremaining — including 5 functions behind USB/kernel-version guards that only surface under a strict build config.