fix build on old gcc

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2024-02-13 23:27:04 -05:00
parent da67fc2360
commit f2ba586baf

View File

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