diff options
author | Brian Behlendorf <[email protected]> | 2010-08-26 09:52:41 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-08-27 15:34:03 -0700 |
commit | e75c13c353571efaa9b4e047f16969ec13a518f5 (patch) | |
tree | d6d4092487d7ca7084de7cb78b30fd527e6ac472 /module/zfs | |
parent | 2598c0012dc33496539ce893a0af601c66cbb7e2 (diff) |
Fix gcc missing case warnings
Gcc ASSERT() missing cases are impossible
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs')
-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 |
7 files changed, 21 insertions, 0 deletions
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())); |