summaryrefslogtreecommitdiffstats
path: root/src/H5Tenum.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Tenum.c')
-rw-r--r--src/H5Tenum.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/H5Tenum.c b/src/H5Tenum.c
index 95c514f..56ac80d 100644
--- a/src/H5Tenum.c
+++ b/src/H5Tenum.c
@@ -220,7 +220,7 @@ done:
herr_t
H5T_enum_insert(H5T_t *dt, const char *name, void *value)
{
- int i;
+ unsigned i;
char **names=NULL;
uint8_t *values=NULL;
herr_t ret_value=SUCCEED; /* Return value */
@@ -280,9 +280,17 @@ done:
*
*-------------------------------------------------------------------------
*/
+#ifdef H5_WANT_H5_V1_6_COMPAT
herr_t
-H5Tget_member_value(hid_t type, int membno, void *value/*out*/)
+H5Tget_member_value(hid_t type, int _membno, void *value/*out*/)
+#else /* H5_WANT_H5_V1_6_COMPAT */
+herr_t
+H5Tget_member_value(hid_t type, unsigned membno, void *value/*out*/)
+#endif /* H5_WANT_H5_V1_6_COMPAT */
{
+#ifdef H5_WANT_H5_V1_6_COMPAT
+ unsigned membno = (unsigned)_membno;
+#endif /* H5_WANT_H5_V1_6_COMPAT */
H5T_t *dt=NULL;
herr_t ret_value=SUCCEED; /* Return value */
@@ -293,7 +301,7 @@ H5Tget_member_value(hid_t type, int membno, void *value/*out*/)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
if (H5T_ENUM!=dt->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for data type class");
- if (membno<0 || membno>=dt->u.enumer.nmembs)
+ if (membno>=dt->u.enumer.nmembs)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid member number");
if (!value)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null value buffer");
@@ -324,7 +332,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5T_get_member_value(H5T_t *dt, int membno, void *value/*out*/)
+H5T_get_member_value(H5T_t *dt, unsigned membno, void *value/*out*/)
{
herr_t ret_value=SUCCEED; /* Return value */