All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: fix initialiser warning in fs/btrfs/tree-checker.c
@ 2021-09-19 22:40 Russell King (Oracle)
  2021-09-19 22:44 ` Qu Wenruo
  2021-09-20  8:12 ` David Sterba
  0 siblings, 2 replies; 8+ messages in thread
From: Russell King (Oracle) @ 2021-09-19 22:40 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik, David Sterba; +Cc: Qu Wenruo, linux-btrfs

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.

Fixes: 1465af12e254 ("btrfs: tree-checker: fix false alert caused by legacy btrfs root item")
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 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 a8b2e0d2c025..1737b62756a6 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -1068,7 +1068,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.30.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-09-20  8:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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)
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

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.