[svn-r23938] remove "switch missing default case" in src.

This commit is contained in:
Mohamad Chaarawi 2013-07-26 12:28:26 -05:00
parent cb41664db2
commit 69e501fc70
8 changed files with 41 additions and 0 deletions

View File

@ -1668,6 +1668,9 @@ H5SL_below(H5SL_t *slist, const void *key)
case H5SL_TYPE_GENERIC:
H5SL_FIND(GENERIC, slist, x, const void, key, -)
break;
default:
HDassert(0 && "Unknown skiplist type!");
} /* end switch */
/* An exact match for 'key' must not have been found in list, if we get here */
@ -1767,6 +1770,9 @@ H5SL_above(H5SL_t *slist, const void *key)
case H5SL_TYPE_GENERIC:
H5SL_FIND(GENERIC, slist, x, const void, key, -)
break;
default:
HDassert(0 && "Unknown skiplist type!");
} /* end switch */
/* An exact match for 'key' must not have been found in list, if we get here */

View File

@ -8249,6 +8249,9 @@ loc += fast_dim_buf_off;
duffs_index = (fast_dim_count + 7) / 8;
switch (fast_dim_count % 8) {
default:
HDassert(0 && "This Should never be executed!");
break;
case 0:
do
{

View File

@ -3247,6 +3247,8 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method)
new_dt->shared->state = H5T_STATE_RDONLY;
}
break;
default:
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid copy method type")
} /* end switch */
/* Update fields in the new struct, if we aren't sharing an already opened
@ -3449,6 +3451,8 @@ H5T_lock (H5T_t *dt, hbool_t immutable)
case H5T_STATE_OPEN:
/*void*/
break;
default:
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "invalid datatype state")
}
done:
@ -4850,6 +4854,8 @@ H5T_oloc(H5T_t *dt)
HDassert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
ret_value = &dt->oloc;
break;
default:
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid datatype state")
} /* end switch */
done:
@ -4888,6 +4894,8 @@ H5T_nameof(H5T_t *dt)
case H5T_STATE_OPEN:
ret_value = &(dt->path);
break;
default:
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid datatype state")
} /* end switch */
done:

View File

@ -237,6 +237,8 @@ H5T_debug(const H5T_t *dt, FILE *stream)
case H5T_STATE_OPEN:
s2 = "[named,open]";
break;
default:
HDassert(0 && "This Should never be executed!");
} /* end switch */
fprintf(stream, "%s%s {nbytes=%lu", s1, s2, (unsigned long)(dt->shared->size));

View File

@ -1093,6 +1093,8 @@ H5Z_nbit_decompress_one_array(unsigned char *data, size_t data_offset,
parms_index++; /* skip size of no-op type */
H5Z_nbit_decompress_one_nooptype(data, data_offset, buffer, j, buf_len, total_size);
break;
default:
HDassert(0 && "This Should never be executed!");
} /* end switch */
}
@ -1131,6 +1133,8 @@ H5Z_nbit_decompress_one_compound(unsigned char *data, size_t data_offset,
H5Z_nbit_decompress_one_nooptype(data, data_offset+member_offset,
buffer, j, buf_len, size);
break;
default:
HDassert(0 && "This Should never be executed!");
} /* end switch */
}
}
@ -1179,6 +1183,8 @@ H5Z_nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buffe
parms_index = 4;
}
break;
default:
HDassert(0 && "This Should never be executed!");
} /* end switch */
}
@ -1320,6 +1326,8 @@ static void H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
parms_index++; /* skip size of no-op type */
H5Z_nbit_compress_one_nooptype(data, data_offset, buffer, j, buf_len, total_size);
break;
default:
HDassert(0 && "This Should never be executed!");
} /* end switch */
}
@ -1358,6 +1366,8 @@ static void H5Z_nbit_compress_one_compound(unsigned char *data, size_t data_offs
H5Z_nbit_compress_one_nooptype(data, data_offset+member_offset,
buffer, j, buf_len, size);
break;
default:
HDassert(0 && "This Should never be executed!");
} /* end switch */
}
}
@ -1406,6 +1416,8 @@ static void H5Z_nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned c
parms_index = 4;
}
break;
default:
HDassert(0 && "This Should never be executed!");
} /* end switch */
/* Update the size to the new value after compression. If there are any bits hanging over in

View File

@ -183,6 +183,9 @@ H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
duffs_index = (numofelements + 7) / 8;
switch (numofelements % 8) {
default:
HDassert(0 && "This Should never be executed!");
break;
case 0:
do
{
@ -238,6 +241,9 @@ H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
duffs_index = (numofelements + 7) / 8;
switch (numofelements % 8) {
default:
HDassert(0 && "This Should never be executed!");
break;
case 0:
do
{

View File

@ -422,6 +422,8 @@ H5_checksum_lookup3(const void *key, size_t length, uint32_t initval)
case 1 : a+=k[0];
break;
case 0 : goto done;
default:
HDassert(0 && "This Should never be executed!");
}
H5_lookup3_final(a, b, c);

View File

@ -155,6 +155,8 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case '#':
prefix = 1;
break;
default:
HDassert(0 && "This Should never be executed!");
} /* end switch */ /*lint !e744 Switch statement doesn't _need_ default */
s++;
} /* end while */