Home
last modified time | relevance | path

Searched hist:"47699 a2b" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/scsi/aacraid/
H A Daacraid.h47699a2b Mon Jul 03 06:48:46 CDT 2023 Arnd Bergmann <arnd@arndb.de> scsi: aacraid: Avoid -Warray-bounds warning

The one-element array in aac_aifcmd is actually meant as a flexible array,
and causes an overflow warning that can be avoided using the normal flex
arrays:

drivers/scsi/aacraid/commsup.c:1166:17: error: array index 1 is past the end of the array (that has type 'u8[1]' (aka 'unsigned char[1]'), cast to '__le32 *' (aka 'unsigned int *')) [-Werror,-Warray-bounds]
(((__le32 *)aifcmd->data)[1] == cpu_to_le32(3));
^ ~

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230703114851.1194510-1-arnd@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>