aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtul Raut <[email protected]>2023-07-30 19:18:08 -0700
committerHelge Deller <[email protected]>2023-07-31 14:54:08 +0200
commit43a1120c0578791a7cdac1978406d9bf486001d9 (patch)
tree36622994162d267421340fa917b86d96dd86d5c3
parent5d0c230f1de8c7515b6567d9afba1f196fb4e2f4 (diff)
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 <[email protected]> Signed-off-by: Helge Deller <[email protected]>
-rw-r--r--drivers/video/fbdev/amifb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/amifb.c b/drivers/video/fbdev/amifb.c
index d88265dbebf4..f216b2c702a1 100644
--- a/drivers/video/fbdev/amifb.c
+++ b/drivers/video/fbdev/amifb.c
@@ -687,7 +687,7 @@ struct fb_var_cursorinfo {
__u16 height;
__u16 xspot;
__u16 yspot;
- __u8 data[1]; /* field with [height][width] */
+ DECLARE_FLEX_ARRAY(__u8, data); /* field with [height][width] */
};
struct fb_cursorstate {