mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2025-01-15 08:15:33 +00:00
mxm_wifiex: avoid the array-bounds build warnings on L5.17
When build the wifi driver based on L5.17 kernel, we may meet the following build warnings. Add Wno-array-bounds cc-flags to avoid it. /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c: In function ‘woal_host_mlme_disconnect’: /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:9127:13: warning: array subscript ‘struct ieee80211_mgmt[0]’ is partly outside array bounds of ‘t_u8[26]’ {aka ‘unsigned char[26]’} [-Warray-bounds] 9127 | mgmt->frame_control = (__force __le16)IEEE80211_STYPE_DEAUTH; | ^~ /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:9123:14: note: while referencing ‘frame_buf’ 9123 | t_u8 frame_buf[26]; | ^~~~~~~~~ /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:9128:13: warning: array subscript ‘struct ieee80211_mgmt[0]’ is partly outside array bounds of ‘t_u8[26]’ {aka ‘unsigned char[26]’} [-Warray-bounds] 9128 | mgmt->duration = 0; | ^~ /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:9123:14: note: while referencing ‘frame_buf’ 9123 | t_u8 frame_buf[26]; | ^~~~~~~~~ /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:9129:13: warning: array subscript ‘struct ieee80211_mgmt[0]’ is partly outside array bounds of ‘t_u8[26]’ {aka ‘unsigned char[26]’} [-Warray-bounds] 9129 | mgmt->seq_ctrl = 0; | ^~ /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:9123:14: note: while referencing ‘frame_buf’ 9123 | t_u8 frame_buf[26]; | ^~~~~~~~~ /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:9130:13: warning: array subscript ‘struct ieee80211_mgmt[0]’ is partly outside array bounds of ‘t_u8[26]’ {aka ‘unsigned char[26]’} [-Warray-bounds] 9130 | mgmt->u.deauth.reason_code = (__force __le16)reason_code; | ^~ /work/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_sta_cfg80211.c:9123:14: note: while referencing ‘frame_buf’ 9123 | t_u8 frame_buf[26]; | ^~~~~~~~~ Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Approved-by: Tian Yang <yang.tian@nxp.com>
This commit is contained in:
parent
ce5f564cb7
commit
6620b8524b
1 changed files with 1 additions and 0 deletions
|
@ -345,6 +345,7 @@ endif
|
|||
#ccflags-y += -Wmisleading-indentation
|
||||
#ccflags-y += -Wunused-const-variable
|
||||
ccflags-y += -Wno-stringop-truncation
|
||||
ccflags-y += -Wno-array-bounds
|
||||
#############################################################################
|
||||
# Make Targets
|
||||
#############################################################################
|
||||
|
|
Loading…
Reference in a new issue