Re: [PATCH] btrfs: fix gcc-4.8 build warning

From: David Sterba
Date: Wed Apr 29 2020 - 19:49:19 EST


On Wed, Apr 29, 2020 at 03:27:32PM +0200, Arnd Bergmann wrote:
> Some older compilers like gcc-4.8 warn about mismatched curly
> braces in a initializer:
>
> fs/btrfs/backref.c: In function 'is_shared_data_backref':
> fs/btrfs/backref.c:394:9: error: missing braces around
> initializer [-Werror=missing-braces]
> struct prelim_ref target = {0};
> ^
> fs/btrfs/backref.c:394:9: error: (near initialization for
> 'target.rbnode') [-Werror=missing-braces]
>
> Use the GNU empty initializer extension to avoid this.
>
> Fixes: ed58f2e66e84 ("btrfs: backref, don't add refs from shared block when resolving normal backref")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Added to devel queue, thanks.