kaloz / mwlwifi

mac80211 driver for the Marvell 88W8864 802.11ac chip
396 stars 119 forks source link

replace [0] with [] #418

Closed neheb closed 7 months ago

neheb commented 7 months ago

The latter has been deprecated upstream and does not work with the bounds checking performed there. Fixes warnings such as:

error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning] 493 | __write_overflow_field(p_size_field, size);

neheb commented 7 months ago

Related: https://github.com/openwrt/openwrt/issues/15108

stklcode commented 7 months ago

Build and run tested on WRT1900ACS with dual 88W8864 radios on Kernel 6.6.25 (applied this PR as patch in OpenWRT sourcetree and ).

No regressions noticed during a short test.