Fix gcc missing case warnings

Gcc ASSERT() missing cases are impossible

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2010-08-26 09:52:41 -07:00
parent 2598c0012d
commit e75c13c353
12 changed files with 51 additions and 1 deletions
+6
View File
@@ -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;
+2
View File
@@ -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);