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

s390/fcx: replace zero-length array with flexible-array member

Zero-length arrays are deprecated [1] and have to be replaced by C99
flexible-array members.

This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines
on memcpy() and help to make progress towards globally enabling
-fstrict-flex-arrays=3 [2]

Link: https://github.com/KSPP/linux/issues/78 [1]
Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2]
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/ZC7XT5prvoE4Yunm@work
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

authored by

Gustavo A. R. Silva and committed by
Vasily Gorbik
6ca87bc4 3071e9b3

+1 -1
+1 -1
arch/s390/include/asm/fcx.h
··· 286 286 */ 287 287 struct tccb { 288 288 struct tccb_tcah tcah; 289 - u8 tca[0]; 289 + u8 tca[]; 290 290 } __attribute__ ((packed, aligned(8))); 291 291 292 292 struct tcw *tcw_get_intrg(struct tcw *tcw);