[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c3f856a5-730c-0488-70c0-f11713cb71f3@gmail.com>
Date: Fri, 20 May 2022 21:58:09 +0200
From: Christian Lamparter <chunkeey@...il.com>
To: Jakub Kicinski <kuba@...nel.org>, kvalo@...nel.org,
johannes@...solutions.net
Cc: netdev@...r.kernel.org, linux-wireless@...r.kernel.org
Subject: Re: [PATCH net-next 8/8] wifi: carl9170: silence a GCC 12
-Warray-bounds warning
On 20/05/2022 21:43, Jakub Kicinski wrote:
> carl9170 has a big union (struct carl9170_cmd) with all the command
> types in it. But it allocates buffers only large enough for a given
> command. This upsets GCC 12:
>
> drivers/net/wireless/ath/carl9170/cmd.c:125:30: warning: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[8]’ [-Warray-bounds]
> 125 | tmp->hdr.cmd = cmd;
> | ~~~~~~~~~~~~~^~~~~
>
> Punt the warning to W=1 for now. Hopefully GCC will learn to
> recognize which fields are in-bounds.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Acked-by: Christian Lamparter <chunkeey@...il.com>
Powered by blists - more mailing lists