lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <76b3c602-ab9d-7368-2c83-f5a8f4f0f330@gmx.de>
Date:   Mon, 31 Jul 2023 14:37:42 +0200
From:   Helge Deller <deller@....de>
To:     Atul Raut <rauji.raut@...il.com>
Cc:     linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org,
        linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH] fbdev/amifb: Replace zero-length arrays with
 DECLARE_FLEX_ARRAY() helper

On 7/31/23 04:18, Atul Raut wrote:
> 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 (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
>
> Signed-off-by: Atul Raut <rauji.raut@...il.com>

applied.
Thanks!
Helge

> ---
>   drivers/video/fbdev/amifb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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 {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ