Compiling bcachefs sources with LLVM triggers uninitialized variables
warnings.

Signed-off-by: Piotr Zalewski <[email protected]>
---
 fs/bcachefs/move.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c
index 8c032ef3a567..94cac498d372 100644
--- a/fs/bcachefs/move.c
+++ b/fs/bcachefs/move.c
@@ -674,8 +674,8 @@ int bch2_evacuate_bucket(struct moving_context *ctxt,
        struct bkey_buf sk;
        struct bkey_s_c k;
        struct data_update_opts data_opts;
-       unsigned dirty_sectors, bucket_size;
-       u64 fragmentation;
+       unsigned dirty_sectors = 0, bucket_size = 0;
+       u64 fragmentation = 0;
        int ret = 0;
 
        struct bch_dev *ca = bch2_dev_tryget(c, bucket.inode);
-- 
2.47.0



Reply via email to