diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-12-04 10:30:13 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-12-12 18:10:41 +0300 |
commit | 595b1280e2c95ea53fbb228bb90d834caa0f86f1 (patch) | |
tree | 89e4c52b2880dd89e530cbe4f284ba43dab61882 /include/sound/es1688.h | |
parent | 379872288fd353119d15c65f11d20a219e09d6b2 (diff) | |
download | linux-595b1280e2c95ea53fbb228bb90d834caa0f86f1.tar.xz |
wifi: rtw89: avoid stringop-overflow warning
After -Wstringop-overflow got enabled, the rtw89 driver produced
two odd warnings with gcc-13:
drivers/net/wireless/realtek/rtw89/coex.c: In function 'rtw89_btc_ntfy_scan_start':
drivers/net/wireless/realtek/rtw89/coex.c:5362:50: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
5362 | wl->dbcc_info.scan_band[phy_idx] = band;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from drivers/net/wireless/realtek/rtw89/coex.h:8,
from drivers/net/wireless/realtek/rtw89/coex.c:5:
drivers/net/wireless/realtek/rtw89/core.h:1441:12: note: at offset [64, 255] into destination object 'scan_band' of size 2
1441 | u8 scan_band[RTW89_PHY_MAX]; /* scan band in each phy */
| ^~~~~~~~~
drivers/net/wireless/realtek/rtw89/coex.c: In function 'rtw89_btc_ntfy_switch_band':
drivers/net/wireless/realtek/rtw89/coex.c:5406:50: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
5406 | wl->dbcc_info.scan_band[phy_idx] = band;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
drivers/net/wireless/realtek/rtw89/core.h:1441:12: note: at offset [64, 255] into destination object 'scan_band' of size 2
1441 | u8 scan_band[RTW89_PHY_MAX]; /* scan band in each phy */
| ^~~~~~~~~
I don't know what happened here, but adding an explicit range check
shuts up the output.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231204073020.1105416-1-arnd@kernel.org
Diffstat (limited to 'include/sound/es1688.h')
0 files changed, 0 insertions, 0 deletions