Skip to content

Commit 43a1120

Browse files
atulrauthdeller
authored andcommitted
fbdev: amifb: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper
Replacing zero-length arrays with C99 flexible-array members because they are deprecated. Use the new DECLARE_FLEX_ARRAY() auxiliary macro instead of defining a zero-length array. This fixes warnings such as: ./drivers/video/fbdev/amifb.c:690:6-10: WARNING use flexible-array member instead Signed-off-by: Atul Raut <rauji.raut@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 5d0c230 commit 43a1120

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/video/fbdev/amifb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ struct fb_var_cursorinfo {
687687
__u16 height;
688688
__u16 xspot;
689689
__u16 yspot;
690-
__u8 data[1]; /* field with [height][width] */
690+
DECLARE_FLEX_ARRAY(__u8, data); /* field with [height][width] */
691691
};
692692

693693
struct fb_cursorstate {

0 commit comments

Comments
 (0)