Input: applespi - replace zero-length array with DECLARE_FLEX_ARRAY() helper
Subsystems (2)
PATCH 1/1 Input: applespi - replace zero-length array with DECLARE_FLEX_ARRAY() helper
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new DECLARE_FLEX_ARRAY() helper macro.
This helper allows for flexible-array members in unions.
--- drivers/input/keyboard/applespi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/applespi.c +1 -1
@@ -311,7 +311,7 @@ struct message {struct command_protocol_mt_init init_mt_command;struct command_protocol_capsl capsl_command;struct command_protocol_bl bl_command; -u8 data[0 ]; +DECLARE_FLEX_ARRAY (u8, data); }; };
Signature · 1 line
2.34.1
Quoted 11 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new
DECLARE_FLEX_ARRAY()helper macro.This helper allows for flexible-array members in unions.
Signature · 1 line
Kees Cook
Quoted 11 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new
DECLARE_FLEX_ARRAY()helper macro.This helper allows for flexible-array members in unions.
Applied, thank you.
Signature · 1 line
Dmitry