Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform/x86: Avoid -Wflex-array-member-not-at-end warning

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

Move the conflicting declaration to the end of the structure. Notice
that `struct acpi_resource_irq` is a flexible structure --a structure
that contains a flexible-array member.

Fix the following warning:

drivers/platform/x86/sony-laptop.c:3330:41: 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>
Link: https://lore.kernel.org/r/Z-WlhL_tAP11M02G@kspp
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Gustavo A. R. Silva and committed by
Ilpo Järvinen
a62372b6 0af2f6be

+3 -1
+3 -1
drivers/platform/x86/sony-laptop.c
··· 3327 3327 }; 3328 3328 3329 3329 struct sony_pic_irq { 3330 - struct acpi_resource_irq irq; 3331 3330 struct list_head list; 3331 + 3332 + /* Must be last --ends in a flexible-array member. */ 3333 + struct acpi_resource_irq irq; 3332 3334 }; 3333 3335 3334 3336 struct sonypi_eventtypes {