summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-10-22 16:22:58 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-10-22 16:22:58 (GMT)
commit3606f20c0243c77998171906473668500cd007ac (patch)
tree82dc29c43ffc3d47eedad9633afef99fc0bbd365 /src/H5Shyper.c
parent8f15ee5e3c449782fb34059b4da68eabdadb271b (diff)
downloadhdf5-3606f20c0243c77998171906473668500cd007ac.zip
hdf5-3606f20c0243c77998171906473668500cd007ac.tar.gz
hdf5-3606f20c0243c77998171906473668500cd007ac.tar.bz2
Removes -Wimplicit-fallthrough=5 from the gcc warnings
-Wimplicit-fallthrough=3 is added by -Wextra, which we already set. Bumping the warning level only changes how fall-through comments are parsed, with level 5 turning off fall-through comments entirely. This is unnecessary and results in having to do extra work to squash warnings when included external code uses fall-through. This change also adds /* FALLTHROUGH */ comments where H5_ATTR_FALLTHROUGH is used so compilers that don't use attributes but do respect fall-through comments don't raise spurious warnings.
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 6b3d750..02ec885 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -2138,24 +2138,31 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max
case 0:
do {
DUFF_GUTS
+ /* FALLTHROUGH */
H5_ATTR_FALLTHROUGH
case 7:
DUFF_GUTS
+ /* FALLTHROUGH */
H5_ATTR_FALLTHROUGH
case 6:
DUFF_GUTS
+ /* FALLTHROUGH */
H5_ATTR_FALLTHROUGH
case 5:
DUFF_GUTS
+ /* FALLTHROUGH */
H5_ATTR_FALLTHROUGH
case 4:
DUFF_GUTS
+ /* FALLTHROUGH */
H5_ATTR_FALLTHROUGH
case 3:
DUFF_GUTS
+ /* FALLTHROUGH */
H5_ATTR_FALLTHROUGH
case 2:
DUFF_GUTS
+ /* FALLTHROUGH */
H5_ATTR_FALLTHROUGH
case 1:
DUFF_GUTS
@@ -10101,7 +10108,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
case H5S_SEL_POINTS: /* Can't combine hyperslab operations and point selections currently */
if (op == H5S_SELECT_SET) /* Allow only "set" operation to proceed */
break;
- /* Else fall through to error */
+ /* FALLTHROUGH (to error) */
H5_ATTR_FALLTHROUGH
case H5S_SEL_ERROR: