All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>, Qu Wenruo <wqu@suse.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: fix initialiser warning in fs/btrfs/tree-checker.c
Date: Sun, 19 Sep 2021 23:50:56 +0100	[thread overview]
Message-ID: <YUe+0GEN608bRcmq@shell.armlinux.org.uk> (raw)
In-Reply-To: <YUe94+ksRJrkqp16@shell.armlinux.org.uk>

On Sun, Sep 19, 2021 at 11:46:59PM +0100, Russell King (Oracle) wrote:
> On Mon, Sep 20, 2021 at 06:44:58AM +0800, Qu Wenruo wrote:
> > 
> > 
> > On 2021/9/20 06:40, Russell King (Oracle) wrote:
> > > Debian gcc 10.2.1 complains thusly:
> > > 
> > > fs/btrfs/tree-checker.c:1071:9: warning: missing braces
> > > around initializer [-Wmissing-braces]
> > >    struct btrfs_root_item ri = { 0 };
> > >           ^
> > > fs/btrfs/tree-checker.c:1071:9: warning: (near initialization for 'ri.inode') [-Wmissing-braces]
> > > 
> > > Fix it by removing the unnecessary '0' initialiser, leaving the
> > > braces.
> > 
> > This should be a compiler bug.
> > 
> > = { 0 }; is completely fine here, in fact = { }; would be more problematic.
> > 
> > What's the compiler version? I haven't hit such problem for GCC 11.1.0
> > nor clang 12.0.1.
> 
> I just realised that it's not the compiler I thought it was - It's
> GCC 4.9.4 used on 32-bit ARM.

Okay, ignore this - the warning exists with 5.14, where 4.9.4 is still
a valid compiler, but no longer with 5.15-rc.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2021-09-19 22:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-19 22:40 [PATCH] btrfs: fix initialiser warning in fs/btrfs/tree-checker.c Russell King (Oracle)
2021-09-19 22:44 ` Qu Wenruo
2021-09-19 22:46   ` Russell King (Oracle)
2021-09-19 22:50     ` Russell King (Oracle) [this message]
2021-09-19 22:57     ` Qu Wenruo
2021-09-20  8:12 ` David Sterba
2021-09-20  8:25   ` Qu Wenruo
2021-09-20  8:31     ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YUe+0GEN608bRcmq@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    --cc=wqu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.