Skip to contentSkip to conversation

nfc: pn533: Avoid -Wflex-array-member-not-at-end warnings

PATCH Applied Gustavo A. R. Silva 3 participants 3 messages Aug 20, 2024 – Aug 22, 2024

Subsystems (3)

v1 of 2 Applied 1/1 Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfc: pn533: Avoid -Wflex-array-member-not-at-end warnings

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

Remove unnecessary flex-array member data[], and with this fix the following warnings:

drivers/nfc/pn533/usb.c:268:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] drivers/nfc/pn533/usb.c:275:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

---
 drivers/nfc/pn533/usb.c | 1 -
 1 file changed, 1 deletion(-)
drivers/nfc/pn533/usb.c +0 -1
index a187f0e0b0f7..ffd7367ce119 100644
@@ -254,7 +254,6 @@ struct pn533_acr122_ccid_hdr {
 	 * byte for reposnse msg
 	 */
 	u8 params[3];
-	u8 data[]; /* payload */
 } __packed;
 
 struct pn533_acr122_apdu_hdr {
Signature · 1 line
2.34.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Gustavo A. R. Silva

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

Remove unnecessary flex-array member data[], and with this fix the following warnings:

drivers/nfc/pn533/usb.c:268:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] drivers/nfc/pn533/usb.c:275:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

#2 lore raw
In reply to Gustavo A. R. Silva
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Mon, 19 Aug 2024 19:27:11 -0600 you wrote:

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

Remove unnecessary flex-array member data[], and with this fix the following warnings:

drivers/nfc/pn533/usb.c:268:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] drivers/nfc/pn533/usb.c:275:38: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

[...]

Here is the summary with links:
- [next] nfc: pn533: Avoid -Wflex-array-member-not-at-end warnings

    https://git.kernel.org/netdev/net-next/c/488d34643ec3

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html