diff options
-rw-r--r-- | cmd/zinject/translate.c | 6 | ||||
-rw-r--r-- | cmd/ztest/ztest.c | 2 | ||||
-rw-r--r-- | lib/libzfs/libzfs_changelist.c | 2 | ||||
-rw-r--r-- | lib/libzfs/libzfs_dataset.c | 12 | ||||
-rw-r--r-- | lib/libzfs/libzfs_pool.c | 9 | ||||
-rw-r--r-- | module/zfs/arc.c | 4 | ||||
-rw-r--r-- | module/zfs/dmu_send.c | 2 | ||||
-rw-r--r-- | module/zfs/dsl_prop.c | 2 | ||||
-rw-r--r-- | module/zfs/sa.c | 2 | ||||
-rw-r--r-- | module/zfs/spa.c | 5 | ||||
-rw-r--r-- | module/zfs/vdev_label.c | 2 | ||||
-rw-r--r-- | module/zfs/zfs_ioctl.c | 4 |
12 files changed, 51 insertions, 1 deletions
diff --git a/cmd/zinject/translate.c b/cmd/zinject/translate.c index 87751e315..996075283 100644 --- a/cmd/zinject/translate.c +++ b/cmd/zinject/translate.c @@ -233,6 +233,8 @@ calculate_range(const char *dataset, err_type_t type, int level, char *range, } switch (type) { + default: + break; case TYPE_DATA: break; @@ -347,6 +349,8 @@ translate_record(err_type_t type, const char *object, const char *range, * MOS objects are treated specially. */ switch (type) { + default: + break; case TYPE_MOS: record->zi_type = 0; break; @@ -473,6 +477,8 @@ translate_device(const char *pool, const char *device, err_type_t label_type, } switch (label_type) { + default: + break; case TYPE_LABEL_UBERBLOCK: record->zi_start = offsetof(vdev_label_t, vl_uberblock[0]); record->zi_end = record->zi_start + VDEV_UBERBLOCK_RING - 1; diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index fbc3c2cc9..5677dcb85 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -1998,6 +1998,8 @@ ztest_io(ztest_ds_t *zd, uint64_t object, uint64_t offset) case ZTEST_IO_SETATTR: (void) ztest_setattr(zd, object); break; + default: + break; } umem_free(data, blocksize); 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); diff --git a/module/zfs/arc.c b/module/zfs/arc.c index d6d648c65..d38d9a367 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -1143,6 +1143,8 @@ arc_space_consume(uint64_t space, arc_space_type_t type) ASSERT(type >= 0 && type < ARC_SPACE_NUMTYPES); switch (type) { + default: + break; case ARC_SPACE_DATA: ARCSTAT_INCR(arcstat_data_size, space); break; @@ -1167,6 +1169,8 @@ arc_space_return(uint64_t space, arc_space_type_t type) ASSERT(type >= 0 && type < ARC_SPACE_NUMTYPES); switch (type) { + default: + break; case ARC_SPACE_DATA: ARCSTAT_INCR(arcstat_data_size, -space); break; diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c index e47d533a4..3ddea95d0 100644 --- a/module/zfs/dmu_send.c +++ b/module/zfs/dmu_send.c @@ -1012,6 +1012,8 @@ backup_byteswap(dmu_replay_record_t *drr) DO64(drr_end.drr_checksum.zc_word[3]); DO64(drr_end.drr_toguid); break; + default: + break; } #undef DO64 #undef DO32 diff --git a/module/zfs/dsl_prop.c b/module/zfs/dsl_prop.c index aa66b32e7..6492701c5 100644 --- a/module/zfs/dsl_prop.c +++ b/module/zfs/dsl_prop.c @@ -413,6 +413,8 @@ dsl_prop_check_prediction(dsl_dir_t *dd, dsl_prop_setarg_t *psa) case ZFS_PROP_QUOTA: case ZFS_PROP_RESERVATION: return; + default: + break; } } diff --git a/module/zfs/sa.c b/module/zfs/sa.c index cf87c867e..b6e61bec0 100644 --- a/module/zfs/sa.c +++ b/module/zfs/sa.c @@ -398,6 +398,8 @@ sa_attr_op(sa_handle_t *hdl, sa_bulk_attr_t *bulk, int count, if (error) return (error); break; + default: + break; } } return (error); diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 9ae16d316..64f5e067c 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -471,6 +471,9 @@ spa_prop_validate(spa_t *spa, nvlist_t *props) intval != 0 && intval < ZIO_DEDUPDITTO_MIN) error = EINVAL; break; + + default: + break; } if (error) @@ -1425,6 +1428,8 @@ static int spa_check_logs(spa_t *spa) { switch (spa->spa_log_state) { + default: + break; case SPA_LOG_MISSING: /* need to recheck in case slog has been restored */ case SPA_LOG_UNKNOWN: diff --git a/module/zfs/vdev_label.c b/module/zfs/vdev_label.c index 528710eaf..8b400879b 100644 --- a/module/zfs/vdev_label.c +++ b/module/zfs/vdev_label.c @@ -565,6 +565,8 @@ vdev_inuse(vdev_t *vd, uint64_t crtxg, vdev_labeltype_t reason, case VDEV_LABEL_SPARE: return (spa_has_spare(spa, device_guid)); + default: + break; } } diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index ff31144d3..b7f6c1ed7 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -483,6 +483,8 @@ zfs_secpolicy_setprop(const char *dsname, zfs_prop_t prop, nvpair_t *propval, * Check permissions for special properties. */ switch (prop) { + default: + break; case ZFS_PROP_ZONED: /* * Disallow setting of 'zoned' from within a local zone. @@ -3380,6 +3382,8 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr) return (ENOTSUP); } break; + default: + break; } return (zfs_secpolicy_setprop(dsname, prop, pair, CRED())); |