summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5SL.c6
-rw-r--r--src/H5Shyper.c3
-rw-r--r--src/H5T.c8
-rw-r--r--src/H5Tdbg.c2
-rw-r--r--src/H5Znbit.c12
-rw-r--r--src/H5Zshuffle.c6
-rw-r--r--src/H5checksum.c2
-rw-r--r--src/H5system.c2
8 files changed, 41 insertions, 0 deletions
diff --git a/src/H5SL.c b/src/H5SL.c
index 5c46fd4..2e2ad1e 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -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 */
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index d88ac35..f8d87e4 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -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
{
diff --git a/src/H5T.c b/src/H5T.c
index 080af8e..8f44035 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -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:
diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c
index e5df7ff..fe204d8 100644
--- a/src/H5Tdbg.c
+++ b/src/H5Tdbg.c
@@ -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));
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index 134ef3a..ebb534b 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -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
diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c
index 7aa0202..90509b0 100644
--- a/src/H5Zshuffle.c
+++ b/src/H5Zshuffle.c
@@ -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
{
diff --git a/src/H5checksum.c b/src/H5checksum.c
index ec8b2b0..48e4ce5 100644
--- a/src/H5checksum.c
+++ b/src/H5checksum.c
@@ -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);
diff --git a/src/H5system.c b/src/H5system.c
index a93a128..e46964f 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -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 */