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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1N-Yh65y6bEb+d7DwVOqB8ee=T1gM1cc7k6=cg1c3Jtw@mail.gmail.com>
Date:   Thu, 1 Feb 2018 12:31:36 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     "Darrick J . Wong" <darrick.wong@...cle.com>,
        linux-xfs <linux-xfs@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] xfs: Add missing braces around xfs_scrub_agfl_info initializer

On Thu, Feb 1, 2018 at 11:23 AM, Geert Uytterhoeven
<geert@...ux-m68k.org> wrote:
> With gcc-4.1.2:
>
>     fs/xfs/scrub/agheader.c: In function ‘xfs_scrub_agfl’:
>     fs/xfs/scrub/agheader.c:770: warning: missing braces around initializer
>     fs/xfs/scrub/agheader.c:770: warning: (near initialization for ‘sai.oinfo’)
>
> The first member of struct xfs_scrub_agfl_info is no longer an integral
> type, but a struct.  Add the missing curly braces to fix this.

I suspect gcc-4.5 is affected as well, but not 4.6+

> --- a/fs/xfs/scrub/agheader.c
> +++ b/fs/xfs/scrub/agheader.c
> @@ -767,7 +767,7 @@ int
>  xfs_scrub_agfl(
>         struct xfs_scrub_context        *sc)
>  {
> -       struct xfs_scrub_agfl_info      sai = { 0 };
> +       struct xfs_scrub_agfl_info      sai = { { 0 } };
>         struct xfs_agf                  *agf;

Looks ok to me, but

        struct xfs_scrub_agfl_info      sai = { };

might be slightly better in case the first member changes again.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ