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 4E7A6C433EF for ; Sun, 19 Sep 2021 22:47:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 266C560F6C for ; Sun, 19 Sep 2021 22:47:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230090AbhISWsc (ORCPT ); Sun, 19 Sep 2021 18:48:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230007AbhISWsc (ORCPT ); Sun, 19 Sep 2021 18:48:32 -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 15B6FC061574 for ; Sun, 19 Sep 2021 15:47:06 -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=PyKDva89oSByhOo2ejjW6bBb4CZ0VKA1HYvHyZy47GU=; b=axmlBkpgJrQMCi7Te6aIggMmBQ vHNMXzd2TukNEEgpIJeijvmOmAqPeWDsFb5XbJxVwqsqSdFJVWoKR8KZTUOLE0wCZdPlRHVHHoL2q yfQwUirZI9pKpq79TB5lbRjFDJIg3wGVNDc5NlXCrhgp4iSMPhTzFoEvQPHCbKcf11j/AbA44j/ck oOu/Bw6Ocf+mvdBp4U6vScQXEIsm2HqvWr1YyQauViWNRdKG02fJz3xlgc/NSNhpeFlVQfNp/bafl idjeBJl4BBzUYdQS5UIqhGdu7akP2uSObTcljPQiqtJrGPEZQAWKBm3ezVfgwPBUHr468FofOGi50 YgeDQN7g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:54652) 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 1mS5aP-00019J-Hn; Sun, 19 Sep 2021 23:47:01 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mS5aN-0001h7-Bd; Sun, 19 Sep 2021 23:46:59 +0100 Date: Sun, 19 Sep 2021 23:46:59 +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 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. = { }; is not a problem for that version of GCC. Why do you think it's problematic? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!