-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.

Move the conflicting declarations to the end of the corresponding
structures. Notice that `struct urb` is a flexible structure, this
is a structure that contains a flexible-array member.

With these changes fix the following warnings:

9 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h:1951:20: warning: structure 
containing a flexible array member is not at the end of another structure 
[-Wflex-array-member-not-at-end]
9 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h:1945:20: warning: structure 
containing a flexible array member is not at the end of another structure 
[-Wflex-array-member-not-at-end]

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h 
b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
index f42463e595cc..48b598b06523 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
@@ -1942,15 +1942,19 @@ struct rtl8xxxu_vif {
 };
 
 struct rtl8xxxu_rx_urb {
-       struct urb urb;
        struct ieee80211_hw *hw;
        struct list_head list;
+
+       /* Must be last as it ends in a flexible-array member. */
+       struct urb urb;
 };
 
 struct rtl8xxxu_tx_urb {
-       struct urb urb;
        struct ieee80211_hw *hw;
        struct list_head list;
+
+       /* Must be last as it ends in a flexible-array member. */
+       struct urb urb;
 };
 
 struct rtl8xxxu_fileops {
-- 
2.43.0


Reply via email to