From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D9F9C433F5 for ; Sun, 19 Sep 2021 22:51:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7EBB360F6C for ; Sun, 19 Sep 2021 22:51:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233090AbhISWwb (ORCPT ); Sun, 19 Sep 2021 18:52:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230007AbhISWw1 (ORCPT ); Sun, 19 Sep 2021 18:52:27 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C351C061574 for ; Sun, 19 Sep 2021 15:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=e29zNS38fx9puq7EAsBlNc3ENUJvT6u0VadH7PjvozQ=; b=uEv5igbzjzBu44axXbKd8niIjD 1Gst9wGzMQWl74EwbQLDjbabDUHDODotYO9flrpGyT1syzVXce3hwZRooUChFVNOL0jIK7rZoH19z ASMGNS2w80IM/ukk5gYEW2gC/5EFcBbDgOBp3gH2Yo0+4nv3TRZfo4q95tZ5k8e9WWs/uLQUVyvzV ya/PQzywZ8PU/91q00I5PvsbB7KElFCIzY8arVMue+SBdrPvDLM24/cg/1LgL8zd+kiTHE2LgipxU lAETo9tXXfSNeTAsQMUsi8PJso+DNIMZgQ/7riJumPTHRJuqoiv+BNacYnxOyc8rt4JaI/D+yi3KZ lrbLHZ8g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:54656) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mS5eD-00019r-5H; Sun, 19 Sep 2021 23:50:57 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mS5eC-0001hL-7b; Sun, 19 Sep 2021 23:50:56 +0100 Date: Sun, 19 Sep 2021 23:50:56 +0100 From: "Russell King (Oracle)" To: Qu Wenruo Cc: Chris Mason , Josef Bacik , David Sterba , Qu Wenruo , linux-btrfs@vger.kernel.org Subject: Re: [PATCH] btrfs: fix initialiser warning in fs/btrfs/tree-checker.c Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org 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!