From: Ruediger Meier Date: Thu, 15 Jun 2017 06:56:01 +0000 (+0200) Subject: libmount: fix warning "set but not used" X-Git-Tag: v2.31-rc1~293^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b5f75e412ac613478b44a7c02680d1578a48c0f;p=thirdparty%2Futil-linux.git libmount: fix warning "set but not used" Signed-off-by: Ruediger Meier --- diff --git a/libmount/src/tab.c b/libmount/src/tab.c index 10da730e3e..760b95b5fb 100644 --- a/libmount/src/tab.c +++ b/libmount/src/tab.c @@ -1422,7 +1422,6 @@ struct libmnt_fs *mnt_table_get_fs_root(struct libmnt_table *tb, { char *root = NULL; const char *mnt = NULL; - const char *fstype; struct libmnt_fs *src_fs = NULL; assert(fs); @@ -1430,8 +1429,6 @@ struct libmnt_fs *mnt_table_get_fs_root(struct libmnt_table *tb, DBG(TAB, ul_debug("lookup fs-root for '%s'", mnt_fs_get_source(fs))); - fstype = mnt_fs_get_fstype(fs); - if (tb && (mountflags & MS_BIND)) { const char *src, *src_root; char *xsrc = NULL; @@ -1496,7 +1493,8 @@ struct libmnt_fs *mnt_table_get_fs_root(struct libmnt_table *tb, /* * btrfs-subvolume mount -- get subvolume name and use it as a root-fs path */ - else if (tb && fstype && (!strcmp(fstype, "btrfs") || !strcmp(fstype, "auto"))) { + else if (tb && fs->fstype && + (!strcmp(fs->fstype, "btrfs") || !strcmp(fs->fstype, "auto"))) { if (get_btrfs_fs_root(tb, fs, &root) < 0) goto err; }