Fix coverity defects: CID 147448, 147449, 147450, 147453, 147454

coverity scan CID:147448,type: unchecked return value
coverity scan CID:147449,type: unchecked return value
coverity scan CID:147450,type: unchecked return value
coverity scan CID:147453,type: unchecked return value
coverity scan CID:147454,type: unchecked return value

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn>
Closes #5206
This commit is contained in:
luozhengzheng 2016-10-03 02:24:54 +08:00 committed by Brian Behlendorf
parent 0ca5261be4
commit aecdc70604
5 changed files with 5 additions and 5 deletions

View File

@ -388,7 +388,7 @@ dev_clear(void)
fprintf(stderr, "Ioctl() error %lu / %d: %d\n",
(unsigned long) ZPIOS_CFG, cfg.cfg_cmd, errno);
lseek(zpiosctl_fd, 0, SEEK_SET);
(void) lseek(zpiosctl_fd, 0, SEEK_SET);
return (rc);
}

View File

@ -735,7 +735,7 @@ make_leaf_vdev(nvlist_t *props, const char *arg, uint64_t is_log)
}
if (ashift > 0)
nvlist_add_uint64(vdev, ZPOOL_CONFIG_ASHIFT, ashift);
(void) nvlist_add_uint64(vdev, ZPOOL_CONFIG_ASHIFT, ashift);
return (vdev);
}

View File

@ -3468,7 +3468,7 @@ zpool_vdev_name(libzfs_handle_t *hdl, zpool_handle_t *zhp, nvlist_t *nv,
if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_NOT_PRESENT, &value) == 0 ||
name_flags & VDEV_NAME_GUID) {
nvlist_lookup_uint64(nv, ZPOOL_CONFIG_GUID, &value);
(void) nvlist_lookup_uint64(nv, ZPOOL_CONFIG_GUID, &value);
(void) snprintf(buf, sizeof (buf), "%llu", (u_longlong_t)value);
path = buf;
} else if (nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0) {

View File

@ -652,7 +652,7 @@ zfs_zevent_next(zfs_zevent_t *ze, nvlist_t **event, uint64_t *event_size,
ze->ze_zevent = ev;
list_insert_head(&ev->ev_ze_list, ze);
nvlist_dup(ev->ev_nvl, event, KM_SLEEP);
(void) nvlist_dup(ev->ev_nvl, event, KM_SLEEP);
*dropped = ze->ze_dropped;
ze->ze_dropped = 0;
out:

View File

@ -456,7 +456,7 @@ zfs_inode_set_ops(zfs_sb_t *zsb, struct inode *ip)
*/
case S_IFCHR:
case S_IFBLK:
sa_lookup(ITOZ(ip)->z_sa_hdl, SA_ZPL_RDEV(zsb), &rdev,
(void) sa_lookup(ITOZ(ip)->z_sa_hdl, SA_ZPL_RDEV(zsb), &rdev,
sizeof (rdev));
/*FALLTHROUGH*/
case S_IFIFO: