wifi: iwlwifi: fw: file: don't use [0] for variable arrays
authorJohannes Berg <johannes.berg@intel.com>
Thu, 7 Dec 2023 02:50:14 +0000 (04:50 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 12 Dec 2023 09:37:00 +0000 (10:37 +0100)
This causes fortify warnings when compiled against recent kernels
with recent compilers, and generally is not supported in the kernel
anymore.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20231207044813.367a2c77b9be.I4964ec8ca1d30c7c3163f9873814c8205a1a14eb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/file.h

index 03f6e520145f0b9a559db8b9880438006f032e77..7bbc55ccc3ceffb74d50bf85b305c4e97feea0f0 100644 (file)
@@ -20,7 +20,7 @@ struct iwl_ucode_header {
                        __le32 init_size;       /* bytes of init code */
                        __le32 init_data_size;  /* bytes of init data */
                        __le32 boot_size;       /* bytes of bootstrap code */
-                       u8 data[0];             /* in same order as sizes */
+                       u8 data[];              /* in same order as sizes */
                } v1;
                struct {
                        __le32 build;           /* build number */
@@ -29,7 +29,7 @@ struct iwl_ucode_header {
                        __le32 init_size;       /* bytes of init code */
                        __le32 init_data_size;  /* bytes of init data */
                        __le32 boot_size;       /* bytes of bootstrap code */
-                       u8 data[0];             /* in same order as sizes */
+                       u8 data[];              /* in same order as sizes */
                } v2;
        } u;
 };