diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5.c | 4 | ||||
-rw-r--r-- | src/H5ACprivate.h | 4 | ||||
-rw-r--r-- | src/H5Aint.c | 5 | ||||
-rw-r--r-- | src/H5Apkg.h | 7 | ||||
-rw-r--r-- | src/H5B.c | 10 | ||||
-rw-r--r-- | src/H5Bprivate.h | 10 | ||||
-rw-r--r-- | src/H5Cpkg.h | 6 | ||||
-rw-r--r-- | src/H5Cprivate.h | 24 | ||||
-rw-r--r-- | src/H5Dvirtual.c | 7 | ||||
-rw-r--r-- | src/H5EA.c | 13 | ||||
-rw-r--r-- | src/H5Fio.c | 4 | ||||
-rw-r--r-- | src/H5Fpkg.h | 9 | ||||
-rw-r--r-- | src/H5HLprivate.h | 7 | ||||
-rw-r--r-- | src/H5Oalloc.c | 7 | ||||
-rw-r--r-- | src/H5Opkg.h | 14 | ||||
-rw-r--r-- | src/H5SM.c | 27 | ||||
-rw-r--r-- | src/H5Tpkg.h | 7 | ||||
-rw-r--r-- | src/H5private.h | 22 |
18 files changed, 111 insertions, 76 deletions
@@ -359,9 +359,9 @@ H5_term_library(void) if(func) { fprintf(stderr, "HDF5: infinite loop closing library\n"); fprintf(stderr, " %s\n", loop); -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG HDabort(); -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 02fd36f..b9e2a60 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -485,7 +485,7 @@ H5_DLL herr_t H5AC_add_candidate(H5AC_t * cache_ptr, haddr_t addr); /* Debugging functions */ H5_DLL herr_t H5AC_stats(const H5F_t *f); -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG H5_DLL herr_t H5AC_dump_cache(const H5F_t *f); H5_DLL herr_t H5AC_get_entry_ptr_from_addr(const H5F_t *f, haddr_t addr, void **entry_ptr_ptr); @@ -496,7 +496,7 @@ H5_DLL herr_t H5AC_verify_entry_type(const H5F_t *f, haddr_t addr, hbool_t *type_ok_ptr); H5_DLL hbool_t H5AC_get_serialization_in_progress(H5F_t *f); H5_DLL hbool_t H5AC_cache_is_clean(const H5F_t *f, H5AC_ring_t inner_ring); -#endif /* H5_DEBUG_BUILD */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ #endif /* !_H5ACprivate_H */ diff --git a/src/H5Aint.c b/src/H5Aint.c index f3654ef..160c7fb 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -314,7 +314,7 @@ H5A__open_common(const H5G_loc_t *loc, H5A_t *attr) HDassert(loc); HDassert(attr); -#if defined(H5_USING_MEMCHECKER) || defined(H5_DEBUG_BUILD) +#if defined(H5_USING_MEMCHECKER) || !defined(NDEBUG) /* Clear object location */ if(H5O_loc_reset(&(attr->oloc)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to reset location") @@ -1710,7 +1710,10 @@ H5A_attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, break; default: + HDassert("unknown attribute op type" && 0); +#ifdef NDEBUG HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type") +#endif /* NDEBUG */ } /* end switch */ /* Increment the number of entries passed through */ diff --git a/src/H5Apkg.h b/src/H5Apkg.h index 961c102..6d5a83a 100644 --- a/src/H5Apkg.h +++ b/src/H5Apkg.h @@ -26,6 +26,13 @@ #ifndef _H5Apkg_H #define _H5Apkg_H +/* + * Define this to enable debugging. + */ +#ifdef NDEBUG +# undef H5A_DEBUG +#endif + /* Get package's private header */ #include "H5Aprivate.h" @@ -991,8 +991,14 @@ H5B__insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "internal error: likely corrupt key values") #endif /* H5_STRICT_FORMAT_CHECKS */ } else if(cmp) { - /* We couldn't determine which branch to follow out of this node. */ - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "unable to find a way out of this node") + /* + * We couldn't figure out which branch to follow out of this node. THIS + * IS A MAJOR PROBLEM THAT NEEDS TO BE FIXED --rpm. + */ + HDassert("INTERNAL HDF5 ERROR (contact rpm)" && 0); +#ifdef NDEBUG + HDabort(); +#endif /* NDEBUG */ } else if(bt->level > 0) { /* * Follow a branch out of this node to another subtree. diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h index 0dcc924..cb038ec 100644 --- a/src/H5Bprivate.h +++ b/src/H5Bprivate.h @@ -39,10 +39,14 @@ /**************************/ /* - * NOTE: Define H5B_DEBUG if you want to check B-tree consistency - * after each B-tree operation. Note that this slows down the - * library considerably! + * Feature: Define this constant if you want to check B-tree consistency + * after each B-tree operation. Note that this slows down the + * library considerably! Debugging the B-tree depends on assert() + * being enabled. */ +#ifdef NDEBUG +# undef H5B_DEBUG +#endif /****************************/ diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 00e0d62..fdb14a5 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -4670,7 +4670,7 @@ typedef struct H5C_tag_info_t { * get_entry_ptr_from_addr_counter: Counter used to track the number of * times the H5C_get_entry_ptr_from_addr() function has been * called successfully. This field is only defined when - * H5_DEBUG_BUILD is #defined. + * NDEBUG is not #defined. * ****************************************************************************/ struct H5C_t { @@ -4903,9 +4903,9 @@ struct H5C_t { char prefix[H5C__PREFIX_LEN]; -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG int64_t get_entry_ptr_from_addr_counter; -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ }; /* Define typedef for tagged cache entry iteration callbacks */ diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 2b60147..5335f80 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -207,20 +207,20 @@ #define H5C__UPDATE_PAGE_BUFFER_FLAG 0x40000 /* Set during parallel I/O */ /* Debugging/sanity checking/statistics settings */ -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG #define H5C_DO_SANITY_CHECKS 1 #define H5C_DO_SLIST_SANITY_CHECKS 0 #define H5C_DO_TAGGING_SANITY_CHECKS 1 #define H5C_DO_EXTREME_SANITY_CHECKS 0 -#else /* H5_DEBUG_BUILD */ +#else /* NDEBUG */ /* With rare execptions, the following defines should be set - * to 0 if not using a debug build. + * to 0 if NDEBUG is defined */ #define H5C_DO_SANITY_CHECKS 0 #define H5C_DO_SLIST_SANITY_CHECKS 0 #define H5C_DO_TAGGING_SANITY_CHECKS 0 #define H5C_DO_EXTREME_SANITY_CHECKS 0 -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ /* Cork actions: cork/uncork/get cork status of an object */ #define H5C__SET_CORK 0x1 @@ -242,11 +242,11 @@ * debug mode, and 0 in production mode.. */ -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG #define H5C_COLLECT_CACHE_STATS 1 -#else /* H5_DEBUG_BUILD */ +#else /* NDEBUG */ #define H5C_COLLECT_CACHE_STATS 0 -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ /* H5C_COLLECT_CACHE_ENTRY_STATS controls collection of statistics * in individual cache entries. @@ -1559,7 +1559,7 @@ typedef int H5C_ring_t; * a single cache serialization. * * This is a debugging field, and thus is maintained only if - * H5_DEBUG_BUILD is defined. + * NDEBUG is undefined. * * Fields supporting tagged entries: * @@ -1669,9 +1669,9 @@ typedef struct H5C_cache_entry_t { int32_t age; hbool_t prefetched_dirty; -#ifdef H5_DEBUG_BUILD /* debugging field */ +#ifndef NDEBUG /* debugging field */ int serialization_count; -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ /* fields supporting tag lists */ struct H5C_cache_entry_t *tl_next; @@ -2332,7 +2332,7 @@ H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t *f, hid_t dxpl_id, unsigned ce_arr haddr_t *ce_array_ptr); #endif /* H5_HAVE_PARALLEL */ -#ifdef H5_DEBUG_BUILD /* debugging functions */ +#ifndef NDEBUG /* debugging functions */ H5_DLL herr_t H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name); H5_DLL herr_t H5C_dump_cache_LRU(H5C_t *cache_ptr, const char *cache_name); H5_DLL hbool_t H5C_get_serialization_in_progress(const H5C_t *cache_ptr); @@ -2349,7 +2349,7 @@ H5_DLL herr_t H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr, const H5C_class_t *expected_type, hbool_t *in_cache_ptr, hbool_t *type_ok_ptr); H5_DLL herr_t H5C_validate_index_list(H5C_t *cache_ptr); -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ #endif /* !_H5Cprivate_H */ diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index a864729..3be2353 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -2510,7 +2510,7 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, type_info->mem_type, fill_space, io_info->md_dxpl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "filling buf failed") -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG /* Make sure the total number of elements written (including fill * values) >= nelmts */ { @@ -2523,10 +2523,9 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, /* Verify number of elements is correct. Note that since we * don't check for overlap we can't assert that these are equal */ - if((tot_nelmts + (hsize_t)select_nelmts) < nelmts) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "number of elements is incorrect") + HDassert((tot_nelmts + (hsize_t)select_nelmts) >= nelmts); } /* end block */ -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ @@ -877,7 +877,7 @@ H5EA_close(H5EA_t *ea, hid_t dxpl_id)) if(pending_delete) { H5EA_hdr_t *hdr; /* Another pointer to extensible array header */ -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG { unsigned hdr_status = 0; /* Header's status in the metadata cache */ @@ -886,14 +886,11 @@ H5EA_close(H5EA_t *ea, hid_t dxpl_id)) H5E_THROW(H5E_CANTGET, "unable to check metadata cache status for extensible array header") /* Sanity checks on header */ - if(!(hdr_status & H5AC_ES__IN_CACHE)) - H5E_THROW(H5E_BADVALUE, "extensible array header not in cache") - if(!(hdr_status & H5AC_ES__IS_PINNED)) - H5E_THROW(H5E_BADVALUE, "extensible array header not pinned") - if(hdr_status & H5AC_ES__IS_PROTECTED) - H5E_THROW(H5E_BADVALUE, "extensible array header is incorrectly protected") + HDassert(hdr_status & H5AC_ES__IN_CACHE); + HDassert(hdr_status & H5AC_ES__IS_PINNED); + HDassert(!(hdr_status & H5AC_ES__IS_PROTECTED)); } -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ /* Lock the array header into memory */ /* (OK to pass in NULL for callback context, since we know the header must be in the cache) */ diff --git a/src/H5Fio.c b/src/H5Fio.c index 2dc0b70..81fa514 100644 --- a/src/H5Fio.c +++ b/src/H5Fio.c @@ -298,7 +298,7 @@ H5F__evict_cache_entries(H5F_t *f, hid_t dxpl_id) if(H5AC_evict(f, dxpl_id) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "unable to evict all except pinned entries") -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG { unsigned status = 0; uint32_t cur_num_entries; @@ -319,7 +319,7 @@ H5F__evict_cache_entries(H5F_t *f, hid_t dxpl_id) if(cur_num_entries != 1) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "number of cache entries is not correct") } -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ done: FUNC_LEAVE_NOAPI(ret_value); diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 2fde183..7a5c126 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -43,6 +43,15 @@ #include "H5PBprivate.h" /* Page buffer */ #include "H5UCprivate.h" /* Reference counted object functions */ + +/* + * Feature: Define this constant on the compiler command-line if you want to + * see some debugging messages on the debug stream. + */ +#ifdef NDEBUG +# undef H5F_DEBUG +#endif + /* Superblock status flags */ #define H5F_SUPER_WRITE_ACCESS 0x01 #define H5F_SUPER_FILE_OK 0x02 diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h index 5ada884..054d396 100644 --- a/src/H5HLprivate.h +++ b/src/H5HLprivate.h @@ -32,6 +32,13 @@ #include "H5ACprivate.h" /* Metadata cache */ #include "H5Fprivate.h" /* File access */ +/* + * Feature: Define H5HL_DEBUG on the compiler command line if you want to + * enable diagnostic messages from this layer. + */ +#ifdef NDEBUG +# undef H5HL_DEBUG +#endif #define H5HL_ALIGN(X) ((((unsigned)X)+7)&(unsigned)(~0x07)) /* align on 8-byte boundary */ diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index 945c8ca..3512d3e 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -127,7 +127,7 @@ H5O_add_gap(H5F_t *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied, HDassert(new_gap_loc); HDassert(new_gap_size); -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG if(chunkno > 0) { unsigned chk_proxy_status = 0; /* Object header chunk proxy entry cache status */ @@ -136,10 +136,9 @@ if(chunkno > 0) { HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check metadata cache status for object header chunk proxy") /* Make certain that object header is protected */ - if(!(chk_proxy_status & H5AC_ES__IS_PROTECTED)) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "chunk proxy is not protected") + HDassert(chk_proxy_status & H5AC_ES__IS_PROTECTED); } /* end if */ -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ /* Check for existing null message in chunk */ merged_with_null = FALSE; diff --git a/src/H5Opkg.h b/src/H5Opkg.h index e0fd496..b0c67d1 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -171,11 +171,11 @@ #define H5O_DECODEIO_DIRTY 0x02u /* OUT: message has been changed */ /* Macro to incremend ndecode_dirtied (only if we are debugging) */ -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG #define INCR_NDECODE_DIRTIED(OH) (OH)->ndecode_dirtied++; -#else /* H5_DEBUG_BUILD */ +#else /* NDEBUG */ #define INCR_NDECODE_DIRTIED(OH) ; -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ /* Load native information for a message, if it's not already present */ /* (Only works for messages with decode callback) */ @@ -193,11 +193,11 @@ if((ioflags & H5O_DECODEIO_DIRTY) && (H5F_get_intent((F)) & H5F_ACC_RDWR)) { \ (MSG)->dirty = TRUE; \ /* Increment the count of messages dirtied by decoding, but */ \ - /* only debugging */ \ + /* only ifndef NDEBUG */ \ INCR_NDECODE_DIRTIED(OH) \ } \ \ - /* Set the message's "shared info", if it's shareable */ \ + /* Set the message's "shared info", if it's shareable */ \ if((MSG)->flags & H5O_MSG_FLAG_SHAREABLE) { \ HDassert(msg_type->share_flags & H5O_SHARE_IS_SHARABLE); \ H5O_UPDATE_SHARED((H5O_shared_t *)(MSG)->native, H5O_SHARE_TYPE_HERE, (F), msg_type->id, (MSG)->crt_idx, (OH)->chunk[0].addr) \ @@ -292,9 +292,9 @@ struct H5O_t { * versions of the library) */ #endif /* H5O_ENABLE_BAD_MESG_COUNT */ -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG size_t ndecode_dirtied; /* Number of messages dirtied by decoding */ -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ /* Chunk management information (not stored) */ size_t rc; /* Reference count of [continuation] chunks using this structure */ @@ -527,17 +527,16 @@ H5SM_create_index(H5F_t *f, H5SM_index_header_t *header, hid_t dxpl_id) if(H5HF_get_heap_addr(fheap, &(header->heap_addr)) < 0) HGOTO_ERROR(H5E_SOHM, H5E_CANTGETSIZE, FAIL, "can't get fractal heap address") -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG { size_t fheap_id_len; /* Size of a fractal heap ID */ /* Sanity check ID length */ if(H5HF_get_id_len(fheap, &fheap_id_len) < 0) HGOTO_ERROR(H5E_SOHM, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length") - if(fheap_id_len != H5O_FHEAP_ID_LEN) - HGOTO_ERROR(H5E_SOHM, H5E_BADVALUE, FAIL, "incorrect fractal heap ID length") + HDassert(fheap_id_len == H5O_FHEAP_ID_LEN); } -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ done: /* Release resources */ @@ -1058,7 +1057,7 @@ H5SM_try_share(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned defer_flags, unsigned cache_flags = H5AC__NO_FLAGS_SET; ssize_t index_num; htri_t tri_ret; -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG unsigned deferred_type = -1u; #endif htri_t ret_value = TRUE; @@ -1070,13 +1069,13 @@ H5SM_try_share(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned defer_flags, * holds true; otherwise we can leave now if it wasn't shared in the DEFER * pass. */ if(defer_flags & H5SM_WAS_DEFERRED) -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG deferred_type = ((H5O_shared_t *)mesg)->type; -#else /* H5_DEBUG_BUILD */ +#else /* NDEBUG */ if((((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_HERE) && (((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_SOHM)) HGOTO_DONE(FALSE); -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ /* "trivial" sharing checks */ if(mesg_flags && (*mesg_flags & H5O_MSG_FLAG_DONTSHARE)) @@ -1131,18 +1130,16 @@ done: HDassert((ret_value != TRUE) || ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_HERE || ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_SOHM); -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG /* If we previously deferred this operation, make sure the saved message - * type is the same as the one we get here. - */ + * type is the same as the one we get here. */ if(defer_flags & H5SM_WAS_DEFERRED) - if(deferred_type != ((H5O_shared_t *)mesg)->type) - HDONE_ERROR(H5E_SOHM, H5E_BADVALUE, FAIL, "deferred type doesn't match") -#endif /* H5_DEBUG_BUILD */ + HDassert(deferred_type == ((H5O_shared_t *)mesg)->type); +#endif /* NDEBUG */ /* Release the master SOHM table */ if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, cache_flags) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5SM_try_share() */ diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 01beee6..d075127 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -26,6 +26,13 @@ #ifndef _H5Tpkg_H #define _H5Tpkg_H +/* + * Define this to enable debugging. + */ +#ifdef NDEBUG +# undef H5T_DEBUG +#endif + /* Get package's private header */ #include "H5Tprivate.h" diff --git a/src/H5private.h b/src/H5private.h index d2c02e1..ca4ebcf 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1559,20 +1559,20 @@ extern char *strdup(const char *s); /* * A macro for detecting over/under-flow when casting between types */ -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG #define H5_CHECK_OVERFLOW(var, vartype, casttype) \ { \ casttype _tmp_overflow = (casttype)(var); \ HDassert((var) == (vartype)_tmp_overflow); \ } -#else /* H5_DEBUG_BUILD */ +#else /* NDEBUG */ #define H5_CHECK_OVERFLOW(var, vartype, casttype) -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ /* * A macro for detecting over/under-flow when assigning between types */ -#ifdef H5_DEBUG_BUILD +#ifndef NDEBUG #define ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype) \ { \ srctype _tmp_src = (srctype)(src); \ @@ -1626,10 +1626,10 @@ extern char *strdup(const char *s); #define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) \ H5_GLUE4(ASSIGN_,srctype,_TO_,dsttype)(dst,dsttype,src,srctype)\ -#else /* H5_DEBUG_BUILD */ +#else /* NDEBUG */ #define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) \ (dst) = (dsttype)(src); -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ #if defined(H5_HAVE_WINDOW_PATH) @@ -1974,23 +1974,23 @@ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */ #define H5_PACKAGE_INIT(pkg_init, err) #endif /* H5_MY_PKG */ -/* Check the function name (requires assert()) */ -#if defined(H5_DEBUG_BUILD) && !defined(NDEBUG) + +#ifndef NDEBUG #define FUNC_ENTER_CHECK_NAME(asrt) \ { \ static hbool_t func_check = FALSE; \ \ if(!func_check) { \ /* Check function naming status */ \ - HDassert(asrt && "Function naming conventions are incorrect - check H5_IS_API|PUB|PRIV|PKG macros in H5private.h (this is usually due to an incorrect number of underscores in a new or changed function name)"); \ + HDassert(asrt && "Function naming conventions are incorrect - check H5_IS_API|PUB|PRIV|PKG macros in H5private.h (this is usually due to an incorrect number of underscores)"); \ \ /* Don't check again */ \ func_check = TRUE; \ } /* end if */ \ } /* end scope */ -#else /* H5_DEBUG_BUILD */ +#else /* NDEBUG */ #define FUNC_ENTER_CHECK_NAME(asrt) -#endif /* H5_DEBUG_BUILD */ +#endif /* NDEBUG */ #define FUNC_ENTER_COMMON(asrt) \ |