Skip to content
Commit 13182526 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

wifi: carl9170: silence a GCC 12 -Warray-bounds warning



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.

Acked-by: default avatarChristian Lamparter <chunkeey@gmail.com>
Acked-by: default avatarKalle Valo <kvalo@kernel.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 84f23fb1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment