Skip to contentSkip to conversation

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

PATCH New Gustavo A. R. Silva 1 participant 1 message Apr 6, 2023 s390

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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]

---
 arch/s390/include/asm/fcx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/include/asm/fcx.h +1 -1
index b8a028a36173..29784b4b44f6 100644
@@ -286,7 +286,7 @@ struct tccb_tcat {
  */
 struct tccb {
 	struct tccb_tcah tcah;
-	u8 tca[0];
+	u8 tca[];
 } __attribute__ ((packed, aligned(8)));
 
 struct tcw *tcw_get_intrg(struct tcw *tcw);
Signature · 1 line
2.34.1