From 9bdd63ada4f5fed4d8bc043d29afdb33187d2d5d Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 20 Dec 2000 11:10:56 -0500 Subject: [svn-r3162] Purpose: Bug Fix Description: If the library was compiled with 'NDEBUG' defined, but the user's program (the fortran API in this case) was compiled with 'NDEBUG' not defined, the IDs returned from the library would appear to be incorrect. Solution: Removed 'ifndef NDEBUG' from around "H5I_TEMPLAX_MAX" definition and error checking. Platforms tested: Linux 2.2 (eirene) & FreeBSD 4.2 (hawkwind) --- src/H5G.c | 2 -- src/H5Ipublic.h | 2 -- src/H5P.c | 4 ---- 3 files changed, 8 deletions(-) diff --git a/src/H5G.c b/src/H5G.c index 989f9e0..2b970d1 100644 --- a/src/H5G.c +++ b/src/H5G.c @@ -1776,9 +1776,7 @@ H5G_loc (hid_t loc_id) case H5I_TEMPLATE_5: case H5I_TEMPLATE_6: case H5I_TEMPLATE_7: -#ifndef NDEBUG case H5I_TEMPLATE_MAX: -#endif case H5I_GENPROP_CLS: case H5I_GENPROP_LST: HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h index 6afb391..20e991a 100644 --- a/src/H5Ipublic.h +++ b/src/H5Ipublic.h @@ -38,9 +38,7 @@ typedef enum { H5I_TEMPLATE_5, /*group ID for Template objects */ H5I_TEMPLATE_6, /*group ID for Template objects */ H5I_TEMPLATE_7, /*group ID for Template objects */ -#ifndef NDEBUG H5I_TEMPLATE_MAX, /*not really a group ID */ -#endif H5I_GROUP, /*group ID for Group objects */ H5I_DATATYPE, /*group ID for Datatype objects */ H5I_DATASPACE, /*group ID for Dataspace objects */ diff --git a/src/H5P.c b/src/H5P.c index c35ddf6..2808ada 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -544,9 +544,7 @@ H5Pget_class(hid_t plist_id) H5TRACE1("p","i",plist_id); if ((group = H5I_get_type(plist_id)) < 0 || -#ifndef NDEBUG group >= H5I_TEMPLATE_MAX || -#endif group < H5I_TEMPLATE_0) { HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, H5P_NO_CLASS, "not a property list"); @@ -583,9 +581,7 @@ H5P_get_class(hid_t plist_id) FUNC_ENTER(H5P_get_class, H5P_NO_CLASS); if ((group = H5I_get_type(plist_id)) < 0 || -#ifndef NDEBUG group >= H5I_TEMPLATE_MAX || -#endif group < H5I_TEMPLATE_0) { HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, H5P_NO_CLASS, "not a property list"); -- cgit v0.12