Commit 2631c5b6 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Felix Fietkau

wifi: mt76: Replace zero-length array with flexible-array member

Zero-length arrays are deprecated [1] and have to be replaced by C99
flexible-array members.

This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines
on memcpy() and help to make progress towards globally enabling
-fstrict-flex-arrays=3 [2]

Link: https://github.com/KSPP/linux/issues/78 [1]
Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2]
Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 03eb52dd
...@@ -127,7 +127,7 @@ struct mt76_connac2_mcu_rxd { ...@@ -127,7 +127,7 @@ struct mt76_connac2_mcu_rxd {
u8 rsv1[2]; u8 rsv1[2];
u8 s2d_index; u8 s2d_index;
u8 tlv[0]; u8 tlv[];
}; };
struct mt76_connac2_patch_hdr { struct mt76_connac2_patch_hdr {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment