nfc: pn533: Avoid -Wflex-array-member-not-at-end warnings
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 20 Aug 2024 01:27:11 +0000 (19:27 -0600)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 Aug 2024 00:15:43 +0000 (17:15 -0700)
-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]

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/ZsPw7+6vNoS651Cb@elsanto
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/nfc/pn533/usb.c

index a187f0e0b0f7d1799f3f8d8d6ad36a801b7ca756..ffd7367ce11945ad74c2e2293c8be48e755918b0 100644 (file)
@@ -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 {