summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 09:52:41 -0700
committerBrian Behlendorf <[email protected]>2010-08-27 15:34:03 -0700
commite75c13c353571efaa9b4e047f16969ec13a518f5 (patch)
treed6d4092487d7ca7084de7cb78b30fd527e6ac472 /lib
parent2598c0012dc33496539ce893a0af601c66cbb7e2 (diff)
Fix gcc missing case warnings
Gcc ASSERT() missing cases are impossible Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_changelist.c2
-rw-r--r--lib/libzfs/libzfs_dataset.c12
-rw-r--r--lib/libzfs/libzfs_pool.c9
3 files changed, 22 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_changelist.c b/lib/libzfs/libzfs_changelist.c
index 4328d38a2..0bcfc0423 100644
--- a/lib/libzfs/libzfs_changelist.c
+++ b/lib/libzfs/libzfs_changelist.c
@@ -131,6 +131,8 @@ changelist_prefix(prop_changelist_t *clp)
case ZFS_PROP_SHARESMB:
(void) zfs_unshare_smb(cn->cn_handle, NULL);
break;
+ default:
+ break;
}
}
}
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c
index 089be7e04..e2c4c1e16 100644
--- a/lib/libzfs/libzfs_dataset.c
+++ b/lib/libzfs/libzfs_dataset.c
@@ -72,6 +72,8 @@ zfs_type_to_name(zfs_type_t type)
return (dgettext(TEXT_DOMAIN, "snapshot"));
case ZFS_TYPE_VOLUME:
return (dgettext(TEXT_DOMAIN, "volume"));
+ default:
+ break;
}
return (NULL);
@@ -180,6 +182,8 @@ zfs_validate_name(libzfs_handle_t *hdl, const char *path, int type,
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"reserved disk name"));
break;
+ default:
+ break;
}
}
@@ -1015,6 +1019,8 @@ badlabel:
"component of '%s' is too long"),
propname);
break;
+ default:
+ break;
}
(void) zfs_error(hdl, EZFS_BADPROP, errbuf);
goto error;
@@ -1139,6 +1145,8 @@ badlabel:
case ZFS_PROP_NORMALIZE:
chosen_normal = (int)intval;
break;
+ default:
+ break;
}
/*
@@ -1187,6 +1195,8 @@ badlabel:
goto error;
}
break;
+ default:
+ break;
}
}
}
@@ -1674,6 +1684,8 @@ get_numeric_property(zfs_handle_t *zhp, zfs_prop_t prop, zprop_source_t *src,
mntopt_on = MNTOPT_NBMAND;
mntopt_off = MNTOPT_NONBMAND;
break;
+ default:
+ break;
}
/*
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c
index eac5a4c4d..f1edb77f0 100644
--- a/lib/libzfs/libzfs_pool.c
+++ b/lib/libzfs/libzfs_pool.c
@@ -178,6 +178,8 @@ char *
zpool_state_to_name(vdev_state_t state, vdev_aux_t aux)
{
switch (state) {
+ default:
+ break;
case VDEV_STATE_CLOSED:
case VDEV_STATE_OFFLINE:
return (gettext("OFFLINE"));
@@ -421,6 +423,8 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname,
* Perform additional checking for specific properties.
*/
switch (prop) {
+ default:
+ break;
case ZPOOL_PROP_VERSION:
if (intval < version || intval > SPA_VERSION) {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
@@ -730,7 +734,10 @@ zpool_name_valid(libzfs_handle_t *hdl, boolean_t isopen, const char *pool)
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"multiple '@' delimiters in name"));
break;
-
+ case NAME_ERR_NO_AT:
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "permission set is missing '@'"));
+ break;
}
}
return (B_FALSE);