Skip to content

Commit

Permalink
Fix unused variable warnings
Browse files Browse the repository at this point in the history
Resolved unused variable warnings observed after restricting
-Wno-unused-but-set-variable to only libzfs and libzpool.

Reviewed-by: DHE <git@dehacked.net>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#6941
  • Loading branch information
behlendorf authored and prometheanfire committed Jan 11, 2018
1 parent dd0625a commit 049b655
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 6 additions & 5 deletions cmd/zed/agents/zfs_diagnosis.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,12 @@ zfs_case_unserialize(fmd_hdl_t *hdl, fmd_case_t *cp)
static void
zfs_mark_vdev(uint64_t pool_guid, nvlist_t *vd, er_timeval_t *loaded)
{
uint64_t vdev_guid;
uint64_t vdev_guid = 0;
uint_t c, children;
nvlist_t **child;
zfs_case_t *zcp;
int ret;

ret = nvlist_lookup_uint64(vd, ZPOOL_CONFIG_GUID, &vdev_guid);
assert(ret == 0);
(void) nvlist_lookup_uint64(vd, ZPOOL_CONFIG_GUID, &vdev_guid);

/*
* Mark any cases associated with this (pool, vdev) pair.
Expand Down Expand Up @@ -253,7 +251,10 @@ zfs_mark_pool(zpool_handle_t *zhp, void *unused)
}

ret = nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &vd);
assert(ret == 0);
if (ret) {
zpool_close(zhp);
return (-1);
}

zfs_mark_vdev(pool_guid, vd, &loaded);

Expand Down
2 changes: 0 additions & 2 deletions cmd/zpool/zpool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2271,11 +2271,9 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts,
int ret = 0;
zpool_handle_t *zhp;
char *name;
uint64_t state;
uint64_t version;

name = fnvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME);
state = fnvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE);
version = fnvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION);

if (!SPA_VERSION_IS_SUPPORTED(version)) {
Expand Down

0 comments on commit 049b655

Please sign in to comment.