summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/H5O.c b/src/H5O.c
index c615437..b5c74ff 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -91,6 +91,11 @@ static herr_t H5O_visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
/*********************/
/* Header message ID to class mapping */
+
+/* Remember to increment H5O_MSG_TYPES in H5Opkg.h when adding a new
+ * message.
+ */
+
const H5O_msg_class_t *const H5O_msg_class_g[] = {
H5O_MSG_NULL, /*0x0000 Null */
H5O_MSG_SDSPACE, /*0x0001 Dataspace */
@@ -174,6 +179,10 @@ H5FL_EXTERN(H5_obj_t);
* Programmer: Quincey Koziol
* Thursday, January 18, 2007
*
+ * Changes: JRM -- 12/12/07
+ * Added santity check verifying that H5O_msg_class_g
+ * is big enough.
+ *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -185,6 +194,8 @@ H5O_init_interface(void)
HDassert(H5O_MSG_TYPES == NELMTS(H5O_msg_class_g));
HDassert(sizeof(H5O_fheap_id_t) == H5O_FHEAP_ID_LEN);
+ HDassert(H5O_UNKNOWN_ID < H5O_MSG_TYPES);
+
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_init_interface() */