]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bcachefs: Fix some (spurious) warnings about uninitialized vars
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 25 Mar 2021 02:11:22 +0000 (22:11 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:54 +0000 (17:08 -0400)
These are only complained about when building in userspace, for some
reason.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_gc.c
fs/bcachefs/extents.c

index 259a36f416299c9a001a251c3a102210e6b37c72..7c03c50e0fa55e59a14c232feb390e32f1352d27 100644 (file)
@@ -166,7 +166,7 @@ static int bch2_check_fix_ptrs(struct bch_fs *c, enum btree_id btree_id,
 {
        struct bkey_ptrs_c ptrs = bch2_bkey_ptrs_c(*k);
        const union bch_extent_entry *entry;
-       struct extent_ptr_decoded p;
+       struct extent_ptr_decoded p = { 0 };
        bool do_update = false;
        int ret = 0;
 
index 4007af4a780b65975e96ef81a3f9cc73ebb815d8..4bf4c27da6cd496ee430375f236e522c4a695114 100644 (file)
@@ -696,7 +696,7 @@ unsigned bch2_bkey_replicas(struct bch_fs *c, struct bkey_s_c k)
 {
        struct bkey_ptrs_c ptrs = bch2_bkey_ptrs_c(k);
        const union bch_extent_entry *entry;
-       struct extent_ptr_decoded p;
+       struct extent_ptr_decoded p = { 0 };
        unsigned replicas = 0;
 
        bkey_for_each_ptr_decode(k.k, ptrs, p, entry) {