]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
fix build on old gcc
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 14 Feb 2024 04:27:04 +0000 (23:27 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 14 Feb 2024 04:27:04 +0000 (23:27 -0500)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
c_src/cmd_fsck.c

index 802f44eaf2ea565a644948c090bfb5ef0d9c4feb..321463caf5768df4eedc05cdb4a85d506216a62b 100644 (file)
@@ -219,6 +219,8 @@ int cmd_fsck(int argc, char *argv[])
        if (kernel_probed < 0)
                kernel_probed = should_use_kernel_fsck(devs);
 
+       struct bch_opts opts = bch2_opts_empty();
+
        if (kernel_probed) {
                struct bch_ioctl_fsck_offline *fsck = calloc(sizeof(*fsck) +
                                                             sizeof(u64) * devs.nr, 1);
@@ -241,7 +243,6 @@ int cmd_fsck(int argc, char *argv[])
                ret = splice_fd_to_stdinout(fsck_fd);
        } else {
 userland_fsck:
-               struct bch_opts opts = bch2_opts_empty();
                ret = bch2_parse_mount_opts(NULL, &opts, opts_str.buf);
                if (ret)
                        return ret;