aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/clk.py
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2023-01-05 13:57:10 -0800
committerKees Cook <[email protected]>2023-01-19 15:18:19 -0800
commitb5fc3ca3954fd0382bb576a5a295c03a089ac7e3 (patch)
tree51bdf82e4315f78b79cd5981d2100b48ca5e0746 /scripts/gdb/linux/clk.py
parent439a1bcac648fe9b59210cde8991fb2acf37bdab (diff)
ARM: ixp4xx: Replace 0-length arrays with flexible arrays
Zero-length arrays are deprecated[1]. Replace npe_load_firmware's union of 0-length arrays with flexible arrays. Detected with GCC 13, using -fstrict-flex-arrays=3: drivers/soc/ixp4xx/ixp4xx-npe.c: In function 'npe_load_firmware': drivers/soc/ixp4xx/ixp4xx-npe.c:570:60: warning: array subscript i is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds=] 570 | image->data[i] = swab32(image->data[i]); include/uapi/linux/swab.h:115:54: note: in definition of macro '__swab32' 115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) | ^ drivers/soc/ixp4xx/ixp4xx-npe.c:570:42: note: in expansion of macro 'swab32' 570 | image->data[i] = swab32(image->data[i]); | ^~~~~~ drivers/soc/ixp4xx/ixp4xx-npe.c:522:29: note: while referencing 'data' 522 | u32 data[0]; | ^~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: Krzysztof Halasa <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: "Gustavo A. R. Silva" <[email protected]> Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gdb/linux/clk.py')
0 files changed, 0 insertions, 0 deletions