Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1699430pxk; Fri, 2 Oct 2020 17:13:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnBFS42DwUR62OtTyB2WCMH7YN0EyYT5+i+ZE1y6LjP2g5Bi8XPM0YKyczPRLjxdAgBJec X-Received: by 2002:a05:6402:1642:: with SMTP id s2mr5400904edx.295.1601684035307; Fri, 02 Oct 2020 17:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601684035; cv=none; d=google.com; s=arc-20160816; b=r7C7rZBJWPooIr29usu99fqy1hr9umP8oUJfq+mpFZUwwHrCPs7G126UhYtJ+IeqFk PDNLWxGuJyiVFwqE6nO6TGF+heku1GcgZPzdSKFt9IxR2WGBxTRuTVFnBt7FU/0LlDEw 3pUg0t5xBQujWWeooG1CTbDMQOrbBA6nJAR0VXTILl7zGndmwp5J6KqfF2UwahBTzij4 WCTOTYSCU2emLTvs4Ey9kMUaHeWltfZNc19D2AqTZVEDXtbu91BNXfHmWGcolw4P857m PLmzLXc3j7/sWPy7JOIyUdHPK62HVqMNiiiECJW7FPJpl0a12uot4AHnXJfsH/29kCbZ N52A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=5QZv+Rd3bQMX47IS5ZlWsHnrzTDh43gZUw508PHN7F8=; b=URPWAyEThyuudZUKJXIswvAk6sKrEM9heIURQ7xXAjIz3iD/hXpzxOUCLv8Y5T7hwH xb4nVogF+f0pwXifXWwL6ZwHV9wMIPIwl3Arvq40swKMJlXNFit2NDf1iJT2qmp0pyJH 7wkqRHhad8ORkw4JERXYgoNaXipFpJuguaLFG40RRsbtW1wAsyy7JDylr0lUTppMKYK/ 4AaZYXnCN+Y//XqmQWNctUMveWkVfYzesPoW731//vt6+CnG6LRn3xl8NQWABs04ce15 vMQHuWRyFcTNmcDGq9o6kjsB0pwSEVzOZnG/cDEGr+GVtVdXy2eaUG6NKH74f6qzSsFG i54A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="I/+spYda"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p21si2151305ejo.182.2020.10.02.17.13.32; Fri, 02 Oct 2020 17:13:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="I/+spYda"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725764AbgJCAM3 (ORCPT + 99 others); Fri, 2 Oct 2020 20:12:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725283AbgJCAM2 (ORCPT ); Fri, 2 Oct 2020 20:12:28 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FAB7C0613D0; Fri, 2 Oct 2020 17:12:28 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id x2so1898466pjk.0; Fri, 02 Oct 2020 17:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=5QZv+Rd3bQMX47IS5ZlWsHnrzTDh43gZUw508PHN7F8=; b=I/+spYdaGvO2WV5sfLpO8DHlGCmBH7ZvKcq5mZ3GMoooMMmswFizyAl3a+GoeIMirK MmxwUO8wXBdiuRKVmjTZ9NP4dkYAfsgwgtBj7W4EMTc5lXwd6NfzJ93BAeDCXs/DTAm+ iDc+mmVR96FHw3cfok3Hk74Sm5HzwlzCmfIr2YrJ8NbTKWoZWcDjaG5xRtBcBHZzfgkA y9mUYD1+/NDJ8IwZQSzbIchw+Ti2dcLTvZLiv/PxfjDldLLoJPejaXWfFvSrb/5htXod 7clXyg9dHz3J9KV2vrIrwLkvNOuKAfbjO/UAkOvncEkDr4ryZpYH9gzMsCscahKriBSc /gEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5QZv+Rd3bQMX47IS5ZlWsHnrzTDh43gZUw508PHN7F8=; b=c2c822guNycAOP0eVsrXXCka1s34GA8doVquaWdqDzIWxlxDo17tgNYIUb4mbn8IHL vB8mTK4rdDdiQ3pAZM7KAEkiHLtEsHJnR40IIeJ+64/CxioVaWviv8F7mg/lbjVsnfEW 8kPmpNAQd8Dw6SnaQZ9Ydh8ecJ+B8XhymhRo0gRV+WX9zf8/o+jYpTqOHdtXuYxjZoPh PnfECCSdBVKrE9aAY4NkBd9beD2SNKifEiuH5IQrCEuYixXcOQYzJMUfYPJ+vJD3CtYI aSzfLgHQrQdHjcml/N1LdZASRS/XXFC57RAnnn63XmEYRIPDlz8achK1xtyEl/uReFpX 54gg== X-Gm-Message-State: AOAM533Dts5EkM9aIbRhamZmc3Dx+TRw68Bqt9xd+Gekn34T/GoxaJW5 9EDO60OOH5w6dQUs5LpmjA== X-Received: by 2002:a17:90a:203:: with SMTP id c3mr5063154pjc.149.1601683948034; Fri, 02 Oct 2020 17:12:28 -0700 (PDT) Received: from localhost.localdomain ([47.242.140.181]) by smtp.gmail.com with ESMTPSA id x140sm3303157pfc.211.2020.10.02.17.12.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 17:12:27 -0700 (PDT) From: Pujin Shi To: Chris Mason , Josef Bacik , David Sterba Cc: Qu Wenruo , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, hankinsea@gmail.com, Pujin Shi Subject: [PATCH] fs: tree-checker: fix missing brace warning for old compilers Date: Sat, 3 Oct 2020 08:11:51 +0800 Message-Id: <20201003001151.1306-1-shipujin.t@gmail.com> X-Mailer: git-send-email 2.18.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For older versions of gcc, the array = {0}; will cause warnings: fs/btrfs/tree-checker.c: In function 'check_root_item': fs/btrfs/tree-checker.c:1038:9: warning: missing braces around initializer [-Wmissing-braces] struct btrfs_root_item ri = { 0 }; ^ fs/btrfs/tree-checker.c:1038:9: warning: (near initialization for 'ri.inode') [-Wmissing-braces] 1 warnings generated Fixes: 443b313c7ff8 ("btrfs: tree-checker: fix false alert caused by legacy btrfs root item") Signed-off-by: Pujin Shi --- fs/btrfs/tree-checker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c index f0ffd5ee77bd..5028b3af308c 100644 --- a/fs/btrfs/tree-checker.c +++ b/fs/btrfs/tree-checker.c @@ -1035,7 +1035,7 @@ static int check_root_item(struct extent_buffer *leaf, struct btrfs_key *key, int slot) { struct btrfs_fs_info *fs_info = leaf->fs_info; - struct btrfs_root_item ri = { 0 }; + struct btrfs_root_item ri = {}; const u64 valid_root_flags = BTRFS_ROOT_SUBVOL_RDONLY | BTRFS_ROOT_SUBVOL_DEAD; int ret; -- 2.18.1