summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 20:43:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 20:43:30 (GMT)
commit1e91d96fa02466ffe451319bdac1005f84dc7993 (patch)
tree4de04ef502c313dfd766497b20235188761146c0 /src
parent95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff)
downloadhdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'src')
-rw-r--r--src/H5.c75
-rw-r--r--src/H5A.c24
-rw-r--r--src/H5AC.c234
-rw-r--r--src/H5ACdbg.c32
-rw-r--r--src/H5ACmpio.c328
-rw-r--r--src/H5ACproxy_entry.c56
-rw-r--r--src/H5Abtree2.c20
-rw-r--r--src/H5Adense.c114
-rw-r--r--src/H5Aint.c202
-rw-r--r--src/H5Atest.c2
-rw-r--r--src/H5B.c262
-rw-r--r--src/H5B2.c100
-rw-r--r--src/H5B2cache.c144
-rw-r--r--src/H5B2dbg.c145
-rw-r--r--src/H5B2hdr.c62
-rw-r--r--src/H5B2int.c98
-rw-r--r--src/H5B2internal.c118
-rw-r--r--src/H5B2leaf.c98
-rw-r--r--src/H5B2stat.c6
-rw-r--r--src/H5B2test.c32
-rw-r--r--src/H5Bcache.c38
-rw-r--r--src/H5Bdbg.c88
-rw-r--r--src/H5C.c1242
-rw-r--r--src/H5CS.c44
-rw-r--r--src/H5CX.c340
-rw-r--r--src/H5Cdbg.c453
-rw-r--r--src/H5Cimage.c703
-rw-r--r--src/H5Clog.c84
-rw-r--r--src/H5Clog_json.c134
-rw-r--r--src/H5Clog_trace.c116
-rw-r--r--src/H5Cmpio.c263
-rw-r--r--src/H5Cpkg.h472
-rw-r--r--src/H5Cprefetched.c26
-rw-r--r--src/H5Cprivate.h2
-rw-r--r--src/H5Cquery.c30
-rw-r--r--src/H5Ctag.c90
-rw-r--r--src/H5Ctest.c4
-rw-r--r--src/H5D.c4
-rw-r--r--src/H5Dbtree.c278
-rw-r--r--src/H5Dbtree2.c250
-rw-r--r--src/H5Dchunk.c753
-rw-r--r--src/H5Dcompact.c46
-rw-r--r--src/H5Dcontig.c144
-rw-r--r--src/H5Ddbg.c3
-rw-r--r--src/H5Dearray.c294
-rw-r--r--src/H5Defl.c86
-rw-r--r--src/H5Dfarray.c278
-rw-r--r--src/H5Dfill.c54
-rw-r--r--src/H5Dint.c202
-rw-r--r--src/H5Dio.c62
-rw-r--r--src/H5Dlayout.c40
-rw-r--r--src/H5Dmpio.c254
-rw-r--r--src/H5Dnone.c108
-rw-r--r--src/H5Doh.c28
-rw-r--r--src/H5Dscatgath.c168
-rw-r--r--src/H5Dselect.c28
-rw-r--r--src/H5Dsingle.c142
-rw-r--r--src/H5Dtest.c10
-rw-r--r--src/H5Dvirtual.c286
-rw-r--r--src/H5E.c48
-rw-r--r--src/H5EA.c86
-rw-r--r--src/H5EAcache.c250
-rw-r--r--src/H5EAdbg.c176
-rw-r--r--src/H5EAdblkpage.c18
-rw-r--r--src/H5EAdblock.c44
-rw-r--r--src/H5EAhdr.c72
-rw-r--r--src/H5EAiblock.c30
-rw-r--r--src/H5EAint.c8
-rw-r--r--src/H5EAsblock.c34
-rw-r--r--src/H5EAstat.c4
-rw-r--r--src/H5EAtest.c40
-rw-r--r--src/H5ESevent.c8
-rw-r--r--src/H5ESint.c106
-rw-r--r--src/H5ESlist.c16
-rw-r--r--src/H5Eint.c110
-rw-r--r--src/H5F.c8
-rw-r--r--src/H5FA.c64
-rw-r--r--src/H5FAcache.c142
-rw-r--r--src/H5FAdbg.c82
-rw-r--r--src/H5FAdblkpage.c24
-rw-r--r--src/H5FAdblock.c32
-rw-r--r--src/H5FAhdr.c44
-rw-r--r--src/H5FAint.c8
-rw-r--r--src/H5FAstat.c6
-rw-r--r--src/H5FAtest.c38
-rw-r--r--src/H5FD.c102
-rw-r--r--src/H5FDcore.c58
-rw-r--r--src/H5FDdirect.c86
-rw-r--r--src/H5FDfamily.c18
-rw-r--r--src/H5FDhdfs.c158
-rw-r--r--src/H5FDint.c296
-rw-r--r--src/H5FDlog.c214
-rw-r--r--src/H5FDmirror.c144
-rw-r--r--src/H5FDmpi.c38
-rw-r--r--src/H5FDmpio.c326
-rw-r--r--src/H5FDonion.c62
-rw-r--r--src/H5FDonion_header.c32
-rw-r--r--src/H5FDonion_history.c32
-rw-r--r--src/H5FDonion_index.c134
-rw-r--r--src/H5FDros3.c164
-rw-r--r--src/H5FDs3comms.c212
-rw-r--r--src/H5FDsec2.c32
-rw-r--r--src/H5FDspace.c70
-rw-r--r--src/H5FDsplitter.c102
-rw-r--r--src/H5FDsubfiling/H5FDioc.c92
-rw-r--r--src/H5FDsubfiling/H5FDioc_int.c34
-rw-r--r--src/H5FDsubfiling/H5FDioc_priv.h30
-rw-r--r--src/H5FDsubfiling/H5FDioc_threads.c168
-rw-r--r--src/H5FDsubfiling/H5FDsubfile_int.c36
-rw-r--r--src/H5FDsubfiling/H5FDsubfiling.c236
-rw-r--r--src/H5FDsubfiling/H5subfiling_common.c314
-rw-r--r--src/H5FL.c174
-rw-r--r--src/H5FO.c78
-rw-r--r--src/H5FS.c194
-rw-r--r--src/H5FScache.c254
-rw-r--r--src/H5FSdbg.c92
-rw-r--r--src/H5FSint.c8
-rw-r--r--src/H5FSsection.c405
-rw-r--r--src/H5FSstat.c4
-rw-r--r--src/H5FStest.c8
-rw-r--r--src/H5Faccum.c50
-rw-r--r--src/H5Fcwfs.c22
-rw-r--r--src/H5Fdbg.c100
-rw-r--r--src/H5Fefc.c112
-rw-r--r--src/H5Fint.c198
-rw-r--r--src/H5Fio.c88
-rw-r--r--src/H5Fmount.c44
-rw-r--r--src/H5Fmpi.c32
-rw-r--r--src/H5Fprivate.h4
-rw-r--r--src/H5Fquery.c226
-rw-r--r--src/H5Fsfile.c10
-rw-r--r--src/H5Fspace.c30
-rw-r--r--src/H5Fsuper.c102
-rw-r--r--src/H5Fsuper_cache.c122
-rw-r--r--src/H5Gbtree2.c18
-rw-r--r--src/H5Gcache.c42
-rw-r--r--src/H5Gcompact.c52
-rw-r--r--src/H5Gdense.c106
-rw-r--r--src/H5Gdeprec.c10
-rw-r--r--src/H5Gent.c88
-rw-r--r--src/H5Gint.c84
-rw-r--r--src/H5Glink.c38
-rw-r--r--src/H5Gloc.c60
-rw-r--r--src/H5Gname.c90
-rw-r--r--src/H5Gnode.c157
-rw-r--r--src/H5Gobj.c66
-rw-r--r--src/H5Goh.c22
-rw-r--r--src/H5Groot.c30
-rw-r--r--src/H5Gstab.c78
-rw-r--r--src/H5Gtest.c14
-rw-r--r--src/H5Gtraverse.c40
-rw-r--r--src/H5HF.c76
-rw-r--r--src/H5HFbtree2.c38
-rw-r--r--src/H5HFcache.c524
-rw-r--r--src/H5HFdbg.c341
-rw-r--r--src/H5HFdblock.c71
-rw-r--r--src/H5HFdtable.c18
-rw-r--r--src/H5HFhdr.c90
-rw-r--r--src/H5HFhuge.c84
-rw-r--r--src/H5HFiblock.c160
-rw-r--r--src/H5HFiter.c58
-rw-r--r--src/H5HFman.c60
-rw-r--r--src/H5HFsection.c571
-rw-r--r--src/H5HFspace.c52
-rw-r--r--src/H5HFstat.c8
-rw-r--r--src/H5HFtest.c48
-rw-r--r--src/H5HFtiny.c42
-rw-r--r--src/H5HG.c89
-rw-r--r--src/H5HGcache.c60
-rw-r--r--src/H5HGdbg.c54
-rw-r--r--src/H5HGquery.c6
-rw-r--r--src/H5HL.c118
-rw-r--r--src/H5HLcache.c150
-rw-r--r--src/H5HLdbg.c32
-rw-r--r--src/H5HLdblk.c16
-rw-r--r--src/H5HLint.c20
-rw-r--r--src/H5HLprfx.c4
-rw-r--r--src/H5Idbg.c28
-rw-r--r--src/H5Iint.c80
-rw-r--r--src/H5Lexternal.c2
-rw-r--r--src/H5Lint.c126
-rw-r--r--src/H5M.c4
-rw-r--r--src/H5MF.c501
-rw-r--r--src/H5MFaggr.c196
-rw-r--r--src/H5MFdbg.c81
-rw-r--r--src/H5MFsection.c139
-rw-r--r--src/H5MM.c16
-rw-r--r--src/H5O.c2
-rw-r--r--src/H5Oainfo.c76
-rw-r--r--src/H5Oalloc.c187
-rw-r--r--src/H5Oattr.c88
-rw-r--r--src/H5Oattribute.c132
-rw-r--r--src/H5Obogus.c22
-rw-r--r--src/H5Obtreek.c38
-rw-r--r--src/H5Ocache.c212
-rw-r--r--src/H5Ocache_image.c38
-rw-r--r--src/H5Ochunk.c48
-rw-r--r--src/H5Ocont.c38
-rw-r--r--src/H5Ocopy.c154
-rw-r--r--src/H5Ocopy_ref.c26
-rw-r--r--src/H5Odbg.c230
-rw-r--r--src/H5Odeprec.c10
-rw-r--r--src/H5Odrvinfo.c36
-rw-r--r--src/H5Odtype.c208
-rw-r--r--src/H5Oefl.c67
-rw-r--r--src/H5Ofill.c106
-rw-r--r--src/H5Oflush.c6
-rw-r--r--src/H5Ofsinfo.c64
-rw-r--r--src/H5Oginfo.c36
-rw-r--r--src/H5Oint.c226
-rw-r--r--src/H5Olayout.c137
-rw-r--r--src/H5Olinfo.c78
-rw-r--r--src/H5Olink.c108
-rw-r--r--src/H5Omessage.c374
-rw-r--r--src/H5Omtime.c46
-rw-r--r--src/H5Oname.c30
-rw-r--r--src/H5Opkg.h4
-rw-r--r--src/H5Opline.c66
-rw-r--r--src/H5Orefcount.c30
-rw-r--r--src/H5Osdspace.c56
-rw-r--r--src/H5Oshared.c98
-rw-r--r--src/H5Oshared.h15
-rw-r--r--src/H5Oshmesg.c34
-rw-r--r--src/H5Ostab.c46
-rw-r--r--src/H5Otest.c18
-rw-r--r--src/H5Ounknown.c2
-rw-r--r--src/H5P.c6
-rw-r--r--src/H5PB.c152
-rw-r--r--src/H5PLint.c10
-rw-r--r--src/H5PLpath.c64
-rw-r--r--src/H5PLplugin_cache.c12
-rw-r--r--src/H5Pdapl.c82
-rw-r--r--src/H5Pdcpl.c128
-rw-r--r--src/H5Pdeprec.c2
-rw-r--r--src/H5Pdxpl.c124
-rw-r--r--src/H5Pencdec.c68
-rw-r--r--src/H5Pfapl.c174
-rw-r--r--src/H5Pfcpl.c40
-rw-r--r--src/H5Pgcpl.c4
-rw-r--r--src/H5Pint.c310
-rw-r--r--src/H5Plapl.c42
-rw-r--r--src/H5Pocpl.c32
-rw-r--r--src/H5Pocpypl.c34
-rw-r--r--src/H5Pstrcpl.c10
-rw-r--r--src/H5R.c8
-rw-r--r--src/H5RS.c74
-rw-r--r--src/H5Rdeprec.c18
-rw-r--r--src/H5Rint.c168
-rw-r--r--src/H5S.c86
-rw-r--r--src/H5SL.c150
-rw-r--r--src/H5SM.c292
-rw-r--r--src/H5SMbtree2.c18
-rw-r--r--src/H5SMcache.c124
-rw-r--r--src/H5SMmessage.c28
-rw-r--r--src/H5SMtest.c4
-rw-r--r--src/H5Sall.c110
-rw-r--r--src/H5Sdbg.c10
-rw-r--r--src/H5Shyper.c974
-rw-r--r--src/H5Smpio.c108
-rw-r--r--src/H5Snone.c108
-rw-r--r--src/H5Spoint.c168
-rw-r--r--src/H5Sselect.c196
-rw-r--r--src/H5Stest.c12
-rw-r--r--src/H5T.c304
-rw-r--r--src/H5TS.c12
-rw-r--r--src/H5Tarray.c14
-rw-r--r--src/H5Tbit.c24
-rw-r--r--src/H5Tcommit.c48
-rw-r--r--src/H5Tcompound.c34
-rw-r--r--src/H5Tconv.c205
-rw-r--r--src/H5Tdbg.c87
-rw-r--r--src/H5Tenum.c33
-rw-r--r--src/H5Tfields.c34
-rw-r--r--src/H5Tfixed.c2
-rw-r--r--src/H5Tnative.c10
-rw-r--r--src/H5Toffset.c12
-rw-r--r--src/H5Toh.c10
-rw-r--r--src/H5Tprecis.c12
-rw-r--r--src/H5Tref.c148
-rw-r--r--src/H5Tvisit.c4
-rw-r--r--src/H5Tvlen.c106
-rw-r--r--src/H5UC.c12
-rw-r--r--src/H5VLcallback.c222
-rw-r--r--src/H5VLdyn_ops.c10
-rw-r--r--src/H5VLint.c122
-rw-r--r--src/H5VLnative.c24
-rw-r--r--src/H5VLnative_blob.c16
-rw-r--r--src/H5VLnative_dataset.c20
-rw-r--r--src/H5VLnative_file.c2
-rw-r--r--src/H5VLnative_group.c2
-rw-r--r--src/H5VLnative_introspect.c2
-rw-r--r--src/H5VLnative_token.c12
-rw-r--r--src/H5VM.c204
-rw-r--r--src/H5VMprivate.h8
-rw-r--r--src/H5WB.c22
-rw-r--r--src/H5Z.c102
-rw-r--r--src/H5Zdeflate.c8
-rw-r--r--src/H5Zfletcher32.c2
-rw-r--r--src/H5Znbit.c26
-rw-r--r--src/H5Zscaleoffset.c30
-rw-r--r--src/H5Zshuffle.c4
-rw-r--r--src/H5Zszip.c20
-rw-r--r--src/H5Ztrans.c24
-rw-r--r--src/H5checksum.c20
-rw-r--r--src/H5dbg.c20
-rw-r--r--src/H5detect.c28
-rw-r--r--src/H5make_libsettings.c68
-rw-r--r--src/H5mpi.c18
-rw-r--r--src/H5system.c50
-rw-r--r--src/H5timer.c16
-rw-r--r--src/H5trace.c319
311 files changed, 15712 insertions, 15764 deletions
diff --git a/src/H5.c b/src/H5.c
index c22d0c9..a33f6f1 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -183,7 +183,7 @@ H5_init_library(void)
/*
* Make sure the package information is updated.
*/
- HDmemset(&H5_debug_g, 0, sizeof H5_debug_g);
+ memset(&H5_debug_g, 0, sizeof H5_debug_g);
H5_debug_g.pkg[H5_PKG_A].name = "a";
H5_debug_g.pkg[H5_PKG_AC].name = "ac";
H5_debug_g.pkg[H5_PKG_B].name = "b";
@@ -745,7 +745,7 @@ H5__debug_mask(const char *s)
} /* end if */
} /* end for */
if (i >= (size_t)H5_NPKGS)
- HDfprintf(stderr, "HDF5_DEBUG: ignored %s\n", pkg_name);
+ fprintf(stderr, "HDF5_DEBUG: ignored %s\n", pkg_name);
} /* end if-else */
}
else if (HDisdigit(*s)) {
@@ -900,15 +900,15 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
if (H5_VERS_MAJOR != majnum || H5_VERS_MINOR != minnum) {
switch (disable_version_check) {
case 0:
- HDfprintf(stderr, "%s%s", version_mismatch_warning,
- "You can, at your own risk, disable this warning by setting the environment\n"
- "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n"
- "Setting it to 2 or higher will suppress the warning messages totally.\n");
+ fprintf(stderr, "%s%s", version_mismatch_warning,
+ "You can, at your own risk, disable this warning by setting the environment\n"
+ "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n"
+ "Setting it to 2 or higher will suppress the warning messages totally.\n");
/* Mention the versions we are referring to */
- HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
- (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
+ fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
+ (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
/* Show library settings if available */
- HDfprintf(stderr, "%s", H5libhdf5_settings);
+ fprintf(stderr, "%s", H5libhdf5_settings);
/* Bail out now. */
HDfputs("Bye...\n", stderr);
@@ -916,16 +916,16 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
case 1:
/* continue with a warning */
/* Note that the warning message is embedded in the format string.*/
- HDfprintf(stderr,
- "%s'HDF5_DISABLE_VERSION_CHECK' "
- "environment variable is set to %d, application will\n"
- "continue at your own risk.\n",
- version_mismatch_warning, disable_version_check);
+ fprintf(stderr,
+ "%s'HDF5_DISABLE_VERSION_CHECK' "
+ "environment variable is set to %d, application will\n"
+ "continue at your own risk.\n",
+ version_mismatch_warning, disable_version_check);
/* Mention the versions we are referring to */
- HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
- (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
+ fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
+ (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
/* Show library settings if available */
- HDfprintf(stderr, "%s", H5libhdf5_settings);
+ fprintf(stderr, "%s", H5libhdf5_settings);
break;
default:
/* 2 or higher: continue silently */
@@ -942,15 +942,13 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
if (VERS_RELEASE_EXCEPTIONS[i] == relnum || VERS_RELEASE_EXCEPTIONS[i] == H5_VERS_RELEASE) {
switch (disable_version_check) {
case 0:
- HDfprintf(
- stderr, "%s%s", release_mismatch_warning,
- "You can, at your own risk, disable this warning by setting the environment\n"
- "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n"
- "Setting it to 2 or higher will suppress the warning messages totally.\n");
+ fprintf(stderr, "%s%s", release_mismatch_warning,
+ "You can, at your own risk, disable this warning by setting the environment\n"
+ "variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.\n"
+ "Setting it to 2 or higher will suppress the warning messages totally.\n");
/* Mention the versions we are referring to */
- HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum,
- relnum, (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR,
- (unsigned)H5_VERS_RELEASE);
+ fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
+ (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
/* Bail out now. */
HDfputs("Bye...\n", stderr);
@@ -958,15 +956,14 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
case 1:
/* continue with a warning */
/* Note that the warning message is embedded in the format string.*/
- HDfprintf(stderr,
- "%s'HDF5_DISABLE_VERSION_CHECK' "
- "environment variable is set to %d, application will\n"
- "continue at your own risk.\n",
- release_mismatch_warning, disable_version_check);
+ fprintf(stderr,
+ "%s'HDF5_DISABLE_VERSION_CHECK' "
+ "environment variable is set to %d, application will\n"
+ "continue at your own risk.\n",
+ release_mismatch_warning, disable_version_check);
/* Mention the versions we are referring to */
- HDfprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum,
- relnum, (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR,
- (unsigned)H5_VERS_RELEASE);
+ fprintf(stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum,
+ (unsigned)H5_VERS_MAJOR, (unsigned)H5_VERS_MINOR, (unsigned)H5_VERS_RELEASE);
break;
default:
/* 2 or higher: continue silently */
@@ -999,11 +996,11 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
"variable 'HDF5_DISABLE_VERSION_CHECK' to a value of 1 "
"will suppress\nthis warning.\n",
stderr);
- HDfprintf(stderr,
- "Library version information are:\n"
- "H5_VERS_MAJOR=%d, H5_VERS_MINOR=%d, H5_VERS_RELEASE=%d, "
- "H5_VERS_SUBRELEASE=%s,\nH5_VERS_INFO=%s\n",
- H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE, H5_VERS_SUBRELEASE, H5_VERS_INFO);
+ fprintf(stderr,
+ "Library version information are:\n"
+ "H5_VERS_MAJOR=%d, H5_VERS_MINOR=%d, H5_VERS_RELEASE=%d, "
+ "H5_VERS_SUBRELEASE=%s,\nH5_VERS_INFO=%s\n",
+ H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE, H5_VERS_SUBRELEASE, H5_VERS_INFO);
} /* end if */
}
@@ -1259,7 +1256,7 @@ H5is_library_terminating(hbool_t *is_terminating /*out*/)
FUNC_ENTER_API_NOINIT
H5TRACE1("e", "x", is_terminating);
- HDassert(is_terminating);
+ assert(is_terminating);
if (is_terminating)
*is_terminating = H5_TERM_GLOBAL;
diff --git a/src/H5A.c b/src/H5A.c
index 439654b..b110be9 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -119,9 +119,9 @@ H5A__create_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(loc_params);
- HDassert(attr_name);
+ assert(vol_obj);
+ assert(loc_params);
+ assert(attr_name);
/* Create the attribute */
if (NULL == (attr = H5VL_attr_create(vol_obj, loc_params, attr_name, type_id, space_id, acpl_id, aapl_id,
@@ -455,8 +455,8 @@ H5A__open_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const ch
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Open the attribute */
if (NULL ==
@@ -1205,7 +1205,7 @@ H5Aget_create_plist(hid_t attr_id)
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", attr_id);
- HDassert(H5P_LST_ATTRIBUTE_CREATE_ID_g != -1);
+ assert(H5P_LST_ATTRIBUTE_CREATE_ID_g != -1);
/* Check arguments */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR)))
@@ -1589,10 +1589,10 @@ H5A__rename_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(loc_params);
- HDassert(old_name);
- HDassert(new_name);
+ assert(vol_obj);
+ assert(loc_params);
+ assert(old_name);
+ assert(new_name);
/* Avoid thrashing things if the names are the same */
if (HDstrcmp(old_name, new_name) != 0) {
@@ -2332,8 +2332,8 @@ H5A__exists_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Check arguments */
if (!attr_name || !*attr_name)
diff --git a/src/H5AC.c b/src/H5AC.c
index 2b4c297..77fb142 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -207,8 +207,8 @@ H5AC_cache_image_pending(const H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
ret_value = H5C_cache_image_pending(cache_ptr);
@@ -246,11 +246,11 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(NULL == f->shared->cache);
- HDassert(config_ptr != NULL);
- HDassert(image_config_ptr != NULL);
- HDassert(image_config_ptr->version == H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION);
+ assert(f);
+ assert(NULL == f->shared->cache);
+ assert(config_ptr != NULL);
+ assert(image_config_ptr != NULL);
+ assert(image_config_ptr->version == H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION);
HDcompile_assert(NELMTS(H5AC_class_s) == H5AC_NTYPES);
HDcompile_assert(H5C__MAX_NUM_TYPE_IDS == H5AC_NTYPES);
@@ -428,9 +428,9 @@ H5AC_dest(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
#if H5AC_DUMP_STATS_ON_CLOSE
/* Dump debugging info */
@@ -459,7 +459,7 @@ H5AC_dest(H5F_t *f)
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache);
if (aux_ptr) {
/* Sanity check */
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
/* If the file was opened R/W, attempt to flush all entries
* from rank 0 & Bcast clean list to other ranks.
@@ -502,17 +502,17 @@ H5AC_dest(H5F_t *f)
#ifdef H5_HAVE_PARALLEL
if (aux_ptr != NULL) {
if (aux_ptr->d_slist_ptr != NULL) {
- HDassert(H5SL_count(aux_ptr->d_slist_ptr) == 0);
+ assert(H5SL_count(aux_ptr->d_slist_ptr) == 0);
H5SL_close(aux_ptr->d_slist_ptr);
} /* end if */
if (aux_ptr->c_slist_ptr != NULL) {
- HDassert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
+ assert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
H5SL_close(aux_ptr->c_slist_ptr);
} /* end if */
if (aux_ptr->candidate_slist_ptr != NULL) {
- HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0);
+ assert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0);
H5SL_close(aux_ptr->candidate_slist_ptr);
} /* end if */
@@ -546,9 +546,9 @@ H5AC_evict(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
/* Evict all entries in the cache except the pinned superblock entry */
if (H5C_evict(f) < 0)
@@ -585,12 +585,12 @@ H5AC_expunge_entry(H5F_t *f, const H5AC_class_t *type, haddr_t addr, unsigned fl
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(type->serialize);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(type);
+ assert(type->serialize);
+ assert(H5F_addr_defined(addr));
if (H5C_expunge_entry(f, type, addr, flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "H5C_expunge_entry() failed")
@@ -631,9 +631,9 @@ H5AC_flush(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
#ifdef H5_HAVE_PARALLEL
/* flushing the cache, so clear all collective entries */
@@ -748,13 +748,13 @@ H5AC_insert_entry(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing,
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(type->serialize);
- HDassert(H5F_addr_defined(addr));
- HDassert(thing);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(type);
+ assert(type->serialize);
+ assert(H5F_addr_defined(addr));
+ assert(thing);
/* Check for invalid access request */
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
@@ -818,9 +818,9 @@ H5AC_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, hbool
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
if (H5C_load_cache_image_on_next_protect(f, addr, len, rw) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, FAIL, "call to H5C_load_cache_image_on_next_protect failed")
@@ -852,7 +852,7 @@ H5AC_mark_entry_dirty(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
/* Set up entry & cache pointers */
entry_ptr = (H5AC_info_t *)thing;
@@ -906,7 +906,7 @@ H5AC_mark_entry_clean(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
entry_ptr = (H5AC_info_t *)thing;
cache_ptr = entry_ptr->cache_ptr;
@@ -959,7 +959,7 @@ H5AC_mark_entry_unserialized(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
/* Set up entry & cache pointers */
entry_ptr = (H5AC_info_t *)thing;
@@ -1001,7 +1001,7 @@ H5AC_mark_entry_serialized(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
entry_ptr = (H5AC_info_t *)thing;
cache_ptr = entry_ptr->cache_ptr;
@@ -1043,12 +1043,12 @@ H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t ne
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(H5F_addr_defined(old_addr));
- HDassert(H5F_addr_defined(new_addr));
- HDassert(H5F_addr_ne(old_addr, new_addr));
+ assert(f);
+ assert(f->shared->cache);
+ assert(type);
+ assert(H5F_addr_defined(old_addr));
+ assert(H5F_addr_defined(new_addr));
+ assert(H5F_addr_ne(old_addr, new_addr));
#ifdef H5_HAVE_PARALLEL
/* Log moving the entry */
@@ -1099,11 +1099,11 @@ H5AC_pin_protected_entry(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
entry_ptr = (H5AC_info_t *)thing;
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
+ assert(cache_ptr);
/* Pin entry */
if (H5C_pin_protected_entry(thing) < 0)
@@ -1145,9 +1145,9 @@ H5AC_prep_for_file_close(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
if (H5C_prep_for_file_close(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "cache prep for file close failed")
@@ -1187,9 +1187,9 @@ H5AC_prep_for_file_flush(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't enable skip list")
@@ -1231,9 +1231,9 @@ H5AC_secure_from_file_flush(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
if (H5C_set_slist_enabled(f->shared->cache, FALSE, FALSE) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't disable skip list")
@@ -1266,12 +1266,12 @@ H5AC_create_flush_dependency(void *parent_thing, void *child_thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(parent_thing);
- HDassert(child_thing);
+ assert(parent_thing);
+ assert(child_thing);
entry_ptr = (H5AC_info_t *)parent_thing;
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
+ assert(cache_ptr);
/* Create the flush dependency */
if (H5C_create_flush_dependency(parent_thing, child_thing) < 0)
@@ -1320,21 +1320,21 @@ H5AC_protect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *udata, unsi
FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(type->serialize);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(type);
+ assert(type->serialize);
+ assert(H5F_addr_defined(addr));
/* Check for unexpected flags -- H5C__FLUSH_COLLECTIVELY_FLAG
* only permitted in the parallel case.
*/
#ifdef H5_HAVE_PARALLEL
- HDassert(0 == (flags &
- (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG | H5C__FLUSH_COLLECTIVELY_FLAG))));
+ assert(0 == (flags &
+ (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG | H5C__FLUSH_COLLECTIVELY_FLAG))));
#else /* H5_HAVE_PARALLEL */
- HDassert(0 == (flags & (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG))));
+ assert(0 == (flags & (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG))));
#endif /* H5_HAVE_PARALLEL */
/* Check for invalid access request */
@@ -1388,11 +1388,11 @@ H5AC_resize_entry(void *thing, size_t new_size)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
entry_ptr = (H5AC_info_t *)thing;
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
+ assert(cache_ptr);
#ifdef H5_HAVE_PARALLEL
/* Log the generation of dirty bytes of metadata iff:
@@ -1485,11 +1485,11 @@ H5AC_unpin_entry(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(thing);
+ assert(thing);
entry_ptr = (H5AC_info_t *)thing;
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
+ assert(cache_ptr);
/* Unpin the entry */
if (H5C_unpin_entry(thing) < 0)
@@ -1527,12 +1527,12 @@ H5AC_destroy_flush_dependency(void *parent_thing, void *child_thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(parent_thing);
- HDassert(child_thing);
+ assert(parent_thing);
+ assert(child_thing);
entry_ptr = (H5AC_info_t *)parent_thing;
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
+ assert(cache_ptr);
/* Destroy the flush dependency */
if (H5C_destroy_flush_dependency(parent_thing, child_thing) < 0)
@@ -1599,16 +1599,16 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(type->deserialize);
- HDassert(type->image_len);
- HDassert(H5F_addr_defined(addr));
- HDassert(thing);
- HDassert(((H5AC_info_t *)thing)->addr == addr);
- HDassert(((H5AC_info_t *)thing)->type == type);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(type);
+ assert(type->deserialize);
+ assert(type->image_len);
+ assert(H5F_addr_defined(addr));
+ assert(thing);
+ assert(((H5AC_info_t *)thing)->addr == addr);
+ assert(((H5AC_info_t *)thing)->type == type);
dirtied =
(hbool_t)(((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG) || (((H5AC_info_t *)thing)->dirtied));
@@ -1883,7 +1883,7 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, const H5AC_cache_config_t *
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache_ptr);
+ assert(cache_ptr);
if (cache_ptr == NULL)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "bad cache_ptr on entry")
@@ -2118,12 +2118,12 @@ H5AC__check_if_write_permitted(const H5F_t
#ifdef H5_HAVE_PARALLEL
/* Sanity checks */
- HDassert(f != NULL);
- HDassert(f->shared != NULL);
- HDassert(f->shared->cache != NULL);
+ assert(f != NULL);
+ assert(f->shared != NULL);
+ assert(f->shared->cache != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache);
if (aux_ptr != NULL) {
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
if ((aux_ptr->mpi_rank == 0) ||
(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED))
@@ -2225,9 +2225,9 @@ H5AC_ignore_tags(const H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
/* Set up a new metadata tag */
if (H5C_ignore_tags(f->shared->cache) < 0)
@@ -2286,8 +2286,8 @@ H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Call cache-level function to re-tag entries with the COPIED tag */
if (H5C_retag_entries(f->shared->cache, H5AC__COPIED_TAG, metadata_tag) < 0)
@@ -2320,8 +2320,8 @@ H5AC_flush_tagged_metadata(H5F_t *f, haddr_t metadata_tag)
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Call cache level function to flush metadata entries with specified tag */
if (H5C_flush_tagged_entries(f, metadata_tag) < 0)
@@ -2354,8 +2354,8 @@ H5AC_evict_tagged_metadata(H5F_t *f, haddr_t metadata_tag, hbool_t match_global)
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Call cache level function to evict metadata entries with specified tag */
if (H5C_evict_tagged_entries(f, metadata_tag, match_global) < 0)
@@ -2387,8 +2387,8 @@ H5AC_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flag
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Call cache level function to expunge entries with specified tag and type id */
if (H5C_expunge_tag_type_metadata(f, tag, type_id, flags) < 0)
@@ -2420,8 +2420,8 @@ H5AC_get_tag(const void *thing, haddr_t *tag)
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
- HDassert(thing);
- HDassert(tag);
+ assert(thing);
+ assert(tag);
/* Call cache level function to get the tag */
if (H5C_get_tag(thing, tag) < 0)
@@ -2450,11 +2450,11 @@ H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, hbool_t *corked)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(action == H5AC__SET_CORK || action == H5AC__UNCORK || action == H5AC__GET_CORKED);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(H5F_addr_defined(obj_addr));
+ assert(action == H5AC__SET_CORK || action == H5AC__UNCORK || action == H5AC__GET_CORKED);
/* Skip the search on "tag_list" when there are no "corked" objects.
* This is done to mitigate the slow down when closing objects.
@@ -2462,7 +2462,7 @@ H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, hbool_t *corked)
* in the future.
*/
if (action == H5AC__GET_CORKED) {
- HDassert(corked);
+ assert(corked);
if (H5C_get_num_objs_corked(f->shared->cache) == 0) {
*corked = FALSE;
HGOTO_DONE(SUCCEED)
@@ -2535,9 +2535,9 @@ H5AC_get_entry_ring(const H5F_t *f, haddr_t addr, H5AC_ring_t *ring)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(ring);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(ring);
/* Retrieve the ring value for the entry at address */
if (H5C_get_entry_ring(f, addr, ring) < 0)
@@ -2565,7 +2565,7 @@ H5AC_set_ring(H5AC_ring_t ring, H5AC_ring_t *orig_ring)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- /* Note: orig_ring can be NULL so don't check it with HDassert() */
+ /* Note: orig_ring can be NULL so don't check it with assert() */
/* Get the current ring value and return that (if orig_ring is NOT null) */
if (orig_ring)
@@ -2614,7 +2614,7 @@ H5AC_unsettle_entry_ring(void *_entry)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry);
+ assert(entry);
/* Unsettle the entry's ring */
if (H5C_unsettle_entry_ring(entry) < 0)
@@ -2688,9 +2688,9 @@ H5AC_remove_entry(void *_entry)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry);
+ assert(entry);
cache = entry->cache_ptr;
- HDassert(cache);
+ assert(cache);
/* Remove the entry from the cache*/
if (H5C_remove_entry(entry) < 0)
diff --git a/src/H5ACdbg.c b/src/H5ACdbg.c
index 55f0418..ead20c0 100644
--- a/src/H5ACdbg.c
+++ b/src/H5ACdbg.c
@@ -79,9 +79,9 @@ H5AC_stats(const H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
/* at present, this can't fail */
(void)H5C_stats(f->shared->cache, H5F_OPEN_NAME(f), FALSE);
@@ -112,9 +112,9 @@ H5AC_dump_cache(const H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
if (H5C_dump_cache(f->shared->cache, H5F_OPEN_NAME(f)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_dump_cache() failed.")
@@ -173,8 +173,8 @@ H5AC_get_entry_ptr_from_addr(const H5F_t *f, haddr_t addr, void **entry_ptr_ptr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
if (H5C_get_entry_ptr_from_addr(cache_ptr, addr, entry_ptr_ptr) < 0)
@@ -220,8 +220,8 @@ H5AC_flush_dependency_exists(H5F_t *f, haddr_t parent_addr, haddr_t child_addr,
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
ret_value = H5C_flush_dependency_exists(cache_ptr, parent_addr, child_addr, fd_exists_ptr);
@@ -269,8 +269,8 @@ H5AC_verify_entry_type(const H5F_t *f, haddr_t addr, const H5AC_class_t *expecte
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
if (H5C_verify_entry_type(cache_ptr, addr, expected_type, in_cache_ptr, type_ok_ptr) < 0)
@@ -304,8 +304,8 @@ H5AC_get_serialization_in_progress(H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
/* Set return value */
@@ -342,8 +342,8 @@ H5AC_cache_is_clean(const H5F_t *f, H5AC_ring_t inner_ring)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
ret_value = H5C_cache_is_clean(cache_ptr, inner_ring);
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index e103a26..9201f21 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -143,10 +143,10 @@ H5AC__set_sync_point_done_callback(H5C_t *cache_ptr, H5AC_sync_point_done_cb_t s
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(cache_ptr);
+ assert(cache_ptr);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
aux_ptr->sync_point_done = sync_point_done;
@@ -175,10 +175,10 @@ H5AC__set_write_done_callback(H5C_t *cache_ptr, H5AC_write_done_cb_t write_done)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(cache_ptr);
+ assert(cache_ptr);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
aux_ptr->write_done = write_done;
@@ -213,12 +213,12 @@ H5AC_add_candidate(H5AC_t *cache_ptr, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert(aux_ptr->candidate_slist_ptr != NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr->candidate_slist_ptr != NULL);
/* Construct an entry for the supplied address, and insert
* it into the candidate slist.
@@ -275,17 +275,17 @@ H5AC__broadcast_candidate_list(H5AC_t *cache_ptr, unsigned *num_entries_ptr, had
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->mpi_rank == 0);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert(aux_ptr->candidate_slist_ptr != NULL);
- HDassert(num_entries_ptr != NULL);
- HDassert(*num_entries_ptr == 0);
- HDassert(haddr_buf_ptr_ptr != NULL);
- HDassert(*haddr_buf_ptr_ptr == NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->mpi_rank == 0);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr->candidate_slist_ptr != NULL);
+ assert(num_entries_ptr != NULL);
+ assert(*num_entries_ptr == 0);
+ assert(haddr_buf_ptr_ptr != NULL);
+ assert(*haddr_buf_ptr_ptr == NULL);
/* First broadcast the number of entries in the list so that the
* receivers can set up buffers to receive them. If there aren't
@@ -307,8 +307,8 @@ H5AC__broadcast_candidate_list(H5AC_t *cache_ptr, unsigned *num_entries_ptr, had
/* Push an error, but still participate in following MPI_Bcast */
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate buffer.")
}
- HDassert(chk_num_entries == num_entries);
- HDassert(haddr_buf_ptr != NULL);
+ assert(chk_num_entries == num_entries);
+ assert(haddr_buf_ptr != NULL);
/* Now broadcast the list of candidate entries */
buf_size = sizeof(haddr_t) * num_entries;
@@ -355,8 +355,8 @@ H5AC__broadcast_clean_list_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_uda
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(slist_entry_ptr);
- HDassert(udata);
+ assert(slist_entry_ptr);
+ assert(udata);
/* Store the entry's address in the buffer */
addr = slist_entry_ptr->addr;
@@ -408,12 +408,12 @@ H5AC__broadcast_clean_list(H5AC_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->mpi_rank == 0);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->mpi_rank == 0);
+ assert(aux_ptr->c_slist_ptr != NULL);
/* First broadcast the number of entries in the list so that the
* receives can set up a buffer to receive them. If there aren't
@@ -495,18 +495,18 @@ H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t H5_ATTR_NDEBUG_UNUS
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr != NULL);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE) || (aux_ptr->mpi_rank == 0));
- HDassert(aux_ptr->d_slist_ptr != NULL);
- HDassert(aux_ptr->c_slist_ptr != NULL);
- HDassert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
- HDassert(aux_ptr->candidate_slist_ptr != NULL);
- HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0);
- HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) ||
- (sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE));
+ assert(cache_ptr != NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE) || (aux_ptr->mpi_rank == 0));
+ assert(aux_ptr->d_slist_ptr != NULL);
+ assert(aux_ptr->c_slist_ptr != NULL);
+ assert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
+ assert(aux_ptr->candidate_slist_ptr != NULL);
+ assert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0);
+ assert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) ||
+ (sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_CACHE));
switch (sync_point_op) {
case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN:
@@ -551,8 +551,8 @@ H5AC__copy_candidate_list_to_buffer_cb(void *_item, void H5_ATTR_UNUSED *_key, v
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(slist_entry_ptr);
- HDassert(udata);
+ assert(slist_entry_ptr);
+ assert(udata);
/* Store the entry's address in the buffer */
udata->addr_buf_ptr[udata->u] = slist_entry_ptr->addr;
@@ -609,17 +609,17 @@ H5AC__copy_candidate_list_to_buffer(const H5AC_t *cache_ptr, unsigned *num_entri
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert(aux_ptr->candidate_slist_ptr != NULL);
- HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) > 0);
- HDassert(num_entries_ptr != NULL);
- HDassert(*num_entries_ptr == 0);
- HDassert(haddr_buf_ptr_ptr != NULL);
- HDassert(*haddr_buf_ptr_ptr == NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr->candidate_slist_ptr != NULL);
+ assert(H5SL_count(aux_ptr->candidate_slist_ptr) > 0);
+ assert(num_entries_ptr != NULL);
+ assert(*num_entries_ptr == 0);
+ assert(haddr_buf_ptr_ptr != NULL);
+ assert(*haddr_buf_ptr_ptr == NULL);
num_entries = (unsigned)H5SL_count(aux_ptr->candidate_slist_ptr);
@@ -681,16 +681,16 @@ H5AC__log_deleted_entry(const H5AC_info_t *entry_ptr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(entry_ptr);
+ assert(entry_ptr);
addr = entry_ptr->addr;
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->mpi_rank == 0);
- HDassert(aux_ptr->d_slist_ptr != NULL);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->mpi_rank == 0);
+ assert(aux_ptr->d_slist_ptr != NULL);
+ assert(aux_ptr->c_slist_ptr != NULL);
/* if the entry appears in the dirtied entry slist, remove it. */
if (NULL != (slist_entry_ptr = (H5AC_slist_entry_t *)H5SL_remove(aux_ptr->d_slist_ptr, (void *)(&addr))))
@@ -734,21 +734,21 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(entry_ptr->is_dirty == FALSE);
+ assert(entry_ptr);
+ assert(entry_ptr->is_dirty == FALSE);
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
if (aux_ptr->mpi_rank == 0) {
H5AC_slist_entry_t *slist_entry_ptr;
haddr_t addr = entry_ptr->addr;
/* Sanity checks */
- HDassert(aux_ptr->d_slist_ptr != NULL);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr->d_slist_ptr != NULL);
+ assert(aux_ptr->c_slist_ptr != NULL);
if (NULL == H5SL_search(aux_ptr->d_slist_ptr, (void *)(&addr))) {
/* insert the address of the entry in the dirty entry list, and
@@ -811,21 +811,21 @@ H5AC__log_cleaned_entry(const H5AC_info_t *entry_ptr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(entry_ptr);
- HDassert(entry_ptr->is_dirty == FALSE);
+ assert(entry_ptr);
+ assert(entry_ptr->is_dirty == FALSE);
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
if (aux_ptr->mpi_rank == 0) {
H5AC_slist_entry_t *slist_entry_ptr;
haddr_t addr = entry_ptr->addr;
/* Sanity checks */
- HDassert(aux_ptr->d_slist_ptr != NULL);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr->d_slist_ptr != NULL);
+ assert(aux_ptr->c_slist_ptr != NULL);
/* Remove it from both the cleaned list and the dirtied list. */
if (NULL !=
@@ -875,12 +875,12 @@ H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty, unsig
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->mpi_rank == 0);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->mpi_rank == 0);
+ assert(aux_ptr->c_slist_ptr != NULL);
/* Set local flags */
cleared = ((flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0);
@@ -942,18 +942,18 @@ H5AC__log_inserted_entry(const H5AC_info_t *entry_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry_ptr);
+ assert(entry_ptr);
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
if (aux_ptr->mpi_rank == 0) {
H5AC_slist_entry_t *slist_entry_ptr;
- HDassert(aux_ptr->d_slist_ptr != NULL);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr->d_slist_ptr != NULL);
+ assert(aux_ptr->c_slist_ptr != NULL);
/* Entry to insert should not be in dirty list currently */
if (NULL != H5SL_search(aux_ptr->d_slist_ptr, (const void *)(&entry_ptr->addr)))
@@ -1043,13 +1043,13 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = (H5AC_t *)f->shared->cache;
- HDassert(cache_ptr);
+ assert(cache_ptr);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
/* get entry status, size, etc here */
if (H5C_get_entry_status(f, old_addr, &entry_size, &entry_in_cache, &entry_dirty, NULL, NULL, NULL, NULL,
@@ -1061,8 +1061,8 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr)
if (aux_ptr->mpi_rank == 0) {
H5AC_slist_entry_t *slist_entry_ptr;
- HDassert(aux_ptr->d_slist_ptr != NULL);
- HDassert(aux_ptr->c_slist_ptr != NULL);
+ assert(aux_ptr->d_slist_ptr != NULL);
+ assert(aux_ptr->c_slist_ptr != NULL);
/* if the entry appears in the cleaned entry slist, under its old
* address, remove it.
@@ -1085,7 +1085,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr)
* list under its old address implies that it must have
* been clean to start with.
*/
- HDassert(!entry_dirty);
+ assert(!entry_dirty);
if (NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry .")
slist_entry_ptr->addr = new_addr;
@@ -1223,13 +1223,13 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
/* to prevent "messages from the future" we must synchronize all
* processes before we write any entries.
@@ -1241,7 +1241,7 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f)
if (H5AC__broadcast_candidate_list(cache_ptr, &num_candidates, &candidates_list_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't broadcast candidate slist.")
- HDassert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0);
+ assert(H5SL_count(aux_ptr->candidate_slist_ptr) == 0);
} /* end if */
else {
if (H5AC__receive_candidate_list(cache_ptr, &num_candidates, &candidates_list_ptr) < 0)
@@ -1386,18 +1386,18 @@ H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
if (aux_ptr->mpi_rank == 0) {
if (H5AC__broadcast_clean_list(cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't broadcast clean slist.")
- HDassert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
+ assert(H5SL_count(aux_ptr->c_slist_ptr) == 0);
} /* end if */
else if (H5AC__receive_and_apply_clean_list(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive and/or process clean slist broadcast.")
@@ -1437,10 +1437,10 @@ H5AC__receive_haddr_list(MPI_Comm mpi_comm, unsigned *num_entries_ptr, haddr_t *
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(num_entries_ptr != NULL);
- HDassert(*num_entries_ptr == 0);
- HDassert(haddr_buf_ptr_ptr != NULL);
- HDassert(*haddr_buf_ptr_ptr == NULL);
+ assert(num_entries_ptr != NULL);
+ assert(*num_entries_ptr == 0);
+ assert(haddr_buf_ptr_ptr != NULL);
+ assert(*haddr_buf_ptr_ptr == NULL);
/* First receive the number of entries in the list so that we
* can set up a buffer to receive them. If there aren't
@@ -1509,13 +1509,13 @@ H5AC__receive_and_apply_clean_list(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->mpi_rank != 0);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->mpi_rank != 0);
/* Retrieve the clean list from process 0 */
if (H5AC__receive_haddr_list(aux_ptr->mpi_comm, &num_entries, &haddr_buf_ptr) < 0)
@@ -1569,16 +1569,16 @@ H5AC__receive_candidate_list(const H5AC_t *cache_ptr, unsigned *num_entries_ptr,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->mpi_rank != 0);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert(num_entries_ptr != NULL);
- HDassert(*num_entries_ptr == 0);
- HDassert(haddr_buf_ptr_ptr != NULL);
- HDassert(*haddr_buf_ptr_ptr == NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->mpi_rank != 0);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(num_entries_ptr != NULL);
+ assert(*num_entries_ptr == 0);
+ assert(haddr_buf_ptr_ptr != NULL);
+ assert(*haddr_buf_ptr_ptr == NULL);
/* Retrieve the candidate list from process 0 */
if (H5AC__receive_haddr_list(aux_ptr->mpi_comm, num_entries_ptr, haddr_buf_ptr_ptr) < 0)
@@ -1650,13 +1650,13 @@ H5AC__rsp__dist_md_write__flush(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
/* first construct the candidate list -- initially, this will be in the
* form of a skip list. We will convert it later.
@@ -1794,13 +1794,13 @@ H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
/* Query if evictions are allowed */
if (H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0)
@@ -1873,13 +1873,13 @@ H5AC__rsp__p0_only__flush(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
/* To prevent "messages from the future" we must
* synchronize all processes before we start the flush.
@@ -1984,13 +1984,13 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
/* Query if evictions are allowed */
if (H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0)
@@ -2098,21 +2098,21 @@ H5AC__run_sync_point(H5F_t *f, int sync_point_op)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) ||
- (sync_point_op == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED));
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) ||
+ (sync_point_op == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED));
#ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION
- HDfprintf(stdout, "%d:%s...:%u: (u/uu/i/iu/m/mu) = %zu/%u/%zu/%u/%zu/%u\n", aux_ptr->mpi_rank, __func__,
- aux_ptr->dirty_bytes_propagations, aux_ptr->unprotect_dirty_bytes,
- aux_ptr->unprotect_dirty_bytes_updates, aux_ptr->insert_dirty_bytes,
- aux_ptr->insert_dirty_bytes_updates, aux_ptr->move_dirty_bytes,
- aux_ptr->move_dirty_bytes_updates);
+ fprintf(stdout, "%d:%s...:%u: (u/uu/i/iu/m/mu) = %zu/%u/%zu/%u/%zu/%u\n", aux_ptr->mpi_rank, __func__,
+ aux_ptr->dirty_bytes_propagations, aux_ptr->unprotect_dirty_bytes,
+ aux_ptr->unprotect_dirty_bytes_updates, aux_ptr->insert_dirty_bytes,
+ aux_ptr->insert_dirty_bytes_updates, aux_ptr->move_dirty_bytes,
+ aux_ptr->move_dirty_bytes_updates);
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
/* Clear collective access flag on half of the entries in the cache and
@@ -2229,14 +2229,14 @@ H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, unsigned num_candidates, haddr_t *ca
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
- HDassert(aux_ptr != NULL);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
- HDassert(aux_ptr->mpi_rank == 0);
- HDassert(num_candidates > 0);
- HDassert(candidates_list_ptr != NULL);
+ assert(aux_ptr != NULL);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
+ assert(aux_ptr->mpi_rank == 0);
+ assert(num_candidates > 0);
+ assert(candidates_list_ptr != NULL);
/* clean up dirtied and flushed and still clean lists by removing
* all entries on the candidate list. Cleared entries should
@@ -2289,8 +2289,8 @@ H5AC__flush_entries(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared->cache);
/* Check if we have >1 ranks */
if (H5C_get_aux_ptr(f->shared->cache))
diff --git a/src/H5ACproxy_entry.c b/src/H5ACproxy_entry.c
index 20889e2..8fa0897 100644
--- a/src/H5ACproxy_entry.c
+++ b/src/H5ACproxy_entry.c
@@ -150,8 +150,8 @@ H5AC_proxy_entry_add_parent(H5AC_proxy_entry_t *pentry, void *_parent)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(parent);
- HDassert(pentry);
+ assert(parent);
+ assert(pentry);
/* Add parent to the list of parents */
if (NULL == pentry->parents)
@@ -166,7 +166,7 @@ H5AC_proxy_entry_add_parent(H5AC_proxy_entry_t *pentry, void *_parent)
/* Add flush dependency on parent */
if (pentry->nchildren > 0) {
/* Sanity check */
- HDassert(H5F_addr_defined(pentry->addr));
+ assert(H5F_addr_defined(pentry->addr));
if (H5AC_create_flush_dependency(parent, pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "unable to set flush dependency on proxy entry")
@@ -198,9 +198,9 @@ H5AC_proxy_entry_remove_parent(H5AC_proxy_entry_t *pentry, void *_parent)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(pentry);
- HDassert(pentry->parents);
- HDassert(parent);
+ assert(pentry);
+ assert(pentry->parents);
+ assert(parent);
/* Remove parent from skip list */
if (NULL == (rem_parent = (H5AC_info_t *)H5SL_remove(pentry->parents, &parent->addr)))
@@ -211,7 +211,7 @@ H5AC_proxy_entry_remove_parent(H5AC_proxy_entry_t *pentry, void *_parent)
/* Shut down the skip list, if this is the last parent */
if (0 == H5SL_count(pentry->parents)) {
/* Sanity check */
- HDassert(0 == pentry->nchildren);
+ assert(0 == pentry->nchildren);
if (H5SL_close(pentry->parents) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CLOSEERROR, FAIL, "can't close proxy parent skip list")
@@ -279,8 +279,8 @@ H5AC_proxy_entry_add_child(H5AC_proxy_entry_t *pentry, H5F_t *f, void *child)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(pentry);
- HDassert(child);
+ assert(pentry);
+ assert(child);
/* Check for first child */
if (0 == pentry->nchildren) {
@@ -372,8 +372,8 @@ H5AC_proxy_entry_remove_child(H5AC_proxy_entry_t *pentry, void *child)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(pentry);
- HDassert(child);
+ assert(pentry);
+ assert(child);
/* Remove flush dependency on proxy entry */
if (H5AC_destroy_flush_dependency(pentry, child) < 0)
@@ -423,11 +423,11 @@ H5AC_proxy_entry_dest(H5AC_proxy_entry_t *pentry)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(pentry);
- HDassert(NULL == pentry->parents);
- HDassert(0 == pentry->nchildren);
- HDassert(0 == pentry->ndirty_children);
- HDassert(0 == pentry->nunser_children);
+ assert(pentry);
+ assert(NULL == pentry->parents);
+ assert(0 == pentry->nchildren);
+ assert(0 == pentry->ndirty_children);
+ assert(0 == pentry->nunser_children);
/* Free the proxy entry object */
pentry = H5FL_FREE(H5AC_proxy_entry_t, pentry);
@@ -453,7 +453,7 @@ H5AC__proxy_entry_image_len(const void H5_ATTR_UNUSED *thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image_len);
+ assert(image_len);
/* Set the image length size to 1 byte */
*image_len = 1;
@@ -482,7 +482,7 @@ H5AC__proxy_entry_serialize(const H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *
FUNC_ENTER_PACKAGE_NOERR /* Yes, even though this pushes an error on the stack */
/* Should never be invoked */
- HDassert(0 && "Invalid callback?!?");
+ assert(0 && "Invalid callback?!?");
HERROR(H5E_CACHE, H5E_CANTSERIALIZE, "called unreachable fcn.");
@@ -510,7 +510,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pentry);
+ assert(pentry);
switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
@@ -520,7 +520,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Invalid action?!?");
+ assert(0 && "Invalid action?!?");
#endif /* NDEBUG */
break;
@@ -528,28 +528,28 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Invalid action?!?");
+ assert(0 && "Invalid action?!?");
#endif /* NDEBUG */
break;
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
/* Sanity checks */
- HDassert(0 == pentry->ndirty_children);
- HDassert(0 == pentry->nunser_children);
+ assert(0 == pentry->ndirty_children);
+ assert(0 == pentry->nunser_children);
/* No action */
break;
case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED:
/* Sanity checks */
- HDassert(pentry->ndirty_children > 0);
+ assert(pentry->ndirty_children > 0);
/* No action */
break;
case H5AC_NOTIFY_ACTION_ENTRY_CLEANED:
/* Sanity checks */
- HDassert(0 == pentry->ndirty_children);
+ assert(0 == pentry->ndirty_children);
/* No action */
break;
@@ -566,7 +566,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
case H5AC_NOTIFY_ACTION_CHILD_CLEANED:
/* Sanity check */
- HDassert(pentry->ndirty_children > 0);
+ assert(pentry->ndirty_children > 0);
/* Decrement # of dirty children */
pentry->ndirty_children--;
@@ -589,7 +589,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
case H5AC_NOTIFY_ACTION_CHILD_SERIALIZED:
/* Sanity check */
- HDassert(pentry->nunser_children > 0);
+ assert(pentry->nunser_children > 0);
/* Decrement # of unserialized children */
pentry->nunser_children--;
@@ -604,7 +604,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown notify action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index 788aab7..aa7f087 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -237,8 +237,8 @@ H5A__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(bt2_udata);
- HDassert(bt2_rec);
+ assert(bt2_udata);
+ assert(bt2_rec);
/* Check hash value */
if (bt2_udata->name_hash < bt2_rec->hash)
@@ -250,7 +250,7 @@ H5A__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
H5HF_t *fheap; /* Fractal heap handle to use for finding object */
/* Sanity check */
- HDassert(bt2_udata->name_hash == bt2_rec->hash);
+ assert(bt2_udata->name_hash == bt2_rec->hash);
/* Prepare user data for callback */
/* down */
@@ -268,7 +268,7 @@ H5A__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
fheap = bt2_udata->shared_fheap;
else
fheap = bt2_udata->fheap;
- HDassert(fheap);
+ assert(fheap);
/* Check if the user's attribute and the B-tree's attribute have the same name */
if (H5HF_op(fheap, &bt2_rec->id, H5A__dense_fh_name_cmp, &fh_udata) < 0)
@@ -363,8 +363,8 @@ H5A__dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *_
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u, %08" PRIx32 "}\n", indent, "", fwidth,
- "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder, nrecord->hash);
+ fprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u, %08" PRIx32 "}\n", indent, "", fwidth,
+ "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder, nrecord->hash);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A__dense_btree2_name_debug() */
@@ -421,8 +421,8 @@ H5A__dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, i
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(bt2_udata);
- HDassert(bt2_rec);
+ assert(bt2_udata);
+ assert(bt2_rec);
/* Check creation order value */
if (bt2_udata->corder < bt2_rec->corder)
@@ -514,8 +514,8 @@ H5A__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u}\n", indent, "", fwidth,
- "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder);
+ fprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u}\n", indent, "", fwidth,
+ "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A__dense_btree2_corder_debug() */
diff --git a/src/H5Adense.c b/src/H5Adense.c
index efac18d..02c6d68 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -177,12 +177,12 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
+ assert(f);
+ assert(ainfo);
/* Set fractal heap creation parameters */
/* XXX: Give some control of these to applications? */
- HDmemset(&fheap_cparam, 0, sizeof(fheap_cparam));
+ memset(&fheap_cparam, 0, sizeof(fheap_cparam));
fheap_cparam.managed.width = H5O_FHEAP_MAN_WIDTH;
fheap_cparam.managed.start_block_size = H5O_FHEAP_MAN_START_BLOCK_SIZE;
fheap_cparam.managed.max_direct_size = H5O_FHEAP_MAN_MAX_DIRECT_SIZE;
@@ -206,12 +206,12 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
/* Retrieve the heap's ID length in the file */
if (H5HF_get_id_len(fheap, &fheap_id_len) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length")
- HDassert(fheap_id_len == H5O_FHEAP_ID_LEN);
+ assert(fheap_id_len == H5O_FHEAP_ID_LEN);
}
#endif /* NDEBUG */
/* Create the name index v2 B-tree */
- HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
+ memset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5A_BT2_NAME;
bt2_cparam.node_size = (size_t)H5A_NAME_BT2_NODE_SIZE;
bt2_cparam.rrec_size = 4 + /* Name's hash value */
@@ -230,7 +230,7 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
/* Check if we should create a creation order index v2 B-tree */
if (ainfo->index_corder) {
/* Create the creation order index v2 B-tree */
- HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
+ memset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5A_BT2_CORDER;
bt2_cparam.node_size = (size_t)H5A_CORDER_BT2_NODE_SIZE;
bt2_cparam.rrec_size = 4 + /* Creation order index */
@@ -279,9 +279,9 @@ H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(attr);
- HDassert(user_attr);
- HDassert(took_ownership);
+ assert(attr);
+ assert(user_attr);
+ assert(took_ownership);
/*
* If there is an attribute already stored in "user_attr",
@@ -343,9 +343,9 @@ H5A__dense_open(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(name);
+ assert(f);
+ assert(ainfo);
+ assert(name);
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr)))
@@ -434,9 +434,9 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(attr);
+ assert(f);
+ assert(ainfo);
+ assert(attr);
/* Check if attributes are shared in this file */
if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0)
@@ -459,7 +459,7 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
/* Attributes can't be "unique be shareable" yet */
- HDassert(!(mesg_flags & H5O_MSG_FLAG_SHAREABLE));
+ assert(!(mesg_flags & H5O_MSG_FLAG_SHAREABLE));
} /* end else */
/* Retrieve the address of the shared message's fractal heap */
@@ -481,7 +481,7 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
/* Check for inserting shared attribute */
if (mesg_flags & H5O_MSG_FLAG_SHARED) {
/* Sanity check */
- HDassert(attr_sharable);
+ assert(attr_sharable);
/* Use heap ID for shared message heap */
udata.id = attr->sh_loc.u.heap_id;
@@ -535,7 +535,7 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
/* Check if we should create a creation order index v2 B-tree record */
if (ainfo->index_corder) {
/* Open the creation order index v2 B-tree */
- HDassert(H5F_addr_defined(ainfo->corder_bt2_addr));
+ assert(H5F_addr_defined(ainfo->corder_bt2_addr));
if (NULL == (bt2_corder = H5B2_open(f, ainfo->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
@@ -582,8 +582,8 @@ H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(record);
- HDassert(new_heap_id);
+ assert(record);
+ assert(new_heap_id);
/* Update record's heap ID */
record->id = *new_heap_id;
@@ -619,8 +619,8 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(record);
- HDassert(op_data);
+ assert(record);
+ assert(op_data);
/* Check for modifying shared attribute */
if (record->flags & H5O_MSG_FLAG_SHARED) {
@@ -687,7 +687,7 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
if (H5HF_get_obj_len(op_data->fheap, &record->id, &obj_len) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get object size")
- HDassert(obj_len == attr_size);
+ assert(obj_len == attr_size);
}
#endif /* NDEBUG */
/* Update existing attribute in heap */
@@ -732,11 +732,11 @@ H5A__dense_write(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(H5F_addr_defined(ainfo->fheap_addr));
- HDassert(H5F_addr_defined(ainfo->name_bt2_addr));
- HDassert(attr);
+ assert(f);
+ assert(ainfo);
+ assert(H5F_addr_defined(ainfo->fheap_addr));
+ assert(H5F_addr_defined(ainfo->name_bt2_addr));
+ assert(attr);
/* Check if attributes are shared in this file */
if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0)
@@ -872,10 +872,10 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(old_name);
- HDassert(new_name);
+ assert(f);
+ assert(ainfo);
+ assert(old_name);
+ assert(new_name);
/* Check if attributes are shared in this file */
if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0)
@@ -922,7 +922,7 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't search for attribute in name index")
if (attr_exists == FALSE)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute in name index")
- HDassert(attr_copy);
+ assert(attr_copy);
/* Check if message is already shared */
if ((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr_copy)) < 0)
@@ -946,7 +946,7 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons
hbool_t corder_attr_exists; /* Attribute exists in v2 B-tree */
/* Open the creation order index v2 B-tree */
- HDassert(H5F_addr_defined(ainfo->corder_bt2_addr));
+ assert(H5F_addr_defined(ainfo->corder_bt2_addr));
if (NULL == (bt2_corder = H5B2_open(f, ainfo->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation index")
@@ -1099,7 +1099,7 @@ H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
break;
default:
- HDassert("unknown attribute op type" && 0);
+ assert("unknown attribute op type" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type")
#endif /* NDEBUG */
@@ -1148,11 +1148,11 @@ H5A__dense_iterate(H5F_t *f, hid_t loc_id, const H5O_ainfo_t *ainfo, H5_index_t
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(H5F_addr_defined(ainfo->fheap_addr));
- HDassert(H5F_addr_defined(ainfo->name_bt2_addr));
- HDassert(attr_op);
+ assert(f);
+ assert(ainfo);
+ assert(H5F_addr_defined(ainfo->fheap_addr));
+ assert(H5F_addr_defined(ainfo->name_bt2_addr));
+ assert(attr_op);
/* Determine the address of the index to use */
if (idx_type == H5_INDEX_NAME) {
@@ -1161,14 +1161,14 @@ H5A__dense_iterate(H5F_t *f, hid_t loc_id, const H5O_ainfo_t *ainfo, H5_index_t
* table and sorting it.
*/
if (order == H5_ITER_NATIVE) {
- HDassert(H5F_addr_defined(ainfo->name_bt2_addr));
+ assert(H5F_addr_defined(ainfo->name_bt2_addr));
bt2_addr = ainfo->name_bt2_addr;
} /* end if */
else
bt2_addr = HADDR_UNDEF;
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
/* This address may not be defined if creation order is tracked, but
* there's no index on it. If there's no v2 B-tree that indexes
@@ -1343,9 +1343,9 @@ H5A__dense_remove(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(name && *name);
+ assert(f);
+ assert(ainfo);
+ assert(name && *name);
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr)))
@@ -1445,7 +1445,7 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
/* Call fractal heap 'op' routine, to make copy of attribute to remove */
if (H5HF_op(fheap, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "attribute removal callback failed")
- HDassert(fh_udata.attr);
+ assert(fh_udata.attr);
/* Use the attribute's shared location */
use_sh_loc = FALSE;
@@ -1468,7 +1468,7 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
other_bt2_udata.corder = fh_udata.attr->shared->crt_idx;
} /* end if */
else {
- HDassert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
+ assert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
/* Set up the user data for the v2 B-tree 'record remove' callback */
other_bt2_udata.f = bt2_udata->f;
@@ -1555,8 +1555,8 @@ H5A__dense_remove_by_idx(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
+ assert(f);
+ assert(ainfo);
/* Determine the address of the index to use */
if (idx_type == H5_INDEX_NAME) {
@@ -1566,13 +1566,13 @@ H5A__dense_remove_by_idx(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type
*/
if (order == H5_ITER_NATIVE) {
bt2_addr = ainfo->name_bt2_addr;
- HDassert(H5F_addr_defined(bt2_addr));
+ assert(H5F_addr_defined(bt2_addr));
} /* end if */
else
bt2_addr = HADDR_UNDEF;
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
/* This address may not be defined if creation order is tracked, but
* there's no index on it. If there's no v2 B-tree that indexes
@@ -1680,10 +1680,10 @@ H5A__dense_exists(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name, hbool_t
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
- HDassert(name);
- HDassert(attr_exists);
+ assert(f);
+ assert(ainfo);
+ assert(name);
+ assert(attr_exists);
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr)))
@@ -1825,8 +1825,8 @@ H5A__dense_delete(H5F_t *f, H5O_ainfo_t *ainfo)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(ainfo);
+ assert(f);
+ assert(ainfo);
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr)))
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 8662b5f..6905235 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -221,7 +221,7 @@ H5A_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(0 == H5I_nmembers(H5I_ATTR));
+ assert(0 == H5I_nmembers(H5I_ATTR));
/* Destroy the attribute object id group */
n += (H5I_dec_type_ref(H5I_ATTR) > 0);
@@ -253,10 +253,10 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons
FUNC_ENTER_PACKAGE_TAG(loc->oloc->addr)
/* Check args */
- HDassert(loc);
- HDassert(attr_name);
- HDassert(type);
- HDassert(space);
+ assert(loc);
+ assert(attr_name);
+ assert(type);
+ assert(space);
/* Check for existing attribute with same name */
/* (technically, the "attribute create" operation will fail for a duplicated
@@ -285,7 +285,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "can't allocate shared attr structure")
/* If the creation property list is H5P_ATTRIBUTE_CREATE_DEFAULT, use the default character encoding */
- HDassert(acpl_id != H5P_DEFAULT);
+ assert(acpl_id != H5P_DEFAULT);
if (acpl_id == H5P_ATTRIBUTE_CREATE_DEFAULT)
attr->shared->encoding = H5F_DEFAULT_CSET;
else {
@@ -363,8 +363,8 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, NULL, "dataspace is invalid")
H5_CHECKED_ASSIGN(nelmts, size_t, snelmts, hssize_t);
- HDassert(attr->shared->dt_size > 0);
- HDassert(attr->shared->ds_size > 0);
+ assert(attr->shared->dt_size > 0);
+ assert(attr->shared->ds_size > 0);
attr->shared->data_size = nelmts * H5T_GET_SIZE(attr->shared->dt);
/* Hold the symbol table entry (and file) open */
@@ -417,9 +417,9 @@ H5A__create_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(loc);
- HDassert(obj_name);
- HDassert(attr_name);
+ assert(loc);
+ assert(obj_name);
+ assert(attr_name);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -476,8 +476,8 @@ H5A__open_common(const H5G_loc_t *loc, H5A_t *attr)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(loc);
- HDassert(attr);
+ assert(loc);
+ assert(attr);
#if defined(H5_USING_MEMCHECKER) || !defined(NDEBUG)
/* Clear object location */
@@ -527,8 +527,8 @@ H5A__open(const H5G_loc_t *loc, const char *attr_name)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(loc);
- HDassert(attr_name);
+ assert(loc);
+ assert(attr_name);
/* Read in attribute from object header */
if (NULL == (attr = H5O__attr_open_by_name(loc->oloc, attr_name)))
@@ -577,8 +577,8 @@ H5A__open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(loc);
- HDassert(obj_name);
+ assert(loc);
+ assert(obj_name);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -639,9 +639,9 @@ H5A__open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_n
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(loc);
- HDassert(obj_name);
- HDassert(attr_name);
+ assert(loc);
+ assert(obj_name);
+ assert(attr_name);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -709,9 +709,9 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf)
FUNC_ENTER_PACKAGE_TAG(attr->oloc.addr)
- HDassert(attr);
- HDassert(mem_type);
- HDassert(buf);
+ assert(attr);
+ assert(mem_type);
+ assert(buf);
/* Patch the top level file pointer in attr->shared->dt->shared->u.vlen.f if needed */
if (H5T_patch_vlen_file(attr->shared->dt, H5F_VOL_OBJ(attr->oloc.file)) < 0)
@@ -729,7 +729,7 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf)
/* Check if the attribute has any data yet, if not, fill with zeroes */
if (attr->obj_opened && !attr->shared->data)
- HDmemset(buf, 0, (dst_type_size * nelmts));
+ memset(buf, 0, (dst_type_size * nelmts));
else { /* Attribute exists and has a value */
/* Convert memory buffer into disk buffer */
/* Set up type conversion function */
@@ -764,7 +764,7 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf)
/* Copy the application buffer into the background buffer if necessary */
if (need_bkg == H5T_BKG_YES) {
- HDassert(buf_size >= (dst_type_size * nelmts));
+ assert(buf_size >= (dst_type_size * nelmts));
H5MM_memcpy(bkg_buf, buf, dst_type_size * nelmts);
}
}
@@ -778,7 +778,7 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf)
} /* end if */
/* No type conversion necessary */
else {
- HDassert(dst_type_size == src_type_size);
+ assert(dst_type_size == src_type_size);
/* Copy the attribute data into the user's buffer */
H5MM_memcpy(buf, attr->shared->data, (dst_type_size * nelmts));
@@ -831,9 +831,9 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
FUNC_ENTER_PACKAGE_TAG(attr->oloc.addr)
- HDassert(attr);
- HDassert(mem_type);
- HDassert(buf);
+ assert(attr);
+ assert(mem_type);
+ assert(buf);
/* Patch the top level file pointer in attr->shared->dt->shared->u.vlen.f if needed */
if (H5T_patch_vlen_file(attr->shared->dt, H5F_VOL_OBJ(attr->oloc.file)) < 0)
@@ -888,7 +888,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
/* Clear background buffer if it's not supposed to be initialized with file
* contents */
if (need_bkg == H5T_BKG_TEMP)
- HDmemset(bkg_buf, 0, dst_type_size * nelmts);
+ memset(bkg_buf, 0, dst_type_size * nelmts);
}
else if (NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed")
@@ -908,7 +908,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
} /* end if */
/* No type conversion necessary */
else {
- HDassert(dst_type_size == src_type_size);
+ assert(dst_type_size == src_type_size);
/* Allocate the attribute buffer, if there isn't one */
if (attr->shared->data == NULL)
@@ -962,8 +962,8 @@ H5A__get_name(H5A_t *attr, size_t buf_size, char *buf, size_t *attr_name_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(attr);
- HDassert(attr_name_len);
+ assert(attr);
+ assert(attr_name_len);
/* Get the real attribute length */
nbytes = HDstrlen(attr->shared->name);
@@ -1004,7 +1004,7 @@ H5A_get_space(H5A_t *attr)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(attr);
+ assert(attr);
/* Copy the attribute's dataspace */
if (NULL == (ds = H5S_copy(attr->shared->ds, FALSE, TRUE)))
@@ -1039,7 +1039,7 @@ H5A__get_type(H5A_t *attr)
FUNC_ENTER_PACKAGE
- HDassert(attr);
+ assert(attr);
/* Patch the datatype's "top level" file pointer */
if (H5T_patch_file(attr->shared->dt, attr->oloc.file) < 0)
@@ -1145,8 +1145,8 @@ H5A__get_info(const H5A_t *attr, H5A_info_t *ainfo)
FUNC_ENTER_NOAPI_NOERR
/* Check args */
- HDassert(attr);
- HDassert(ainfo);
+ assert(attr);
+ assert(ainfo);
/* Set info for attribute */
ainfo->cset = attr->shared->encoding;
@@ -1186,7 +1186,7 @@ H5A__copy(H5A_t *_new_attr, const H5A_t *old_attr)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(old_attr);
+ assert(old_attr);
/* Allocate attribute structure */
if (_new_attr == NULL) {
@@ -1246,8 +1246,8 @@ H5A__shared_free(H5A_t *attr)
FUNC_ENTER_PACKAGE
- HDassert(attr);
- HDassert(attr->shared);
+ assert(attr);
+ assert(attr->shared);
/* Free dynamically allocated items.
* When possible, keep trying to shut things down (via HDONE_ERROR).
@@ -1292,7 +1292,7 @@ H5A__close_cb(H5VL_object_t *attr_vol_obj, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(attr_vol_obj);
+ assert(attr_vol_obj);
/* Close the attribute */
if (H5VL_attr_close(attr_vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0)
@@ -1325,8 +1325,8 @@ H5A__close(H5A_t *attr)
FUNC_ENTER_PACKAGE
- HDassert(attr);
- HDassert(attr->shared);
+ assert(attr);
+ assert(attr->shared);
/* Close the object's symbol-table entry */
if (attr->obj_opened && (H5O_close(&(attr->oloc), NULL) < 0))
@@ -1378,7 +1378,7 @@ H5A_oloc(H5A_t *attr)
FUNC_ENTER_NOAPI_NOERR
- HDassert(attr);
+ assert(attr);
/* Set return value */
ret_value = &(attr->oloc);
@@ -1408,7 +1408,7 @@ H5A_nameof(H5A_t *attr)
FUNC_ENTER_NOAPI_NOERR
- HDassert(attr);
+ assert(attr);
/* Set return value */
ret_value = &(attr->path);
@@ -1436,7 +1436,7 @@ H5A_type(const H5A_t *attr)
FUNC_ENTER_NOAPI_NOERR
- HDassert(attr);
+ assert(attr);
/* Set return value */
ret_value = attr->shared->dt;
@@ -1468,9 +1468,9 @@ H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj_name);
- HDassert(attr_name);
- HDassert(attr_exists);
+ assert(obj_name);
+ assert(attr_name);
+ assert(attr_exists);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -1521,7 +1521,7 @@ H5A__compact_build_table_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* Re-allocate the table if necessary */
if (udata->curr_attr == udata->atable->nattrs) {
@@ -1580,9 +1580,9 @@ H5A__compact_build_table(H5F_t *f, H5O_t *oh, H5_index_t idx_type, H5_iter_order
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(oh);
- HDassert(atable);
+ assert(f);
+ assert(oh);
+ assert(atable);
/* Initialize table */
atable->attrs = NULL;
@@ -1638,9 +1638,9 @@ H5A__dense_build_table_cb(const H5A_t *attr, void *_udata)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(attr);
- HDassert(udata);
- HDassert(udata->curr_attr < udata->atable->nattrs);
+ assert(attr);
+ assert(udata);
+ assert(udata->curr_attr < udata->atable->nattrs);
/* Allocate attribute for entry in the table */
if (NULL == (udata->atable->attrs[udata->curr_attr] = H5FL_CALLOC(H5A_t)))
@@ -1685,11 +1685,11 @@ H5A__dense_build_table(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(ainfo);
- HDassert(H5F_addr_defined(ainfo->fheap_addr));
- HDassert(H5F_addr_defined(ainfo->name_bt2_addr));
- HDassert(atable);
+ assert(f);
+ assert(ainfo);
+ assert(H5F_addr_defined(ainfo->fheap_addr));
+ assert(H5F_addr_defined(ainfo->name_bt2_addr));
+ assert(atable);
/* Open the name index v2 B-tree */
if (NULL == (bt2_name = H5B2_open(f, ainfo->name_bt2_addr, NULL)))
@@ -1879,7 +1879,7 @@ H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, H5_iter_orde
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(atable);
+ assert(atable);
/* Pick appropriate comparison routine */
if (idx_type == H5_INDEX_NAME) {
@@ -1888,16 +1888,16 @@ H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, H5_iter_orde
else if (order == H5_ITER_DEC)
HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t *), H5A__attr_cmp_name_dec);
else
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
if (order == H5_ITER_INC)
HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t *), H5A__attr_cmp_corder_inc);
else if (order == H5_ITER_DEC)
HDqsort(atable->attrs, atable->nattrs, sizeof(H5A_t *), H5A__attr_cmp_corder_dec);
else
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1926,8 +1926,8 @@ H5A__attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, hsize_t *l
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(atable);
- HDassert(attr_op);
+ assert(atable);
+ assert(attr_op);
/* Skip over attributes, if requested */
if (last_attr)
@@ -1963,7 +1963,7 @@ H5A__attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, hsize_t *l
break;
default:
- HDassert("unknown attribute op type" && 0);
+ assert("unknown attribute op type" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type")
#endif /* NDEBUG */
@@ -2002,7 +2002,7 @@ H5A__attr_release_table(H5A_attr_table_t *atable)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(atable);
+ assert(atable);
/* Release attribute info, if any. */
if (atable->nattrs > 0) {
@@ -2014,7 +2014,7 @@ H5A__attr_release_table(H5A_attr_table_t *atable)
HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to release attribute")
} /* end if */
else
- HDassert(atable->attrs == NULL);
+ assert(atable->attrs == NULL);
atable->attrs = (H5A_t **)H5FL_SEQ_FREE(H5A_t_ptr, atable->attrs);
@@ -2044,9 +2044,9 @@ H5A__get_ainfo(H5F_t *f, H5O_t *oh, H5O_ainfo_t *ainfo)
FUNC_ENTER_NOAPI_TAG(oh->cache_info.addr, FAIL)
/* check arguments */
- HDassert(f);
- HDassert(oh);
- HDassert(ainfo);
+ assert(f);
+ assert(oh);
+ assert(ainfo);
/* Check if the "attribute info" message exists */
if ((ret_value = H5O_msg_exists_oh(oh, H5O_AINFO_ID)) < 0)
@@ -2108,8 +2108,8 @@ H5A__set_version(const H5F_t *f, H5A_t *attr)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(attr);
+ assert(f);
+ assert(attr);
/* Check whether datatype and dataspace are shared */
if (H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt) > 0)
@@ -2185,10 +2185,10 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(attr_src);
- HDassert(file_dst);
- HDassert(cpy_info);
- HDassert(!cpy_info->copy_without_attr);
+ assert(attr_src);
+ assert(file_dst);
+ assert(cpy_info);
+ assert(!cpy_info->copy_without_attr);
/* Allocate space for the destination message */
if (NULL == (attr_dst = H5FL_CALLOC(H5A_t)))
@@ -2210,7 +2210,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
/* Copy attribute's name */
attr_dst->shared->name = H5MM_strdup(attr_src->shared->name);
- HDassert(attr_dst->shared->name);
+ assert(attr_dst->shared->name);
attr_dst->shared->encoding = attr_src->shared->encoding;
/* Copy attribute's datatype */
@@ -2235,7 +2235,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
/* Copy the dataspace for the attribute. Make sure the maximal dimension is also copied.
* Otherwise the comparison in the test may complain about it. SLU 2011/4/12 */
attr_dst->shared->ds = H5S_copy(attr_src->shared->ds, FALSE, TRUE);
- HDassert(attr_dst->shared->ds);
+ assert(attr_dst->shared->ds);
/* Reset the dataspace's sharing in the source file before trying to share
* it in the destination.
@@ -2256,9 +2256,9 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
* size unless they're shared.
*/
attr_dst->shared->dt_size = H5O_msg_raw_size(file_dst, H5O_DTYPE_ID, FALSE, attr_dst->shared->dt);
- HDassert(attr_dst->shared->dt_size > 0);
+ assert(attr_dst->shared->dt_size > 0);
attr_dst->shared->ds_size = H5O_msg_raw_size(file_dst, H5O_SDSPACE_ID, FALSE, attr_dst->shared->ds);
- HDassert(attr_dst->shared->ds_size > 0);
+ assert(attr_dst->shared->ds_size > 0);
/* Check whether to recompute the size of the attribute */
/* (happens when the datatype or dataspace changes sharing status) */
@@ -2371,7 +2371,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
/* Set background buffer to all zeros */
if (bkg_buf)
- HDmemset(bkg_buf, 0, buf_size);
+ memset(bkg_buf, 0, buf_size);
/* Convert from memory to destination file */
if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg_buf) < 0)
@@ -2383,7 +2383,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, NULL, "unable to reclaim variable-length data")
} /* end if */
else {
- HDassert(attr_dst->shared->data_size == attr_src->shared->data_size);
+ assert(attr_dst->shared->data_size == attr_src->shared->data_size);
H5MM_memcpy(attr_dst->shared->data, attr_src->shared->data, attr_src->shared->data_size);
} /* end else */
} /* end if(attr_src->shared->data) */
@@ -2457,16 +2457,16 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(src_oloc);
- HDassert(dst_oloc);
- HDassert(attr_dst);
- HDassert(attr_src);
+ assert(src_oloc);
+ assert(dst_oloc);
+ assert(attr_dst);
+ assert(attr_src);
file_src = src_oloc->file;
file_dst = dst_oloc->file;
- HDassert(file_src);
- HDassert(file_dst);
+ assert(file_src);
+ assert(file_dst);
if (H5T_is_named(attr_src->shared->dt)) {
H5O_loc_t *src_oloc_dt; /* Pointer to source datatype's object location */
@@ -2474,9 +2474,9 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l
/* Get group entries for source & destination */
src_oloc_dt = H5T_oloc(attr_src->shared->dt);
- HDassert(src_oloc_dt);
+ assert(src_oloc_dt);
dst_oloc_dt = H5T_oloc(attr_dst->shared->dt);
- HDassert(dst_oloc_dt);
+ assert(dst_oloc_dt);
/* Reset object location for new object */
H5O_loc_reset(dst_oloc_dt);
@@ -2517,7 +2517,7 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l
} /* end if */
else
/* Reset value to zero */
- HDmemset(attr_dst->shared->data, 0, attr_dst->shared->data_size);
+ memset(attr_dst->shared->data, 0, attr_dst->shared->data_size);
} /* end if */
done:
@@ -2547,11 +2547,11 @@ H5A__dense_post_copy_file_cb(const H5A_t *attr_src, void *_udata)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(attr_src);
- HDassert(udata);
- HDassert(udata->ainfo);
- HDassert(udata->file);
- HDassert(udata->cpy_info);
+ assert(attr_src);
+ assert(udata);
+ assert(udata->ainfo);
+ assert(udata->file);
+ assert(udata->cpy_info);
if (NULL ==
(attr_dst = H5A__attr_copy_file(attr_src, udata->file, udata->recompute_size, udata->cpy_info)))
@@ -2605,8 +2605,8 @@ H5A__dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainf
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(ainfo_src);
- HDassert(ainfo_dst);
+ assert(ainfo_src);
+ assert(ainfo_dst);
udata.ainfo = ainfo_dst; /* Destination dense information */
udata.file = dst_oloc->file; /* Destination file */
diff --git a/src/H5Atest.c b/src/H5Atest.c
index 803d3cd..cb7671d 100644
--- a/src/H5Atest.c
+++ b/src/H5Atest.c
@@ -128,7 +128,7 @@ H5A__get_shared_rc_test(hid_t attr_id, hsize_t *ref_count)
api_ctx_pushed = TRUE;
/* Sanity check */
- HDassert(H5O_msg_is_shared(H5O_ATTR_ID, attr));
+ assert(H5O_msg_is_shared(H5O_ATTR_ID, attr));
/* Retrieve ref count for shared or shareable attribute */
if (H5SM_get_refcount(attr->oloc.file, H5O_ATTR_ID, &attr->sh_loc, ref_count) < 0)
diff --git a/src/H5B.c b/src/H5B.c
index 596a05d..881abb0 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -211,16 +211,16 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p /*out
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
- HDassert(addr_p);
+ assert(f);
+ assert(type);
+ assert(addr_p);
/*
* Allocate file and memory data structures.
*/
if (NULL == (bt = H5FL_MALLOC(H5B_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
- HDmemset(&bt->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&bt->cache_info, 0, sizeof(H5AC_info_t));
bt->level = 0;
bt->left = HADDR_UNDEF;
bt->right = HADDR_UNDEF;
@@ -229,7 +229,7 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p /*out
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer")
H5UC_INC(bt->rc_shared);
shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
- HDassert(shared);
+ assert(shared);
if (NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
NULL == (bt->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
@@ -298,18 +298,18 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, hbool_t *found, void *
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
- HDassert(type->decode);
- HDassert(type->cmp3);
- HDassert(type->found);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(type);
+ assert(type->decode);
+ assert(type->cmp3);
+ assert(type->found);
+ assert(H5F_addr_defined(addr));
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/*
* Perform a binary search to locate the child which contains
@@ -338,7 +338,7 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, hbool_t *found, void *
/*
* Follow the link to the subtree or to the data node.
*/
- HDassert(idx < bt->nchildren);
+ assert(idx < bt->nchildren);
if (bt->level > 0) {
if ((ret_value = H5B_find(f, type, bt->child[idx], found, udata)) < 0)
@@ -392,19 +392,19 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(bt_ud);
- HDassert(bt_ud->bt);
- HDassert(H5F_addr_defined(bt_ud->addr));
- HDassert(split_bt_ud);
- HDassert(!split_bt_ud->bt);
+ assert(f);
+ assert(bt_ud);
+ assert(bt_ud->bt);
+ assert(H5F_addr_defined(bt_ud->addr));
+ assert(split_bt_ud);
+ assert(!split_bt_ud->bt);
/*
* Initialize variables.
*/
shared = (H5B_shared_t *)H5UC_GET_OBJ(bt_ud->bt->rc_shared);
- HDassert(shared);
- HDassert(bt_ud->bt->nchildren == shared->two_k);
+ assert(shared);
+ assert(bt_ud->bt->nchildren == shared->two_k);
/* Get B-tree split ratios */
if (H5CX_get_btree_split_ratios(split_ratios) < 0)
@@ -422,8 +422,8 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_
side = "LEFT";
else
side = "MIDDLE";
- HDfprintf(H5DEBUG(B), "H5B__split: %3u {%5.3f,%5.3f,%5.3f} %6s", shared->two_k, split_ratios[0],
- split_ratios[1], split_ratios[2], side);
+ fprintf(H5DEBUG(B), "H5B__split: %3u {%5.3f,%5.3f,%5.3f} %6s", shared->two_k, split_ratios[0],
+ split_ratios[1], split_ratios[2], side);
}
#endif
@@ -450,7 +450,7 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_
nright = shared->two_k - nleft;
#ifdef H5B_DEBUG
if (H5DEBUG(B))
- HDfprintf(H5DEBUG(B), " split %3d/%-3d\n", nleft, nright);
+ fprintf(H5DEBUG(B), " split %3d/%-3d\n", nleft, nright);
#endif
/*
@@ -503,7 +503,7 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_
} /* end if */
bt_ud->bt->right = split_bt_ud->addr;
- HDassert(bt_ud->cache_flags & H5AC__DIRTIED_FLAG);
+ assert(bt_ud->cache_flags & H5AC__DIRTIED_FLAG);
done:
if (ret_value < 0) {
@@ -556,16 +556,16 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(type);
- HDassert(type->sizeof_nkey <= sizeof _lt_key);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(type);
+ assert(type->sizeof_nkey <= sizeof _lt_key);
+ assert(H5F_addr_defined(addr));
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/* Protect the root node */
cache_udata.f = f;
@@ -583,12 +583,12 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
/* Check if the root node split */
if (H5B_INS_NOOP == my_ins) {
/* The root node did not split - just return */
- HDassert(!split_bt_ud.bt);
+ assert(!split_bt_ud.bt);
HGOTO_DONE(SUCCEED)
} /* end if */
- HDassert(H5B_INS_RIGHT == my_ins);
- HDassert(split_bt_ud.bt);
- HDassert(H5F_addr_defined(split_bt_ud.addr));
+ assert(H5B_INS_RIGHT == my_ins);
+ assert(split_bt_ud.bt);
+ assert(H5F_addr_defined(split_bt_ud.addr));
/* Get level of old root */
level = bt_ud.bt->level;
@@ -694,12 +694,12 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx, haddr_t child, H5
FUNC_ENTER_PACKAGE_NOERR
- HDassert(bt);
- HDassert(bt_flags);
- HDassert(H5F_addr_defined(child));
+ assert(bt);
+ assert(bt_flags);
+ assert(H5F_addr_defined(child));
shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
- HDassert(shared);
- HDassert(bt->nchildren < shared->two_k);
+ assert(shared);
+ assert(bt->nchildren < shared->two_k);
/* Check for inserting right-most key into node (common when just appending
* records to an unlimited dimension chunked dataset)
@@ -791,22 +791,22 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
/*
* Check arguments
*/
- HDassert(f);
- HDassert(bt_ud);
- HDassert(bt_ud->bt);
- HDassert(H5F_addr_defined(bt_ud->addr));
- HDassert(type);
- HDassert(type->decode);
- HDassert(type->cmp3);
- HDassert(type->new_node);
- HDassert(lt_key);
- HDassert(lt_key_changed);
- HDassert(rt_key);
- HDassert(rt_key_changed);
- HDassert(split_bt_ud);
- HDassert(!split_bt_ud->bt);
- HDassert(!H5F_addr_defined(split_bt_ud->addr));
- HDassert(split_bt_ud->cache_flags == H5AC__NO_FLAGS_SET);
+ assert(f);
+ assert(bt_ud);
+ assert(bt_ud->bt);
+ assert(H5F_addr_defined(bt_ud->addr));
+ assert(type);
+ assert(type->decode);
+ assert(type->cmp3);
+ assert(type->new_node);
+ assert(lt_key);
+ assert(lt_key_changed);
+ assert(rt_key);
+ assert(rt_key_changed);
+ assert(split_bt_ud);
+ assert(!split_bt_ud->bt);
+ assert(!H5F_addr_defined(split_bt_ud->addr));
+ assert(split_bt_ud->cache_flags == H5AC__NO_FLAGS_SET);
bt = bt_ud->bt;
@@ -817,7 +817,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/*
* Use a binary search to find the child that will receive the new
@@ -844,7 +844,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
* The value being inserted will be the only value in this tree. We
* must necessarily be at level zero.
*/
- HDassert(0 == bt->level);
+ assert(0 == bt->level);
if ((type->new_node)(f, H5B_INS_FIRST, H5B_NKEY(bt, shared, 0), udata, H5B_NKEY(bt, shared, 1),
bt->child + 0 /*out*/) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, H5B_INS_ERROR, "unable to create leaf node")
@@ -965,7 +965,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
* 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);
+ assert("INTERNAL HDF5 ERROR (contact rpm)" && 0);
#ifdef NDEBUG
HDabort();
#endif /* NDEBUG */
@@ -974,7 +974,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
/*
* Follow a branch out of this node to another subtree.
*/
- HDassert(idx < bt->nchildren);
+ assert(idx < bt->nchildren);
child_bt_ud.addr = bt->child[idx];
if (NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, H5AC_BT, child_bt_ud.addr, &cache_udata,
H5AC__NO_FLAGS_SET)))
@@ -989,13 +989,13 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
/*
* Follow a branch out of this node to a leaf node of some other type.
*/
- HDassert(idx < bt->nchildren);
+ assert(idx < bt->nchildren);
if ((int)(my_ins = (type->insert)(f, bt->child[idx], H5B_NKEY(bt, shared, idx), lt_key_changed,
md_key, udata, H5B_NKEY(bt, shared, idx + 1), rt_key_changed,
&new_child_bt_ud.addr /*out*/)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert leaf node")
}
- HDassert((int)my_ins >= 0);
+ assert((int)my_ins >= 0);
/*
* Update the left and right keys of the current node.
@@ -1003,8 +1003,8 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if (*lt_key_changed) {
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
if (idx > 0) {
- HDassert(type->critical_key == H5B_LEFT);
- HDassert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
+ assert(type->critical_key == H5B_LEFT);
+ assert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
*lt_key_changed = FALSE;
} /* end if */
else
@@ -1013,8 +1013,8 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if (*rt_key_changed) {
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
if (idx + 1 < bt->nchildren) {
- HDassert(type->critical_key == H5B_RIGHT);
- HDassert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
+ assert(type->critical_key == H5B_RIGHT);
+ assert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
*rt_key_changed = FALSE;
} /* end if */
else
@@ -1024,13 +1024,13 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
/*
* Handle changes/additions to children
*/
- HDassert(!(bt->level == 0) != !(child_bt_ud.bt));
+ assert(!(bt->level == 0) != !(child_bt_ud.bt));
if (H5B_INS_CHANGE == my_ins) {
/*
* The insertion simply changed the address for the child.
*/
- HDassert(!child_bt_ud.bt);
- HDassert(bt->level == 0);
+ assert(!child_bt_ud.bt);
+ assert(bt->level == 0);
bt->child[idx] = new_child_bt_ud.addr;
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
}
@@ -1077,7 +1077,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
* in the new node.
*/
cmp = (type->cmp2)(H5B_NKEY(bt, shared, bt->nchildren), udata, H5B_NKEY(split_bt_ud->bt, shared, 0));
- HDassert(0 == cmp);
+ assert(0 == cmp);
#endif
} /* end if */
else
@@ -1124,17 +1124,17 @@ H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operato
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
- HDassert(H5F_addr_defined(addr));
- HDassert(op);
- HDassert(udata);
+ assert(f);
+ assert(type);
+ assert(H5F_addr_defined(addr));
+ assert(op);
+ assert(udata);
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/* Protect the initial/current node */
cache_udata.f = f;
@@ -1183,11 +1183,11 @@ H5B_iterate(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operator_t op,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
- HDassert(H5F_addr_defined(addr));
- HDassert(op);
- HDassert(udata);
+ assert(f);
+ assert(type);
+ assert(H5F_addr_defined(addr));
+ assert(op);
+ assert(udata);
/* Iterate over the B-tree records */
if ((ret_value = H5B__iterate_helper(f, type, addr, op, udata)) < 0)
@@ -1236,20 +1236,20 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(type);
- HDassert(type->decode);
- HDassert(type->cmp3);
- HDassert(lt_key && lt_key_changed);
- HDassert(udata);
- HDassert(rt_key && rt_key_changed);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(type);
+ assert(type->decode);
+ assert(type->cmp3);
+ assert(lt_key && lt_key_changed);
+ assert(udata);
+ assert(rt_key && rt_key_changed);
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/*
* Perform a binary search to locate the child which contains the thing
@@ -1276,7 +1276,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
* Follow the link to the subtree or to the data node. The return value
* will be one of H5B_INS_ERROR, H5B_INS_NOOP, or H5B_INS_REMOVE.
*/
- HDassert(idx < bt->nchildren);
+ assert(idx < bt->nchildren);
if (bt->level > 0) {
/* We're at an internal node -- call recursively */
if ((int)(ret_value =
@@ -1315,7 +1315,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
* our right key and indicate that it changed.
*/
if (*lt_key_changed) {
- HDassert(type->critical_key == H5B_LEFT);
+ assert(type->critical_key == H5B_LEFT);
bt_flags |= H5AC__DIRTIED_FLAG;
if (idx > 0)
@@ -1325,7 +1325,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
H5MM_memcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
} /* end if */
if (*rt_key_changed) {
- HDassert(type->critical_key == H5B_RIGHT);
+ assert(type->critical_key == H5B_RIGHT);
bt_flags |= H5AC__DIRTIED_FLAG;
if (idx + 1 < bt->nchildren)
/* Don't propagate change out of this B-tree node */
@@ -1342,8 +1342,8 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
/* Clients should not change keys when a node is removed. This function
* will handle it as appropriate, based on the value of bt->critical_key
*/
- HDassert(!(*lt_key_changed));
- HDassert(!(*rt_key_changed));
+ assert(!(*lt_key_changed));
+ assert(!(*rt_key_changed));
if (1 == bt->nchildren) {
/*
@@ -1496,8 +1496,8 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
/* Patch keys in neighboring trees if necessary */
if (*lt_key_changed && H5F_addr_defined(bt->left)) {
- HDassert(type->critical_key == H5B_LEFT);
- HDassert(level > 0);
+ assert(type->critical_key == H5B_LEFT);
+ assert(level > 0);
/* Update the rightmost key in the left sibling */
if (NULL == (sibling = (H5B_t *)H5AC_protect(f, H5AC_BT, bt->left, &cache_udata, H5AC__NO_FLAGS_SET)))
@@ -1511,8 +1511,8 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
sibling = NULL; /* Make certain future references will be caught */
} /* end if */
else if (*rt_key_changed && H5F_addr_defined(bt->right)) {
- HDassert(type->critical_key == H5B_RIGHT);
- HDassert(level > 0);
+ assert(type->critical_key == H5B_RIGHT);
+ assert(level > 0);
/* Update the lefttmost key in the right sibling */
if (NULL ==
@@ -1563,10 +1563,10 @@ H5B_remove(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(f);
- HDassert(type);
- HDassert(type->sizeof_nkey <= sizeof _lt_key);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(type);
+ assert(type->sizeof_nkey <= sizeof _lt_key);
+ assert(H5F_addr_defined(addr));
/* The actual removal */
if (H5B_INS_ERROR ==
@@ -1606,15 +1606,15 @@ H5B_delete(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(f);
- HDassert(type);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(type);
+ assert(H5F_addr_defined(addr));
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/* Lock this B-tree node into memory for now */
cache_udata.f = f;
@@ -1678,7 +1678,7 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
/*
* Check arguments.
*/
- HDassert(type);
+ assert(type);
/* Allocate space for the shared structure */
if (NULL == (shared = H5FL_CALLOC(H5B_shared_t)))
@@ -1690,17 +1690,17 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
shared->sizeof_addr = H5F_SIZEOF_ADDR(f);
shared->sizeof_len = H5F_SIZEOF_SIZE(f);
shared->sizeof_rkey = sizeof_rkey;
- HDassert(shared->sizeof_rkey);
+ assert(shared->sizeof_rkey);
shared->sizeof_keys = (shared->two_k + 1) * type->sizeof_nkey;
shared->sizeof_rnode = ((size_t)H5B_SIZEOF_HDR(f) + /*node header */
shared->two_k * H5F_SIZEOF_ADDR(f) + /*child pointers */
(shared->two_k + 1) * shared->sizeof_rkey); /*keys */
- HDassert(shared->sizeof_rnode);
+ assert(shared->sizeof_rnode);
/* Allocate and clear shared buffers */
if (NULL == (shared->page = H5FL_BLK_MALLOC(page, shared->sizeof_rnode)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree page")
- HDmemset(shared->page, 0, shared->sizeof_rnode);
+ memset(shared->page, 0, shared->sizeof_rnode);
if (NULL == (shared->nkey = H5FL_SEQ_MALLOC(size_t, (size_t)(shared->two_k + 1))))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree native keys")
@@ -1782,9 +1782,9 @@ H5B__copy(const H5B_t *old_bt)
/*
* Check arguments.
*/
- HDassert(old_bt);
+ assert(old_bt);
shared = (H5B_shared_t *)H5UC_GET_OBJ(old_bt->rc_shared);
- HDassert(shared);
+ assert(shared);
/* Allocate memory for the new H5B_t object */
if (NULL == (new_node = H5FL_MALLOC(H5B_t)))
@@ -1794,7 +1794,7 @@ H5B__copy(const H5B_t *old_bt)
H5MM_memcpy(new_node, old_bt, sizeof(H5B_t));
/* Reset cache info */
- HDmemset(&new_node->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&new_node->cache_info, 0, sizeof(H5AC_info_t));
if (NULL == (new_node->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
NULL == (new_node->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
@@ -1852,18 +1852,18 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, const H5B_
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
- HDassert(H5F_addr_defined(addr));
- HDassert(info_udata);
- HDassert(info_udata->bt_info);
- HDassert(info_udata->udata);
+ assert(f);
+ assert(type);
+ assert(H5F_addr_defined(addr));
+ assert(info_udata);
+ assert(info_udata->bt_info);
+ assert(info_udata->udata);
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, info_udata->udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/* Get the raw node size for iteration */
sizeof_rnode = shared->sizeof_rnode;
@@ -1950,14 +1950,14 @@ H5B_get_info(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_info_t *bt_inf
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
- HDassert(bt_info);
- HDassert(H5F_addr_defined(addr));
- HDassert(udata);
+ assert(f);
+ assert(type);
+ assert(bt_info);
+ assert(H5F_addr_defined(addr));
+ assert(udata);
/* Portably initialize B-tree info struct */
- HDmemset(bt_info, 0, sizeof(*bt_info));
+ memset(bt_info, 0, sizeof(*bt_info));
/* Set up internal user-data for the B-tree 'get info' helper routine */
info_udata.bt_info = bt_info;
@@ -2002,8 +2002,8 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(type);
+ assert(f);
+ assert(type);
if (!H5F_addr_defined(addr))
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "address is undefined")
@@ -2011,7 +2011,7 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr)
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, NULL)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
- HDassert(H5UC_GET_OBJ(rc_shared) != NULL);
+ assert(H5UC_GET_OBJ(rc_shared) != NULL);
/*
* Load the tree node.
@@ -2049,8 +2049,8 @@ H5B__node_dest(H5B_t *bt)
FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
- HDassert(bt);
- HDassert(bt->rc_shared);
+ assert(bt);
+ assert(bt->rc_shared);
bt->child = H5FL_SEQ_FREE(haddr_t, bt->child);
bt->native = H5FL_BLK_FREE(native_block, bt->native);
diff --git a/src/H5B2.c b/src/H5B2.c
index 7781eab..cdb0ef9 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -132,8 +132,8 @@ H5B2_create(H5F_t *f, const H5B2_create_t *cparam, void *ctx_udata)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
/* H5B2 interface sanity check */
HDcompile_assert(H5B2_NUM_BTREE_ID == NELMTS(H5B2_client_class_g));
@@ -200,8 +200,8 @@ H5B2_open(H5F_t *f, haddr_t addr, void *ctx_udata)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Look up the B-tree header */
if (NULL == (hdr = H5B2__hdr_protect(f, addr, ctx_udata, H5AC__READ_ONLY_FLAG)))
@@ -263,8 +263,8 @@ H5B2_insert(H5B2_t *bt2, void *udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(udata);
+ assert(bt2);
+ assert(udata);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -305,8 +305,8 @@ H5B2_update(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(udata);
+ assert(bt2);
+ assert(udata);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -333,7 +333,7 @@ H5B2_update(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
} /* end else */
/* Sanity check */
- HDassert(H5B2_UPDATE_UNKNOWN != status);
+ assert(H5B2_UPDATE_UNKNOWN != status);
/* Use insert algorithm if nodes to leaf full */
if (H5B2_UPDATE_INSERT_CHILD_FULL == status) {
@@ -347,7 +347,7 @@ H5B2_update(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
} /* end else-if */
else {
/* Sanity check */
- HDassert(H5B2_UPDATE_MODIFY_DONE == status);
+ assert(H5B2_UPDATE_MODIFY_DONE == status);
} /* end else */
done:
@@ -374,8 +374,8 @@ H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr_p)
/*
* Check arguments.
*/
- HDassert(bt2);
- HDassert(addr_p);
+ assert(bt2);
+ assert(addr_p);
/* Retrieve the header address for this v2 B-tree */
*addr_p = bt2->hdr->addr;
@@ -408,8 +408,8 @@ H5B2_iterate(H5B2_t *bt2, H5B2_operator_t op, void *op_data)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments. */
- HDassert(bt2);
- HDassert(op);
+ assert(bt2);
+ assert(op);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -463,8 +463,8 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(found);
+ assert(bt2);
+ assert(found);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -686,7 +686,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da
done:
if (parent) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (parent != hdr && H5AC_unpin_entry(parent) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry")
} /* end if */
@@ -723,8 +723,8 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(op);
+ assert(bt2);
+ assert(op);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -845,7 +845,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
} /* end if */
else
/* Index that is greater than the number of records in the tree? */
- HDassert(0 && "Index off end of tree??");
+ assert(0 && "Index off end of tree??");
} /* end if */
/* Decrement depth we're at in B-tree */
@@ -867,7 +867,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
} /* end if */
/* Sanity check index */
- HDassert(idx < leaf->nrec);
+ assert(idx < leaf->nrec);
/* Make callback for correct record */
if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0) {
@@ -885,7 +885,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi
done:
if (parent) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (parent != hdr && H5AC_unpin_entry(parent) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry")
} /* end if */
@@ -914,7 +914,7 @@ H5B2_remove(H5B2_t *bt2, void *udata, H5B2_remove_t op, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
+ assert(bt2);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -946,7 +946,7 @@ H5B2_remove(H5B2_t *bt2, void *udata, H5B2_remove_t op, void *op_data)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
"can't destroy node's node pointer block factory")
- HDassert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
+ assert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
hdr->depth = (uint16_t)(hdr->depth - depth_decreased);
} /* end for */
} /* end if */
@@ -987,7 +987,7 @@ H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
+ assert(bt2);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -1027,7 +1027,7 @@ H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
"can't destroy node's node pointer block factory")
- HDassert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
+ assert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth);
hdr->depth = (uint16_t)(hdr->depth - depth_decreased);
} /* end for */
} /* end if */
@@ -1065,8 +1065,8 @@ H5B2_get_nrec(const H5B2_t *bt2, hsize_t *nrec)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(bt2);
- HDassert(nrec);
+ assert(bt2);
+ assert(nrec);
/* Get B-tree number of records */
*nrec = bt2->hdr->root.all_nrec;
@@ -1107,8 +1107,8 @@ H5B2_neighbor(H5B2_t *bt2, H5B2_compare_t range, void *udata, H5B2_found_t op, v
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(op);
+ assert(bt2);
+ assert(op);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -1169,8 +1169,8 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(op);
+ assert(bt2);
+ assert(op);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -1263,7 +1263,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
/* Make callback for current record */
if ((op)(H5B2_INT_NREC(internal, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- HDassert(changed == FALSE);
+ assert(changed == FALSE);
/* Unlock current node */
if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) <
@@ -1331,7 +1331,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
/* Make callback for current record */
if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- HDassert(changed == FALSE);
+ assert(changed == FALSE);
/* Unlock current node */
if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0)
@@ -1375,7 +1375,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
done:
if (parent) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (parent != hdr && H5AC_unpin_entry(parent) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry")
} /* end if */
@@ -1405,8 +1405,8 @@ H5B2_close(H5B2_t *bt2)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(bt2);
- HDassert(bt2->f);
+ assert(bt2);
+ assert(bt2->f);
/* Decrement file reference & check if this is the last open v2 B-tree using the shared B-tree header */
if (0 == H5B2__hdr_fuse_decr(bt2->hdr)) {
@@ -1428,7 +1428,7 @@ H5B2_close(H5B2_t *bt2)
H5B2_hdr_t *hdr; /* Another pointer to v2 B-tree header */
/* Sanity check */
- HDassert(H5F_addr_defined(bt2_addr));
+ assert(H5F_addr_defined(bt2_addr));
#ifndef NDEBUG
{
@@ -1441,9 +1441,9 @@ H5B2_close(H5B2_t *bt2)
(unsigned long long)bt2_addr)
/* Sanity checks on header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PINNED);
- HDassert(!(hdr_status & H5AC_ES__IS_PROTECTED));
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PINNED);
+ assert(!(hdr_status & H5AC_ES__IS_PROTECTED));
}
#endif /* NDEBUG */
@@ -1515,8 +1515,8 @@ H5B2_delete(H5F_t *f, haddr_t addr, void *ctx_udata, H5B2_remove_t op, void *op_
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Lock the v2 B-tree header into memory */
if (NULL == (hdr = H5B2__hdr_protect(f, addr, ctx_udata, H5AC__NO_FLAGS_SET)))
@@ -1572,10 +1572,10 @@ H5B2_depend(H5B2_t *bt2, H5AC_proxy_entry_t *parent)
/*
* Check arguments.
*/
- HDassert(bt2);
- HDassert(hdr);
- HDassert(parent);
- HDassert(hdr->parent == NULL || hdr->parent == parent);
+ assert(bt2);
+ assert(hdr);
+ assert(parent);
+ assert(hdr->parent == NULL || hdr->parent == parent);
/*
* Check to see if the flush dependency between the parent
@@ -1584,7 +1584,7 @@ H5B2_depend(H5B2_t *bt2, H5AC_proxy_entry_t *parent)
*/
if (NULL == hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Set the shared v2 B-tree header's file context for this operation */
hdr->f = bt2->f;
@@ -1619,8 +1619,8 @@ H5B2_patch_file(H5B2_t *bt2, H5F_t *f)
/*
* Check arguments.
*/
- HDassert(bt2);
- HDassert(f);
+ assert(bt2);
+ assert(f);
if (bt2->f != f || bt2->hdr->f != f)
bt2->f = bt2->hdr->f = f;
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 07c6cdf..a3968e5 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -167,9 +167,9 @@ H5B2__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->f);
+ assert(image_len);
/* Set the image length size */
*image_len = H5B2_HEADER_SIZE_FILE(udata->f);
@@ -201,7 +201,7 @@ H5B2__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -241,15 +241,15 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Allocate new B-tree header and reset cache info */
if (NULL == (hdr = H5B2__hdr_alloc(udata->f)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "allocation failed for B-tree header")
/* Magic number */
- if (HDmemcmp(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree header signature")
image += H5_SIZEOF_MAGIC;
@@ -286,7 +286,7 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == hdr->hdr_size);
+ assert((size_t)(image - (const uint8_t *)_image) == hdr->hdr_size);
/* Initialize B-tree header info */
cparam.cls = H5B2_client_class_g[id];
@@ -297,7 +297,7 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
hdr->addr = udata->addr;
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= len);
+ assert((size_t)(image - (const uint8_t *)_image) <= len);
/* Set return value */
ret_value = hdr;
@@ -330,8 +330,8 @@ H5B2__cache_hdr_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(hdr);
- HDassert(image_len);
+ assert(hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = hdr->hdr_size;
@@ -361,9 +361,9 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(hdr);
+ assert(f);
+ assert(image);
+ assert(hdr);
/* Magic number */
H5MM_memcpy(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -373,7 +373,7 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5B2_HDR_VERSION;
/* B-tree type */
- HDassert(hdr->cls->id <= 255);
+ assert(hdr->cls->id <= 255);
*image++ = (uint8_t)hdr->cls->id;
/* Node size (in bytes) */
@@ -403,7 +403,7 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2__cache_hdr_serialize() */
@@ -431,7 +431,7 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Check if the file was opened with SWMR-write access */
if (hdr->swmr_write) {
@@ -462,7 +462,7 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
*/
if (hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Destroy flush dependency on object header proxy */
if (H5AC_proxy_entry_remove_child((H5AC_proxy_entry_t *)hdr->parent,
@@ -486,12 +486,12 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
} /* end if */
else
- HDassert(NULL == hdr->parent);
+ assert(NULL == hdr->parent);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -518,7 +518,7 @@ H5B2__cache_hdr_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Destroy v2 B-tree header */
if (H5B2__hdr_free((H5B2_hdr_t *)thing) < 0)
@@ -548,9 +548,9 @@ H5B2__cache_int_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = udata->hdr->node_size;
@@ -584,8 +584,8 @@ H5B2__cache_int_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, voi
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Internal node prefix header + records + child pointer triplets: size with checksum at the end */
chk_size = H5B2_INT_PREFIX_SIZE + (udata->nrec * udata->hdr->rrec_size) +
@@ -630,8 +630,8 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Allocate new internal node and reset cache info */
if (NULL == (internal = H5FL_CALLOC(H5B2_internal_t)))
@@ -647,7 +647,7 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
internal->shadow_epoch = udata->hdr->shadow_epoch;
/* Magic number */
- if (HDmemcmp(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree internal node signature")
image += H5_SIZEOF_MAGIC;
@@ -710,7 +710,7 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
UINT32DECODE(image, stored_chksum);
/* Sanity check parsing */
- HDassert((size_t)(image - (const uint8_t *)_image) <= len);
+ assert((size_t)(image - (const uint8_t *)_image) <= len);
/* Set return value */
ret_value = internal;
@@ -744,9 +744,9 @@ H5B2__cache_int_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(internal);
- HDassert(internal->hdr);
- HDassert(image_len);
+ assert(internal);
+ assert(internal->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = internal->hdr->node_size;
@@ -780,10 +780,10 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(internal);
- HDassert(internal->hdr);
+ assert(f);
+ assert(image);
+ assert(internal);
+ assert(internal->hdr);
/* Magic number */
H5MM_memcpy(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -793,9 +793,9 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5B2_INT_VERSION;
/* B-tree type */
- HDassert(internal->hdr->cls->id <= 255);
+ assert(internal->hdr->cls->id <= 255);
*image++ = (uint8_t)internal->hdr->cls->id;
- HDassert((size_t)(image - (uint8_t *)_image) == (H5B2_INT_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
+ assert((size_t)(image - (uint8_t *)_image) == (H5B2_INT_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
/* Serialize records for internal node */
native = internal->int_native;
@@ -830,10 +830,10 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) <= len);
+ assert((size_t)(image - (uint8_t *)_image) <= len);
/* Clear rest of internal node */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -862,8 +862,8 @@ H5B2__cache_int_notify(H5AC_notify_action_t action, void *_thing)
/*
* Check arguments.
*/
- HDassert(internal);
- HDassert(internal->hdr);
+ assert(internal);
+ assert(internal->hdr);
/* Check if the file was opened with SWMR-write access */
if (internal->hdr->swmr_write) {
@@ -904,12 +904,12 @@ H5B2__cache_int_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
} /* end if */
else
- HDassert(NULL == internal->top_proxy);
+ assert(NULL == internal->top_proxy);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -937,7 +937,7 @@ H5B2__cache_int_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(internal);
+ assert(internal);
/* Release v2 B-tree internal node */
if (H5B2__internal_free(internal) < 0)
@@ -967,9 +967,9 @@ H5B2__cache_leaf_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = udata->hdr->node_size;
@@ -1003,8 +1003,8 @@ H5B2__cache_leaf_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Leaf node prefix header + records: size with checksum at the end */
chk_size = H5B2_LEAF_PREFIX_SIZE + (udata->nrec * udata->hdr->rrec_size);
@@ -1046,8 +1046,8 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Allocate new leaf node and reset cache info */
if (NULL == (leaf = H5FL_CALLOC(H5B2_leaf_t)))
@@ -1063,7 +1063,7 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
leaf->shadow_epoch = udata->hdr->shadow_epoch;
/* Magic number */
- if (HDmemcmp(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree leaf node signature")
image += H5_SIZEOF_MAGIC;
@@ -1100,10 +1100,10 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
UINT32DECODE(image, stored_chksum);
/* Sanity check parsing */
- HDassert((size_t)(image - (const uint8_t *)_image) <= udata->hdr->node_size);
+ assert((size_t)(image - (const uint8_t *)_image) <= udata->hdr->node_size);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= len);
+ assert((size_t)(image - (const uint8_t *)_image) <= len);
/* Set return value */
ret_value = leaf;
@@ -1136,9 +1136,9 @@ H5B2__cache_leaf_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(leaf);
- HDassert(leaf->hdr);
- HDassert(image_len);
+ assert(leaf);
+ assert(leaf->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = leaf->hdr->node_size;
@@ -1172,10 +1172,10 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(leaf);
- HDassert(leaf->hdr);
+ assert(f);
+ assert(image);
+ assert(leaf);
+ assert(leaf->hdr);
/* magic number */
H5MM_memcpy(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -1185,9 +1185,9 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H
*image++ = H5B2_LEAF_VERSION;
/* B-tree type */
- HDassert(leaf->hdr->cls->id <= 255);
+ assert(leaf->hdr->cls->id <= 255);
*image++ = (uint8_t)leaf->hdr->cls->id;
- HDassert((size_t)(image - (uint8_t *)_image) == (H5B2_LEAF_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
+ assert((size_t)(image - (uint8_t *)_image) == (H5B2_LEAF_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
/* Serialize records for leaf node */
native = leaf->leaf_native;
@@ -1209,10 +1209,10 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) <= len);
+ assert((size_t)(image - (uint8_t *)_image) <= len);
/* Clear rest of leaf node */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1241,8 +1241,8 @@ H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *_thing)
/*
* Check arguments.
*/
- HDassert(leaf);
- HDassert(leaf->hdr);
+ assert(leaf);
+ assert(leaf->hdr);
/* Check if the file was opened with SWMR-write access */
if (leaf->hdr->swmr_write) {
@@ -1283,12 +1283,12 @@ H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
} /* end if */
else
- HDassert(NULL == leaf->top_proxy);
+ assert(NULL == leaf->top_proxy);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1316,7 +1316,7 @@ H5B2__cache_leaf_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(leaf);
+ assert(leaf);
/* Destroy v2 B-tree leaf node */
if (H5B2__leaf_free(leaf) < 0)
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index 8e01898..79819f7 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -89,13 +89,13 @@ H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(type);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(obj_addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(type);
/* Load the B-tree header */
if (NULL == (hdr = H5B2__hdr_protect(f, addr, f, H5AC__READ_ONLY_FLAG)))
@@ -105,34 +105,33 @@ H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
hdr->f = f;
/* Print opening message */
- HDfprintf(stream, "%*sv2 B-tree Header...\n", indent, "");
+ fprintf(stream, "%*sv2 B-tree Header...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
- (unsigned)hdr->cls->id);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Size of raw (disk) record:", (unsigned)hdr->rrec_size);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:", hdr->cache_info.is_dirty ? "True" : "False");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Depth:", hdr->depth);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of records in tree:", hdr->root.all_nrec);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of records in root node:", hdr->root.node_nrec);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Address of root node:", hdr->root.addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Split percent:", hdr->split_percent);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Merge percent:", hdr->merge_percent);
+ fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
+ (unsigned)hdr->cls->id);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Size of raw (disk) record:", (unsigned)hdr->rrec_size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Dirty flag:", hdr->cache_info.is_dirty ? "True" : "False");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Depth:", hdr->depth);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of records in tree:", hdr->root.all_nrec);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Number of records in root node:", hdr->root.node_nrec);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of root node:", hdr->root.addr);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Split percent:", hdr->split_percent);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Merge percent:", hdr->merge_percent);
/* Print relevant node info */
- HDfprintf(stream, "%*sNode Info: (max_nrec/split_nrec/merge_nrec)\n", indent, "");
+ fprintf(stream, "%*sNode Info: (max_nrec/split_nrec/merge_nrec)\n", indent, "");
for (u = 0; u < (unsigned)(hdr->depth + 1); u++) {
HDsnprintf(temp_str, sizeof(temp_str), "Depth %u:", u);
- HDfprintf(stream, "%*s%-*s (%u/%u/%u)\n", indent + 3, "", MAX(0, fwidth - 3), temp_str,
- hdr->node_info[u].max_nrec, hdr->node_info[u].split_nrec, hdr->node_info[u].merge_nrec);
+ fprintf(stream, "%*s%-*s (%u/%u/%u)\n", indent + 3, "", MAX(0, fwidth - 3), temp_str,
+ hdr->node_info[u].max_nrec, hdr->node_info[u].split_nrec, hdr->node_info[u].merge_nrec);
} /* end for */
done:
@@ -170,15 +169,15 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(type);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(nrec > 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(type);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(H5F_addr_defined(obj_addr));
+ assert(nrec > 0);
/* Load the B-tree header */
if (NULL == (hdr = H5B2__hdr_protect(f, hdr_addr, f, H5AC__READ_ONLY_FLAG)))
@@ -198,41 +197,41 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node")
/* Print opening message */
- HDfprintf(stream, "%*sv2 B-tree Internal Node...\n", indent, "");
+ fprintf(stream, "%*sv2 B-tree Internal Node...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
- (unsigned)hdr->cls->id);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Size of raw (disk) record:", (unsigned)hdr->rrec_size);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:", internal->cache_info.is_dirty ? "True" : "False");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", internal->nrec);
+ fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
+ (unsigned)hdr->cls->id);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Size of raw (disk) record:", (unsigned)hdr->rrec_size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Dirty flag:", internal->cache_info.is_dirty ? "True" : "False");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", internal->nrec);
/* Print all node pointers and records */
for (u = 0; u < internal->nrec; u++) {
/* Print node pointer */
HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
- HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3),
- temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec,
- internal->node_ptrs[u].addr);
+ fprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3),
+ temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec,
+ internal->node_ptrs[u].addr);
/* Print record */
HDsnprintf(temp_str, sizeof(temp_str), "Record #%u:", u);
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
- HDassert(H5B2_INT_NREC(internal, hdr, u));
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
+ assert(H5B2_INT_NREC(internal, hdr, u));
(void)(type->debug)(stream, indent + 6, MAX(0, fwidth - 6), H5B2_INT_NREC(internal, hdr, u),
hdr->cb_ctx);
} /* end for */
/* Print final node pointer */
HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
- HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3),
- temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec,
- internal->node_ptrs[u].addr);
+ fprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3),
+ temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec,
+ internal->node_ptrs[u].addr);
done:
if (hdr && H5B2__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
@@ -271,15 +270,15 @@ H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, c
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(type);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(nrec > 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(type);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(H5F_addr_defined(obj_addr));
+ assert(nrec > 0);
/* Load the B-tree header */
if (NULL == (hdr = H5B2__hdr_protect(f, hdr_addr, f, H5AC__READ_ONLY_FLAG)))
@@ -298,26 +297,26 @@ H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, c
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Print opening message */
- HDfprintf(stream, "%*sv2 B-tree Leaf Node...\n", indent, "");
+ fprintf(stream, "%*sv2 B-tree Leaf Node...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
- (unsigned)hdr->cls->id);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Size of raw (disk) record:", (unsigned)hdr->rrec_size);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:", leaf->cache_info.is_dirty ? "True" : "False");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", leaf->nrec);
+ fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Tree type ID:", hdr->cls->name,
+ (unsigned)hdr->cls->id);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Size of node:", (unsigned)hdr->node_size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Size of raw (disk) record:", (unsigned)hdr->rrec_size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Dirty flag:", leaf->cache_info.is_dirty ? "True" : "False");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in node:", leaf->nrec);
/* Print all node pointers and records */
for (u = 0; u < leaf->nrec; u++) {
/* Print record */
HDsnprintf(temp_str, sizeof(temp_str), "Record #%u:", u);
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
- HDassert(H5B2_LEAF_NREC(leaf, hdr, u));
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
+ assert(H5B2_LEAF_NREC(leaf, hdr, u));
(void)(type->debug)(stream, indent + 6, MAX(0, fwidth - 6), H5B2_LEAF_NREC(leaf, hdr, u),
hdr->cb_ctx);
} /* end for */
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index 270789f..afc9fe6 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -108,16 +108,16 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(cparam);
- HDassert(cparam->cls);
- HDassert((cparam->cls->crt_context && cparam->cls->dst_context) ||
- (NULL == cparam->cls->crt_context && NULL == cparam->cls->dst_context));
- HDassert(cparam->node_size > 0);
- HDassert(cparam->rrec_size > 0);
- HDassert(cparam->merge_percent > 0 && cparam->merge_percent <= 100);
- HDassert(cparam->split_percent > 0 && cparam->split_percent <= 100);
- HDassert(cparam->merge_percent < (cparam->split_percent / 2));
+ assert(hdr);
+ assert(cparam);
+ assert(cparam->cls);
+ assert((cparam->cls->crt_context && cparam->cls->dst_context) ||
+ (NULL == cparam->cls->crt_context && NULL == cparam->cls->dst_context));
+ assert(cparam->node_size > 0);
+ assert(cparam->rrec_size > 0);
+ assert(cparam->merge_percent > 0 && cparam->merge_percent <= 100);
+ assert(cparam->split_percent > 0 && cparam->split_percent <= 100);
+ assert(cparam->merge_percent < (cparam->split_percent / 2));
/* Assign dynamic information */
hdr->depth = depth;
@@ -134,7 +134,7 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui
/* Allocate "page" for node I/O */
if (NULL == (hdr->page = H5FL_BLK_MALLOC(node_page, hdr->node_size)))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed")
- HDmemset(hdr->page, 0, hdr->node_size);
+ memset(hdr->page, 0, hdr->node_size);
/* Allocate array of node info structs */
if (NULL == (hdr->node_info = H5FL_SEQ_MALLOC(H5B2_node_info_t, (size_t)(hdr->depth + 1))))
@@ -166,14 +166,14 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui
/* (uses leaf # of records because its the largest) */
u_max_nrec_size = H5VM_limit_enc_size((uint64_t)hdr->node_info[0].max_nrec);
H5_CHECKED_ASSIGN(hdr->max_nrec_size, uint8_t, u_max_nrec_size, unsigned)
- HDassert(hdr->max_nrec_size <= H5B2_SIZEOF_RECORDS_PER_NODE);
+ assert(hdr->max_nrec_size <= H5B2_SIZEOF_RECORDS_PER_NODE);
/* Initialize internal node info */
if (depth > 0) {
for (u = 1; u < (unsigned)(depth + 1); u++) {
sz_max_nrec = H5B2_NUM_INT_REC(hdr, u);
H5_CHECKED_ASSIGN(hdr->node_info[u].max_nrec, unsigned, sz_max_nrec, size_t)
- HDassert(hdr->node_info[u].max_nrec <= hdr->node_info[u - 1].max_nrec);
+ assert(hdr->node_info[u].max_nrec <= hdr->node_info[u - 1].max_nrec);
hdr->node_info[u].split_nrec = (hdr->node_info[u].max_nrec * hdr->split_percent) / 100;
hdr->node_info[u].merge_nrec = (hdr->node_info[u].max_nrec * hdr->merge_percent) / 100;
@@ -237,7 +237,7 @@ H5B2__hdr_alloc(H5F_t *f)
/*
* Check arguments.
*/
- HDassert(f);
+ assert(f);
/* Allocate space for the shared information */
if (NULL == (hdr = H5FL_CALLOC(H5B2_hdr_t)))
@@ -282,8 +282,8 @@ H5B2__hdr_create(H5F_t *f, const H5B2_create_t *cparam, void *ctx_udata)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
/* Allocate v2 B-tree header */
if (NULL == (hdr = H5B2__hdr_alloc(f)))
@@ -358,7 +358,7 @@ H5B2__hdr_incr(H5B2_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(hdr);
+ assert(hdr);
/* Mark header as un-evictable when a B-tree node is depending on it */
if (hdr->rc == 0)
@@ -392,8 +392,8 @@ H5B2__hdr_decr(H5B2_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->rc > 0);
+ assert(hdr);
+ assert(hdr->rc > 0);
/* Decrement reference count on B-tree header */
hdr->rc--;
@@ -425,7 +425,7 @@ H5B2__hdr_fuse_incr(H5B2_hdr_t *hdr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Increment file reference count on shared header */
hdr->file_rc++;
@@ -451,8 +451,8 @@ H5B2__hdr_fuse_decr(H5B2_hdr_t *hdr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->file_rc);
+ assert(hdr);
+ assert(hdr->file_rc);
/* Decrement file reference count on shared header */
hdr->file_rc--;
@@ -480,7 +480,7 @@ H5B2__hdr_dirty(H5B2_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Mark B-tree header as dirty in cache */
if (H5AC_mark_entry_dirty(hdr) < 0)
@@ -512,11 +512,11 @@ H5B2__hdr_protect(H5F_t *f, haddr_t hdr_addr, void *ctx_udata, unsigned flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(hdr_addr));
+ assert(f);
+ assert(H5F_addr_defined(hdr_addr));
/* only the H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data for cache callbacks */
udata.f = f;
@@ -575,7 +575,7 @@ H5B2__hdr_unprotect(H5B2_hdr_t *hdr, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Unprotect the header */
if (H5AC_unprotect(hdr->f, H5AC_BT2_HDR, hdr->addr, hdr, cache_flags) < 0)
@@ -606,7 +606,7 @@ H5B2__hdr_free(H5B2_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Destroy the callback context */
if (hdr->cb_ctx) {
@@ -684,7 +684,7 @@ H5B2__hdr_delete(H5B2_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
#ifndef NDEBUG
{
@@ -696,8 +696,8 @@ H5B2__hdr_delete(H5B2_hdr_t *hdr)
"unable to check metadata cache status for v2 B-tree header")
/* Sanity checks on v2 B-tree header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PROTECTED);
} /* end block */
#endif /* NDEBUG */
diff --git a/src/H5B2int.c b/src/H5B2int.c
index bac42a2..c7fe3fd 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -153,9 +153,9 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(internal);
- HDassert(internal_flags_ptr);
+ assert(hdr);
+ assert(internal);
+ assert(internal_flags_ptr);
/* Slide records in parent node up one space, to make room for promoted record */
if (idx < internal->nrec) {
@@ -350,7 +350,7 @@ H5B2__split_root(H5B2_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
+ assert(hdr);
/* Update depth of B-tree */
hdr->depth++;
@@ -437,8 +437,8 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(internal);
+ assert(hdr);
+ assert(internal);
/* Check for the kind of B-tree node to redistribute */
if (depth > 1) {
@@ -582,7 +582,7 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
(uint16_t)(*left_nrec - new_left_nrec); /* Number of records to move from left node to right */
/* Sanity check */
- HDassert(*left_nrec > *right_nrec);
+ assert(*left_nrec > *right_nrec);
/* Slide records in right node up */
HDmemmove(H5B2_NAT_NREC(right_native, hdr, move_nrec), H5B2_NAT_NREC(right_native, hdr, 0),
@@ -716,9 +716,9 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(internal);
- HDassert(internal_flags_ptr);
+ assert(hdr);
+ assert(internal);
+ assert(internal_flags_ptr);
/* Check for the kind of B-tree node to redistribute */
if (depth > 1) {
@@ -806,8 +806,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
uint16_t curr_middle_nrec = *middle_nrec;
/* Sanity check rounding */
- HDassert(new_middle_nrec <= new_left_nrec);
- HDassert(new_middle_nrec <= new_right_nrec);
+ assert(new_middle_nrec <= new_left_nrec);
+ assert(new_middle_nrec <= new_right_nrec);
/* Move records into left node */
if (new_left_nrec > *left_nrec) {
@@ -1135,10 +1135,10 @@ H5B2__merge2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(internal);
- HDassert(internal_flags_ptr);
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(internal);
+ assert(internal_flags_ptr);
/* Check for the kind of B-tree node to split */
if (depth > 1) {
@@ -1317,10 +1317,10 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(internal);
- HDassert(internal_flags_ptr);
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(internal);
+ assert(internal_flags_ptr);
/* Check for the kind of B-tree node to split */
if (depth > 1) {
@@ -1565,8 +1565,8 @@ H5B2__insert(H5B2_hdr_t *hdr, void *udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(udata);
+ assert(hdr);
+ assert(udata);
/* Check if the root node is allocated yet */
if (!H5F_addr_defined(hdr->root.addr)) {
@@ -1631,9 +1631,9 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node);
- HDassert(op);
+ assert(hdr);
+ assert(curr_node);
+ assert(op);
/* Protect current node & set up variables */
if (depth > 0) {
@@ -1748,8 +1748,8 @@ H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, v
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node);
+ assert(hdr);
+ assert(curr_node);
if (depth > 0) {
H5B2_internal_t *internal; /* Pointer to internal node */
@@ -1830,10 +1830,10 @@ H5B2__node_size(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, voi
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node);
- HDassert(btree_size);
- HDassert(depth > 0);
+ assert(hdr);
+ assert(curr_node);
+ assert(btree_size);
+ assert(depth > 0);
/* Lock the current B-tree node */
if (NULL ==
@@ -1883,8 +1883,8 @@ H5B2__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Create a flush dependency between parent and child entry */
if (H5AC_create_flush_dependency(parent_entry, child_entry) < 0)
@@ -1918,11 +1918,11 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(hdr);
- HDassert(depth > 0);
- HDassert(node_ptr);
- HDassert(old_parent);
- HDassert(new_parent);
+ assert(hdr);
+ assert(depth > 0);
+ assert(node_ptr);
+ assert(old_parent);
+ assert(new_parent);
/* Check the node's entry status in the metadata cache */
if (H5AC_get_entry_status(hdr->f, node_ptr->addr, &node_status) < 0)
@@ -1949,7 +1949,7 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node
update_deps = TRUE;
} /* end if */
else
- HDassert(child_int->parent == new_parent);
+ assert(child_int->parent == new_parent);
} /* end if */
else {
H5B2_leaf_t *child_leaf;
@@ -1966,13 +1966,13 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node
update_deps = TRUE;
} /* end if */
else
- HDassert(child_leaf->parent == new_parent);
+ assert(child_leaf->parent == new_parent);
} /* end else */
/* Update flush dependencies if necessary */
if (update_deps) {
/* Sanity check */
- HDassert(parent_ptr);
+ assert(parent_ptr);
/* Switch the flush dependency for the node */
if (H5B2__destroy_flush_depend((H5AC_info_t *)old_parent, (H5AC_info_t *)child) < 0)
@@ -2014,12 +2014,12 @@ H5B2__update_child_flush_depends(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(hdr);
- HDassert(depth > 1);
- HDassert(node_ptrs);
- HDassert(start_idx <= end_idx);
- HDassert(old_parent);
- HDassert(new_parent);
+ assert(hdr);
+ assert(depth > 1);
+ assert(node_ptrs);
+ assert(start_idx <= end_idx);
+ assert(old_parent);
+ assert(new_parent);
/* Loop over children */
for (u = start_idx; u < end_idx; u++)
@@ -2051,8 +2051,8 @@ H5B2__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Destroy a flush dependency between parent and child entry */
if (H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0)
diff --git a/src/H5B2internal.c b/src/H5B2internal.c
index 312dee0..381ef03 100644
--- a/src/H5B2internal.c
+++ b/src/H5B2internal.c
@@ -90,9 +90,9 @@ H5B2__create_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(node_ptr);
- HDassert(depth > 0);
+ assert(hdr);
+ assert(node_ptr);
+ assert(depth > 0);
/* Allocate memory for internal node information */
if (NULL == (internal = H5FL_CALLOC(H5B2_internal_t)))
@@ -109,14 +109,14 @@ H5B2__create_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr,
if (NULL == (internal->int_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].nat_rec_fac)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for B-tree internal native keys")
- HDmemset(internal->int_native, 0, hdr->cls->nrec_size * hdr->node_info[depth].max_nrec);
+ memset(internal->int_native, 0, hdr->cls->nrec_size * hdr->node_info[depth].max_nrec);
/* Allocate space for the node pointers in memory */
if (NULL ==
(internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].node_ptr_fac)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for B-tree internal node pointers")
- HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1));
+ memset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1));
/* Set depth of the node */
internal->depth = depth;
@@ -190,13 +190,13 @@ H5B2__protect_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(node_ptr);
- HDassert(H5F_addr_defined(node_ptr->addr));
- HDassert(depth > 0);
+ assert(hdr);
+ assert(node_ptr);
+ assert(H5F_addr_defined(node_ptr->addr));
+ assert(depth > 0);
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data for callback */
udata.f = hdr->f;
@@ -289,11 +289,11 @@ H5B2__neighbor_internal(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_n
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(depth > 0);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
- HDassert(op);
+ assert(hdr);
+ assert(depth > 0);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(op);
/* Lock current B-tree node */
if (NULL ==
@@ -313,7 +313,7 @@ H5B2__neighbor_internal(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_n
neighbor_loc = H5B2_INT_NREC(internal, hdr, idx - 1);
} /* end if */
else {
- HDassert(comp == H5B2_COMPARE_GREATER);
+ assert(comp == H5B2_COMPARE_GREATER);
if (idx < internal->nrec)
neighbor_loc = H5B2_INT_NREC(internal, hdr, idx);
@@ -366,10 +366,10 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(depth > 0);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(depth > 0);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL ==
@@ -377,7 +377,7 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Sanity check number of records */
- HDassert(internal->nrec == curr_node_ptr->node_nrec);
+ assert(internal->nrec == curr_node_ptr->node_nrec);
/* Split or redistribute child node pointers, if necessary */
{
@@ -537,10 +537,10 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(depth > 0);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(depth > 0);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL ==
@@ -548,7 +548,7 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Sanity check number of records */
- HDassert(internal->nrec == curr_node_ptr->node_nrec);
+ assert(internal->nrec == curr_node_ptr->node_nrec);
/* Locate node pointer for child */
if (H5B2__locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx, &cmp) <
@@ -562,7 +562,7 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
/* Make callback for current record */
if ((op)(H5B2_INT_NREC(internal, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- HDassert(changed == FALSE);
+ assert(changed == FALSE);
HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL,
"'modify' callback failed for B-tree update operation")
@@ -691,7 +691,7 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
case H5B2_UPDATE_UNKNOWN:
default:
- HDassert(0 && "Invalid update status");
+ assert(0 && "Invalid update status");
HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "invalid update status")
} /* end switch */
} /* end else */
@@ -746,12 +746,12 @@ H5B2__shadow_internal(H5B2_internal_t *internal, H5B2_node_ptr_t *curr_node_ptr)
/*
* Check arguments.
*/
- HDassert(internal);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(internal);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
hdr = internal->hdr;
- HDassert(hdr);
- HDassert(hdr->swmr_write);
+ assert(hdr);
+ assert(hdr->swmr_write);
/* We only need to shadow the node if it has not been shadowed since the
* last time the header was flushed, as otherwise it will be unreachable by
@@ -819,11 +819,11 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(depth > 0);
- HDassert(parent_cache_info);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(depth > 0);
+ assert(parent_cache_info);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL == (internal = H5B2__protect_internal(hdr, parent_cache_info, curr_node_ptr, depth, FALSE,
@@ -1063,19 +1063,19 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(depth > 0);
- HDassert(parent_cache_info);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(depth > 0);
+ assert(parent_cache_info);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL == (internal = H5B2__protect_internal(hdr, parent_cache_info, curr_node_ptr, depth, FALSE,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
internal_addr = curr_node_ptr->addr;
- HDassert(internal->nrec == curr_node_ptr->node_nrec);
- HDassert(depth == hdr->depth || internal->nrec > 1);
+ assert(internal->nrec == curr_node_ptr->node_nrec);
+ assert(depth == hdr->depth || internal->nrec > 1);
/* Determine the correct number of records to merge at */
merge_nrec = hdr->node_info[depth - 1].merge_nrec;
@@ -1084,7 +1084,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw
/* (The root node is the only internal node allowed to have 1 record) */
if (internal->nrec == 1 &&
((internal->node_ptrs[0].node_nrec + internal->node_ptrs[1].node_nrec) <= ((merge_nrec * 2) + 1))) {
- HDassert(depth == hdr->depth);
+ assert(depth == hdr->depth);
/* Merge children of root node */
if (H5B2__merge2(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags,
@@ -1347,7 +1347,7 @@ H5B2__internal_free(H5B2_internal_t *internal)
/*
* Check arguments.
*/
- HDassert(internal);
+ assert(internal);
/* Release internal node's native key buffer */
if (internal->int_native)
@@ -1364,7 +1364,7 @@ H5B2__internal_free(H5B2_internal_t *internal)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement ref. count on B-tree header")
/* Sanity check */
- HDassert(NULL == internal->top_proxy);
+ assert(NULL == internal->top_proxy);
/* Free B-tree internal node info */
internal = H5FL_FREE(H5B2_internal_t, internal);
@@ -1395,22 +1395,22 @@ H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_NDEBUG_U
uint16_t u, v; /* Local index variables */
/* General sanity checking on node */
- HDassert(internal->nrec <= hdr->node_info->split_nrec);
+ assert(internal->nrec <= hdr->node_info->split_nrec);
/* Sanity checking on node pointers */
tot_all_nrec = internal->nrec;
for (u = 0; u < internal->nrec + 1; u++) {
tot_all_nrec += internal->node_ptrs[u].all_nrec;
- HDassert(H5F_addr_defined(internal->node_ptrs[u].addr));
- HDassert(internal->node_ptrs[u].addr > 0);
+ assert(H5F_addr_defined(internal->node_ptrs[u].addr));
+ assert(internal->node_ptrs[u].addr > 0);
for (v = 0; v < u; v++)
- HDassert(internal->node_ptrs[u].addr != internal->node_ptrs[v].addr);
+ assert(internal->node_ptrs[u].addr != internal->node_ptrs[v].addr);
} /* end for */
/* Sanity check all_nrec total in parent */
if (parent_all_nrec > 0)
- HDassert(tot_all_nrec == parent_all_nrec);
+ assert(tot_all_nrec == parent_all_nrec);
return (0);
} /* end H5B2__assert_internal() */
@@ -1435,24 +1435,24 @@ H5B2__assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_NDEBUG_
uint16_t u, v; /* Local index variables */
/* General sanity checking on node */
- HDassert(internal->nrec <= hdr->node_info->split_nrec);
+ assert(internal->nrec <= hdr->node_info->split_nrec);
/* Sanity checking on node pointers */
tot_all_nrec = internal->nrec;
for (u = 0; u < internal->nrec + 1; u++) {
tot_all_nrec += internal->node_ptrs[u].all_nrec;
- HDassert(H5F_addr_defined(internal->node_ptrs[u].addr));
- HDassert(internal->node_ptrs[u].addr > 0);
+ assert(H5F_addr_defined(internal->node_ptrs[u].addr));
+ assert(internal->node_ptrs[u].addr > 0);
for (v = 0; v < u; v++)
- HDassert(internal->node_ptrs[u].addr != internal->node_ptrs[v].addr);
+ assert(internal->node_ptrs[u].addr != internal->node_ptrs[v].addr);
for (v = 0; v < internal2->nrec + 1; v++)
- HDassert(internal->node_ptrs[u].addr != internal2->node_ptrs[v].addr);
+ assert(internal->node_ptrs[u].addr != internal2->node_ptrs[v].addr);
} /* end for */
/* Sanity check all_nrec total in parent */
if (parent_all_nrec > 0)
- HDassert(tot_all_nrec == parent_all_nrec);
+ assert(tot_all_nrec == parent_all_nrec);
return (0);
} /* end H5B2__assert_internal2() */
diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c
index 9bc39de..f9f0024 100644
--- a/src/H5B2leaf.c
+++ b/src/H5B2leaf.c
@@ -91,8 +91,8 @@ H5B2__create_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(node_ptr);
+ assert(hdr);
+ assert(node_ptr);
/* Allocate memory for leaf information */
if (NULL == (leaf = H5FL_CALLOC(H5B2_leaf_t)))
@@ -108,7 +108,7 @@ H5B2__create_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr)
/* Allocate space for the native keys in memory */
if (NULL == (leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[0].nat_rec_fac)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf native keys")
- HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec);
+ memset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec);
/* Set parent */
leaf->parent = parent;
@@ -178,12 +178,12 @@ H5B2__protect_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, hbo
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(node_ptr);
- HDassert(H5F_addr_defined(node_ptr->addr));
+ assert(hdr);
+ assert(node_ptr);
+ assert(H5F_addr_defined(node_ptr->addr));
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data for callback */
udata.f = hdr->f;
@@ -273,10 +273,10 @@ H5B2__neighbor_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, void *neigh
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
- HDassert(op);
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(op);
/* Lock current B-tree node */
if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__READ_ONLY_FLAG)))
@@ -296,7 +296,7 @@ H5B2__neighbor_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, void *neigh
neighbor_loc = H5B2_LEAF_NREC(leaf, hdr, idx - 1);
} /* end if */
else {
- HDassert(comp == H5B2_COMPARE_GREATER);
+ assert(comp == H5B2_COMPARE_GREATER);
if (idx < leaf->nrec)
neighbor_loc = H5B2_LEAF_NREC(leaf, hdr, idx);
@@ -345,20 +345,20 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Must have a leaf node with enough space to insert a record now */
- HDassert(curr_node_ptr->node_nrec < hdr->node_info[0].max_nrec);
+ assert(curr_node_ptr->node_nrec < hdr->node_info[0].max_nrec);
/* Sanity check number of records */
- HDassert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
- HDassert(leaf->nrec == curr_node_ptr->node_nrec);
+ assert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
+ assert(leaf->nrec == curr_node_ptr->node_nrec);
/* Check for inserting into empty leaf */
if (leaf->nrec == 0)
@@ -459,17 +459,17 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
/* Sanity check number of records */
- HDassert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
- HDassert(leaf->nrec == curr_node_ptr->node_nrec);
+ assert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
+ assert(leaf->nrec == curr_node_ptr->node_nrec);
/* Check for inserting into empty leaf */
if (leaf->nrec == 0)
@@ -508,7 +508,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s
/* Make callback for current record */
if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data, &changed) < 0) {
/* Make certain that the callback didn't modify the value if it failed */
- HDassert(changed == FALSE);
+ assert(changed == FALSE);
HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL,
"'modify' callback failed for B-tree update operation")
@@ -522,7 +522,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s
} /* end if */
else {
/* Must have a leaf node with enough space to insert a record now */
- HDassert(curr_node_ptr->node_nrec < hdr->node_info[0].max_nrec);
+ assert(curr_node_ptr->node_nrec < hdr->node_info[0].max_nrec);
/* Make callback to store record in native form */
if ((hdr->cls->store)(H5B2_LEAF_NREC(leaf, hdr, idx), udata) < 0)
@@ -615,10 +615,10 @@ H5B2__swap_leaf(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, unsi
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(internal);
- HDassert(internal_flags_ptr);
- HDassert(idx <= internal->nrec);
+ assert(hdr);
+ assert(internal);
+ assert(internal_flags_ptr);
+ assert(idx <= internal->nrec);
/* Check for the kind of B-tree node to swap */
if (depth > 1) {
@@ -706,12 +706,12 @@ H5B2__shadow_leaf(H5B2_leaf_t *leaf, H5B2_node_ptr_t *curr_node_ptr)
/*
* Check arguments.
*/
- HDassert(leaf);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(leaf);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
hdr = leaf->hdr;
- HDassert(hdr);
- HDassert(hdr->swmr_write);
+ assert(hdr);
+ assert(hdr->swmr_write);
/* We only need to shadow the node if it has not been shadowed since the
* last time the header was flushed, as otherwise it will be unreachable by
@@ -773,9 +773,9 @@ H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
@@ -783,8 +783,8 @@ H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_
leaf_addr = curr_node_ptr->addr;
/* Sanity check number of records */
- HDassert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
- HDassert(leaf->nrec == curr_node_ptr->node_nrec);
+ assert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
+ assert(leaf->nrec == curr_node_ptr->node_nrec);
/* Find correct location to remove this record */
if (H5B2__locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0)
@@ -879,9 +879,9 @@ H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_n
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(curr_node_ptr);
- HDassert(H5F_addr_defined(curr_node_ptr->addr));
+ assert(hdr);
+ assert(curr_node_ptr);
+ assert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock B-tree leaf node */
if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__NO_FLAGS_SET)))
@@ -889,9 +889,9 @@ H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_n
leaf_addr = curr_node_ptr->addr;
/* Sanity check number of records */
- HDassert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
- HDassert(leaf->nrec == curr_node_ptr->node_nrec);
- HDassert(idx < leaf->nrec);
+ assert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
+ assert(leaf->nrec == curr_node_ptr->node_nrec);
+ assert(idx < leaf->nrec);
/* Check for invalidating the min/max record for the tree */
if (H5B2_POS_MIDDLE != curr_pos) {
@@ -977,7 +977,7 @@ H5B2__leaf_free(H5B2_leaf_t *leaf)
/*
* Check arguments.
*/
- HDassert(leaf);
+ assert(leaf);
/* Release leaf's native key buffer */
if (leaf->leaf_native)
@@ -988,7 +988,7 @@ H5B2__leaf_free(H5B2_leaf_t *leaf)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement ref. count on B-tree header")
/* Sanity check */
- HDassert(NULL == leaf->top_proxy);
+ assert(NULL == leaf->top_proxy);
/* Free B-tree leaf node info */
leaf = H5FL_FREE(H5B2_leaf_t, leaf);
@@ -1015,7 +1015,7 @@ H5_ATTR_PURE herr_t
H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_leaf_t H5_ATTR_NDEBUG_UNUSED *leaf)
{
/* General sanity checking on node */
- HDassert(leaf->nrec <= hdr->node_info->split_nrec);
+ assert(leaf->nrec <= hdr->node_info->split_nrec);
return (0);
} /* end H5B2__assert_leaf() */
@@ -1037,7 +1037,7 @@ H5B2__assert_leaf2(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_leaf_
const H5B2_leaf_t H5_ATTR_UNUSED *leaf2)
{
/* General sanity checking on node */
- HDassert(leaf->nrec <= hdr->node_info->split_nrec);
+ assert(leaf->nrec <= hdr->node_info->split_nrec);
return (0);
} /* end H5B2__assert_leaf2() */
diff --git a/src/H5B2stat.c b/src/H5B2stat.c
index 1295638..4b399ba 100644
--- a/src/H5B2stat.c
+++ b/src/H5B2stat.c
@@ -76,7 +76,7 @@ H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(info);
+ assert(info);
/* Get information about the B-tree */
info->depth = bt2->hdr->depth;
@@ -107,8 +107,8 @@ H5B2_size(H5B2_t *bt2, hsize_t *btree_size)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(bt2);
- HDassert(btree_size);
+ assert(bt2);
+ assert(btree_size);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
diff --git a/src/H5B2test.c b/src/H5B2test.c
index 14ce00d..4ce7388 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -136,7 +136,7 @@ H5B2__test_crt_context(void *_f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Allocate callback context */
if (NULL == (ctx = H5FL_MALLOC(H5B2_test_ctx_t)))
@@ -173,7 +173,7 @@ H5B2__test_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Release callback context */
ctx = H5FL_FREE(H5B2_test_ctx_t, ctx);
@@ -249,7 +249,7 @@ H5B2__test_encode(uint8_t *raw, const void *nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
H5F_ENCODE_LENGTH_LEN(raw, *(const hsize_t *)nrecord, ctx->sizeof_size);
@@ -277,7 +277,7 @@ H5B2__test_decode(const uint8_t *raw, void *nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
H5F_DECODE_LENGTH_LEN(raw, *(hsize_t *)nrecord, ctx->sizeof_size);
@@ -302,9 +302,9 @@ H5B2__test_debug(FILE *stream, int indent, int fwidth, const void *record, const
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(record);
+ assert(record);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Record:", *(const hsize_t *)record);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Record:", *(const hsize_t *)record);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2__test_debug() */
@@ -377,7 +377,7 @@ H5B2__test2_encode(uint8_t *raw, const void *nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
H5F_ENCODE_LENGTH_LEN(raw, ((const H5B2_test_rec_t *)nrecord)->key, ctx->sizeof_size);
H5F_ENCODE_LENGTH_LEN(raw, ((const H5B2_test_rec_t *)nrecord)->val, ctx->sizeof_size);
@@ -406,7 +406,7 @@ H5B2__test2_decode(const uint8_t *raw, void *nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
H5F_DECODE_LENGTH_LEN(raw, ((H5B2_test_rec_t *)nrecord)->key, ctx->sizeof_size);
H5F_DECODE_LENGTH_LEN(raw, ((H5B2_test_rec_t *)nrecord)->val, ctx->sizeof_size);
@@ -432,10 +432,10 @@ H5B2__test2_debug(FILE *stream, int indent, int fwidth, const void *record, cons
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(record);
+ assert(record);
- HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE ", %" PRIuHSIZE ")\n", indent, "", fwidth,
- "Record:", ((const H5B2_test_rec_t *)record)->key, ((const H5B2_test_rec_t *)record)->val);
+ fprintf(stream, "%*s%-*s (%" PRIuHSIZE ", %" PRIuHSIZE ")\n", indent, "", fwidth,
+ "Record:", ((const H5B2_test_rec_t *)record)->key, ((const H5B2_test_rec_t *)record)->val);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5B2__test2_debug() */
@@ -458,8 +458,8 @@ H5B2__get_root_addr_test(H5B2_t *bt2, haddr_t *root_addr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(bt2);
- HDassert(root_addr);
+ assert(bt2);
+ assert(root_addr);
/* Get B-tree root addr */
*root_addr = bt2->hdr->root.addr;
@@ -493,7 +493,7 @@ H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(bt2);
+ assert(bt2);
/* Set the shared v2 B-tree header's file context for this operation */
bt2->hdr->f = bt2->f;
@@ -607,7 +607,7 @@ H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo)
done:
if (parent) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (parent != hdr && H5AC_unpin_entry(parent) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry")
} /* end if */
@@ -641,7 +641,7 @@ H5B2__get_node_depth_test(H5B2_t *bt2, void *udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(bt2);
+ assert(bt2);
/* Get information abou the node */
if (H5B2__get_node_info_test(bt2, udata, &ninfo) < 0)
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index 437bc1b..ada63ae 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -95,12 +95,12 @@ H5B__cache_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(image_len);
+ assert(udata);
+ assert(image_len);
/* Get shared info for B-tree */
shared = (H5B_shared_t *)H5UC_GET_OBJ(udata->rc_shared);
- HDassert(shared);
+ assert(shared);
/* Set the image length size */
*image_len = shared->sizeof_rnode;
@@ -132,13 +132,13 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Allocate the B-tree node in memory */
if (NULL == (bt = H5FL_MALLOC(H5B_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate B-tree struct")
- HDmemset(&bt->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&bt->cache_info, 0, sizeof(H5AC_info_t));
/* Set & increment the ref-counted "shared" B-tree information for the node */
bt->rc_shared = udata->rc_shared;
@@ -158,7 +158,7 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_
/* Magic number */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_BTREE, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
- if (HDmemcmp(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree signature")
image += H5_SIZEOF_MAGIC;
@@ -239,12 +239,12 @@ H5B__cache_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(bt);
- HDassert(image_len);
+ assert(bt);
+ assert(image_len);
/* Get shared info for B-tree */
shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
- HDassert(shared);
+ assert(shared);
/* Set the image length size */
*image_len = shared->sizeof_rnode;
@@ -273,13 +273,13 @@ H5B__cache_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, vo
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(image);
- HDassert(bt);
- HDassert(bt->rc_shared);
+ assert(image);
+ assert(bt);
+ assert(bt->rc_shared);
shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
- HDassert(shared);
- HDassert(shared->type);
- HDassert(shared->type->encode);
+ assert(shared);
+ assert(shared->type);
+ assert(shared->type->encode);
/* magic number */
H5MM_memcpy(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -322,10 +322,10 @@ H5B__cache_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, vo
} /* end if */
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) <= len);
+ assert((size_t)(image - (uint8_t *)_image) <= len);
/* Clear rest of node */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -347,7 +347,7 @@ H5B__cache_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Destroy B-tree node */
if (H5B__node_dest((H5B_t *)thing) < 0)
diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c
index b134772..828f7cc 100644
--- a/src/H5Bdbg.c
+++ b/src/H5Bdbg.c
@@ -62,21 +62,21 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(type);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(type);
/* Currently does not support SWMR access */
- HDassert(!(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE));
+ assert(!(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE));
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/*
* Load the tree node.
@@ -90,38 +90,38 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Tree type ID:",
- ((shared->type->id) == H5B_SNODE_ID
- ? "H5B_SNODE_ID"
- : ((shared->type->id) == H5B_CHUNK_ID ? "H5B_CHUNK_ID" : "Unknown!")));
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of node:", shared->sizeof_rnode);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of raw (disk) key:", shared->sizeof_rkey);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:", bt->cache_info.is_dirty ? "True" : "False");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Level:", bt->level);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of left sibling:", bt->left);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of right sibling:", bt->right);
- HDfprintf(stream, "%*s%-*s %u (%u)\n", indent, "", fwidth, "Number of children (max):", bt->nchildren,
- shared->two_k);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Tree type ID:",
+ ((shared->type->id) == H5B_SNODE_ID
+ ? "H5B_SNODE_ID"
+ : ((shared->type->id) == H5B_CHUNK_ID ? "H5B_CHUNK_ID" : "Unknown!")));
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of node:", shared->sizeof_rnode);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of raw (disk) key:", shared->sizeof_rkey);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Dirty flag:", bt->cache_info.is_dirty ? "True" : "False");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Level:", bt->level);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of left sibling:", bt->left);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of right sibling:", bt->right);
+ fprintf(stream, "%*s%-*s %u (%u)\n", indent, "", fwidth, "Number of children (max):", bt->nchildren,
+ shared->two_k);
/*
* Print the child addresses
*/
for (u = 0; u < bt->nchildren; u++) {
- HDfprintf(stream, "%*sChild %d...\n", indent, "", u);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(3, fwidth) - 3,
- "Address:", bt->child[u]);
+ fprintf(stream, "%*sChild %d...\n", indent, "", u);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(3, fwidth) - 3,
+ "Address:", bt->child[u]);
/* If there is a key debugging routine, use it to display the left & right keys */
if (type->debug_key) {
/* Decode the 'left' key & print it */
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Left Key:");
- HDassert(H5B_NKEY(bt, shared, u));
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Left Key:");
+ assert(H5B_NKEY(bt, shared, u));
(void)(type->debug_key)(stream, indent + 6, MAX(6, fwidth) - 6, H5B_NKEY(bt, shared, u), udata);
/* Decode the 'right' key & print it */
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Right Key:");
- HDassert(H5B_NKEY(bt, shared, u + 1));
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Right Key:");
+ assert(H5B_NKEY(bt, shared, u + 1));
(void)(type->debug_key)(stream, indent + 6, MAX(6, fwidth) - 6, H5B_NKEY(bt, shared, u + 1),
udata);
} /* end if */
@@ -172,31 +172,31 @@ H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
if (0 == ncalls++) {
if (H5DEBUG(B))
- HDfprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n");
+ fprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n");
} /* end if */
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ assert(shared);
/* Initialize the queue */
cache_udata.f = f;
cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG);
- HDassert(bt);
+ assert(bt);
shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
- HDassert(shared);
+ assert(shared);
cur = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
- HDassert(cur);
+ assert(cur);
cur->addr = addr;
cur->level = bt->level;
head = tail = cur;
status = H5AC_unprotect(f, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET);
- HDassert(status >= 0);
+ assert(status >= 0);
bt = NULL; /* Make certain future references will be caught */
/*
@@ -207,18 +207,18 @@ H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
*/
for (ncell = 0; cur; ncell++) {
bt = (H5B_t *)H5AC_protect(f, H5AC_BT, cur->addr, &cache_udata, H5AC__READ_ONLY_FLAG);
- HDassert(bt);
+ assert(bt);
/* Check node header */
- HDassert(bt->level == cur->level);
+ assert(bt->level == cur->level);
if (cur->next && cur->next->level == bt->level)
- HDassert(H5F_addr_eq(bt->right, cur->next->addr));
+ assert(H5F_addr_eq(bt->right, cur->next->addr));
else
- HDassert(!H5F_addr_defined(bt->right));
+ assert(!H5F_addr_defined(bt->right));
if (prev && prev->level == bt->level)
- HDassert(H5F_addr_eq(bt->left, prev->addr));
+ assert(H5F_addr_eq(bt->left, prev->addr));
else
- HDassert(!H5F_addr_defined(bt->left));
+ assert(!H5F_addr_defined(bt->left));
if (cur->level > 0) {
unsigned u;
@@ -229,11 +229,11 @@ H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
* have then the tree has a cycle.
*/
for (tmp = head; tmp; tmp = tmp->next)
- HDassert(H5F_addr_ne(tmp->addr, bt->child[u]));
+ assert(H5F_addr_ne(tmp->addr, bt->child[u]));
/* Add the child node to the end of the queue */
tmp = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
- HDassert(tmp);
+ assert(tmp);
tmp->addr = bt->child[u];
tmp->level = bt->level - 1;
tail->next = tmp;
@@ -241,13 +241,13 @@ H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
/* Check that the keys are monotonically increasing */
cmp = (type->cmp2)(H5B_NKEY(bt, shared, u), udata, H5B_NKEY(bt, shared, u + 1));
- HDassert(cmp < 0);
+ assert(cmp < 0);
} /* end for */
} /* end if */
/* Release node */
status = H5AC_unprotect(f, H5AC_BT, cur->addr, bt, H5AC__NO_FLAGS_SET);
- HDassert(status >= 0);
+ assert(status >= 0);
bt = NULL; /* Make certain future references will be caught */
/* Advance current location in queue */
diff --git a/src/H5C.c b/src/H5C.c
index 8a97e47..d8870f0 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -184,17 +184,17 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
FUNC_ENTER_NOAPI(NULL)
- HDassert(max_cache_size >= H5C__MIN_MAX_CACHE_SIZE);
- HDassert(max_cache_size <= H5C__MAX_MAX_CACHE_SIZE);
- HDassert(min_clean_size <= max_cache_size);
+ assert(max_cache_size >= H5C__MIN_MAX_CACHE_SIZE);
+ assert(max_cache_size <= H5C__MAX_MAX_CACHE_SIZE);
+ assert(min_clean_size <= max_cache_size);
- HDassert(max_type_id >= 0);
- HDassert(max_type_id < H5C__MAX_NUM_TYPE_IDS);
- HDassert(class_table_ptr);
+ assert(max_type_id >= 0);
+ assert(max_type_id < H5C__MAX_NUM_TYPE_IDS);
+ assert(class_table_ptr);
for (i = 0; i <= max_type_id; i++) {
- HDassert((class_table_ptr)[i]);
- HDassert(HDstrlen((class_table_ptr)[i]->name) > 0);
+ assert((class_table_ptr)[i]);
+ assert(HDstrlen((class_table_ptr)[i]->name) > 0);
} /* end for */
if (NULL == (cache_ptr = H5FL_CALLOC(H5C_t)))
@@ -360,7 +360,7 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
cache_ptr->epoch_marker_ringbuf_size = 0;
/* Initialize all epoch marker entries' fields to zero/FALSE/NULL */
- HDmemset(cache_ptr->epoch_markers, 0, sizeof(cache_ptr->epoch_markers));
+ memset(cache_ptr->epoch_markers, 0, sizeof(cache_ptr->epoch_markers));
/* Set non-zero/FALSE/NULL fields for epoch markers */
for (i = 0; i < H5C__MAX_EPOCH_MARKERS; i++) {
@@ -440,7 +440,7 @@ done:
*
* Purpose: Print results of a automatic cache resize.
*
- * This function should only be used where HDprintf() behaves
+ * This function should only be used where printf() behaves
* well -- i.e. not on Windows.
*
* Return: void
@@ -460,107 +460,107 @@ H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr,
double hit_rate, enum H5C_resize_status status, size_t old_max_cache_size,
size_t new_max_cache_size, size_t old_min_clean_size, size_t new_min_clean_size)
{
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(version == H5C__CURR_AUTO_RESIZE_RPT_FCN_VER);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(version == H5C__CURR_AUTO_RESIZE_RPT_FCN_VER);
switch (status) {
case in_spec:
- HDfprintf(stdout, "%sAuto cache resize -- no change. (hit rate = %lf)\n", cache_ptr->prefix,
- hit_rate);
+ fprintf(stdout, "%sAuto cache resize -- no change. (hit rate = %lf)\n", cache_ptr->prefix,
+ hit_rate);
break;
case increase:
- HDassert(hit_rate < cache_ptr->resize_ctl.lower_hr_threshold);
- HDassert(old_max_cache_size < new_max_cache_size);
+ assert(hit_rate < cache_ptr->resize_ctl.lower_hr_threshold);
+ assert(old_max_cache_size < new_max_cache_size);
- HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
- cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold);
- HDfprintf(stdout, "%scache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix,
- old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
+ fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
+ cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold);
+ fprintf(stdout, "%scache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix,
+ old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
break;
case flash_increase:
- HDassert(old_max_cache_size < new_max_cache_size);
+ assert(old_max_cache_size < new_max_cache_size);
- HDfprintf(stdout, "%sflash cache resize(%d) -- size threshold = %zu.\n", cache_ptr->prefix,
- (int)(cache_ptr->resize_ctl.flash_incr_mode), cache_ptr->flash_size_increase_threshold);
- HDfprintf(stdout, "%s cache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix,
- old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
+ fprintf(stdout, "%sflash cache resize(%d) -- size threshold = %zu.\n", cache_ptr->prefix,
+ (int)(cache_ptr->resize_ctl.flash_incr_mode), cache_ptr->flash_size_increase_threshold);
+ fprintf(stdout, "%s cache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix,
+ old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
break;
case decrease:
- HDassert(old_max_cache_size > new_max_cache_size);
+ assert(old_max_cache_size > new_max_cache_size);
switch (cache_ptr->resize_ctl.decr_mode) {
case H5C_decr__off:
- HDfprintf(stdout, "%sAuto cache resize -- decrease off. HR = %lf\n", cache_ptr->prefix,
- hit_rate);
+ fprintf(stdout, "%sAuto cache resize -- decrease off. HR = %lf\n", cache_ptr->prefix,
+ hit_rate);
break;
case H5C_decr__threshold:
- HDassert(hit_rate > cache_ptr->resize_ctl.upper_hr_threshold);
+ assert(hit_rate > cache_ptr->resize_ctl.upper_hr_threshold);
- HDfprintf(stdout, "%sAuto cache resize -- decrease by threshold. HR = %lf > %6.5lf\n",
- cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold);
- HDfprintf(stdout, "%sout of bounds high (%6.5lf).\n", cache_ptr->prefix,
- cache_ptr->resize_ctl.upper_hr_threshold);
+ fprintf(stdout, "%sAuto cache resize -- decrease by threshold. HR = %lf > %6.5lf\n",
+ cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold);
+ fprintf(stdout, "%sout of bounds high (%6.5lf).\n", cache_ptr->prefix,
+ cache_ptr->resize_ctl.upper_hr_threshold);
break;
case H5C_decr__age_out:
- HDfprintf(stdout, "%sAuto cache resize -- decrease by ageout. HR = %lf\n",
- cache_ptr->prefix, hit_rate);
+ fprintf(stdout, "%sAuto cache resize -- decrease by ageout. HR = %lf\n",
+ cache_ptr->prefix, hit_rate);
break;
case H5C_decr__age_out_with_threshold:
- HDassert(hit_rate > cache_ptr->resize_ctl.upper_hr_threshold);
+ assert(hit_rate > cache_ptr->resize_ctl.upper_hr_threshold);
- HDfprintf(stdout,
- "%sAuto cache resize -- decrease by ageout with threshold. HR = %lf > %6.5lf\n",
- cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold);
+ fprintf(stdout,
+ "%sAuto cache resize -- decrease by ageout with threshold. HR = %lf > %6.5lf\n",
+ cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold);
break;
default:
- HDfprintf(stdout, "%sAuto cache resize -- decrease by unknown mode. HR = %lf\n",
- cache_ptr->prefix, hit_rate);
+ fprintf(stdout, "%sAuto cache resize -- decrease by unknown mode. HR = %lf\n",
+ cache_ptr->prefix, hit_rate);
}
- HDfprintf(stdout, "%s cache size decreased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix,
- old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
+ fprintf(stdout, "%s cache size decreased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix,
+ old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size);
break;
case at_max_size:
- HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
- cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold);
- HDfprintf(stdout, "%s cache already at maximum size so no change.\n", cache_ptr->prefix);
+ fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
+ cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold);
+ fprintf(stdout, "%s cache already at maximum size so no change.\n", cache_ptr->prefix);
break;
case at_min_size:
- HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n", cache_ptr->prefix,
- hit_rate);
- HDfprintf(stdout, "%s cache already at minimum size.\n", cache_ptr->prefix);
+ fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n", cache_ptr->prefix,
+ hit_rate);
+ fprintf(stdout, "%s cache already at minimum size.\n", cache_ptr->prefix);
break;
case increase_disabled:
- HDfprintf(stdout, "%sAuto cache resize -- increase disabled -- HR = %lf.", cache_ptr->prefix,
- hit_rate);
+ fprintf(stdout, "%sAuto cache resize -- increase disabled -- HR = %lf.", cache_ptr->prefix,
+ hit_rate);
break;
case decrease_disabled:
- HDfprintf(stdout, "%sAuto cache resize -- decrease disabled -- HR = %lf.\n", cache_ptr->prefix,
- hit_rate);
+ fprintf(stdout, "%sAuto cache resize -- decrease disabled -- HR = %lf.\n", cache_ptr->prefix,
+ hit_rate);
break;
case not_full:
- HDassert(hit_rate < cache_ptr->resize_ctl.lower_hr_threshold);
+ assert(hit_rate < cache_ptr->resize_ctl.lower_hr_threshold);
- HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
- cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold);
- HDfprintf(stdout, "%s cache not full so no increase in size.\n", cache_ptr->prefix);
+ fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
+ cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold);
+ fprintf(stdout, "%s cache not full so no increase in size.\n", cache_ptr->prefix);
break;
default:
- HDfprintf(stdout, "%sAuto cache resize -- unknown status code.\n", cache_ptr->prefix);
+ fprintf(stdout, "%sAuto cache resize -- unknown status code.\n", cache_ptr->prefix);
break;
}
} /* H5C_def_auto_resize_rpt_fcn() */
@@ -590,12 +590,12 @@ H5C_prep_for_file_close(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* It is possible to receive the close warning more than once */
if (cache_ptr->close_warning_received)
@@ -603,7 +603,7 @@ H5C_prep_for_file_close(H5F_t *f)
cache_ptr->close_warning_received = TRUE;
/* Make certain there aren't any protected entries */
- HDassert(cache_ptr->pl_len == 0);
+ assert(cache_ptr->pl_len == 0);
/* Prepare cache image */
if (H5C__prep_image_for_file_close(f, &image_generated) < 0)
@@ -682,9 +682,9 @@ H5C_dest(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
#if H5AC_DUMP_IMAGE_STATS_ON_CLOSE
if (H5C_image_stats(cache_ptr, TRUE) < 0)
@@ -708,8 +708,8 @@ H5C_dest(H5F_t *f)
* point? If no, shouldn't this if statement be an assert?
*/
if (cache_ptr->slist_ptr != NULL) {
- HDassert(cache_ptr->slist_len == 0);
- HDassert(cache_ptr->slist_size == 0);
+ assert(cache_ptr->slist_len == 0);
+ assert(cache_ptr->slist_size == 0);
H5SL_close(cache_ptr->slist_ptr);
cache_ptr->slist_ptr = NULL;
@@ -727,8 +727,8 @@ H5C_dest(H5F_t *f)
#ifndef NDEBUG
#ifdef H5C_DO_SANITY_CHECKS
if (cache_ptr->get_entry_ptr_from_addr_counter > 0)
- HDfprintf(stdout, "*** %" PRId64 " calls to H5C_get_entry_ptr_from_add(). ***\n",
- cache_ptr->get_entry_ptr_from_addr_counter);
+ fprintf(stdout, "*** %" PRId64 " calls to H5C_get_entry_ptr_from_add(). ***\n",
+ cache_ptr->get_entry_ptr_from_addr_counter);
#endif /* H5C_DO_SANITY_CHECKS */
cache_ptr->magic = 0;
@@ -770,7 +770,7 @@ H5C_evict(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Enable the slist, as it is needed in the flush */
if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
@@ -812,13 +812,13 @@ H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flag
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(type);
- HDassert(H5F_addr_defined(addr));
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(type);
+ assert(H5F_addr_defined(addr));
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_lru_list(cache_ptr) < 0)
@@ -831,8 +831,8 @@ H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flag
/* the target doesn't exist in the cache, so we are done. */
HGOTO_DONE(SUCCEED)
- HDassert(entry_ptr->addr == addr);
- HDassert(entry_ptr->type == type);
+ assert(entry_ptr->addr == addr);
+ assert(entry_ptr->type == type);
/* Check for entry being pinned or protected */
if (entry_ptr->is_protected)
@@ -901,20 +901,20 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_ptr);
#ifdef H5C_DO_SANITY_CHECKS
- HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
for (i = H5C_RING_USER; i < H5C_RING_NTYPES; i++) {
index_len += cache_ptr->index_ring_len[i];
@@ -926,12 +926,12 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
slist_size += cache_ptr->slist_ring_size[i];
} /* end for */
- HDassert(cache_ptr->index_len == index_len);
- HDassert(cache_ptr->index_size == index_size);
- HDassert(cache_ptr->clean_index_size == clean_index_size);
- HDassert(cache_ptr->dirty_index_size == dirty_index_size);
- HDassert(cache_ptr->slist_len == slist_len);
- HDassert(cache_ptr->slist_size == slist_size);
+ assert(cache_ptr->index_len == index_len);
+ assert(cache_ptr->index_size == index_size);
+ assert(cache_ptr->clean_index_size == clean_index_size);
+ assert(cache_ptr->dirty_index_size == dirty_index_size);
+ assert(cache_ptr->slist_len == slist_len);
+ assert(cache_ptr->slist_size == slist_size);
#endif /* H5C_DO_SANITY_CHECKS */
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
@@ -941,8 +941,8 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
destroy = ((flags & H5C__FLUSH_INVALIDATE_FLAG) != 0);
- HDassert(!(destroy && ((flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0)));
- HDassert(!(cache_ptr->flush_in_progress));
+ assert(!(destroy && ((flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0)));
+ assert(!(cache_ptr->flush_in_progress));
cache_ptr->flush_in_progress = TRUE;
@@ -1033,13 +1033,13 @@ H5C_flush_to_min_clean(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (cache_ptr->check_write_permitted != NULL) {
if ((cache_ptr->check_write_permitted)(f, &write_permitted) < 0)
@@ -1092,18 +1092,18 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(type);
- HDassert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
- HDassert(type->image_len);
- HDassert(H5F_addr_defined(addr));
- HDassert(thing);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(type);
+ assert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
+ assert(type->image_len);
+ assert(H5F_addr_defined(addr));
+ assert(thing);
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
/* no need to verify that entry is not already in the index as */
@@ -1161,7 +1161,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
/* Retrieve the size of the thing */
if ((type->image_len)(thing, &(entry_ptr->size)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGETSIZE, FAIL, "can't get size of thing")
- HDassert(entry_ptr->size > 0 && entry_ptr->size < H5C_MAX_ENTRY_SIZE);
+ assert(entry_ptr->size > 0 && entry_ptr->size < H5C_MAX_ENTRY_SIZE);
entry_ptr->in_slist = FALSE;
@@ -1255,7 +1255,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
else
write_permitted = cache_ptr->write_permitted;
- HDassert(entry_ptr->size <= H5C_MAX_ENTRY_SIZE);
+ assert(entry_ptr->size <= H5C_MAX_ENTRY_SIZE);
space_needed = entry_ptr->size;
if (space_needed > cache_ptr->max_cache_size)
space_needed = cache_ptr->max_cache_size;
@@ -1289,7 +1289,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL)
/* New entries are presumed to be dirty */
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
entry_ptr->flush_marker = set_flush_marker;
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, FAIL)
@@ -1377,14 +1377,14 @@ H5C_mark_entry_dirty(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(H5F_addr_defined(entry_ptr->addr));
+ assert(entry_ptr);
+ assert(H5F_addr_defined(entry_ptr->addr));
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (entry_ptr->is_protected) {
- HDassert(!((entry_ptr)->is_read_only));
+ assert(!((entry_ptr)->is_read_only));
/* set the dirtied flag */
entry_ptr->dirtied = TRUE;
@@ -1475,11 +1475,11 @@ H5C_mark_entry_clean(void *_thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(H5F_addr_defined(entry_ptr->addr));
+ assert(entry_ptr);
+ assert(H5F_addr_defined(entry_ptr->addr));
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Operate on pinned entry */
if (entry_ptr->is_protected)
@@ -1550,11 +1550,11 @@ H5C_mark_entry_unserialized(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry);
- HDassert(H5F_addr_defined(entry->addr));
+ assert(entry);
+ assert(H5F_addr_defined(entry->addr));
if (entry->is_protected || entry->is_pinned) {
- HDassert(!entry->is_read_only);
+ assert(!entry->is_read_only);
/* Reset image_up_to_date */
if (entry->image_up_to_date) {
@@ -1596,8 +1596,8 @@ H5C_mark_entry_serialized(void *_thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry);
- HDassert(H5F_addr_defined(entry->addr));
+ assert(entry);
+ assert(H5F_addr_defined(entry->addr));
/* Operate on pinned entry */
if (entry->is_protected)
@@ -1645,12 +1645,12 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(type);
- HDassert(H5F_addr_defined(old_addr));
- HDassert(H5F_addr_defined(new_addr));
- HDassert(H5F_addr_ne(old_addr, new_addr));
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(type);
+ assert(H5F_addr_defined(old_addr));
+ assert(H5F_addr_defined(new_addr));
+ assert(H5F_addr_ne(old_addr, new_addr));
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 ||
@@ -1664,8 +1664,8 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd
/* the old item doesn't exist in the cache, so we are done. */
HGOTO_DONE(SUCCEED)
- HDassert(entry_ptr->addr == old_addr);
- HDassert(entry_ptr->type == type);
+ assert(entry_ptr->addr == old_addr);
+ assert(entry_ptr->type == type);
/* Check for R/W status, otherwise error */
/* (Moving a R/O entry would mark it dirty, which shouldn't
@@ -1702,7 +1702,7 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd
H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr, FAIL)
if (entry_ptr->in_slist) {
- HDassert(cache_ptr->slist_ptr);
+ assert(cache_ptr->slist_ptr);
H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, FALSE)
} /* end if */
} /* end if */
@@ -1793,11 +1793,11 @@ H5C_resize_entry(void *thing, size_t new_size)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(H5F_addr_defined(entry_ptr->addr));
+ assert(entry_ptr);
+ assert(H5F_addr_defined(entry_ptr->addr));
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Check for usage errors */
if (new_size <= 0)
@@ -1926,11 +1926,11 @@ H5C_pin_protected_entry(void *thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(H5F_addr_defined(entry_ptr->addr));
+ assert(entry_ptr);
+ assert(H5F_addr_defined(entry_ptr->addr));
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 ||
@@ -2000,16 +2000,16 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(type);
- HDassert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
- HDassert(H5F_addr_defined(addr));
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(type);
+ assert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
+ assert(H5F_addr_defined(addr));
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 ||
@@ -2042,7 +2042,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
if (entry_ptr->ring != ring)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "ring type mismatch occurred for cache entry")
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (entry_ptr->prefetched) {
/* This call removes the prefetched entry from the cache,
@@ -2052,9 +2052,9 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
if (H5C__deserialize_prefetched_entry(f, cache_ptr, &entry_ptr, type, addr, udata) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't deserialize prefetched entry")
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(!entry_ptr->prefetched);
- HDassert(entry_ptr->addr == addr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(!entry_ptr->prefetched);
+ assert(entry_ptr->addr == addr);
} /* end if */
/* Check for trying to load the wrong type of entry from an address */
@@ -2097,7 +2097,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
*/
HDONE_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "can't generate entry's image")
} /* end if */
- HDassert(entry_ptr->image_ptr);
+ assert(entry_ptr->image_ptr);
H5_CHECKED_ASSIGN(buf_size, int, entry_ptr->size, size_t);
if (MPI_SUCCESS != (mpi_code = MPI_Bcast(entry_ptr->image_ptr, buf_size, MPI_BYTE, 0, comm)))
@@ -2196,7 +2196,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
have_write_permitted = TRUE;
} /* end else */
- HDassert(entry_ptr->size <= H5C_MAX_ENTRY_SIZE);
+ assert(entry_ptr->size <= H5C_MAX_ENTRY_SIZE);
space_needed = entry_ptr->size;
if (space_needed > cache_ptr->max_cache_size)
space_needed = cache_ptr->max_cache_size;
@@ -2261,12 +2261,12 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
was_loaded = TRUE;
} /* end else */
- HDassert(entry_ptr->addr == addr);
- HDassert(entry_ptr->type == type);
+ assert(entry_ptr->addr == addr);
+ assert(entry_ptr->type == type);
if (entry_ptr->is_protected) {
if (read_only && entry_ptr->is_read_only) {
- HDassert(entry_ptr->ro_ref_count > 0);
+ assert(entry_ptr->ro_ref_count > 0);
(entry_ptr->ro_ref_count)++;
} /* end if */
else
@@ -2546,9 +2546,9 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p
*
* by definition.
*/
- HDassert(new_min_clean_size <= new_max_cache_size);
- HDassert(cache_ptr->resize_ctl.min_size <= new_max_cache_size);
- HDassert(new_max_cache_size <= cache_ptr->resize_ctl.max_size);
+ assert(new_min_clean_size <= new_max_cache_size);
+ assert(cache_ptr->resize_ctl.min_size <= new_max_cache_size);
+ assert(new_max_cache_size <= cache_ptr->resize_ctl.max_size);
if (new_max_cache_size < cache_ptr->max_cache_size)
cache_ptr->size_decreased = TRUE;
@@ -2722,7 +2722,7 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli
/* scan the index list and insert all dirty entries in the slist */
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (entry_ptr->is_dirty)
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
entry_ptr = entry_ptr->il_next;
@@ -2734,7 +2734,7 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli
* and in any case, there is no requirement that all dirty entries
* will reside on the dirty LRU.
*/
- HDassert(cache_ptr->dirty_index_size == cache_ptr->slist_size);
+ assert(cache_ptr->dirty_index_size == cache_ptr->slist_size);
}
else { /* take down the skip list */
if (!cache_ptr->slist_enabled)
@@ -2757,8 +2757,8 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli
cache_ptr->slist_enabled = FALSE;
- HDassert(0 == cache_ptr->slist_len);
- HDassert(0 == cache_ptr->slist_size);
+ assert(0 == cache_ptr->slist_len);
+ assert(0 == cache_ptr->slist_size);
}
done:
@@ -2788,10 +2788,10 @@ H5C_unpin_entry(void *_entry_ptr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(entry_ptr);
+ assert(entry_ptr);
cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 ||
@@ -2867,28 +2867,28 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
free_file_space = ((flags & H5C__FREE_FILE_SPACE_FLAG) != 0);
take_ownership = ((flags & H5C__TAKE_OWNERSHIP_FLAG) != 0);
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(H5F_addr_defined(addr));
- HDassert(thing);
- HDassert(!(pin_entry && unpin_entry));
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(H5F_addr_defined(addr));
+ assert(thing);
+ assert(!(pin_entry && unpin_entry));
/* deleted flag must accompany free_file_space */
- HDassert((!free_file_space) || (deleted));
+ assert((!free_file_space) || (deleted));
/* deleted flag must accompany take_ownership */
- HDassert((!take_ownership) || (deleted));
+ assert((!take_ownership) || (deleted));
/* can't have both free_file_space & take_ownership */
- HDassert(!(free_file_space && take_ownership));
+ assert(!(free_file_space && take_ownership));
entry_ptr = (H5C_cache_entry_t *)thing;
- HDassert(entry_ptr->addr == addr);
+ assert(entry_ptr->addr == addr);
/* also set the dirtied variable if the dirtied field is set in
* the entry.
@@ -2908,8 +2908,8 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
*/
if (entry_ptr->ro_ref_count > 1) {
/* Sanity check */
- HDassert(entry_ptr->is_protected);
- HDassert(entry_ptr->is_read_only);
+ assert(entry_ptr->is_protected);
+ assert(entry_ptr->is_read_only);
if (dirtied)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified??")
@@ -2932,7 +2932,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
else {
if (entry_ptr->is_read_only) {
/* Sanity check */
- HDassert(entry_ptr->ro_ref_count == 1);
+ assert(entry_ptr->ro_ref_count == 1);
if (dirtied)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified??")
@@ -2959,7 +2959,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
*/
if (entry_ptr->clear_on_unprotect) {
/* Sanity check */
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
entry_ptr->clear_on_unprotect = FALSE;
if (!dirtied)
@@ -3077,7 +3077,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
/* Delete the entry from the skip list on destroy */
flush_flags |= H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG;
- HDassert((!cache_ptr->slist_enabled) || (((!was_clean) || dirtied) == (entry_ptr->in_slist)));
+ assert((!cache_ptr->slist_enabled) || (((!was_clean) || dirtied) == (entry_ptr->in_slist)));
if (H5C__flush_single_entry(f, entry_ptr, flush_flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't flush entry")
@@ -3147,13 +3147,13 @@ H5C_unsettle_entry_ring(void *_entry)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry);
- HDassert(entry->ring != H5C_RING_UNDEFINED);
- HDassert((H5C_RING_USER == entry->ring) || (H5C_RING_RDFSM == entry->ring) ||
- (H5C_RING_MDFSM == entry->ring));
+ assert(entry);
+ assert(entry->ring != H5C_RING_UNDEFINED);
+ assert((H5C_RING_USER == entry->ring) || (H5C_RING_RDFSM == entry->ring) ||
+ (H5C_RING_MDFSM == entry->ring));
cache = entry->cache_ptr;
- HDassert(cache);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
switch (entry->ring) {
case H5C_RING_USER:
@@ -3177,7 +3177,7 @@ H5C_unsettle_entry_ring(void *_entry)
break;
default:
- HDassert(FALSE); /* this should be un-reachable */
+ assert(FALSE); /* this should be un-reachable */
break;
} /* end switch */
@@ -3218,12 +3218,12 @@ H5C_unsettle_ring(H5F_t *f, H5C_ring_t ring)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert((H5C_RING_RDFSM == ring) || (H5C_RING_MDFSM == ring));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert((H5C_RING_RDFSM == ring) || (H5C_RING_MDFSM == ring));
cache_ptr = f->shared->cache;
- HDassert(H5C__H5C_T_MAGIC == cache_ptr->magic);
+ assert(H5C__H5C_T_MAGIC == cache_ptr->magic);
switch (ring) {
case H5C_RING_RDFSM:
@@ -3243,7 +3243,7 @@ H5C_unsettle_ring(H5F_t *f, H5C_ring_t ring)
break;
default:
- HDassert(FALSE); /* this should be un-reachable */
+ assert(FALSE); /* this should be un-reachable */
break;
} /* end switch */
@@ -3418,23 +3418,23 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(parent_entry);
- HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(H5F_addr_defined(parent_entry->addr));
- HDassert(child_entry);
- HDassert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(H5F_addr_defined(child_entry->addr));
+ assert(parent_entry);
+ assert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(H5F_addr_defined(parent_entry->addr));
+ assert(child_entry);
+ assert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(H5F_addr_defined(child_entry->addr));
cache_ptr = parent_entry->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr == child_entry->cache_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr == child_entry->cache_ptr);
#ifndef NDEBUG
/* Make sure the parent is not already a parent */
{
unsigned u;
for (u = 0; u < child_entry->flush_dep_nparents; u++)
- HDassert(child_entry->flush_dep_parent[u] != parent_entry);
+ assert(child_entry->flush_dep_parent[u] != parent_entry);
} /* end block */
#endif /* NDEBUG */
@@ -3447,9 +3447,9 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
/* Check for parent not pinned */
if (!parent_entry->is_pinned) {
/* Sanity check */
- HDassert(parent_entry->flush_dep_nchildren == 0);
- HDassert(!parent_entry->pinned_from_client);
- HDassert(!parent_entry->pinned_from_cache);
+ assert(parent_entry->flush_dep_nchildren == 0);
+ assert(!parent_entry->pinned_from_client);
+ assert(!parent_entry->pinned_from_cache);
/* Pin the parent entry */
parent_entry->is_pinned = TRUE;
@@ -3463,7 +3463,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
if (child_entry->flush_dep_nparents >= child_entry->flush_dep_parent_nalloc) {
if (child_entry->flush_dep_parent_nalloc == 0) {
/* Array does not exist yet, allocate it */
- HDassert(!child_entry->flush_dep_parent);
+ assert(!child_entry->flush_dep_parent);
if (NULL == (child_entry->flush_dep_parent =
H5FL_SEQ_MALLOC(H5C_cache_entry_ptr_t, H5C_FLUSH_DEP_PARENT_INIT)))
@@ -3473,7 +3473,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
} /* end if */
else {
/* Resize existing array */
- HDassert(child_entry->flush_dep_parent);
+ assert(child_entry->flush_dep_parent);
if (NULL == (child_entry->flush_dep_parent =
H5FL_SEQ_REALLOC(H5C_cache_entry_ptr_t, child_entry->flush_dep_parent,
@@ -3495,7 +3495,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
/* Adjust the number of dirty children */
if (child_entry->is_dirty) {
/* Sanity check */
- HDassert(parent_entry->flush_dep_ndirty_children < parent_entry->flush_dep_nchildren);
+ assert(parent_entry->flush_dep_ndirty_children < parent_entry->flush_dep_nchildren);
parent_entry->flush_dep_ndirty_children++;
@@ -3510,7 +3510,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
* that it is possible for and entry to be clean and unserialized.
*/
if (!child_entry->image_up_to_date) {
- HDassert(parent_entry->flush_dep_nunser_children < parent_entry->flush_dep_nchildren);
+ assert(parent_entry->flush_dep_nunser_children < parent_entry->flush_dep_nchildren);
parent_entry->flush_dep_nunser_children++;
@@ -3522,11 +3522,11 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing)
} /* end if */
/* Post-conditions, for successful operation */
- HDassert(parent_entry->is_pinned);
- HDassert(parent_entry->flush_dep_nchildren > 0);
- HDassert(child_entry->flush_dep_parent);
- HDassert(child_entry->flush_dep_nparents > 0);
- HDassert(child_entry->flush_dep_parent_nalloc > 0);
+ assert(parent_entry->is_pinned);
+ assert(parent_entry->flush_dep_nchildren > 0);
+ assert(child_entry->flush_dep_parent);
+ assert(child_entry->flush_dep_nparents > 0);
+ assert(child_entry->flush_dep_parent_nalloc > 0);
#ifndef NDEBUG
H5C__assert_flush_dep_nocycle(parent_entry, child_entry);
#endif /* NDEBUG */
@@ -3560,16 +3560,16 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(parent_entry);
- HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(H5F_addr_defined(parent_entry->addr));
- HDassert(child_entry);
- HDassert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(H5F_addr_defined(child_entry->addr));
+ assert(parent_entry);
+ assert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(H5F_addr_defined(parent_entry->addr));
+ assert(child_entry);
+ assert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(H5F_addr_defined(child_entry->addr));
cache_ptr = parent_entry->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr == child_entry->cache_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr == child_entry->cache_ptr);
/* Usage checks */
if (!parent_entry->is_pinned)
@@ -3601,7 +3601,7 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing)
parent_entry->flush_dep_nchildren--;
if (0 == parent_entry->flush_dep_nchildren) {
/* Sanity check */
- HDassert(parent_entry->pinned_from_cache);
+ assert(parent_entry->pinned_from_cache);
/* Check if we should unpin parent entry now */
if (!parent_entry->pinned_from_client)
@@ -3615,7 +3615,7 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing)
/* Adjust parent entry's ndirty_children */
if (child_entry->is_dirty) {
/* Sanity check */
- HDassert(parent_entry->flush_dep_ndirty_children > 0);
+ assert(parent_entry->flush_dep_ndirty_children > 0);
parent_entry->flush_dep_ndirty_children--;
@@ -3628,7 +3628,7 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing)
/* adjust parent entry's number of unserialized children */
if (!child_entry->image_up_to_date) {
- HDassert(parent_entry->flush_dep_nunser_children > 0);
+ assert(parent_entry->flush_dep_nunser_children > 0);
parent_entry->flush_dep_nunser_children--;
@@ -3687,9 +3687,9 @@ H5C__pin_entry_from_client(H5C_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(entry_ptr);
- HDassert(entry_ptr->is_protected);
+ assert(cache_ptr);
+ assert(entry_ptr);
+ assert(entry_ptr->is_protected);
/* Check if the entry is already pinned */
if (entry_ptr->is_pinned) {
@@ -3734,9 +3734,9 @@ H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbool_t up
#endif
/* Sanity checking */
- HDassert(cache_ptr);
- HDassert(entry_ptr);
- HDassert(entry_ptr->is_pinned);
+ assert(cache_ptr);
+ assert(entry_ptr);
+ assert(entry_ptr->is_pinned);
/* If requested, update the replacement policy if the entry is not protected */
if (update_rp && !entry_ptr->is_protected)
@@ -3774,8 +3774,8 @@ H5C__unpin_entry_from_client(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbo
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(cache_ptr);
- HDassert(entry_ptr);
+ assert(cache_ptr);
+ assert(entry_ptr);
/* Error checking (should be sanity checks?) */
if (!entry_ptr->is_pinned)
@@ -3831,12 +3831,12 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->cache_accesses >= cache_ptr->resize_ctl.epoch_length);
- HDassert(0.0 <= cache_ptr->resize_ctl.min_clean_fraction);
- HDassert(cache_ptr->resize_ctl.min_clean_fraction <= 100.0);
+ assert(f);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->cache_accesses >= cache_ptr->resize_ctl.epoch_length);
+ assert(0.0 <= cache_ptr->resize_ctl.min_clean_fraction);
+ assert(cache_ptr->resize_ctl.min_clean_fraction <= 100.0);
/* check to see if cache_ptr->resize_in_progress is TRUE. If it, this
* is a re-entrant call via a client callback called in the resize
@@ -3853,13 +3853,13 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
if (!cache_ptr->resize_enabled)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Auto cache resize disabled")
- HDassert((cache_ptr->resize_ctl.incr_mode != H5C_incr__off) ||
- (cache_ptr->resize_ctl.decr_mode != H5C_decr__off));
+ assert((cache_ptr->resize_ctl.incr_mode != H5C_incr__off) ||
+ (cache_ptr->resize_ctl.decr_mode != H5C_decr__off));
if (H5C_get_cache_hit_rate(cache_ptr, &hit_rate) != SUCCEED)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get hit rate")
- HDassert((0.0 <= hit_rate) && (hit_rate <= 1.0));
+ assert((0.0 <= hit_rate) && (hit_rate <= 1.0));
switch (cache_ptr->resize_ctl.incr_mode) {
case H5C_incr__off:
@@ -3872,7 +3872,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
if (!cache_ptr->size_increase_possible)
status = increase_disabled;
else if (cache_ptr->max_cache_size >= cache_ptr->resize_ctl.max_size) {
- HDassert(cache_ptr->max_cache_size == cache_ptr->resize_ctl.max_size);
+ assert(cache_ptr->max_cache_size == cache_ptr->resize_ctl.max_size);
status = at_max_size;
}
else if (!cache_ptr->cache_full)
@@ -3937,7 +3937,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
if (!cache_ptr->size_decrease_possible)
status = decrease_disabled;
else if (cache_ptr->max_cache_size <= cache_ptr->resize_ctl.min_size) {
- HDassert(cache_ptr->max_cache_size == cache_ptr->resize_ctl.min_size);
+ assert(cache_ptr->max_cache_size == cache_ptr->resize_ctl.min_size);
status = at_min_size;
}
else {
@@ -4000,9 +4000,9 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
*
* by definition.
*/
- HDassert(new_min_clean_size <= new_max_cache_size);
- HDassert(cache_ptr->resize_ctl.min_size <= new_max_cache_size);
- HDassert(new_max_cache_size <= cache_ptr->resize_ctl.max_size);
+ assert(new_min_clean_size <= new_max_cache_size);
+ assert(cache_ptr->resize_ctl.min_size <= new_max_cache_size);
+ assert(new_max_cache_size <= cache_ptr->resize_ctl.max_size);
cache_ptr->max_cache_size = new_max_cache_size;
cache_ptr->min_clean_size = new_min_clean_size;
@@ -4044,10 +4044,10 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
done:
/* Sanity checks */
- HDassert(cache_ptr->resize_in_progress);
+ assert(cache_ptr->resize_in_progress);
if (!reentrant_call)
cache_ptr->resize_in_progress = FALSE;
- HDassert((!reentrant_call) || (cache_ptr->resize_in_progress));
+ assert((!reentrant_call) || (cache_ptr->resize_in_progress));
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__auto_adjust_cache_size() */
@@ -4081,11 +4081,11 @@ H5C__autoadjust__ageout(H5F_t *f, double hit_rate, enum H5C_resize_status *statu
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert((status_ptr) && (*status_ptr == in_spec));
- HDassert((new_max_cache_size_ptr) && (*new_max_cache_size_ptr == 0));
+ assert(f);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert((status_ptr) && (*status_ptr == in_spec));
+ assert((new_max_cache_size_ptr) && (*new_max_cache_size_ptr == 0));
/* remove excess epoch markers if any */
if (cache_ptr->epoch_markers_active > cache_ptr->resize_ctl.epochs_before_eviction)
@@ -4162,8 +4162,8 @@ H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (cache_ptr->epoch_markers_active <= 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "No active epoch markers on entry?!?!?")
@@ -4185,9 +4185,9 @@ H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t *cache_ptr)
/* now, re-insert it at the head of the LRU list, and at the tail of
* the ring buffer.
*/
- HDassert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
- HDassert(cache_ptr->epoch_markers[i].next == NULL);
- HDassert(cache_ptr->epoch_markers[i].prev == NULL);
+ assert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
+ assert(cache_ptr->epoch_markers[i].next == NULL);
+ assert(cache_ptr->epoch_markers[i].prev == NULL);
cache_ptr->epoch_marker_ringbuf_last =
(cache_ptr->epoch_marker_ringbuf_last + 1) % (H5C__MAX_EPOCH_MARKERS + 1);
@@ -4257,9 +4257,9 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(f);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* if there is a limit on the amount that the cache size can be decrease
* in any one round of the cache size reduction algorithm, load that
@@ -4279,10 +4279,10 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
bytes_evicted < eviction_size_limit) {
hbool_t skipping_entry = FALSE;
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->is_read_only));
- HDassert((entry_ptr->ro_ref_count) == 0);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_read_only));
+ assert((entry_ptr->ro_ref_count) == 0);
next_ptr = entry_ptr->next;
prev_ptr = entry_ptr->prev;
@@ -4291,7 +4291,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
prev_is_dirty = prev_ptr->is_dirty;
if (entry_ptr->is_dirty) {
- HDassert(!entry_ptr->prefetched_dirty);
+ assert(!entry_ptr->prefetched_dirty);
/* dirty corked entry is skipped */
if (entry_ptr->tag_info && entry_ptr->tag_info->corked)
@@ -4324,8 +4324,8 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry")
} /* end else-if */
else {
- HDassert(!entry_ptr->is_dirty);
- HDassert(entry_ptr->prefetched_dirty);
+ assert(!entry_ptr->is_dirty);
+ assert(entry_ptr->prefetched_dirty);
skipping_entry = TRUE;
} /* end else */
@@ -4379,11 +4379,11 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
* performance implications, but it shouldn't cause any net
* slowdown.
*/
- HDassert(H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS);
+ assert(H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS);
entry_ptr = cache_ptr->LRU_tail_ptr;
while (entry_ptr != NULL && ((entry_ptr->type)->id != H5AC_EPOCH_MARKER_ID) &&
(bytes_evicted < eviction_size_limit)) {
- HDassert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_protected));
prev_ptr = entry_ptr->prev;
@@ -4432,8 +4432,8 @@ H5C__autoadjust__ageout__insert_new_marker(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (cache_ptr->epoch_markers_active >= cache_ptr->resize_ctl.epochs_before_eviction)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Already have a full complement of markers")
@@ -4445,9 +4445,9 @@ H5C__autoadjust__ageout__insert_new_marker(H5C_t *cache_ptr)
if (i >= H5C__MAX_EPOCH_MARKERS)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't find unused marker")
- HDassert(((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i);
- HDassert(((cache_ptr->epoch_markers)[i]).next == NULL);
- HDassert(((cache_ptr->epoch_markers)[i]).prev == NULL);
+ assert(((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i);
+ assert(((cache_ptr->epoch_markers)[i]).next == NULL);
+ assert(((cache_ptr->epoch_markers)[i]).prev == NULL);
(cache_ptr->epoch_marker_active)[i] = TRUE;
@@ -4490,8 +4490,8 @@ H5C__autoadjust__ageout__remove_all_markers(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
while (cache_ptr->epoch_markers_active > 0) {
/* get the index of the last epoch marker in the LRU list
@@ -4518,14 +4518,14 @@ H5C__autoadjust__ageout__remove_all_markers(H5C_t *cache_ptr)
/* mark the epoch marker as unused. */
cache_ptr->epoch_marker_active[i] = FALSE;
- HDassert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
- HDassert(cache_ptr->epoch_markers[i].next == NULL);
- HDassert(cache_ptr->epoch_markers[i].prev == NULL);
+ assert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
+ assert(cache_ptr->epoch_markers[i].next == NULL);
+ assert(cache_ptr->epoch_markers[i].prev == NULL);
/* decrement the number of active epoch markers */
cache_ptr->epoch_markers_active -= 1;
- HDassert(cache_ptr->epoch_markers_active == cache_ptr->epoch_marker_ringbuf_size);
+ assert(cache_ptr->epoch_markers_active == cache_ptr->epoch_marker_ringbuf_size);
}
done:
@@ -4556,8 +4556,8 @@ H5C__autoadjust__ageout__remove_excess_markers(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (cache_ptr->epoch_markers_active <= cache_ptr->resize_ctl.epochs_before_eviction)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "no excess markers on entry")
@@ -4586,14 +4586,14 @@ H5C__autoadjust__ageout__remove_excess_markers(H5C_t *cache_ptr)
/* mark the epoch marker as unused. */
cache_ptr->epoch_marker_active[i] = FALSE;
- HDassert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
- HDassert(cache_ptr->epoch_markers[i].next == NULL);
- HDassert(cache_ptr->epoch_markers[i].prev == NULL);
+ assert(cache_ptr->epoch_markers[i].addr == (haddr_t)i);
+ assert(cache_ptr->epoch_markers[i].next == NULL);
+ assert(cache_ptr->epoch_markers[i].prev == NULL);
/* decrement the number of active epoch markers */
cache_ptr->epoch_markers_active -= 1;
- HDassert(cache_ptr->epoch_markers_active == cache_ptr->epoch_marker_ringbuf_size);
+ assert(cache_ptr->epoch_markers_active == cache_ptr->epoch_marker_ringbuf_size);
}
done:
@@ -4630,11 +4630,11 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->flash_size_increase_possible);
- HDassert(new_entry_size > cache_ptr->flash_size_increase_threshold);
- HDassert(old_entry_size < new_entry_size);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->flash_size_increase_possible);
+ assert(new_entry_size > cache_ptr->flash_size_increase_threshold);
+ assert(old_entry_size < new_entry_size);
if (old_entry_size >= new_entry_size)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "old_entry_size >= new_entry_size")
@@ -4650,7 +4650,7 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n
case H5C_flash_incr__add_space:
if (cache_ptr->index_size < cache_ptr->max_cache_size) {
- HDassert((cache_ptr->max_cache_size - cache_ptr->index_size) < space_needed);
+ assert((cache_ptr->max_cache_size - cache_ptr->index_size) < space_needed);
space_needed -= cache_ptr->max_cache_size - cache_ptr->index_size;
}
space_needed = (size_t)(((double)space_needed) * cache_ptr->resize_ctl.flash_multiple);
@@ -4664,10 +4664,10 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n
if (new_max_cache_size > cache_ptr->resize_ctl.max_size)
new_max_cache_size = cache_ptr->resize_ctl.max_size;
- HDassert(new_max_cache_size > cache_ptr->max_cache_size);
+ assert(new_max_cache_size > cache_ptr->max_cache_size);
new_min_clean_size = (size_t)((double)new_max_cache_size * cache_ptr->resize_ctl.min_clean_fraction);
- HDassert(new_min_clean_size <= new_max_cache_size);
+ assert(new_min_clean_size <= new_max_cache_size);
old_max_cache_size = cache_ptr->max_cache_size;
old_min_clean_size = cache_ptr->min_clean_size;
@@ -4676,7 +4676,7 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n
cache_ptr->min_clean_size = new_min_clean_size;
/* update flash cache size increase fields as appropriate */
- HDassert(cache_ptr->flash_size_increase_possible);
+ assert(cache_ptr->flash_size_increase_possible);
switch (cache_ptr->resize_ctl.flash_incr_mode) {
case H5C_flash_incr__off:
@@ -4762,13 +4762,13 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_ptr);
- HDassert(cache_ptr->slist_enabled);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_ptr);
+ assert(cache_ptr->slist_enabled);
#ifdef H5C_DO_SANITY_CHECKS
{
@@ -4780,12 +4780,12 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
size_t dirty_index_size = (size_t)0;
size_t slist_size = (size_t)0;
- HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
for (i = H5C_RING_USER; i < H5C_RING_NTYPES; i++) {
index_len += cache_ptr->index_ring_len[i];
@@ -4797,12 +4797,12 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
slist_size += cache_ptr->slist_ring_size[i];
} /* end for */
- HDassert(cache_ptr->index_len == index_len);
- HDassert(cache_ptr->index_size == index_size);
- HDassert(cache_ptr->clean_index_size == clean_index_size);
- HDassert(cache_ptr->dirty_index_size == dirty_index_size);
- HDassert(cache_ptr->slist_len == slist_len);
- HDassert(cache_ptr->slist_size == slist_size);
+ assert(cache_ptr->index_len == index_len);
+ assert(cache_ptr->index_size == index_size);
+ assert(cache_ptr->clean_index_size == clean_index_size);
+ assert(cache_ptr->dirty_index_size == dirty_index_size);
+ assert(cache_ptr->slist_len == slist_len);
+ assert(cache_ptr->slist_size == slist_size);
}
#endif /* H5C_DO_SANITY_CHECKS */
@@ -4824,10 +4824,10 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
#ifndef NDEBUG
/* Invariants, after destroying all entries in the hash table */
if (!(flags & H5C__EVICT_ALLOW_LAST_PINS_FLAG)) {
- HDassert(cache_ptr->index_size == 0);
- HDassert(cache_ptr->clean_index_size == 0);
- HDassert(cache_ptr->pel_len == 0);
- HDassert(cache_ptr->pel_size == 0);
+ assert(cache_ptr->index_size == 0);
+ assert(cache_ptr->clean_index_size == 0);
+ assert(cache_ptr->pel_len == 0);
+ assert(cache_ptr->pel_size == 0);
} /* end if */
else {
H5C_cache_entry_t *entry_ptr; /* Cache entry */
@@ -4836,29 +4836,29 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
/* All rings except ring 4 should be empty now */
/* (Ring 4 has the superblock) */
for (u = H5C_RING_USER; u < H5C_RING_SB; u++) {
- HDassert(cache_ptr->index_ring_len[u] == 0);
- HDassert(cache_ptr->index_ring_size[u] == 0);
- HDassert(cache_ptr->clean_index_ring_size[u] == 0);
+ assert(cache_ptr->index_ring_len[u] == 0);
+ assert(cache_ptr->index_ring_size[u] == 0);
+ assert(cache_ptr->clean_index_ring_size[u] == 0);
} /* end for */
/* Check that any remaining pinned entries are in the superblock ring */
entry_ptr = cache_ptr->pel_head_ptr;
while (entry_ptr) {
/* Check ring */
- HDassert(entry_ptr->ring == H5C_RING_SB);
+ assert(entry_ptr->ring == H5C_RING_SB);
/* Advance to next entry in pinned entry list */
entry_ptr = entry_ptr->next;
} /* end while */
} /* end else */
- HDassert(cache_ptr->dirty_index_size == 0);
- HDassert(cache_ptr->slist_len == 0);
- HDassert(cache_ptr->slist_size == 0);
- HDassert(cache_ptr->pl_len == 0);
- HDassert(cache_ptr->pl_size == 0);
- HDassert(cache_ptr->LRU_list_len == 0);
- HDassert(cache_ptr->LRU_list_size == 0);
+ assert(cache_ptr->dirty_index_size == 0);
+ assert(cache_ptr->slist_len == 0);
+ assert(cache_ptr->slist_size == 0);
+ assert(cache_ptr->pl_len == 0);
+ assert(cache_ptr->pl_size == 0);
+ assert(cache_ptr->LRU_list_len == 0);
+ assert(cache_ptr->LRU_list_size == 0);
#endif /* NDEBUG */
done:
@@ -4923,19 +4923,19 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_enabled);
- HDassert(cache_ptr->slist_ptr);
- HDassert(ring > H5C_RING_UNDEFINED);
- HDassert(ring < H5C_RING_NTYPES);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_enabled);
+ assert(cache_ptr->slist_ptr);
+ assert(ring > H5C_RING_UNDEFINED);
+ assert(ring < H5C_RING_NTYPES);
- HDassert(cache_ptr->epoch_markers_active == 0);
+ assert(cache_ptr->epoch_markers_active == 0);
/* Filter out the flags that are not relevant to the flush/invalidate.
*/
@@ -4973,8 +4973,8 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
entry_ptr = cache_ptr->pel_head_ptr;
cur_ring_pel_len = 0;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring >= ring);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring >= ring);
if (entry_ptr->ring == ring)
cur_ring_pel_len++;
@@ -5040,10 +5040,10 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
if (NULL == next_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!")
- HDassert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(next_entry_ptr->is_dirty);
- HDassert(next_entry_ptr->in_slist);
- HDassert(next_entry_ptr->ring >= ring);
+ assert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(next_entry_ptr->is_dirty);
+ assert(next_entry_ptr->in_slist);
+ assert(next_entry_ptr->ring >= ring);
} /* end if */
entry_ptr = next_entry_ptr;
@@ -5059,11 +5059,11 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
* slist if we find them. However, best we do some extra
* sanity checking just in case.
*/
- HDassert(entry_ptr != NULL);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->in_slist);
- HDassert(entry_ptr->is_dirty);
- HDassert(entry_ptr->ring >= ring);
+ assert(entry_ptr != NULL);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->in_slist);
+ assert(entry_ptr->is_dirty);
+ assert(entry_ptr->ring >= ring);
/* increment node pointer now, before we delete its target
* from the slist.
@@ -5074,11 +5074,11 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
if (NULL == next_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!")
- HDassert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(next_entry_ptr->is_dirty);
- HDassert(next_entry_ptr->in_slist);
- HDassert(next_entry_ptr->ring >= ring);
- HDassert(entry_ptr != next_entry_ptr);
+ assert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(next_entry_ptr->is_dirty);
+ assert(next_entry_ptr->in_slist);
+ assert(next_entry_ptr->ring >= ring);
+ assert(entry_ptr != next_entry_ptr);
} /* end if */
else
next_entry_ptr = NULL;
@@ -5153,10 +5153,10 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
*/
if (node_ptr == NULL) {
- HDassert(cache_ptr->slist_len ==
- (uint32_t)((int32_t)initial_slist_len + cache_ptr->slist_len_increase));
- HDassert(cache_ptr->slist_size ==
- (size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase));
+ assert(cache_ptr->slist_len ==
+ (uint32_t)((int32_t)initial_slist_len + cache_ptr->slist_len_increase));
+ assert(cache_ptr->slist_size ==
+ (size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase));
} /* end if */
#endif /* H5C_DO_SANITY_CHECKS */
@@ -5182,11 +5182,11 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
next_entry_ptr = cache_ptr->il_head;
while (next_entry_ptr != NULL) {
entry_ptr = next_entry_ptr;
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring >= ring);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring >= ring);
next_entry_ptr = entry_ptr->il_next;
- HDassert((next_entry_ptr == NULL) || (next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC));
+ assert((next_entry_ptr == NULL) || (next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC));
if (((!entry_ptr->flush_me_last) ||
(entry_ptr->flush_me_last && (cache_ptr->num_last_entries >= cache_ptr->slist_len))) &&
@@ -5200,7 +5200,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
protected_entries++;
if (!entry_ptr->in_slist)
- HDassert(!(entry_ptr->is_dirty));
+ assert(!(entry_ptr->is_dirty));
} /* end if */
else if (!entry_ptr->is_pinned) {
/* if *entry_ptr is dirty, it is possible
@@ -5276,8 +5276,8 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
cur_ring_pel_len = 0;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring >= ring);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring >= ring);
if (entry_ptr->ring == ring)
cur_ring_pel_len++;
@@ -5299,7 +5299,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
(int)cur_ring_pel_len, (int)old_ring_pel_len, (int)ring)
} /* end if */
- HDassert(protected_entries == cache_ptr->pl_len);
+ assert(protected_entries == cache_ptr->pl_len);
if ((protected_entries > 0) && (protected_entries == cache_ptr->index_len))
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL,
@@ -5309,16 +5309,16 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
/* Invariants, after destroying all entries in the ring */
for (i = (int)H5C_RING_UNDEFINED; i <= (int)ring; i++) {
- HDassert(cache_ptr->index_ring_len[i] == 0);
- HDassert(cache_ptr->index_ring_size[i] == (size_t)0);
- HDassert(cache_ptr->clean_index_ring_size[i] == (size_t)0);
- HDassert(cache_ptr->dirty_index_ring_size[i] == (size_t)0);
+ assert(cache_ptr->index_ring_len[i] == 0);
+ assert(cache_ptr->index_ring_size[i] == (size_t)0);
+ assert(cache_ptr->clean_index_ring_size[i] == (size_t)0);
+ assert(cache_ptr->dirty_index_ring_size[i] == (size_t)0);
- HDassert(cache_ptr->slist_ring_len[i] == 0);
- HDassert(cache_ptr->slist_ring_size[i] == (size_t)0);
+ assert(cache_ptr->slist_ring_len[i] == 0);
+ assert(cache_ptr->slist_ring_size[i] == (size_t)0);
} /* end for */
- HDassert(protected_entries <= cache_ptr->pl_len);
+ assert(protected_entries <= cache_ptr->pl_len);
if (protected_entries > 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cache has protected entries")
@@ -5376,13 +5376,13 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_enabled);
- HDassert(cache_ptr->slist_ptr);
- HDassert((flags & H5C__FLUSH_INVALIDATE_FLAG) == 0);
- HDassert(ring > H5C_RING_UNDEFINED);
- HDassert(ring < H5C_RING_NTYPES);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_enabled);
+ assert(cache_ptr->slist_ptr);
+ assert((flags & H5C__FLUSH_INVALIDATE_FLAG) == 0);
+ assert(ring > H5C_RING_UNDEFINED);
+ assert(ring < H5C_RING_NTYPES);
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 ||
@@ -5395,9 +5395,9 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
if (!flush_marked_entries)
for (i = (int)H5C_RING_UNDEFINED; i < (int)ring; i++)
- HDassert(cache_ptr->slist_ring_len[i] == 0);
+ assert(cache_ptr->slist_ring_len[i] == 0);
- HDassert(cache_ptr->flush_in_progress);
+ assert(cache_ptr->flush_in_progress);
/* When we are only flushing marked entries, the slist will usually
* still contain entries when we have flushed everything we should.
@@ -5474,9 +5474,9 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
if (NULL == next_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!")
- HDassert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(next_entry_ptr->is_dirty);
- HDassert(next_entry_ptr->in_slist);
+ assert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(next_entry_ptr->is_dirty);
+ assert(next_entry_ptr->in_slist);
} /* end if */
entry_ptr = next_entry_ptr;
@@ -5498,12 +5498,12 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
* with, we do a bit of extra sanity checking on
* entry_ptr.
*/
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->in_slist);
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->in_slist);
+ assert(entry_ptr->is_dirty);
if (!flush_marked_entries || entry_ptr->flush_marker)
- HDassert(entry_ptr->ring >= ring);
+ assert(entry_ptr->ring >= ring);
/* Advance node pointer now, before we delete its target
* from the slist.
@@ -5514,14 +5514,14 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
if (NULL == next_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!")
- HDassert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(next_entry_ptr->is_dirty);
- HDassert(next_entry_ptr->in_slist);
+ assert(next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(next_entry_ptr->is_dirty);
+ assert(next_entry_ptr->in_slist);
if (!flush_marked_entries || next_entry_ptr->flush_marker)
- HDassert(next_entry_ptr->ring >= ring);
+ assert(next_entry_ptr->ring >= ring);
- HDassert(entry_ptr != next_entry_ptr);
+ assert(entry_ptr != next_entry_ptr);
} /* end if */
else
next_entry_ptr = NULL;
@@ -5533,7 +5533,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
((entry_ptr->flush_dep_nchildren == 0) || (entry_ptr->flush_dep_ndirty_children == 0)) &&
(entry_ptr->ring == ring)) {
- HDassert(entry_ptr->flush_dep_nunser_children == 0);
+ assert(entry_ptr->flush_dep_nunser_children == 0);
if (entry_ptr->is_protected) {
/* we probably have major problems -- but lets
@@ -5567,22 +5567,22 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
#ifdef H5C_DO_SANITY_CHECKS
/* Verify that the slist size and length are as expected. */
- HDassert((uint32_t)((int32_t)initial_slist_len + cache_ptr->slist_len_increase) ==
- cache_ptr->slist_len);
- HDassert((size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase) ==
- cache_ptr->slist_size);
+ assert((uint32_t)((int32_t)initial_slist_len + cache_ptr->slist_len_increase) ==
+ cache_ptr->slist_len);
+ assert((size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase) ==
+ cache_ptr->slist_size);
#endif /* H5C_DO_SANITY_CHECKS */
} /* while */
- HDassert(protected_entries <= cache_ptr->pl_len);
+ assert(protected_entries <= cache_ptr->pl_len);
if (((cache_ptr->pl_len > 0) && !ignore_protected) || tried_to_flush_protected_entry)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "cache has protected items")
#ifdef H5C_DO_SANITY_CHECKS
if (!flush_marked_entries) {
- HDassert(cache_ptr->slist_ring_len[ring] == 0);
- HDassert(cache_ptr->slist_ring_size[ring] == 0);
+ assert(cache_ptr->slist_ring_len[ring] == 0);
+ assert(cache_ptr->slist_ring_size[ring] == 0);
} /* end if */
#endif /* H5C_DO_SANITY_CHECKS */
@@ -5639,14 +5639,14 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
FUNC_ENTER_PACKAGE
- HDassert(f);
+ assert(f);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring != H5C_RING_UNDEFINED);
- HDassert(entry_ptr->type);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring != H5C_RING_UNDEFINED);
+ assert(entry_ptr->type);
/* setup external flags from the flags parameter */
destroy = ((flags & H5C__FLUSH_INVALIDATE_FLAG) != 0);
@@ -5685,11 +5685,11 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
cache_ptr->num_entries_in_image > 0 && cache_ptr->image_entries != NULL) {
/* Sanity checks */
- HDassert(entry_ptr->image_up_to_date || !(entry_ptr->include_in_image));
- HDassert(entry_ptr->image_ptr || !(entry_ptr->include_in_image));
- HDassert((!clear_only) || !(entry_ptr->include_in_image));
- HDassert((!take_ownership) || !(entry_ptr->include_in_image));
- HDassert((!free_file_space) || !(entry_ptr->include_in_image));
+ assert(entry_ptr->image_up_to_date || !(entry_ptr->include_in_image));
+ assert(entry_ptr->image_ptr || !(entry_ptr->include_in_image));
+ assert((!clear_only) || !(entry_ptr->include_in_image));
+ assert((!take_ownership) || !(entry_ptr->include_in_image));
+ assert((!free_file_space) || !(entry_ptr->include_in_image));
suppress_image_entry_frees = TRUE;
@@ -5701,19 +5701,19 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
#ifdef H5C_DO_SANITY_CHECKS
if (cache_ptr->slist_enabled) {
if (entry_ptr->in_slist) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
if (entry_ptr->flush_marker && !entry_ptr->is_dirty)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry in slist failed sanity checks")
} /* end if */
else {
- HDassert(!entry_ptr->is_dirty);
- HDassert(!entry_ptr->flush_marker);
+ assert(!entry_ptr->is_dirty);
+ assert(!entry_ptr->flush_marker);
if (entry_ptr->is_dirty || entry_ptr->flush_marker)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry failed sanity checks")
} /* end else */
}
else { /* slist is disabled */
- HDassert(!entry_ptr->in_slist);
+ assert(!entry_ptr->in_slist);
if (!entry_ptr->is_dirty)
if (entry_ptr->flush_marker)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "flush marked clean entry?")
@@ -5741,7 +5741,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* entry.
*/
if (write_entry || generate_image) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
if (NULL == entry_ptr->image_ptr) {
if (NULL == (entry_ptr->image_ptr = H5MM_malloc(entry_ptr->size + H5C_IMAGE_EXTRA_SPACE)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL,
@@ -5756,7 +5756,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
if (!entry_ptr->image_up_to_date) {
/* Sanity check */
- HDassert(!entry_ptr->prefetched);
+ assert(!entry_ptr->prefetched);
/* Generate the entry's image */
if (H5C__generate_image(f, cache_ptr, entry_ptr) < 0)
@@ -5771,7 +5771,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* flag should only be used in test code.
*/
if (write_entry) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
#ifdef H5C_DO_SANITY_CHECKS
if (cache_ptr->check_write_permitted && !cache_ptr->write_permitted)
@@ -5797,7 +5797,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
else {
#endif /* H5_HAVE_PARALLEL */
if (entry_ptr->prefetched) {
- HDassert(entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
+ assert(entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
mem_type = cache_ptr->class_table_ptr[entry_ptr->prefetch_type_id]->mem_type;
} /* end if */
else
@@ -5833,7 +5833,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr)
}
else if (write_entry) {
- HDassert(was_dirty);
+ assert(was_dirty);
/* only log a flush if we actually wrote to disk */
H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr)
@@ -5848,11 +5848,11 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
if (destroy) {
/* Sanity checks */
if (take_ownership)
- HDassert(!destroy_entry);
+ assert(!destroy_entry);
else
- HDassert(destroy_entry);
+ assert(destroy_entry);
- HDassert(!entry_ptr->is_pinned);
+ assert(!entry_ptr->is_pinned);
/* Update stats, while entry is still in the cache */
H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, take_ownership)
@@ -5901,13 +5901,13 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove entry from tag list")
/* verify that the entry is no longer part of any flush dependencies */
- HDassert(entry_ptr->flush_dep_nparents == 0);
- HDassert(entry_ptr->flush_dep_nchildren == 0);
+ assert(entry_ptr->flush_dep_nparents == 0);
+ assert(entry_ptr->flush_dep_nchildren == 0);
} /* end if */
else {
- HDassert(clear_only || write_entry);
- HDassert(entry_ptr->is_dirty);
- HDassert((!cache_ptr->slist_enabled) || (entry_ptr->in_slist));
+ assert(clear_only || write_entry);
+ assert(entry_ptr->is_dirty);
+ assert((!cache_ptr->slist_enabled) || (entry_ptr->in_slist));
/* We are either doing a flush or a clear.
*
@@ -5941,7 +5941,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* if appropriate
*/
if (entry_ptr->flush_dep_ndirty_children != 0)
- HDassert(entry_ptr->flush_dep_ndirty_children == 0);
+ assert(entry_ptr->flush_dep_ndirty_children == 0);
if (entry_ptr->flush_dep_nparents > 0)
if (H5C__mark_flush_dep_clean(entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "Can't propagate flush dep clean flag")
@@ -5963,7 +5963,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
*/
if (destroy) {
/* Sanity check */
- HDassert(0 == entry_ptr->flush_dep_nparents);
+ assert(0 == entry_ptr->flush_dep_nparents);
/* if both suppress_image_entry_frees and entry_ptr->include_in_image
* are true, simply set entry_ptr->image_ptr to NULL, as we have
@@ -5984,8 +5984,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* the flush dependency parents addresses array if necessary.
*/
if (!entry_ptr->prefetched) {
- HDassert(0 == entry_ptr->fd_parent_count);
- HDassert(NULL == entry_ptr->fd_parent_addrs);
+ assert(0 == entry_ptr->fd_parent_count);
+ assert(NULL == entry_ptr->fd_parent_addrs);
} /* end if */
/* Check whether we should free the space in the file that
@@ -5995,15 +5995,15 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
hsize_t fsf_size;
/* Sanity checks */
- HDassert(H5F_addr_defined(entry_ptr->addr));
- HDassert(!H5F_IS_TMP_ADDR(f, entry_ptr->addr));
+ assert(H5F_addr_defined(entry_ptr->addr));
+ assert(!H5F_IS_TMP_ADDR(f, entry_ptr->addr));
#ifndef NDEBUG
{
size_t curr_len;
/* Get the actual image size for the thing again */
entry_ptr->type->image_len((void *)entry_ptr, &curr_len);
- HDassert(curr_len == entry_ptr->size);
+ assert(curr_len == entry_ptr->size);
}
#endif /* NDEBUG */
@@ -6071,13 +6071,13 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC;
/* verify that the image has been freed */
- HDassert(entry_ptr->image_ptr == NULL);
+ assert(entry_ptr->image_ptr == NULL);
if (entry_ptr->type->free_icr((void *)entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "free_icr callback failed")
} /* end if */
else {
- HDassert(take_ownership);
+ assert(take_ownership);
/* Client is taking ownership of the entry. Set bad magic here too
* so the cache will choke unless the entry is re-inserted properly
@@ -6091,8 +6091,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
*/
if (update_page_buffer) {
/* Sanity check */
- HDassert(!destroy);
- HDassert(entry_ptr->image_ptr);
+ assert(!destroy);
+ assert(entry_ptr->image_ptr);
if (f->shared->page_buf && (f->shared->page_buf->page_size >= entry_ptr->size))
if (H5PB_update_entry(f->shared->page_buf, entry_ptr->addr, entry_ptr->size,
@@ -6105,8 +6105,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "log_flush callback failed")
done:
- HDassert((ret_value != SUCCEED) || (destroy_entry) || (!entry_ptr->flush_in_progress));
- HDassert((ret_value != SUCCEED) || (destroy_entry) || (take_ownership) || (!entry_ptr->is_dirty));
+ assert((ret_value != SUCCEED) || (destroy_entry) || (!entry_ptr->flush_in_progress));
+ assert((ret_value != SUCCEED) || (destroy_entry) || (take_ownership) || (!entry_ptr->is_dirty));
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__flush_single_entry() */
@@ -6213,27 +6213,27 @@ H5C__load_entry(H5F_t *f,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(type);
- HDassert(H5F_addr_defined(addr));
- HDassert(type->get_initial_load_size);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(type);
+ assert(H5F_addr_defined(addr));
+ assert(type->get_initial_load_size);
if (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)
- HDassert(type->get_final_load_size);
+ assert(type->get_final_load_size);
else
- HDassert(NULL == type->get_final_load_size);
- HDassert(type->deserialize);
+ assert(NULL == type->get_final_load_size);
+ assert(type->deserialize);
/* Can't see how skip reads could be usefully combined with
* the speculative read flag. Hence disallow.
*/
- HDassert(!((type->flags & H5C__CLASS_SKIP_READS) && (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)));
+ assert(!((type->flags & H5C__CLASS_SKIP_READS) && (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)));
/* Call the get_initial_load_size callback, to retrieve the initial size of image */
if (type->get_initial_load_size(udata, &len) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "can't retrieve image size")
- HDassert(len > 0);
+ assert(len > 0);
/* Check for possible speculative read off the end of the file */
if (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)
@@ -6293,7 +6293,7 @@ H5C__load_entry(H5F_t *f,
#ifdef H5_HAVE_PARALLEL
if (coll_access) {
/* Push an error, but still participate in following MPI_Bcast */
- HDmemset(image, 0, len);
+ memset(image, 0, len);
HDONE_ERROR(H5E_CACHE, H5E_READERROR, NULL, "Can't read image*")
}
else
@@ -6351,7 +6351,7 @@ H5C__load_entry(H5F_t *f,
#ifdef H5_HAVE_PARALLEL
if (coll_access) {
/* Push an error, but still participate in following MPI_Bcast */
- HDmemset(image + len, 0, actual_len - len);
+ memset(image + len, 0, actual_len - len);
HDONE_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't read image")
}
else
@@ -6430,7 +6430,7 @@ H5C__load_entry(H5F_t *f,
*
* In the following assert:
*
- * HDassert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
+ * assert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
*
* note that type ids 5 & 6 are associated with object headers in the
* metadata cache.
@@ -6440,13 +6440,13 @@ H5C__load_entry(H5F_t *f,
* metadata cache.
*/
- HDassert((dirty == FALSE) || (type->id == 5 || type->id == 6));
+ assert((dirty == FALSE) || (type->id == 5 || type->id == 6));
entry->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC;
entry->cache_ptr = f->shared->cache;
entry->addr = addr;
entry->size = len;
- HDassert(entry->size < H5C_MAX_ENTRY_SIZE);
+ assert(entry->size < H5C_MAX_ENTRY_SIZE);
entry->image_ptr = image;
entry->image_up_to_date = !dirty;
entry->type = type;
@@ -6585,10 +6585,10 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->index_size == (cache_ptr->clean_index_size + cache_ptr->dirty_index_size));
+ assert(f);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->index_size == (cache_ptr->clean_index_size + cache_ptr->dirty_index_size));
/* check to see if cache_ptr->msic_in_progress is TRUE. If it, this
* is a re-entrant call via a client callback called in the make
@@ -6615,10 +6615,10 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
while ((((cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size) ||
((empty_space + cache_ptr->clean_index_size) < (cache_ptr->min_clean_size))) &&
(entries_examined <= (2 * initial_list_len)) && (entry_ptr != NULL)) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->is_read_only));
- HDassert((entry_ptr->ro_ref_count) == 0);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_read_only));
+ assert((entry_ptr->ro_ref_count) == 0);
next_ptr = entry_ptr->next;
prev_ptr = entry_ptr->prev;
@@ -6730,7 +6730,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
else
empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
- HDassert(cache_ptr->index_size == (cache_ptr->clean_index_size + cache_ptr->dirty_index_size));
+ assert(cache_ptr->index_size == (cache_ptr->clean_index_size + cache_ptr->dirty_index_size));
}
#if H5C_COLLECT_CACHE_STATS
@@ -6751,22 +6751,22 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
#endif /* H5C_COLLECT_CACHE_STATS */
/* NEED: work on a better assert for corked entries */
- HDassert((entries_examined > (2 * initial_list_len)) ||
- ((cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) >
- cache_ptr->max_cache_size) ||
- ((cache_ptr->clean_index_size + empty_space) >= cache_ptr->min_clean_size) ||
- ((num_corked_entries)));
+ assert((entries_examined > (2 * initial_list_len)) ||
+ ((cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) >
+ cache_ptr->max_cache_size) ||
+ ((cache_ptr->clean_index_size + empty_space) >= cache_ptr->min_clean_size) ||
+ ((num_corked_entries)));
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- HDassert((entries_examined > (2 * initial_list_len)) ||
- (cache_ptr->cLRU_list_size <= cache_ptr->clean_index_size));
- HDassert((entries_examined > (2 * initial_list_len)) ||
- (cache_ptr->dLRU_list_size <= cache_ptr->dirty_index_size));
+ assert((entries_examined > (2 * initial_list_len)) ||
+ (cache_ptr->cLRU_list_size <= cache_ptr->clean_index_size));
+ assert((entries_examined > (2 * initial_list_len)) ||
+ (cache_ptr->dLRU_list_size <= cache_ptr->dirty_index_size));
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
}
else {
- HDassert(H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS);
+ assert(H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS);
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
initial_list_len = cache_ptr->cLRU_list_len;
@@ -6774,10 +6774,10 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
while (((cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size) &&
(entries_examined <= initial_list_len) && (entry_ptr != NULL)) {
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->is_read_only));
- HDassert((entry_ptr->ro_ref_count) == 0);
- HDassert(!(entry_ptr->is_dirty));
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_read_only));
+ assert((entry_ptr->ro_ref_count) == 0);
+ assert(!(entry_ptr->is_dirty));
prev_ptr = entry_ptr->aux_prev;
@@ -6805,10 +6805,10 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
done:
/* Sanity checks */
- HDassert(cache_ptr->msic_in_progress);
+ assert(cache_ptr->msic_in_progress);
if (!reentrant_call)
cache_ptr->msic_in_progress = FALSE;
- HDassert((!reentrant_call) || (cache_ptr->msic_in_progress));
+ assert((!reentrant_call) || (cache_ptr->msic_in_progress));
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__make_space_in_cache() */
@@ -6840,8 +6840,8 @@ H5C__validate_lru_list(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (((cache_ptr->LRU_head_ptr == NULL) || (cache_ptr->LRU_tail_ptr == NULL)) &&
(cache_ptr->LRU_head_ptr != cache_ptr->LRU_tail_ptr))
@@ -6880,7 +6880,7 @@ H5C__validate_lru_list(H5C_t *cache_ptr)
done:
if (ret_value != SUCCEED)
- HDassert(0);
+ assert(0);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__validate_lru_list() */
@@ -6914,8 +6914,8 @@ H5C__validate_pinned_entry_list(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (((cache_ptr->pel_head_ptr == NULL) || (cache_ptr->pel_tail_ptr == NULL)) &&
(cache_ptr->pel_head_ptr != cache_ptr->pel_tail_ptr))
@@ -6957,7 +6957,7 @@ H5C__validate_pinned_entry_list(H5C_t *cache_ptr)
done:
if (ret_value != SUCCEED)
- HDassert(0);
+ assert(0);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__validate_pinned_entry_list() */
@@ -6991,8 +6991,8 @@ H5C__validate_protected_entry_list(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if (((cache_ptr->pl_head_ptr == NULL) || (cache_ptr->pl_tail_ptr == NULL)) &&
(cache_ptr->pl_head_ptr != cache_ptr->pl_tail_ptr))
@@ -7034,7 +7034,7 @@ H5C__validate_protected_entry_list(H5C_t *cache_ptr)
done:
if (ret_value != SUCCEED)
- HDassert(0);
+ assert(0);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__validate_protected_entry_list() */
@@ -7066,9 +7066,9 @@ H5C__entry_in_skip_list(H5C_t *cache_ptr, H5C_cache_entry_t *target_ptr)
FUNC_ENTER_PACKAGE
/* Assertions */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_ptr);
node_ptr = H5SL_first(cache_ptr->slist_ptr);
in_slist = FALSE;
@@ -7077,10 +7077,10 @@ H5C__entry_in_skip_list(H5C_t *cache_ptr, H5C_cache_entry_t *target_ptr)
entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->is_dirty);
- HDassert(entry_ptr->in_slist);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->is_dirty);
+ assert(entry_ptr->in_slist);
if (entry_ptr == target_ptr)
in_slist = TRUE;
@@ -7117,7 +7117,7 @@ H5C__flush_marked_entries(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Assertions */
- HDassert(f != NULL);
+ assert(f != NULL);
/* Enable the slist, as it is needed in the flush */
if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
@@ -7170,15 +7170,15 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
FUNC_ENTER_NOAPI_NOINIT
/* Assertions */
- HDassert(cache_ptr != NULL);
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(action == H5C__SET_CORK || action == H5C__UNCORK || action == H5C__GET_CORKED);
+ assert(cache_ptr != NULL);
+ assert(H5F_addr_defined(obj_addr));
+ assert(action == H5C__SET_CORK || action == H5C__UNCORK || action == H5C__GET_CORKED);
/* Search the list of corked object addresses in the cache */
HASH_FIND(hh, cache_ptr->tag_list, &obj_addr, sizeof(haddr_t), tag_info);
if (H5C__GET_CORKED == action) {
- HDassert(corked);
+ assert(corked);
if (tag_info != NULL && tag_info->corked)
*corked = TRUE;
else
@@ -7186,7 +7186,7 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
}
else {
/* Sanity check */
- HDassert(H5C__SET_CORK == action || H5C__UNCORK == action);
+ assert(H5C__SET_CORK == action || H5C__UNCORK == action);
/* Perform appropriate action */
if (H5C__SET_CORK == action) {
@@ -7206,7 +7206,7 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
/* Check for object already corked */
if (tag_info->corked)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCORK, FAIL, "object already corked")
- HDassert(tag_info->entry_cnt > 0 && tag_info->head);
+ assert(tag_info->entry_cnt > 0 && tag_info->head);
}
/* Set the corked status for the entire object */
@@ -7229,7 +7229,7 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
/* Remove the tag info from the tag list, if there's no more entries with this tag */
if (0 == tag_info->entry_cnt) {
/* Sanity check */
- HDassert(NULL == tag_info->head);
+ assert(NULL == tag_info->head);
HASH_DELETE(hh, cache_ptr->tag_list, tag_info);
@@ -7237,7 +7237,7 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
tag_info = H5FL_FREE(H5C_tag_info_t, tag_info);
}
else
- HDassert(NULL != tag_info->head);
+ assert(NULL != tag_info->head);
}
}
@@ -7269,13 +7269,13 @@ H5C__mark_flush_dep_dirty(H5C_cache_entry_t *entry)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry);
+ assert(entry);
/* Iterate over the parent entries, if any */
for (u = 0; u < entry->flush_dep_nparents; u++) {
/* Sanity check */
- HDassert(entry->flush_dep_parent[u]->flush_dep_ndirty_children <
- entry->flush_dep_parent[u]->flush_dep_nchildren);
+ assert(entry->flush_dep_parent[u]->flush_dep_ndirty_children <
+ entry->flush_dep_parent[u]->flush_dep_nchildren);
/* Adjust the parent's number of dirty children */
entry->flush_dep_parent[u]->flush_dep_ndirty_children++;
@@ -7316,7 +7316,7 @@ H5C__mark_flush_dep_clean(H5C_cache_entry_t *entry)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry);
+ assert(entry);
/* Iterate over the parent entries, if any */
/* Note reverse iteration order, in case the callback removes the flush
@@ -7324,7 +7324,7 @@ H5C__mark_flush_dep_clean(H5C_cache_entry_t *entry)
*/
for (i = ((int)entry->flush_dep_nparents) - 1; i >= 0; i--) {
/* Sanity check */
- HDassert(entry->flush_dep_parent[i]->flush_dep_ndirty_children > 0);
+ assert(entry->flush_dep_parent[i]->flush_dep_ndirty_children > 0);
/* Adjust the parent's number of dirty children */
entry->flush_dep_parent[i]->flush_dep_ndirty_children--;
@@ -7364,7 +7364,7 @@ H5C__mark_flush_dep_serialized(H5C_cache_entry_t *entry_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry_ptr);
+ assert(entry_ptr);
/* Iterate over the parent entries, if any */
/* Note reverse iteration order, in case the callback removes the flush
@@ -7372,9 +7372,9 @@ H5C__mark_flush_dep_serialized(H5C_cache_entry_t *entry_ptr)
*/
for (i = ((int)entry_ptr->flush_dep_nparents) - 1; i >= 0; i--) {
/* Sanity checks */
- HDassert(entry_ptr->flush_dep_parent);
- HDassert(entry_ptr->flush_dep_parent[i]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->flush_dep_parent[i]->flush_dep_nunser_children > 0);
+ assert(entry_ptr->flush_dep_parent);
+ assert(entry_ptr->flush_dep_parent[i]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->flush_dep_parent[i]->flush_dep_nunser_children > 0);
/* decrement the parents number of unserialized children */
entry_ptr->flush_dep_parent[i]->flush_dep_nunser_children--;
@@ -7414,15 +7414,15 @@ H5C__mark_flush_dep_unserialized(H5C_cache_entry_t *entry_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry_ptr);
+ assert(entry_ptr);
/* Iterate over the parent entries, if any */
for (u = 0; u < entry_ptr->flush_dep_nparents; u++) {
/* Sanity check */
- HDassert(entry_ptr->flush_dep_parent);
- HDassert(entry_ptr->flush_dep_parent[u]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->flush_dep_parent[u]->flush_dep_nunser_children <
- entry_ptr->flush_dep_parent[u]->flush_dep_nchildren);
+ assert(entry_ptr->flush_dep_parent);
+ assert(entry_ptr->flush_dep_parent[u]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->flush_dep_parent[u]->flush_dep_nunser_children <
+ entry_ptr->flush_dep_parent[u]->flush_dep_nchildren);
/* increment parents number of usserialized children */
entry_ptr->flush_dep_parent[u]->flush_dep_nunser_children++;
@@ -7463,11 +7463,11 @@ H5C__assert_flush_dep_nocycle(const H5C_cache_entry_t *entry, const H5C_cache_en
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(entry);
- HDassert(base_entry);
+ assert(entry);
+ assert(base_entry);
/* Make sure the entries are not the same */
- HDassert(base_entry != entry);
+ assert(base_entry != entry);
/* Iterate over entry's parents (if any) */
for (u = 0; u < entry->flush_dep_nparents; u++)
@@ -7530,20 +7530,20 @@ H5C__serialize_cache(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_ptr);
#ifdef H5C_DO_SANITY_CHECKS
- HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
for (i = H5C_RING_USER; i < H5C_RING_NTYPES; i++) {
index_len += cache_ptr->index_ring_len[i];
@@ -7555,12 +7555,12 @@ H5C__serialize_cache(H5F_t *f)
slist_size += cache_ptr->slist_ring_size[i];
} /* end for */
- HDassert(cache_ptr->index_len == index_len);
- HDassert(cache_ptr->index_size == index_size);
- HDassert(cache_ptr->clean_index_size == clean_index_size);
- HDassert(cache_ptr->dirty_index_size == dirty_index_size);
- HDassert(cache_ptr->slist_len == slist_len);
- HDassert(cache_ptr->slist_size == slist_size);
+ assert(cache_ptr->index_len == index_len);
+ assert(cache_ptr->index_size == index_size);
+ assert(cache_ptr->clean_index_size == clean_index_size);
+ assert(cache_ptr->dirty_index_size == dirty_index_size);
+ assert(cache_ptr->slist_len == slist_len);
+ assert(cache_ptr->slist_size == slist_size);
#endif /* H5C_DO_SANITY_CHECKS */
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
@@ -7582,7 +7582,7 @@ H5C__serialize_cache(H5F_t *f)
scan_ptr = cache_ptr->il_head;
while (scan_ptr != NULL) {
- HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
scan_ptr->serialization_count = 0;
scan_ptr = scan_ptr->il_next;
} /* end while */
@@ -7595,7 +7595,7 @@ H5C__serialize_cache(H5F_t *f)
* turn required to support sanity checking in some cache
* clients.
*/
- HDassert(!cache_ptr->serialization_in_progress);
+ assert(!cache_ptr->serialization_in_progress);
cache_ptr->serialization_in_progress = TRUE;
/* Serialize each ring, starting from the outermost ring and
@@ -7603,7 +7603,7 @@ H5C__serialize_cache(H5F_t *f)
*/
ring = H5C_RING_USER;
while (ring < H5C_RING_NTYPES) {
- HDassert(cache_ptr->close_warning_received);
+ assert(cache_ptr->close_warning_received);
switch (ring) {
case H5C_RING_USER:
break;
@@ -7647,8 +7647,8 @@ H5C__serialize_cache(H5F_t *f)
scan_ptr = cache_ptr->il_head;
while (scan_ptr != NULL) {
- HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(scan_ptr->serialization_count <= 1);
+ assert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(scan_ptr->serialization_count <= 1);
scan_ptr = scan_ptr->il_next;
} /* end while */
@@ -7700,15 +7700,15 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(ring > H5C_RING_UNDEFINED);
- HDassert(ring < H5C_RING_NTYPES);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(ring > H5C_RING_UNDEFINED);
+ assert(ring < H5C_RING_NTYPES);
- HDassert(cache_ptr->serialization_in_progress);
+ assert(cache_ptr->serialization_in_progress);
/* The objective here is to serialize all entries in the cache ring
* in flush dependency order.
@@ -7797,13 +7797,13 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
done = TRUE; /* set to FALSE if any activity in inner loop */
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Verify that either the entry is already serialized, or
* that it is assigned to either the target or an inner
* ring.
*/
- HDassert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date));
+ assert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date));
/* Skip flush me last entries or inner ring entries */
if (!entry_ptr->flush_me_last && entry_ptr->ring == ring) {
@@ -7818,14 +7818,14 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
* and it has no unserialized flush dependency children.
*/
if (!entry_ptr->image_up_to_date && entry_ptr->flush_dep_nunser_children == 0) {
- HDassert(entry_ptr->serialization_count == 0);
+ assert(entry_ptr->serialization_count == 0);
/* Serialize the entry */
if (H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed")
- HDassert(entry_ptr->flush_dep_nunser_children == 0);
- HDassert(entry_ptr->serialization_count == 0);
+ assert(entry_ptr->flush_dep_nunser_children == 0);
+ assert(entry_ptr->serialization_count == 0);
#ifndef NDEBUG
/* Increment serialization counter (to detect multiple serializations) */
@@ -7872,16 +7872,16 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
*/
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring > H5C_RING_UNDEFINED);
- HDassert(entry_ptr->ring < H5C_RING_NTYPES);
- HDassert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date));
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring > H5C_RING_UNDEFINED);
+ assert(entry_ptr->ring < H5C_RING_NTYPES);
+ assert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date));
if (entry_ptr->ring == ring) {
if (entry_ptr->flush_me_last) {
if (!entry_ptr->image_up_to_date) {
- HDassert(entry_ptr->serialization_count == 0);
- HDassert(entry_ptr->flush_dep_nunser_children == 0);
+ assert(entry_ptr->serialization_count == 0);
+ assert(entry_ptr->flush_dep_nunser_children == 0);
/* Serialize the entry */
if (H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0)
@@ -7894,8 +7894,8 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL,
"flush_me_last entry serialization triggered restart")
- HDassert(entry_ptr->flush_dep_nunser_children == 0);
- HDassert(entry_ptr->serialization_count == 0);
+ assert(entry_ptr->flush_dep_nunser_children == 0);
+ assert(entry_ptr->serialization_count == 0);
#ifndef NDEBUG
/* Increment serialization counter (to detect multiple serializations) */
entry_ptr->serialization_count++;
@@ -7903,9 +7903,9 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
} /* end if */
} /* end if */
else {
- HDassert(entry_ptr->image_up_to_date);
- HDassert(entry_ptr->serialization_count <= 1);
- HDassert(entry_ptr->flush_dep_nunser_children == 0);
+ assert(entry_ptr->image_up_to_date);
+ assert(entry_ptr->serialization_count <= 1);
+ assert(entry_ptr->flush_dep_nunser_children == 0);
} /* end else */
} /* if ( entry_ptr->ring == ring ) */
@@ -7913,7 +7913,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
} /* while ( entry_ptr != NULL ) */
done:
- HDassert(cache_ptr->serialization_in_progress);
+ assert(cache_ptr->serialization_in_progress);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__serialize_ring() */
@@ -7937,17 +7937,17 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(!entry_ptr->prefetched);
- HDassert(!entry_ptr->image_up_to_date);
- HDassert(entry_ptr->is_dirty);
- HDassert(!entry_ptr->is_protected);
- HDassert(!entry_ptr->flush_in_progress);
- HDassert(entry_ptr->type);
+ assert(f);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(!entry_ptr->prefetched);
+ assert(!entry_ptr->image_up_to_date);
+ assert(entry_ptr->is_dirty);
+ assert(!entry_ptr->is_protected);
+ assert(!entry_ptr->flush_in_progress);
+ assert(entry_ptr->type);
/* Set entry_ptr->flush_in_progress to TRUE so the target entry
* will not be evicted out from under us. Must set it back to FALSE
@@ -7957,7 +7957,7 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry
/* Allocate buffer for the entry image if required. */
if (NULL == entry_ptr->image_ptr) {
- HDassert(entry_ptr->size > 0);
+ assert(entry_ptr->size > 0);
if (NULL == (entry_ptr->image_ptr = H5MM_malloc(entry_ptr->size + H5C_IMAGE_EXTRA_SPACE)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for on disk image buffer")
#if H5C_DO_MEMORY_SANITY_CHECKS
@@ -7974,8 +7974,8 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry
entry_ptr->flush_in_progress = FALSE;
done:
- HDassert((ret_value != SUCCEED) || (!entry_ptr->flush_in_progress));
- HDassert((ret_value != SUCCEED) || (entry_ptr->image_up_to_date));
+ assert((ret_value != SUCCEED) || (!entry_ptr->flush_in_progress));
+ assert((ret_value != SUCCEED) || (entry_ptr->image_up_to_date));
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__serialize_single_entry() */
@@ -8012,15 +8012,15 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(!entry_ptr->image_up_to_date);
- HDassert(entry_ptr->is_dirty);
- HDassert(!entry_ptr->is_protected);
- HDassert(entry_ptr->type);
+ assert(f);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(!entry_ptr->image_up_to_date);
+ assert(entry_ptr->is_dirty);
+ assert(!entry_ptr->is_protected);
+ assert(entry_ptr->type);
/* make note of the entry's current address */
old_addr = entry_ptr->addr;
@@ -8066,7 +8066,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
*/
if (serialize_flags & H5C__SERIALIZE_RESIZED_FLAG) {
/* Sanity check */
- HDassert(new_len > 0);
+ assert(new_len > 0);
/* Allocate a new image buffer */
if (NULL ==
@@ -8099,8 +8099,8 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
* H5C__UPDATE_SLIST_FOR_SIZE_CHANGE() is a no-op if the
* slist is enabled, call it un-conditionally.
*/
- HDassert(entry_ptr->is_dirty);
- HDassert((entry_ptr->in_slist) || (!cache_ptr->slist_enabled));
+ assert(entry_ptr->is_dirty);
+ assert((entry_ptr->in_slist) || (!cache_ptr->slist_enabled));
H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, new_len);
@@ -8129,7 +8129,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL);
} /* end if */
else /* move is already done for us -- just do sanity checks */
- HDassert(entry_ptr->addr == new_addr);
+ assert(entry_ptr->addr == new_addr);
} /* end if */
} /* end if(serialize_flags != H5C__SERIALIZE_NO_FLAGS_SET) */
@@ -8138,8 +8138,8 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to serialize entry")
#if H5C_DO_MEMORY_SANITY_CHECKS
- HDassert(0 == HDmemcmp(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE,
- H5C_IMAGE_EXTRA_SPACE));
+ assert(0 == memcmp(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE,
+ H5C_IMAGE_EXTRA_SPACE));
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
entry_ptr->image_up_to_date = TRUE;
@@ -8150,7 +8150,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
* (see assertion on entry), no need to check that -- only check
* for flush dependency parents.
*/
- HDassert(entry_ptr->flush_dep_nunser_children == 0);
+ assert(entry_ptr->flush_dep_nunser_children == 0);
if (entry_ptr->flush_dep_nparents > 0)
if (H5C__mark_flush_dep_serialized(entry_ptr) < 0)
@@ -8184,11 +8184,11 @@ H5C_remove_entry(void *_entry)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(entry);
- HDassert(entry->ring != H5C_RING_UNDEFINED);
+ assert(entry);
+ assert(entry->ring != H5C_RING_UNDEFINED);
cache = entry->cache_ptr;
- HDassert(cache);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Check for error conditions */
if (entry->is_dirty)
@@ -8211,9 +8211,9 @@ H5C_remove_entry(void *_entry)
"can't remove entry with flush dependency children from cache")
/* Additional internal cache consistency checks */
- HDassert(!entry->in_slist);
- HDassert(!entry->flush_marker);
- HDassert(!entry->flush_in_progress);
+ assert(!entry->in_slist);
+ assert(!entry->flush_marker);
+ assert(!entry->flush_in_progress);
/* Note that the algorithm below is (very) similar to the set of operations
* in H5C__flush_single_entry() and should be kept in sync with changes
diff --git a/src/H5CS.c b/src/H5CS.c
index c4a8862..b3a333a 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -90,10 +90,10 @@ H5CS__get_stack(void)
fstack = (H5CS_t *)LocalAlloc(
LPTR, sizeof(H5CS_t)); /* Win32 has to use LocalAlloc to match the LocalFree in DllMain */
#else
- fstack = (H5CS_t *)HDmalloc(
- sizeof(H5CS_t)); /* Don't use H5MM_malloc() here, it causes infinite recursion */
+ fstack =
+ (H5CS_t *)malloc(sizeof(H5CS_t)); /* Don't use H5MM_malloc() here, it causes infinite recursion */
#endif /* H5_HAVE_WIN_THREADS */
- HDassert(fstack);
+ assert(fstack);
/* Set the thread-specific info */
fstack->nused = 0;
@@ -133,21 +133,21 @@ H5CS_print_stack(const H5CS_t *fstack, FILE *stream)
FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
- HDassert(fstack);
+ assert(fstack);
/* Default to outputting information to stderr */
if (!stream)
stream = stderr;
- HDfprintf(stream, "HDF5-DIAG: Function stack from %s ", H5_lib_vers_info_g);
+ fprintf(stream, "HDF5-DIAG: Function stack from %s ", H5_lib_vers_info_g);
/* try show the process or thread id in multiple processes cases*/
- HDfprintf(stream, "thread %" PRIu64 ".", H5TS_thread_id());
+ fprintf(stream, "thread %" PRIu64 ".", H5TS_thread_id());
if (fstack && fstack->nused > 0)
- HDfprintf(stream, " Back trace follows.");
+ fprintf(stream, " Back trace follows.");
HDfputc('\n', stream);
for (i = fstack->nused - 1; i >= 0; --i)
- HDfprintf(stream, "%*s#%03d: Routine: %s\n", indent, "", i, fstack->rec[i]);
+ fprintf(stream, "%*s#%03d: Routine: %s\n", indent, "", i, fstack->rec[i]);
FUNC_LEAVE_NOAPI_NOFS(SUCCEED)
} /* end H5CS_print_stack() */
@@ -174,19 +174,19 @@ H5CS_push(const char *func_name)
FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
- HDassert(fstack);
- HDassert(fstack->nused <= fstack->nalloc);
- HDassert(func_name);
+ assert(fstack);
+ assert(fstack->nused <= fstack->nalloc);
+ assert(func_name);
/* Check if we need to expand the stack of records */
if (fstack->nused == fstack->nalloc) {
size_t na = MAX((fstack->nalloc * 2), H5CS_MIN_NSLOTS);
/* Don't use H5MM_realloc here */
- const char **x = (const char **)HDrealloc(fstack->rec, na * sizeof(const char *));
+ const char **x = (const char **)realloc(fstack->rec, na * sizeof(const char *));
/* (Avoid returning an error from this routine, currently -QAK) */
- HDassert(x);
+ assert(x);
fstack->rec = x;
fstack->nalloc = na;
} /* end if */
@@ -219,8 +219,8 @@ H5CS_pop(void)
FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
- HDassert(fstack);
- HDassert(fstack->nused > 0);
+ assert(fstack);
+ assert(fstack->nused > 0);
/* Pop the function. */
fstack->nused--;
@@ -252,18 +252,18 @@ H5CS_copy_stack(void)
FUNC_ENTER_NOAPI_NOFS
/* Sanity check */
- HDassert(old_stack);
+ assert(old_stack);
/* Allocate a new stack */
/* (Don't use library allocate code, since this code stack supports it) */
- if (NULL == (new_stack = HDcalloc(1, sizeof(H5CS_t))))
+ if (NULL == (new_stack = calloc(1, sizeof(H5CS_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't allocate function stack")
- if (NULL == (new_stack->rec = HDcalloc(old_stack->nused, sizeof(const char *))))
+ if (NULL == (new_stack->rec = calloc(old_stack->nused, sizeof(const char *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't allocate function stack records")
/* Copy pointers on old stack to new one */
/* (Strings don't need to be duplicated, they are statically allocated) */
- HDmemcpy(new_stack->rec, old_stack->rec, sizeof(char *) * old_stack->nused);
+ memcpy(new_stack->rec, old_stack->rec, sizeof(char *) * old_stack->nused);
new_stack->nused = new_stack->nalloc = old_stack->nused;
/* Set the return value */
@@ -294,18 +294,18 @@ H5CS_close_stack(H5CS_t *stack)
FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
- HDassert(stack);
+ assert(stack);
/* Free stack */
/* The function name string are statically allocated (by the compiler)
* and are not allocated, so there's no need to free them.
*/
if (stack->rec) {
- HDfree(stack->rec);
+ free(stack->rec);
stack->rec = NULL;
} /* end if */
if (stack)
- HDfree(stack);
+ free(stack);
FUNC_LEAVE_NOAPI_NOFS(SUCCEED)
} /* end H5CS_close_stack() */
diff --git a/src/H5CX.c b/src/H5CX.c
index e5595b7..5781e2a 100644
--- a/src/H5CX.c
+++ b/src/H5CX.c
@@ -491,7 +491,7 @@ H5CX_init(void)
FUNC_ENTER_NOAPI(FAIL)
/* Reset the "default DXPL cache" information */
- HDmemset(&H5CX_def_dxpl_cache, 0, sizeof(H5CX_dxpl_cache_t));
+ memset(&H5CX_def_dxpl_cache, 0, sizeof(H5CX_dxpl_cache_t));
/* Get the default DXPL cache information */
@@ -588,7 +588,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve modify write buffer property")
/* Reset the "default LCPL cache" information */
- HDmemset(&H5CX_def_lcpl_cache, 0, sizeof(H5CX_lcpl_cache_t));
+ memset(&H5CX_def_lcpl_cache, 0, sizeof(H5CX_lcpl_cache_t));
/* Get the default LCPL cache information */
@@ -605,7 +605,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve intermediate group creation flag")
/* Reset the "default LAPL cache" information */
- HDmemset(&H5CX_def_lapl_cache, 0, sizeof(H5CX_lapl_cache_t));
+ memset(&H5CX_def_lapl_cache, 0, sizeof(H5CX_lapl_cache_t));
/* Get the default LAPL cache information */
@@ -618,7 +618,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve number of soft / UD links to traverse")
/* Reset the "default DCPL cache" information */
- HDmemset(&H5CX_def_dcpl_cache, 0, sizeof(H5CX_dcpl_cache_t));
+ memset(&H5CX_def_dcpl_cache, 0, sizeof(H5CX_dcpl_cache_t));
/* Get the default DCPL cache information */
@@ -635,7 +635,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve object header flags")
/* Reset the "default DAPL cache" information */
- HDmemset(&H5CX_def_dapl_cache, 0, sizeof(H5CX_dapl_cache_t));
+ memset(&H5CX_def_dapl_cache, 0, sizeof(H5CX_dapl_cache_t));
/* Get the default DAPL cache information */
@@ -652,7 +652,7 @@ H5CX_init(void)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve prefix for VDS")
/* Reset the "default FAPL cache" information */
- HDmemset(&H5CX_def_fapl_cache, 0, sizeof(H5CX_fapl_cache_t));
+ memset(&H5CX_def_fapl_cache, 0, sizeof(H5CX_fapl_cache_t));
/* Get the default FAPL cache information */
@@ -696,8 +696,8 @@ H5CX_term_package(void)
cnode = H5CX__pop_common(FALSE);
/* Free the context node */
- /* (Allocated with HDmalloc() in H5CX_push_special() ) */
- HDfree(cnode);
+ /* (Allocated with malloc() in H5CX_push_special() ) */
+ free(cnode);
#ifndef H5_HAVE_THREADSAFE
H5CX_head_g = NULL;
@@ -736,12 +736,12 @@ H5CX__get_context(void)
/* Win32 has to use LocalAlloc to match the LocalFree in DllMain */
ctx = (H5CX_node_t **)LocalAlloc(LPTR, sizeof(H5CX_node_t *));
#else
- /* Use HDmalloc here since this has to match the HDfree in the
+ /* Use malloc here since this has to match the free in the
* destructor and we want to avoid the codestack there.
*/
- ctx = (H5CX_node_t **)HDmalloc(sizeof(H5CX_node_t *));
+ ctx = (H5CX_node_t **)malloc(sizeof(H5CX_node_t *));
#endif /* H5_HAVE_WIN_THREADS */
- HDassert(ctx);
+ assert(ctx);
/* Reset the thread-specific info */
*ctx = NULL;
@@ -778,9 +778,9 @@ H5CX__push_common(H5CX_node_t *cnode)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(cnode);
+ assert(cnode);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head);
+ assert(head);
/* Set non-zero context info */
cnode->ctx.dxpl_id = H5P_DATASET_XFER_DEFAULT;
@@ -852,8 +852,8 @@ H5CX_push_special(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Allocate & clear API context node, without using library API routines */
- cnode = (H5CX_node_t *)HDcalloc(1, sizeof(H5CX_node_t));
- HDassert(cnode);
+ cnode = (H5CX_node_t *)calloc(1, sizeof(H5CX_node_t));
+ assert(cnode);
/* Set context info */
H5CX__push_common(cnode);
@@ -888,8 +888,8 @@ H5CX_retrieve_state(H5CX_state_t **api_state)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(api_state);
+ assert(head && *head);
+ assert(api_state);
/* Allocate & clear API context state */
if (NULL == (*api_state = H5FL_CALLOC(H5CX_state_t)))
@@ -946,7 +946,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state)
/* Keep a reference to the current VOL wrapping context */
(*api_state)->vol_wrap_ctx = (*head)->ctx.vol_wrap_ctx;
if (NULL != (*api_state)->vol_wrap_ctx) {
- HDassert((*head)->ctx.vol_wrap_ctx_valid);
+ assert((*head)->ctx.vol_wrap_ctx_valid);
if (H5VL_inc_vol_wrapper((*api_state)->vol_wrap_ctx) < 0)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTINC, FAIL, "can't increment refcount on VOL wrapping context")
} /* end if */
@@ -1027,8 +1027,8 @@ H5CX_restore_state(const H5CX_state_t *api_state)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(api_state);
+ assert(head && *head);
+ assert(api_state);
/* Restore the DCPL info */
(*head)->ctx.dcpl_id = api_state->dcpl_id;
@@ -1086,7 +1086,7 @@ H5CX_free_state(H5CX_state_t *api_state)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(api_state);
+ assert(api_state);
/* Release the DCPL */
if (0 != api_state->dcpl_id && H5P_DATASET_CREATE_DEFAULT != api_state->dcpl_id)
@@ -1154,7 +1154,7 @@ H5CX_is_def_dxpl(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
is_def_dxpl = ((*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT);
@@ -1183,7 +1183,7 @@ H5CX_set_dxpl(hid_t dxpl_id)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context's DXPL to a new value */
(*head)->ctx.dxpl_id = dxpl_id;
@@ -1212,7 +1212,7 @@ H5CX_set_dcpl(hid_t dcpl_id)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context's DCPL to a new value */
(*head)->ctx.dcpl_id = dcpl_id;
@@ -1243,7 +1243,7 @@ H5CX_set_libver_bounds(H5F_t *f)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
(*head)->ctx.low_bound = (f == NULL) ? H5F_LIBVER_LATEST : H5F_LOW_BOUND(f);
@@ -1277,7 +1277,7 @@ H5CX_set_lcpl(hid_t lcpl_id)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context's LCPL to a new value */
(*head)->ctx.lcpl_id = lcpl_id;
@@ -1306,7 +1306,7 @@ H5CX_set_lapl(hid_t lapl_id)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context's LAPL to a new value */
(*head)->ctx.lapl_id = lapl_id;
@@ -1346,10 +1346,10 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass,
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(acspl_id);
- HDassert(libclass);
+ assert(acspl_id);
+ assert(libclass);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set access plist to the default property list of the appropriate class if it's the generic default */
if (H5P_DEFAULT == *acspl_id)
@@ -1468,7 +1468,7 @@ H5CX_set_loc(hid_t
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set collective metadata read flag */
(*head)->ctx.coll_metadata_read = TRUE;
@@ -1520,7 +1520,7 @@ H5CX_set_vol_wrap_ctx(void *vol_wrap_ctx)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
(*head)->ctx.vol_wrap_ctx = vol_wrap_ctx;
@@ -1553,7 +1553,7 @@ H5CX_set_vol_connector_prop(const H5VL_connector_prop_t *vol_connector_prop)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
H5MM_memcpy(&(*head)->ctx.vol_connector_prop, vol_connector_prop, sizeof(H5VL_connector_prop_t));
@@ -1586,7 +1586,7 @@ H5CX_get_dxpl(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
dxpl_id = (*head)->ctx.dxpl_id;
@@ -1616,7 +1616,7 @@ H5CX_get_lapl(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
lapl_id = (*head)->ctx.lapl_id;
@@ -1645,7 +1645,7 @@ H5CX_get_vol_wrap_ctx(void **vol_wrap_ctx)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_wrap_ctx);
+ assert(vol_wrap_ctx);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
/* No error is expected at this point. But in case an application calls H5VLwrap_register
@@ -1689,16 +1689,16 @@ H5CX_get_vol_connector_prop(H5VL_connector_prop_t *vol_connector_prop)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(vol_connector_prop);
+ assert(vol_connector_prop);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Check for value that was set */
if ((*head)->ctx.vol_connector_prop_valid)
/* Get the value */
H5MM_memcpy(vol_connector_prop, &(*head)->ctx.vol_connector_prop, sizeof(H5VL_connector_prop_t));
else
- HDmemset(vol_connector_prop, 0, sizeof(H5VL_connector_prop_t));
+ memset(vol_connector_prop, 0, sizeof(H5VL_connector_prop_t));
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_get_vol_connector_prop() */
@@ -1725,7 +1725,7 @@ H5CX_get_tag(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
tag = (*head)->ctx.tag;
@@ -1755,7 +1755,7 @@ H5CX_get_ring(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
ring = (*head)->ctx.ring;
@@ -1787,7 +1787,7 @@ H5CX_get_coll_metadata_read(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
coll_md_read = (*head)->ctx.coll_metadata_read;
@@ -1818,10 +1818,10 @@ H5CX_get_mpi_coll_datatypes(MPI_Datatype *btype, MPI_Datatype *ftype)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(btype);
- HDassert(ftype);
+ assert(btype);
+ assert(ftype);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context values */
*btype = (*head)->ctx.btype;
@@ -1852,7 +1852,7 @@ H5CX_get_mpi_file_flushing(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
flushing = (*head)->ctx.mpi_file_flushing;
@@ -1883,7 +1883,7 @@ H5CX_get_mpio_rank0_bcast(void)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set return value */
do_rank0_bcast = (*head)->ctx.rank0_bcast;
@@ -1913,10 +1913,10 @@ H5CX_get_btree_split_ratios(double split_ratio[3])
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(split_ratio);
+ assert(split_ratio);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_BTREE_SPLIT_RATIO_NAME,
btree_split_ratio)
@@ -1949,10 +1949,10 @@ H5CX_get_max_temp_buf(size_t *max_temp_buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(max_temp_buf);
+ assert(max_temp_buf);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MAX_TEMP_BUF_NAME, max_temp_buf)
@@ -1984,10 +1984,10 @@ H5CX_get_tconv_buf(void **tconv_buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(tconv_buf);
+ assert(tconv_buf);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_TCONV_BUF_NAME, tconv_buf)
@@ -2019,10 +2019,10 @@ H5CX_get_bkgr_buf(void **bkgr_buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(bkgr_buf);
+ assert(bkgr_buf);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_BKGR_BUF_NAME, bkgr_buf)
@@ -2054,10 +2054,10 @@ H5CX_get_bkgr_buf_type(H5T_bkg_t *bkgr_buf_type)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(bkgr_buf_type);
+ assert(bkgr_buf_type);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_BKGR_BUF_TYPE_NAME, bkgr_buf_type)
@@ -2089,10 +2089,10 @@ H5CX_get_vec_size(size_t *vec_size)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vec_size);
+ assert(vec_size);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_HYPER_VECTOR_SIZE_NAME, vec_size)
@@ -2126,10 +2126,10 @@ H5CX_get_io_xfer_mode(H5FD_mpio_xfer_t *io_xfer_mode)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(io_xfer_mode);
+ assert(io_xfer_mode);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_IO_XFER_MODE_NAME, io_xfer_mode)
@@ -2161,10 +2161,10 @@ H5CX_get_mpio_coll_opt(H5FD_mpio_collective_opt_t *mpio_coll_opt)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpio_coll_opt);
+ assert(mpio_coll_opt);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, mpio_coll_opt)
@@ -2196,10 +2196,10 @@ H5CX_get_mpio_local_no_coll_cause(uint32_t *mpio_local_no_coll_cause)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpio_local_no_coll_cause);
+ assert(mpio_local_no_coll_cause);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID_SET(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME,
mpio_local_no_coll_cause)
@@ -2232,10 +2232,10 @@ H5CX_get_mpio_global_no_coll_cause(uint32_t *mpio_global_no_coll_cause)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpio_global_no_coll_cause);
+ assert(mpio_global_no_coll_cause);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID_SET(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME,
mpio_global_no_coll_cause)
@@ -2268,10 +2268,10 @@ H5CX_get_mpio_chunk_opt_mode(H5FD_mpio_chunk_opt_t *mpio_chunk_opt_mode)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpio_chunk_opt_mode);
+ assert(mpio_chunk_opt_mode);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME,
mpio_chunk_opt_mode)
@@ -2304,10 +2304,10 @@ H5CX_get_mpio_chunk_opt_num(unsigned *mpio_chunk_opt_num)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpio_chunk_opt_num);
+ assert(mpio_chunk_opt_num);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME,
mpio_chunk_opt_num)
@@ -2340,10 +2340,10 @@ H5CX_get_mpio_chunk_opt_ratio(unsigned *mpio_chunk_opt_ratio)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpio_chunk_opt_ratio);
+ assert(mpio_chunk_opt_ratio);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME,
mpio_chunk_opt_ratio)
@@ -2377,10 +2377,10 @@ H5CX_get_err_detect(H5Z_EDC_t *err_detect)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(err_detect);
+ assert(err_detect);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_EDC_NAME, err_detect)
@@ -2412,10 +2412,10 @@ H5CX_get_filter_cb(H5Z_cb_t *filter_cb)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(filter_cb);
+ assert(filter_cb);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_FILTER_CB_NAME, filter_cb)
@@ -2447,10 +2447,10 @@ H5CX_get_data_transform(H5Z_data_xform_t **data_transform)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(data_transform);
+ assert(data_transform);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
/* Check if the value has been retrieved already */
if (!(*head)->ctx.data_transform_valid) {
@@ -2505,10 +2505,10 @@ H5CX_get_vlen_alloc_info(H5T_vlen_alloc_info_t *vl_alloc_info)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vl_alloc_info);
+ assert(vl_alloc_info);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
/* Check if the value has been retrieved already */
if (!(*head)->ctx.vl_alloc_info_valid) {
@@ -2570,10 +2570,10 @@ H5CX_get_dt_conv_cb(H5T_conv_cb_t *dt_conv_cb)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dt_conv_cb);
+ assert(dt_conv_cb);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_CONV_CB_NAME, dt_conv_cb)
@@ -2605,10 +2605,10 @@ H5CX_get_selection_io_mode(H5D_selection_io_mode_t *selection_io_mode)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(selection_io_mode);
+ assert(selection_io_mode);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_SELECTION_IO_MODE_NAME,
selection_io_mode)
@@ -2642,10 +2642,10 @@ H5CX_get_no_selection_io_cause(uint32_t *no_selection_io_cause)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(no_selection_io_cause);
+ assert(no_selection_io_cause);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID_SET(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_NO_SELECTION_IO_CAUSE_NAME,
no_selection_io_cause)
@@ -2675,10 +2675,10 @@ H5CX_get_modify_write_buf(hbool_t *modify_write_buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(modify_write_buf);
+ assert(modify_write_buf);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MODIFY_WRITE_BUF_NAME, modify_write_buf)
@@ -2710,10 +2710,10 @@ H5CX_get_encoding(H5T_cset_t *encoding)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(encoding);
+ assert(encoding);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.lcpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.lcpl_id);
H5CX_RETRIEVE_PROP_VALID(lcpl, H5P_LINK_CREATE_DEFAULT, H5P_STRCRT_CHAR_ENCODING_NAME, encoding)
@@ -2745,10 +2745,10 @@ H5CX_get_intermediate_group(unsigned *crt_intermed_group)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(crt_intermed_group);
+ assert(crt_intermed_group);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.lcpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.lcpl_id);
H5CX_RETRIEVE_PROP_VALID(lcpl, H5P_LINK_CREATE_DEFAULT, H5L_CRT_INTERMEDIATE_GROUP_NAME,
intermediate_group)
@@ -2781,10 +2781,10 @@ H5CX_get_nlinks(size_t *nlinks)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(nlinks);
+ assert(nlinks);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
H5CX_RETRIEVE_PROP_VALID(lapl, H5P_LINK_ACCESS_DEFAULT, H5L_ACS_NLINKS_NAME, nlinks)
@@ -2816,11 +2816,11 @@ H5CX_get_libver_bounds(H5F_libver_t *low_bound, H5F_libver_t *high_bound)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(low_bound);
- HDassert(high_bound);
+ assert(low_bound);
+ assert(high_bound);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.fapl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.fapl_id);
H5CX_RETRIEVE_PROP_VALID(fapl, H5P_FILE_ACCESS_DEFAULT, H5F_ACS_LIBVER_LOW_BOUND_NAME, low_bound)
H5CX_RETRIEVE_PROP_VALID(fapl, H5P_FILE_ACCESS_DEFAULT, H5F_ACS_LIBVER_HIGH_BOUND_NAME, high_bound)
@@ -2855,10 +2855,10 @@ H5CX_get_dset_min_ohdr_flag(hbool_t *dset_min_ohdr_flag)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dset_min_ohdr_flag);
+ assert(dset_min_ohdr_flag);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dcpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dcpl_id);
H5CX_RETRIEVE_PROP_VALID(dcpl, H5P_DATASET_CREATE_DEFAULT, H5D_CRT_MIN_DSET_HDR_SIZE_NAME,
do_min_dset_ohdr)
@@ -2891,10 +2891,10 @@ H5CX_get_ext_file_prefix(const char **extfile_prefix)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(extfile_prefix);
+ assert(extfile_prefix);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dapl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dapl_id);
/* Check if the value has been retrieved already */
if (!(*head)->ctx.extfile_prefix_valid) {
@@ -2949,10 +2949,10 @@ H5CX_get_vds_prefix(const char **vds_prefix)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vds_prefix);
+ assert(vds_prefix);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dapl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dapl_id);
/* Check if the value has been retrieved already */
if (!(*head)->ctx.vds_prefix_valid) {
@@ -3007,7 +3007,7 @@ H5CX_set_tag(haddr_t tag)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
(*head)->ctx.tag = tag;
@@ -3035,7 +3035,7 @@ H5CX_set_ring(H5AC_ring_t ring)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
(*head)->ctx.ring = ring;
@@ -3065,7 +3065,7 @@ H5CX_set_coll_metadata_read(hbool_t cmdr)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
(*head)->ctx.coll_metadata_read = cmdr;
@@ -3097,7 +3097,7 @@ H5CX_set_mpi_coll_datatypes(MPI_Datatype btype, MPI_Datatype ftype)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context values */
(*head)->ctx.btype = btype;
@@ -3128,7 +3128,7 @@ H5CX_set_io_xfer_mode(H5FD_mpio_xfer_t io_xfer_mode)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
(*head)->ctx.io_xfer_mode = io_xfer_mode;
@@ -3161,7 +3161,7 @@ H5CX_set_mpio_coll_opt(H5FD_mpio_collective_opt_t mpio_coll_opt)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
(*head)->ctx.mpio_coll_opt = mpio_coll_opt;
@@ -3193,7 +3193,7 @@ H5CX_set_mpi_file_flushing(hbool_t flushing)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
(*head)->ctx.mpi_file_flushing = flushing;
@@ -3222,7 +3222,7 @@ H5CX_set_mpio_rank0_bcast(hbool_t rank0_bcast)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
(*head)->ctx.rank0_bcast = rank0_bcast;
@@ -3252,7 +3252,7 @@ H5CX_set_vlen_alloc_info(H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
(*head)->ctx.vl_alloc_info.alloc_func = alloc_func;
@@ -3288,7 +3288,7 @@ H5CX_set_nlinks(size_t nlinks)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Set the API context value */
(*head)->ctx.nlinks = nlinks;
@@ -3322,8 +3322,8 @@ H5CX_set_mpio_actual_chunk_opt(H5D_mpio_actual_chunk_opt_mode_t mpio_actual_chun
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
/* Cache the value for later, marking it to set in DXPL when context popped */
(*head)->ctx.mpio_actual_chunk_opt = mpio_actual_chunk_opt;
@@ -3353,8 +3353,8 @@ H5CX_set_mpio_actual_io_mode(H5D_mpio_actual_io_mode_t mpio_actual_io_mode)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
/* Cache the value for later, marking it to set in DXPL when context popped */
(*head)->ctx.mpio_actual_io_mode = mpio_actual_io_mode;
@@ -3384,8 +3384,8 @@ H5CX_set_mpio_local_no_coll_cause(uint32_t mpio_local_no_coll_cause)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert((*head)->ctx.dxpl_id != H5P_DEFAULT);
+ assert(head && *head);
+ assert((*head)->ctx.dxpl_id != H5P_DEFAULT);
/* If we're using the default DXPL, don't modify it */
if ((*head)->ctx.dxpl_id != H5P_DATASET_XFER_DEFAULT) {
@@ -3418,8 +3418,8 @@ H5CX_set_mpio_global_no_coll_cause(uint32_t mpio_global_no_coll_cause)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert((*head)->ctx.dxpl_id != H5P_DEFAULT);
+ assert(head && *head);
+ assert((*head)->ctx.dxpl_id != H5P_DEFAULT);
/* If we're using the default DXPL, don't modify it */
if ((*head)->ctx.dxpl_id != H5P_DATASET_XFER_DEFAULT) {
@@ -3457,8 +3457,8 @@ H5CX_test_set_mpio_coll_chunk_link_hard(int mpio_coll_chunk_link_hard)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_CHUNK_LINK_HARD_NAME, mpio_coll_chunk_link_hard)
@@ -3490,8 +3490,8 @@ H5CX_test_set_mpio_coll_chunk_multi_hard(int mpio_coll_chunk_multi_hard)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME, mpio_coll_chunk_multi_hard)
@@ -3523,8 +3523,8 @@ H5CX_test_set_mpio_coll_chunk_link_num_true(int mpio_coll_chunk_link_num_true)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME, mpio_coll_chunk_link_num_true)
@@ -3557,8 +3557,8 @@ H5CX_test_set_mpio_coll_chunk_link_num_false(int mpio_coll_chunk_link_num_false)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME, mpio_coll_chunk_link_num_false)
@@ -3591,8 +3591,8 @@ H5CX_test_set_mpio_coll_chunk_multi_ratio_coll(int mpio_coll_chunk_multi_ratio_c
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME, mpio_coll_chunk_multi_ratio_coll)
@@ -3625,8 +3625,8 @@ H5CX_test_set_mpio_coll_chunk_multi_ratio_ind(int mpio_coll_chunk_multi_ratio_in
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME, mpio_coll_chunk_multi_ratio_ind)
@@ -3658,8 +3658,8 @@ H5CX_test_set_mpio_coll_rank0_bcast(hbool_t mpio_coll_rank0_bcast)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
+ assert(head && *head);
+ assert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
H5CX_TEST_SET_PROP(H5D_XFER_COLL_RANK0_BCAST_NAME, mpio_coll_rank0_bcast)
@@ -3691,8 +3691,8 @@ H5CX_set_no_selection_io_cause(uint32_t no_selection_io_cause)
/* Sanity checks */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert((*head)->ctx.dxpl_id != H5P_DEFAULT);
+ assert(head && *head);
+ assert((*head)->ctx.dxpl_id != H5P_DEFAULT);
/* If we're using the default DXPL, don't modify it */
if ((*head)->ctx.dxpl_id != H5P_DATASET_XFER_DEFAULT) {
@@ -3725,10 +3725,10 @@ H5CX_get_ohdr_flags(uint8_t *ohdr_flags)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(ohdr_flags);
+ assert(ohdr_flags);
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
- HDassert(H5P_DEFAULT != (*head)->ctx.dcpl_id);
+ assert(head && *head);
+ assert(H5P_DEFAULT != (*head)->ctx.dcpl_id);
H5CX_RETRIEVE_PROP_VALID(dcpl, H5P_DATASET_CREATE_DEFAULT, H5O_CRT_OHDR_FLAGS_NAME, ohdr_flags)
@@ -3761,7 +3761,7 @@ H5CX__pop_common(hbool_t update_dxpl_props)
/* Sanity check */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- HDassert(head && *head);
+ assert(head && *head);
/* Check for cached DXPL properties to return to application */
if (update_dxpl_props) {
diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c
index ed95bcd..3ad67a1 100644
--- a/src/H5Cdbg.c
+++ b/src/H5Cdbg.c
@@ -85,9 +85,9 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_name != NULL);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_name != NULL);
/* First, create a skip list */
if (NULL == (slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
@@ -101,7 +101,7 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name)
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (H5SL_insert(slist_ptr, entry_ptr, &(entry_ptr->addr)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "can't insert entry in skip list")
@@ -113,40 +113,40 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name)
* skip list -- scan the skip list generating the desired output.
*/
- HDfprintf(stdout, "\n\nDump of metadata cache \"%s\"\n", cache_name);
+ fprintf(stdout, "\n\nDump of metadata cache \"%s\"\n", cache_name);
/* Print header */
- HDfprintf(stdout, "Entry ");
- HDfprintf(stdout, "| Address ");
- HDfprintf(stdout, "| Tag ");
- HDfprintf(stdout, "| Size ");
- HDfprintf(stdout, "| Ring ");
- HDfprintf(stdout, "| Type ");
- HDfprintf(stdout, "| Prot/Pin/Dirty");
- HDfprintf(stdout, "\n");
-
- HDfprintf(stdout, "--------------------------------------------------------------------------------------"
- "--------------------------\n");
+ fprintf(stdout, "Entry ");
+ fprintf(stdout, "| Address ");
+ fprintf(stdout, "| Tag ");
+ fprintf(stdout, "| Size ");
+ fprintf(stdout, "| Ring ");
+ fprintf(stdout, "| Type ");
+ fprintf(stdout, "| Prot/Pin/Dirty");
+ fprintf(stdout, "\n");
+
+ fprintf(stdout, "--------------------------------------------------------------------------------------"
+ "--------------------------\n");
i = 0;
entry_ptr = (H5C_cache_entry_t *)H5SL_remove_first(slist_ptr);
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Print entry */
- HDfprintf(stdout, "%s%5d ", cache_ptr->prefix, i);
- HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr));
+ fprintf(stdout, "%s%5d ", cache_ptr->prefix, i);
+ fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr));
if (NULL == entry_ptr->tag_info)
- HDfprintf(stdout, " %16s ", "N/A");
+ fprintf(stdout, " %16s ", "N/A");
else
- HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag));
- HDfprintf(stdout, " %5lld ", (long long)(entry_ptr->size));
- HDfprintf(stdout, " %d ", (int)(entry_ptr->ring));
- HDfprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name));
- HDfprintf(stdout, " %d", (int)(entry_ptr->is_protected));
- HDfprintf(stdout, " %d", (int)(entry_ptr->is_pinned));
- HDfprintf(stdout, " %d", (int)(entry_ptr->is_dirty));
- HDfprintf(stdout, "\n");
+ fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag));
+ fprintf(stdout, " %5lld ", (long long)(entry_ptr->size));
+ fprintf(stdout, " %d ", (int)(entry_ptr->ring));
+ fprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name));
+ fprintf(stdout, " %d", (int)(entry_ptr->is_protected));
+ fprintf(stdout, " %d", (int)(entry_ptr->is_pinned));
+ fprintf(stdout, " %d", (int)(entry_ptr->is_dirty));
+ fprintf(stdout, "\n");
/* remove the next (first) item in the skip list */
entry_ptr = (H5C_cache_entry_t *)H5SL_remove_first(slist_ptr);
@@ -154,10 +154,10 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name)
i++;
} /* end while */
- HDfprintf(stdout, "\n\n");
+ fprintf(stdout, "\n\n");
/* Verify that all the entries were removed from the skip list */
- HDassert(H5SL_count(slist_ptr) == 0);
+ assert(H5SL_count(slist_ptr) == 0);
done:
/* Discard the skip list */
@@ -192,55 +192,55 @@ H5C_dump_cache_LRU(H5C_t *cache_ptr, const char *cache_name)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_name != NULL);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_name != NULL);
- HDfprintf(stdout, "\n\nDump of metadata cache LRU \"%s\"\n", cache_name);
- HDfprintf(stdout, "LRU len = %d, LRU size = %d\n", cache_ptr->LRU_list_len,
- (int)(cache_ptr->LRU_list_size));
- HDfprintf(stdout, "index_size = %d, max_cache_size = %d, delta = %d\n\n", (int)(cache_ptr->index_size),
- (int)(cache_ptr->max_cache_size),
- (int)(cache_ptr->max_cache_size) - (int)(cache_ptr->index_size));
+ fprintf(stdout, "\n\nDump of metadata cache LRU \"%s\"\n", cache_name);
+ fprintf(stdout, "LRU len = %d, LRU size = %d\n", cache_ptr->LRU_list_len,
+ (int)(cache_ptr->LRU_list_size));
+ fprintf(stdout, "index_size = %d, max_cache_size = %d, delta = %d\n\n", (int)(cache_ptr->index_size),
+ (int)(cache_ptr->max_cache_size),
+ (int)(cache_ptr->max_cache_size) - (int)(cache_ptr->index_size));
/* Print header */
- HDfprintf(stdout, "Entry ");
- HDfprintf(stdout, "| Address ");
- HDfprintf(stdout, "| Tag ");
- HDfprintf(stdout, "| Size ");
- HDfprintf(stdout, "| Ring ");
- HDfprintf(stdout, "| Type ");
- HDfprintf(stdout, "| Dirty");
- HDfprintf(stdout, "\n");
-
- HDfprintf(stdout, "--------------------------------------------------------------------------------------"
- "--------------------------\n");
+ fprintf(stdout, "Entry ");
+ fprintf(stdout, "| Address ");
+ fprintf(stdout, "| Tag ");
+ fprintf(stdout, "| Size ");
+ fprintf(stdout, "| Ring ");
+ fprintf(stdout, "| Type ");
+ fprintf(stdout, "| Dirty");
+ fprintf(stdout, "\n");
+
+ fprintf(stdout, "--------------------------------------------------------------------------------------"
+ "--------------------------\n");
entry_ptr = cache_ptr->LRU_head_ptr;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Print entry */
- HDfprintf(stdout, "%s%5d ", cache_ptr->prefix, i);
- HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr));
+ fprintf(stdout, "%s%5d ", cache_ptr->prefix, i);
+ fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr));
if (NULL == entry_ptr->tag_info)
- HDfprintf(stdout, " %16s ", "N/A");
+ fprintf(stdout, " %16s ", "N/A");
else
- HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag));
+ fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag));
- HDfprintf(stdout, " %5lld ", (long long)(entry_ptr->size));
- HDfprintf(stdout, " %d ", (int)(entry_ptr->ring));
- HDfprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name));
- HDfprintf(stdout, " %d", (int)(entry_ptr->is_dirty));
- HDfprintf(stdout, "\n");
+ fprintf(stdout, " %5lld ", (long long)(entry_ptr->size));
+ fprintf(stdout, " %d ", (int)(entry_ptr->ring));
+ fprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name));
+ fprintf(stdout, " %d", (int)(entry_ptr->is_dirty));
+ fprintf(stdout, "\n");
i++;
entry_ptr = entry_ptr->next;
} /* end while */
- HDfprintf(stdout, "--------------------------------------------------------------------------------------"
- "--------------------------\n");
+ fprintf(stdout, "--------------------------------------------------------------------------------------"
+ "--------------------------\n");
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5C_dump_cache_LRU() */
@@ -272,21 +272,21 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn)
FUNC_ENTER_NOAPI_NOERR
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(calling_fcn != NULL);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(calling_fcn != NULL);
- HDfprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n", calling_fcn);
- HDfprintf(stdout, " slist %s.\n", cache_ptr->slist_enabled ? "enabled" : "disabled");
- HDfprintf(stdout, " slist len = %" PRIu32 ".\n", cache_ptr->slist_len);
- HDfprintf(stdout, " slist size = %zu.\n", cache_ptr->slist_size);
+ fprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n", calling_fcn);
+ fprintf(stdout, " slist %s.\n", cache_ptr->slist_enabled ? "enabled" : "disabled");
+ fprintf(stdout, " slist len = %" PRIu32 ".\n", cache_ptr->slist_len);
+ fprintf(stdout, " slist size = %zu.\n", cache_ptr->slist_size);
if (cache_ptr->slist_len > 0) {
/* If we get this far, all entries in the cache are listed in the
* skip list -- scan the skip list generating the desired output.
*/
- HDfprintf(stdout, "Num: Addr: Len: Prot/Pind: Dirty: Type:\n");
+ fprintf(stdout, "Num: Addr: Len: Prot/Pind: Dirty: Type:\n");
i = 0;
@@ -297,12 +297,12 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn)
entry_ptr = NULL;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDfprintf(stdout, "%s%d 0x%016llx %4lld %d/%d %d %s\n", cache_ptr->prefix, i,
- (long long)(entry_ptr->addr), (long long)(entry_ptr->size),
- (int)(entry_ptr->is_protected), (int)(entry_ptr->is_pinned), (int)(entry_ptr->is_dirty),
- entry_ptr->type->name);
- HDfprintf(stdout, " node_ptr = %p, item = %p\n", (void *)node_ptr, H5SL_item(node_ptr));
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ fprintf(stdout, "%s%d 0x%016llx %4lld %d/%d %d %s\n", cache_ptr->prefix, i,
+ (long long)(entry_ptr->addr), (long long)(entry_ptr->size),
+ (int)(entry_ptr->is_protected), (int)(entry_ptr->is_pinned), (int)(entry_ptr->is_dirty),
+ entry_ptr->type->name);
+ fprintf(stdout, " node_ptr = %p, item = %p\n", (void *)node_ptr, H5SL_item(node_ptr));
/* increment node_ptr before we delete its target */
node_ptr = H5SL_next(node_ptr);
@@ -315,7 +315,7 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn)
} /* end while */
} /* end if */
- HDfprintf(stdout, "\n\n");
+ fprintf(stdout, "\n\n");
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_dump_cache_skip_list() */
@@ -416,7 +416,7 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name,
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* This would normally be an assert, but we need to use an HGOTO_ERROR
* call to shut up the compiler.
@@ -481,157 +481,154 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name,
average_failed_search_depth =
((double)(cache_ptr->total_failed_ht_search_depth)) / ((double)(cache_ptr->failed_ht_searches));
- HDfprintf(stdout, "\n%sH5C: cache statistics for %s\n", cache_ptr->prefix, cache_name);
+ fprintf(stdout, "\n%sH5C: cache statistics for %s\n", cache_ptr->prefix, cache_name);
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
- HDfprintf(stdout, "%s hash table insertion / deletions = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->total_ht_insertions), (long)(cache_ptr->total_ht_deletions));
+ fprintf(stdout, "%s hash table insertion / deletions = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->total_ht_insertions), (long)(cache_ptr->total_ht_deletions));
- HDfprintf(stdout, "%s HT successful / failed searches = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->successful_ht_searches), (long)(cache_ptr->failed_ht_searches));
+ fprintf(stdout, "%s HT successful / failed searches = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->successful_ht_searches), (long)(cache_ptr->failed_ht_searches));
- HDfprintf(stdout, "%s Av. HT suc / failed search depth = %f / %f\n", cache_ptr->prefix,
- average_successful_search_depth, average_failed_search_depth);
+ fprintf(stdout, "%s Av. HT suc / failed search depth = %f / %f\n", cache_ptr->prefix,
+ average_successful_search_depth, average_failed_search_depth);
- HDfprintf(stdout, "%s current (max) index size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
- (long)(cache_ptr->index_size), (long)(cache_ptr->max_index_size),
- (unsigned long)(cache_ptr->index_len), (unsigned long)(cache_ptr->max_index_len));
+ fprintf(stdout, "%s current (max) index size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
+ (long)(cache_ptr->index_size), (long)(cache_ptr->max_index_size),
+ (unsigned long)(cache_ptr->index_len), (unsigned long)(cache_ptr->max_index_len));
- HDfprintf(stdout, "%s current (max) clean/dirty idx size = %ld (%ld) / %ld (%ld)\n", cache_ptr->prefix,
- (long)(cache_ptr->clean_index_size), (long)(cache_ptr->max_clean_index_size),
- (long)(cache_ptr->dirty_index_size), (long)(cache_ptr->max_dirty_index_size));
+ fprintf(stdout, "%s current (max) clean/dirty idx size = %ld (%ld) / %ld (%ld)\n", cache_ptr->prefix,
+ (long)(cache_ptr->clean_index_size), (long)(cache_ptr->max_clean_index_size),
+ (long)(cache_ptr->dirty_index_size), (long)(cache_ptr->max_dirty_index_size));
- HDfprintf(stdout, "%s current (max) slist size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
- (long)(cache_ptr->slist_size), (long)(cache_ptr->max_slist_size),
- (unsigned long)(cache_ptr->slist_len), (unsigned long)(cache_ptr->max_slist_len));
+ fprintf(stdout, "%s current (max) slist size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
+ (long)(cache_ptr->slist_size), (long)(cache_ptr->max_slist_size),
+ (unsigned long)(cache_ptr->slist_len), (unsigned long)(cache_ptr->max_slist_len));
- HDfprintf(stdout, "%s current (max) PL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
- (long)(cache_ptr->pl_size), (long)(cache_ptr->max_pl_size), (unsigned long)(cache_ptr->pl_len),
- (unsigned long)(cache_ptr->max_pl_len));
+ fprintf(stdout, "%s current (max) PL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
+ (long)(cache_ptr->pl_size), (long)(cache_ptr->max_pl_size), (unsigned long)(cache_ptr->pl_len),
+ (unsigned long)(cache_ptr->max_pl_len));
- HDfprintf(stdout, "%s current (max) PEL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
- (long)(cache_ptr->pel_size), (long)(cache_ptr->max_pel_size),
- (unsigned long)(cache_ptr->pel_len), (unsigned long)(cache_ptr->max_pel_len));
+ fprintf(stdout, "%s current (max) PEL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix,
+ (long)(cache_ptr->pel_size), (long)(cache_ptr->max_pel_size), (unsigned long)(cache_ptr->pel_len),
+ (unsigned long)(cache_ptr->max_pel_len));
- HDfprintf(stdout, "%s current LRU list size / length = %ld / %lu\n", cache_ptr->prefix,
- (long)(cache_ptr->LRU_list_size), (unsigned long)(cache_ptr->LRU_list_len));
+ fprintf(stdout, "%s current LRU list size / length = %ld / %lu\n", cache_ptr->prefix,
+ (long)(cache_ptr->LRU_list_size), (unsigned long)(cache_ptr->LRU_list_len));
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- HDfprintf(stdout, "%s current clean LRU size / length = %ld / %lu\n", cache_ptr->prefix,
- (long)(cache_ptr->cLRU_list_size), (unsigned long)(cache_ptr->cLRU_list_len));
+ fprintf(stdout, "%s current clean LRU size / length = %ld / %lu\n", cache_ptr->prefix,
+ (long)(cache_ptr->cLRU_list_size), (unsigned long)(cache_ptr->cLRU_list_len));
- HDfprintf(stdout, "%s current dirty LRU size / length = %ld / %lu\n", cache_ptr->prefix,
- (long)(cache_ptr->dLRU_list_size), (unsigned long)(cache_ptr->dLRU_list_len));
+ fprintf(stdout, "%s current dirty LRU size / length = %ld / %lu\n", cache_ptr->prefix,
+ (long)(cache_ptr->dLRU_list_size), (unsigned long)(cache_ptr->dLRU_list_len));
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
- HDfprintf(stdout, "%s Total hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix,
- (long)total_hits, (long)total_misses, hit_rate);
+ fprintf(stdout, "%s Total hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix,
+ (long)total_hits, (long)total_misses, hit_rate);
- HDfprintf(stdout, "%s Total write / read (max) protects = %ld / %ld (%ld)\n", cache_ptr->prefix,
- (long)total_write_protects, (long)total_read_protects, (long)max_read_protects);
+ fprintf(stdout, "%s Total write / read (max) protects = %ld / %ld (%ld)\n", cache_ptr->prefix,
+ (long)total_write_protects, (long)total_read_protects, (long)max_read_protects);
- HDfprintf(stdout, "%s Total clears / flushes = %ld / %ld\n", cache_ptr->prefix,
- (long)total_clears, (long)total_flushes);
+ fprintf(stdout, "%s Total clears / flushes = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_clears, (long)total_flushes);
- HDfprintf(stdout, "%s Total evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix,
- (long)total_evictions, (long)total_take_ownerships);
+ fprintf(stdout, "%s Total evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_evictions, (long)total_take_ownerships);
- HDfprintf(stdout, "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix,
- (long)total_insertions, (long)total_pinned_insertions, (long)total_moves);
+ fprintf(stdout, "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix,
+ (long)total_insertions, (long)total_pinned_insertions, (long)total_moves);
- HDfprintf(stdout, "%s Total entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix,
- (long)total_entry_flush_moves, (long)total_cache_flush_moves);
+ fprintf(stdout, "%s Total entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_entry_flush_moves, (long)total_cache_flush_moves);
- HDfprintf(stdout, "%s Total entry size incrs / decrs = %ld / %ld\n", cache_ptr->prefix,
- (long)total_size_increases, (long)total_size_decreases);
+ fprintf(stdout, "%s Total entry size incrs / decrs = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_size_increases, (long)total_size_decreases);
- HDfprintf(stdout, "%s Ttl entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix,
- (long)total_entry_flush_size_changes, (long)total_cache_flush_size_changes);
+ fprintf(stdout, "%s Ttl entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_entry_flush_size_changes, (long)total_cache_flush_size_changes);
- HDfprintf(stdout, "%s Total entry pins (dirty) / unpins = %ld (%ld) / %ld\n", cache_ptr->prefix,
- (long)total_pins, (long)total_dirty_pins, (long)total_unpins);
+ fprintf(stdout, "%s Total entry pins (dirty) / unpins = %ld (%ld) / %ld\n", cache_ptr->prefix,
+ (long)total_pins, (long)total_dirty_pins, (long)total_unpins);
- HDfprintf(stdout, "%s Total pinned flushes / clears = %ld / %ld\n", cache_ptr->prefix,
- (long)total_pinned_flushes, (long)total_pinned_clears);
+ fprintf(stdout, "%s Total pinned flushes / clears = %ld / %ld\n", cache_ptr->prefix,
+ (long)total_pinned_flushes, (long)total_pinned_clears);
- HDfprintf(stdout, "%s MSIC: (make space in cache) calls = %lld\n", cache_ptr->prefix,
- (long long)(cache_ptr->calls_to_msic));
+ fprintf(stdout, "%s MSIC: (make space in cache) calls = %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->calls_to_msic));
if (cache_ptr->calls_to_msic > 0)
average_entries_skipped_per_calls_to_msic =
(((double)(cache_ptr->total_entries_skipped_in_msic)) / ((double)(cache_ptr->calls_to_msic)));
- HDfprintf(stdout, "%s MSIC: Average/max entries skipped = %lf / %ld\n", cache_ptr->prefix,
- (double)average_entries_skipped_per_calls_to_msic,
- (long)(cache_ptr->max_entries_skipped_in_msic));
+ fprintf(stdout, "%s MSIC: Average/max entries skipped = %lf / %ld\n", cache_ptr->prefix,
+ (double)average_entries_skipped_per_calls_to_msic,
+ (long)(cache_ptr->max_entries_skipped_in_msic));
if (cache_ptr->calls_to_msic > 0)
average_dirty_pf_entries_skipped_per_call_to_msic =
(((double)(cache_ptr->total_dirty_pf_entries_skipped_in_msic)) /
((double)(cache_ptr->calls_to_msic)));
- HDfprintf(stdout, "%s MSIC: Average/max dirty pf entries skipped = %lf / %ld\n", cache_ptr->prefix,
- average_dirty_pf_entries_skipped_per_call_to_msic,
- (long)(cache_ptr->max_dirty_pf_entries_skipped_in_msic));
+ fprintf(stdout, "%s MSIC: Average/max dirty pf entries skipped = %lf / %ld\n", cache_ptr->prefix,
+ average_dirty_pf_entries_skipped_per_call_to_msic,
+ (long)(cache_ptr->max_dirty_pf_entries_skipped_in_msic));
if (cache_ptr->calls_to_msic > 0)
average_entries_scanned_per_calls_to_msic =
(((double)(cache_ptr->total_entries_scanned_in_msic)) / ((double)(cache_ptr->calls_to_msic)));
- HDfprintf(stdout, "%s MSIC: Average/max entries scanned = %lf / %ld\n", cache_ptr->prefix,
- (double)average_entries_scanned_per_calls_to_msic,
- (long)(cache_ptr->max_entries_scanned_in_msic));
+ fprintf(stdout, "%s MSIC: Average/max entries scanned = %lf / %ld\n", cache_ptr->prefix,
+ (double)average_entries_scanned_per_calls_to_msic,
+ (long)(cache_ptr->max_entries_scanned_in_msic));
- HDfprintf(stdout, "%s MSIC: Scanned to make space(evict) = %lld\n", cache_ptr->prefix,
- (long long)(cache_ptr->entries_scanned_to_make_space));
+ fprintf(stdout, "%s MSIC: Scanned to make space(evict) = %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->entries_scanned_to_make_space));
- HDfprintf(
- stdout, "%s MSIC: Scanned to satisfy min_clean = %lld\n", cache_ptr->prefix,
- (long long)(cache_ptr->total_entries_scanned_in_msic - cache_ptr->entries_scanned_to_make_space));
+ fprintf(stdout, "%s MSIC: Scanned to satisfy min_clean = %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->total_entries_scanned_in_msic - cache_ptr->entries_scanned_to_make_space));
- HDfprintf(stdout, "%s slist/LRU/index scan restarts = %lld / %lld / %lld.\n", cache_ptr->prefix,
- (long long)(cache_ptr->slist_scan_restarts), (long long)(cache_ptr->LRU_scan_restarts),
- (long long)(cache_ptr->index_scan_restarts));
+ fprintf(stdout, "%s slist/LRU/index scan restarts = %lld / %lld / %lld.\n", cache_ptr->prefix,
+ (long long)(cache_ptr->slist_scan_restarts), (long long)(cache_ptr->LRU_scan_restarts),
+ (long long)(cache_ptr->index_scan_restarts));
- HDfprintf(stdout, "%s cache image creations/reads/loads/size = %d / %d /%d / %" PRIuHSIZE "\n",
- cache_ptr->prefix, cache_ptr->images_created, cache_ptr->images_read, cache_ptr->images_loaded,
- cache_ptr->last_image_size);
+ fprintf(stdout, "%s cache image creations/reads/loads/size = %d / %d /%d / %" PRIuHSIZE "\n",
+ cache_ptr->prefix, cache_ptr->images_created, cache_ptr->images_read, cache_ptr->images_loaded,
+ cache_ptr->last_image_size);
- HDfprintf(stdout, "%s prefetches / dirty prefetches = %lld / %lld\n", cache_ptr->prefix,
- (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches));
+ fprintf(stdout, "%s prefetches / dirty prefetches = %lld / %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches));
- HDfprintf(stdout, "%s prefetch hits/flushes/evictions = %lld / %lld / %lld\n", cache_ptr->prefix,
- (long long)(cache_ptr->prefetch_hits),
- (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]),
- (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]));
+ fprintf(stdout, "%s prefetch hits/flushes/evictions = %lld / %lld / %lld\n", cache_ptr->prefix,
+ (long long)(cache_ptr->prefetch_hits), (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]),
+ (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]));
if (cache_ptr->prefetches > 0)
prefetch_use_rate = 100.0 * ((double)(cache_ptr->prefetch_hits)) / ((double)(cache_ptr->prefetches));
else
prefetch_use_rate = 0.0;
- HDfprintf(stdout, "%s prefetched entry use rate = %lf\n", cache_ptr->prefix, prefetch_use_rate);
+ fprintf(stdout, "%s prefetched entry use rate = %lf\n", cache_ptr->prefix, prefetch_use_rate);
#if H5C_COLLECT_CACHE_ENTRY_STATS
- HDfprintf(stdout, "%s aggregate max / min accesses = %d / %d\n", cache_ptr->prefix,
- (int)aggregate_max_accesses, (int)aggregate_min_accesses);
+ fprintf(stdout, "%s aggregate max / min accesses = %d / %d\n", cache_ptr->prefix,
+ (int)aggregate_max_accesses, (int)aggregate_min_accesses);
- HDfprintf(stdout, "%s aggregate max_clears / max_flushes = %d / %d\n", cache_ptr->prefix,
- (int)aggregate_max_clears, (int)aggregate_max_flushes);
+ fprintf(stdout, "%s aggregate max_clears / max_flushes = %d / %d\n", cache_ptr->prefix,
+ (int)aggregate_max_clears, (int)aggregate_max_flushes);
- HDfprintf(stdout, "%s aggregate max_size / max_pins = %d / %d\n", cache_ptr->prefix,
- (int)aggregate_max_size, (int)aggregate_max_pins);
+ fprintf(stdout, "%s aggregate max_size / max_pins = %d / %d\n", cache_ptr->prefix,
+ (int)aggregate_max_size, (int)aggregate_max_pins);
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
if (display_detailed_stats) {
for (i = 0; i <= cache_ptr->max_type_id; i++) {
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
- HDfprintf(stdout, "%s Stats on %s:\n", cache_ptr->prefix,
- ((cache_ptr->class_table_ptr))[i]->name);
+ fprintf(stdout, "%s Stats on %s:\n", cache_ptr->prefix, ((cache_ptr->class_table_ptr))[i]->name);
if ((cache_ptr->hits[i] > 0) || (cache_ptr->misses[i] > 0))
hit_rate = 100.0 * ((double)(cache_ptr->hits[i])) /
@@ -639,56 +636,56 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name,
else
hit_rate = 0.0;
- HDfprintf(stdout, "%s hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix,
- (long)(cache_ptr->hits[i]), (long)(cache_ptr->misses[i]), hit_rate);
+ fprintf(stdout, "%s hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix,
+ (long)(cache_ptr->hits[i]), (long)(cache_ptr->misses[i]), hit_rate);
- HDfprintf(stdout, "%s write / read (max) protects = %ld / %ld (%d)\n", cache_ptr->prefix,
- (long)(cache_ptr->write_protects[i]), (long)(cache_ptr->read_protects[i]),
- (int)(cache_ptr->max_read_protects[i]));
+ fprintf(stdout, "%s write / read (max) protects = %ld / %ld (%d)\n", cache_ptr->prefix,
+ (long)(cache_ptr->write_protects[i]), (long)(cache_ptr->read_protects[i]),
+ (int)(cache_ptr->max_read_protects[i]));
- HDfprintf(stdout, "%s clears / flushes = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->clears[i]), (long)(cache_ptr->flushes[i]));
+ fprintf(stdout, "%s clears / flushes = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->clears[i]), (long)(cache_ptr->flushes[i]));
- HDfprintf(stdout, "%s evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->evictions[i]), (long)(cache_ptr->take_ownerships[i]));
+ fprintf(stdout, "%s evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->evictions[i]), (long)(cache_ptr->take_ownerships[i]));
- HDfprintf(stdout, "%s insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->insertions[i]), (long)(cache_ptr->pinned_insertions[i]),
- (long)(cache_ptr->moves[i]));
+ fprintf(stdout, "%s insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->insertions[i]), (long)(cache_ptr->pinned_insertions[i]),
+ (long)(cache_ptr->moves[i]));
- HDfprintf(stdout, "%s entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->entry_flush_moves[i]), (long)(cache_ptr->cache_flush_moves[i]));
+ fprintf(stdout, "%s entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->entry_flush_moves[i]), (long)(cache_ptr->cache_flush_moves[i]));
- HDfprintf(stdout, "%s size increases / decreases = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->size_increases[i]), (long)(cache_ptr->size_decreases[i]));
+ fprintf(stdout, "%s size increases / decreases = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->size_increases[i]), (long)(cache_ptr->size_decreases[i]));
- HDfprintf(stdout, "%s entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->entry_flush_size_changes[i]),
- (long)(cache_ptr->cache_flush_size_changes[i]));
+ fprintf(stdout, "%s entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->entry_flush_size_changes[i]),
+ (long)(cache_ptr->cache_flush_size_changes[i]));
- HDfprintf(stdout, "%s entry pins / unpins = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->pins[i]), (long)(cache_ptr->unpins[i]));
+ fprintf(stdout, "%s entry pins / unpins = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->pins[i]), (long)(cache_ptr->unpins[i]));
- HDfprintf(stdout, "%s entry dirty pins/pin'd flushes = %ld / %ld\n", cache_ptr->prefix,
- (long)(cache_ptr->dirty_pins[i]), (long)(cache_ptr->pinned_flushes[i]));
+ fprintf(stdout, "%s entry dirty pins/pin'd flushes = %ld / %ld\n", cache_ptr->prefix,
+ (long)(cache_ptr->dirty_pins[i]), (long)(cache_ptr->pinned_flushes[i]));
#if H5C_COLLECT_CACHE_ENTRY_STATS
- HDfprintf(stdout, "%s entry max / min accesses = %d / %d\n", cache_ptr->prefix,
- cache_ptr->max_accesses[i], cache_ptr->min_accesses[i]);
+ fprintf(stdout, "%s entry max / min accesses = %d / %d\n", cache_ptr->prefix,
+ cache_ptr->max_accesses[i], cache_ptr->min_accesses[i]);
- HDfprintf(stdout, "%s entry max_clears / max_flushes = %d / %d\n", cache_ptr->prefix,
- cache_ptr->max_clears[i], cache_ptr->max_flushes[i]);
+ fprintf(stdout, "%s entry max_clears / max_flushes = %d / %d\n", cache_ptr->prefix,
+ cache_ptr->max_clears[i], cache_ptr->max_flushes[i]);
- HDfprintf(stdout, "%s entry max_size / max_pins = %d / %d\n", cache_ptr->prefix,
- (int)(cache_ptr->max_size[i]), (int)(cache_ptr->max_pins[i]));
+ fprintf(stdout, "%s entry max_size / max_pins = %d / %d\n", cache_ptr->prefix,
+ (int)(cache_ptr->max_size[i]), (int)(cache_ptr->max_pins[i]));
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
} /* end for */
} /* end if */
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -723,8 +720,8 @@ H5C_stats__reset(H5C_t H5_ATTR_UNUSED *cache_ptr)
int i;
#endif /* H5C_COLLECT_CACHE_STATS */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
#if H5C_COLLECT_CACHE_STATS
for (i = 0; i <= cache_ptr->max_type_id; i++) {
@@ -847,29 +844,29 @@ H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr, haddr_t child
FUNC_ENTER_NOAPI(NULL)
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(H5F_addr_defined(parent_addr));
- HDassert(H5F_addr_defined(child_addr));
- HDassert(fd_exists_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(H5F_addr_defined(parent_addr));
+ assert(H5F_addr_defined(child_addr));
+ assert(fd_exists_ptr);
H5C__SEARCH_INDEX(cache_ptr, parent_addr, parent_ptr, FAIL)
H5C__SEARCH_INDEX(cache_ptr, child_addr, child_ptr, FAIL)
if (parent_ptr && child_ptr) {
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(child_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(child_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (child_ptr->flush_dep_nparents > 0) {
unsigned u; /* Local index variable */
- HDassert(child_ptr->flush_dep_parent);
- HDassert(child_ptr->flush_dep_parent_nalloc >= child_ptr->flush_dep_nparents);
+ assert(child_ptr->flush_dep_parent);
+ assert(child_ptr->flush_dep_parent_nalloc >= child_ptr->flush_dep_nparents);
for (u = 0; u < child_ptr->flush_dep_nparents; u++) {
if (child_ptr->flush_dep_parent[u] == parent_ptr) {
fd_exists = TRUE;
- HDassert(parent_ptr->flush_dep_nchildren > 0);
+ assert(parent_ptr->flush_dep_nchildren > 0);
break;
} /* end if */
} /* end for */
@@ -918,8 +915,8 @@ H5C_validate_index_list(H5C_t *cache_ptr)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
for (i = 0; i < H5C_RING_NTYPES; i++) {
index_ring_len[i] = 0;
@@ -952,8 +949,8 @@ H5C_validate_index_list(H5C_t *cache_ptr)
((entry_ptr->il_next == NULL) || (entry_ptr->il_next->il_prev != entry_ptr)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index list pointers for entry are invalid")
- HDassert(entry_ptr->ring > 0);
- HDassert(entry_ptr->ring < H5C_RING_NTYPES);
+ assert(entry_ptr->ring > 0);
+ assert(entry_ptr->ring < H5C_RING_NTYPES);
len++;
index_ring_len[entry_ptr->ring] += 1;
@@ -993,7 +990,7 @@ H5C_validate_index_list(H5C_t *cache_ptr)
done:
if (ret_value != SUCCEED)
- HDassert(0);
+ assert(0);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_validate_index_list() */
@@ -1045,10 +1042,10 @@ H5C_get_entry_ptr_from_addr(H5C_t *cache_ptr, haddr_t addr, void **entry_ptr_ptr
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(H5F_addr_defined(addr));
- HDassert(entry_ptr_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(H5F_addr_defined(addr));
+ assert(entry_ptr_ptr);
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
@@ -1089,8 +1086,8 @@ H5C_get_serialization_in_progress(const H5C_t *cache_ptr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
FUNC_LEAVE_NOAPI(cache_ptr->serialization_in_progress)
} /* H5C_get_serialization_in_progress() */
@@ -1123,10 +1120,10 @@ H5C_cache_is_clean(const H5C_t *cache_ptr, H5C_ring_t inner_ring)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(inner_ring >= H5C_RING_USER);
- HDassert(inner_ring <= H5C_RING_SB);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(inner_ring >= H5C_RING_USER);
+ assert(inner_ring <= H5C_RING_SB);
while (ring <= inner_ring) {
if (cache_ptr->dirty_index_ring_size[ring] > 0)
@@ -1176,12 +1173,12 @@ H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr, const H5C_class_t *expecte
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(H5F_addr_defined(addr));
- HDassert(expected_type);
- HDassert(in_cache_ptr);
- HDassert(type_ok_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(H5F_addr_defined(addr));
+ assert(expected_type);
+ assert(in_cache_ptr);
+ assert(type_ok_ptr);
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
diff --git a/src/H5Cimage.c b/src/H5Cimage.c
index b8f46f1..b6e5712 100644
--- a/src/H5Cimage.c
+++ b/src/H5Cimage.c
@@ -95,13 +95,13 @@
#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_READ(cache_ptr) \
{ \
/* make sure image len is still good */ \
- HDassert((cache_ptr)->image_len > 0); \
+ assert((cache_ptr)->image_len > 0); \
(cache_ptr)->images_read++; \
}
#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_LOAD(cache_ptr) \
{ \
/* make sure image len is still good */ \
- HDassert((cache_ptr)->image_len > 0); \
+ assert((cache_ptr)->image_len > 0); \
(cache_ptr)->images_loaded++; \
(cache_ptr)->last_image_size = (cache_ptr)->image_len; \
}
@@ -195,8 +195,8 @@ H5C_cache_image_pending(const H5C_t *cache_ptr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
ret_value = (cache_ptr->load_image && !cache_ptr->image_loaded);
@@ -233,13 +233,13 @@ H5C_cache_image_status(H5F_t *f, hbool_t *load_ci_ptr, hbool_t *write_ci_ptr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(load_ci_ptr);
- HDassert(write_ci_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(load_ci_ptr);
+ assert(write_ci_ptr);
*load_ci_ptr = cache_ptr->load_image || cache_ptr->image_loaded;
*write_ci_ptr = cache_ptr->image_ctl.generate_image;
@@ -274,17 +274,17 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(cache_ptr == f->shared->cache);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
- HDassert(cache_ptr->image_ctl.generate_image);
- HDassert(cache_ptr->num_entries_in_image > 0);
- HDassert(cache_ptr->index_len == 0);
- HDassert(cache_ptr->image_data_len > 0);
- HDassert(cache_ptr->image_data_len <= cache_ptr->image_len);
+ assert(f);
+ assert(f->shared);
+ assert(cache_ptr == f->shared->cache);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
+ assert(cache_ptr->image_ctl.generate_image);
+ assert(cache_ptr->num_entries_in_image > 0);
+ assert(cache_ptr->index_len == 0);
+ assert(cache_ptr->image_data_len > 0);
+ assert(cache_ptr->image_data_len <= cache_ptr->image_len);
/* Allocate the buffer in which to construct the cache image block */
if (NULL == (cache_ptr->image_buffer = H5MM_malloc(cache_ptr->image_len + 1)))
@@ -294,13 +294,13 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr)
p = (uint8_t *)cache_ptr->image_buffer;
if (H5C__encode_cache_image_header(f, cache_ptr, &p) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTENCODE, FAIL, "header image construction failed")
- HDassert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_data_len);
+ assert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_data_len);
/* Construct the cache entry images */
for (u = 0; u < cache_ptr->num_entries_in_image; u++)
if (H5C__encode_cache_image_entry(f, cache_ptr, &p, u) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTENCODE, FAIL, "entry image construction failed")
- HDassert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_data_len);
+ assert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_data_len);
/* Construct the adaptive resize status image -- not yet */
@@ -308,8 +308,8 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr)
chksum = H5_checksum_metadata(cache_ptr->image_buffer,
(size_t)(cache_ptr->image_data_len - H5F_SIZEOF_CHKSUM), 0);
UINT32ENCODE(p, chksum);
- HDassert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) == cache_ptr->image_data_len);
- HDassert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) <= cache_ptr->image_len);
+ assert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) == cache_ptr->image_data_len);
+ assert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) <= cache_ptr->image_len);
#ifndef NDEBUG
/* validate the metadata cache image we just constructed by decoding it
@@ -323,21 +323,21 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr)
herr_t status; /* Status from decoding */
fake_cache_ptr = (H5C_t *)H5MM_malloc(sizeof(H5C_t));
- HDassert(fake_cache_ptr);
+ assert(fake_cache_ptr);
fake_cache_ptr->magic = H5C__H5C_T_MAGIC;
/* needed for sanity checks */
fake_cache_ptr->image_len = cache_ptr->image_len;
q = (const uint8_t *)cache_ptr->image_buffer;
status = H5C__decode_cache_image_header(f, fake_cache_ptr, &q);
- HDassert(status >= 0);
+ assert(status >= 0);
- HDassert(NULL != p);
- HDassert(fake_cache_ptr->num_entries_in_image == cache_ptr->num_entries_in_image);
+ assert(NULL != p);
+ assert(fake_cache_ptr->num_entries_in_image == cache_ptr->num_entries_in_image);
fake_cache_ptr->image_entries = (H5C_image_entry_t *)H5MM_malloc(
sizeof(H5C_image_entry_t) * (size_t)(fake_cache_ptr->num_entries_in_image + 1));
- HDassert(fake_cache_ptr->image_entries);
+ assert(fake_cache_ptr->image_entries);
for (u = 0; u < fake_cache_ptr->num_entries_in_image; u++) {
fake_cache_ptr->image_entries[u].magic = H5C_IMAGE_ENTRY_T_MAGIC;
@@ -346,58 +346,58 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr)
/* touch up f->shared->cache to satisfy sanity checks... */
f->shared->cache = fake_cache_ptr;
status = H5C__decode_cache_image_entry(f, fake_cache_ptr, &q, u);
- HDassert(status >= 0);
+ assert(status >= 0);
/* ...and then return f->shared->cache to its correct value */
f->shared->cache = cache_ptr;
/* verify expected contents */
- HDassert(cache_ptr->image_entries[u].addr == fake_cache_ptr->image_entries[u].addr);
- HDassert(cache_ptr->image_entries[u].size == fake_cache_ptr->image_entries[u].size);
- HDassert(cache_ptr->image_entries[u].type_id == fake_cache_ptr->image_entries[u].type_id);
- HDassert(cache_ptr->image_entries[u].lru_rank == fake_cache_ptr->image_entries[u].lru_rank);
- HDassert(cache_ptr->image_entries[u].is_dirty == fake_cache_ptr->image_entries[u].is_dirty);
+ assert(cache_ptr->image_entries[u].addr == fake_cache_ptr->image_entries[u].addr);
+ assert(cache_ptr->image_entries[u].size == fake_cache_ptr->image_entries[u].size);
+ assert(cache_ptr->image_entries[u].type_id == fake_cache_ptr->image_entries[u].type_id);
+ assert(cache_ptr->image_entries[u].lru_rank == fake_cache_ptr->image_entries[u].lru_rank);
+ assert(cache_ptr->image_entries[u].is_dirty == fake_cache_ptr->image_entries[u].is_dirty);
/* don't check image_fd_height as it is not stored in
* the metadata cache image block.
*/
- HDassert(cache_ptr->image_entries[u].fd_child_count ==
- fake_cache_ptr->image_entries[u].fd_child_count);
- HDassert(cache_ptr->image_entries[u].fd_dirty_child_count ==
- fake_cache_ptr->image_entries[u].fd_dirty_child_count);
- HDassert(cache_ptr->image_entries[u].fd_parent_count ==
- fake_cache_ptr->image_entries[u].fd_parent_count);
+ assert(cache_ptr->image_entries[u].fd_child_count ==
+ fake_cache_ptr->image_entries[u].fd_child_count);
+ assert(cache_ptr->image_entries[u].fd_dirty_child_count ==
+ fake_cache_ptr->image_entries[u].fd_dirty_child_count);
+ assert(cache_ptr->image_entries[u].fd_parent_count ==
+ fake_cache_ptr->image_entries[u].fd_parent_count);
for (v = 0; v < cache_ptr->image_entries[u].fd_parent_count; v++)
- HDassert(cache_ptr->image_entries[u].fd_parent_addrs[v] ==
- fake_cache_ptr->image_entries[u].fd_parent_addrs[v]);
+ assert(cache_ptr->image_entries[u].fd_parent_addrs[v] ==
+ fake_cache_ptr->image_entries[u].fd_parent_addrs[v]);
/* free the fd_parent_addrs array if it exists */
if (fake_cache_ptr->image_entries[u].fd_parent_addrs) {
- HDassert(fake_cache_ptr->image_entries[u].fd_parent_count > 0);
+ assert(fake_cache_ptr->image_entries[u].fd_parent_count > 0);
fake_cache_ptr->image_entries[u].fd_parent_addrs =
(haddr_t *)H5MM_xfree(fake_cache_ptr->image_entries[u].fd_parent_addrs);
fake_cache_ptr->image_entries[u].fd_parent_count = 0;
} /* end if */
else
- HDassert(fake_cache_ptr->image_entries[u].fd_parent_count == 0);
+ assert(fake_cache_ptr->image_entries[u].fd_parent_count == 0);
- HDassert(cache_ptr->image_entries[u].image_ptr);
- HDassert(fake_cache_ptr->image_entries[u].image_ptr);
- HDassert(!HDmemcmp(cache_ptr->image_entries[u].image_ptr,
- fake_cache_ptr->image_entries[u].image_ptr, cache_ptr->image_entries[u].size));
+ assert(cache_ptr->image_entries[u].image_ptr);
+ assert(fake_cache_ptr->image_entries[u].image_ptr);
+ assert(!memcmp(cache_ptr->image_entries[u].image_ptr, fake_cache_ptr->image_entries[u].image_ptr,
+ cache_ptr->image_entries[u].size));
fake_cache_ptr->image_entries[u].image_ptr =
H5MM_xfree(fake_cache_ptr->image_entries[u].image_ptr);
} /* end for */
- HDassert((size_t)(q - (const uint8_t *)cache_ptr->image_buffer) ==
- cache_ptr->image_data_len - H5F_SIZEOF_CHKSUM);
+ assert((size_t)(q - (const uint8_t *)cache_ptr->image_buffer) ==
+ cache_ptr->image_data_len - H5F_SIZEOF_CHKSUM);
/* compute the checksum */
old_chksum = chksum;
chksum = H5_checksum_metadata(cache_ptr->image_buffer,
(size_t)(cache_ptr->image_data_len - H5F_SIZEOF_CHKSUM), 0);
- HDassert(chksum == old_chksum);
+ assert(chksum == old_chksum);
fake_cache_ptr->image_entries = (H5C_image_entry_t *)H5MM_xfree(fake_cache_ptr->image_entries);
fake_cache_ptr = (H5C_t *)H5MM_xfree(fake_cache_ptr);
@@ -429,11 +429,11 @@ H5C__generate_cache_image(H5F_t *f, H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(cache_ptr == f->shared->cache);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(f);
+ assert(f->shared);
+ assert(cache_ptr == f->shared->cache);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Construct cache image */
if (H5C__construct_cache_image_buffer(f, cache_ptr) < 0)
@@ -452,7 +452,7 @@ H5C__generate_cache_image(H5F_t *f, H5C_t *cache_ptr)
} /* end if */
/* Free cache image buffer */
- HDassert(cache_ptr->image_buffer);
+ assert(cache_ptr->image_buffer);
cache_ptr->image_buffer = H5MM_xfree(cache_ptr->image_buffer);
done:
@@ -521,56 +521,56 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
FUNC_ENTER_PACKAGE
/* sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
- HDassert(f->shared->cache == cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(entry_ptr_ptr);
- HDassert(*entry_ptr_ptr);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
+ assert(f->shared->cache == cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(entry_ptr_ptr);
+ assert(*entry_ptr_ptr);
pf_entry_ptr = *entry_ptr_ptr;
- HDassert(pf_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(pf_entry_ptr->type);
- HDassert(pf_entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
- HDassert(pf_entry_ptr->prefetched);
- HDassert(pf_entry_ptr->image_up_to_date);
- HDassert(pf_entry_ptr->image_ptr);
- HDassert(pf_entry_ptr->size > 0);
- HDassert(pf_entry_ptr->addr == addr);
- HDassert(type);
- HDassert(type->id == pf_entry_ptr->prefetch_type_id);
- HDassert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
+ assert(pf_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(pf_entry_ptr->type);
+ assert(pf_entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
+ assert(pf_entry_ptr->prefetched);
+ assert(pf_entry_ptr->image_up_to_date);
+ assert(pf_entry_ptr->image_ptr);
+ assert(pf_entry_ptr->size > 0);
+ assert(pf_entry_ptr->addr == addr);
+ assert(type);
+ assert(type->id == pf_entry_ptr->prefetch_type_id);
+ assert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
/* verify absence of prohibited or unsupported type flag combinations */
- HDassert(!(type->flags & H5C__CLASS_SKIP_READS));
+ assert(!(type->flags & H5C__CLASS_SKIP_READS));
/* Can't see how skip reads could be usefully combined with
* either the speculative read flag. Hence disallow.
*/
- HDassert(!((type->flags & H5C__CLASS_SKIP_READS) && (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)));
- HDassert(H5F_addr_defined(addr));
- HDassert(type->get_initial_load_size);
- HDassert(type->deserialize);
+ assert(!((type->flags & H5C__CLASS_SKIP_READS) && (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG)));
+ assert(H5F_addr_defined(addr));
+ assert(type->get_initial_load_size);
+ assert(type->deserialize);
/* if *pf_entry_ptr is a flush dependency child, destroy all such
* relationships now. The client will restore the relationship(s) with
* the deserialized entry if appropriate.
*/
- HDassert(pf_entry_ptr->fd_parent_count == pf_entry_ptr->flush_dep_nparents);
+ assert(pf_entry_ptr->fd_parent_count == pf_entry_ptr->flush_dep_nparents);
for (i = (int)(pf_entry_ptr->fd_parent_count) - 1; i >= 0; i--) {
- HDassert(pf_entry_ptr->flush_dep_parent);
- HDassert(pf_entry_ptr->flush_dep_parent[i]);
- HDassert(pf_entry_ptr->flush_dep_parent[i]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(pf_entry_ptr->flush_dep_parent[i]->flush_dep_nchildren > 0);
- HDassert(pf_entry_ptr->fd_parent_addrs);
- HDassert(pf_entry_ptr->flush_dep_parent[i]->addr == pf_entry_ptr->fd_parent_addrs[i]);
+ assert(pf_entry_ptr->flush_dep_parent);
+ assert(pf_entry_ptr->flush_dep_parent[i]);
+ assert(pf_entry_ptr->flush_dep_parent[i]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(pf_entry_ptr->flush_dep_parent[i]->flush_dep_nchildren > 0);
+ assert(pf_entry_ptr->fd_parent_addrs);
+ assert(pf_entry_ptr->flush_dep_parent[i]->addr == pf_entry_ptr->fd_parent_addrs[i]);
if (H5C_destroy_flush_dependency(pf_entry_ptr->flush_dep_parent[i], pf_entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "can't destroy pf entry parent flush dependency")
pf_entry_ptr->fd_parent_addrs[i] = HADDR_UNDEF;
} /* end for */
- HDassert(pf_entry_ptr->flush_dep_nparents == 0);
+ assert(pf_entry_ptr->flush_dep_nparents == 0);
/* If *pf_entry_ptr is a flush dependency parent, destroy its flush
* dependency relationships with all its children (which must be
@@ -616,7 +616,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
*
* In the following assert:
*
- * HDassert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
+ * assert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
*
* note that type ids 5 & 6 are associated with object headers in the
* metadata cache.
@@ -633,13 +633,13 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
* hence the value assigned to ds_entry_ptr->is_dirty below.
*/
- HDassert((dirty == FALSE) || (type->id == 5 || type->id == 6));
+ assert((dirty == FALSE) || (type->id == 5 || type->id == 6));
ds_entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC;
ds_entry_ptr->cache_ptr = f->shared->cache;
ds_entry_ptr->addr = addr;
ds_entry_ptr->size = len;
- HDassert(ds_entry_ptr->size < H5C_MAX_ENTRY_SIZE);
+ assert(ds_entry_ptr->size < H5C_MAX_ENTRY_SIZE);
ds_entry_ptr->image_ptr = pf_entry_ptr->image_ptr;
ds_entry_ptr->image_up_to_date = !dirty;
ds_entry_ptr->type = type;
@@ -733,8 +733,8 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
pf_entry_ptr->image_ptr = NULL;
if (pf_entry_ptr->is_dirty) {
- HDassert(((cache_ptr->slist_enabled) && (pf_entry_ptr->in_slist)) ||
- ((!cache_ptr->slist_enabled) && (!pf_entry_ptr->in_slist)));
+ assert(((cache_ptr->slist_enabled) && (pf_entry_ptr->in_slist)) ||
+ ((!cache_ptr->slist_enabled) && (!pf_entry_ptr->in_slist)));
flush_flags |= H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG;
} /* end if */
@@ -745,13 +745,13 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
#ifndef NDEGUG /* verify deletion */
H5C__SEARCH_INDEX(cache_ptr, addr, pf_entry_ptr, FAIL);
- HDassert(NULL == pf_entry_ptr);
+ assert(NULL == pf_entry_ptr);
#endif /* NDEBUG */
/* Insert the deserialized entry into the cache. */
H5C__INSERT_IN_INDEX(cache_ptr, ds_entry_ptr, FAIL)
- HDassert(!ds_entry_ptr->in_slist);
+ assert(!ds_entry_ptr->in_slist);
if (ds_entry_ptr->is_dirty)
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, ds_entry_ptr, FAIL)
@@ -777,10 +777,10 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
ds_entry_ptr->is_protected = TRUE;
while (fd_children[i] != NULL) {
/* Sanity checks */
- HDassert((fd_children[i])->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert((fd_children[i])->prefetched);
- HDassert((fd_children[i])->fd_parent_count > 0);
- HDassert((fd_children[i])->fd_parent_addrs);
+ assert((fd_children[i])->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert((fd_children[i])->prefetched);
+ assert((fd_children[i])->fd_parent_count > 0);
+ assert((fd_children[i])->fd_parent_addrs);
#ifndef NDEBUG
{
@@ -795,7 +795,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
j++;
} /* end while */
- HDassert(found);
+ assert(found);
}
#endif /* NDEBUG */
@@ -808,7 +808,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, ds_entry_ptr, FAIL);
ds_entry_ptr->is_protected = FALSE;
} /* end if ( fd_children != NULL ) */
- HDassert((unsigned)i == ds_entry_ptr->fd_child_count);
+ assert((unsigned)i == ds_entry_ptr->fd_child_count);
ds_entry_ptr->fd_child_count = 0;
H5C__UPDATE_STATS_FOR_PREFETCH_HIT(cache_ptr)
@@ -851,11 +851,11 @@ H5C__free_image_entries_array(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
- HDassert(cache_ptr->image_ctl.generate_image);
- HDassert(cache_ptr->index_len == 0);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
+ assert(cache_ptr->image_ctl.generate_image);
+ assert(cache_ptr->index_len == 0);
/* Check for entries to free */
if (cache_ptr->image_entries != NULL) {
@@ -868,18 +868,18 @@ H5C__free_image_entries_array(H5C_t *cache_ptr)
ie_ptr = &(cache_ptr->image_entries[u]);
/* Sanity checks */
- HDassert(ie_ptr);
- HDassert(ie_ptr->magic == H5C_IMAGE_ENTRY_T_MAGIC);
- HDassert(ie_ptr->image_ptr);
+ assert(ie_ptr);
+ assert(ie_ptr->magic == H5C_IMAGE_ENTRY_T_MAGIC);
+ assert(ie_ptr->image_ptr);
/* Free the parent addrs array if appropriate */
if (ie_ptr->fd_parent_addrs) {
- HDassert(ie_ptr->fd_parent_count > 0);
+ assert(ie_ptr->fd_parent_count > 0);
ie_ptr->fd_parent_addrs = (haddr_t *)H5MM_xfree(ie_ptr->fd_parent_addrs);
} /* end if */
else
- HDassert(ie_ptr->fd_parent_count == 0);
+ assert(ie_ptr->fd_parent_count == 0);
/* Free the image */
ie_ptr->image_ptr = H5MM_xfree(ie_ptr->image_ptr);
@@ -977,16 +977,15 @@ H5C_image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header)
prefetch_use_rate = 0.0;
if (print_header) {
- HDfprintf(stdout, "\nhit prefetches prefetch image pf hit\n");
- HDfprintf(stdout, "rate: total: dirty: hits: flshs: evct: size: rate:\n");
+ fprintf(stdout, "\nhit prefetches prefetch image pf hit\n");
+ fprintf(stdout, "rate: total: dirty: hits: flshs: evct: size: rate:\n");
} /* end if */
- HDfprintf(stdout, "%3.1lf %5lld %5lld %5lld %5lld %5lld %5lld %3.1lf\n", hit_rate,
- (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches),
- (long long)(cache_ptr->prefetch_hits),
- (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]),
- (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]),
- (long long)(cache_ptr->last_image_size), prefetch_use_rate);
+ fprintf(stdout, "%3.1lf %5lld %5lld %5lld %5lld %5lld %5lld %3.1lf\n", hit_rate,
+ (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches),
+ (long long)(cache_ptr->prefetch_hits), (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]),
+ (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]),
+ (long long)(cache_ptr->last_image_size), prefetch_use_rate);
#endif /* H5C_COLLECT_CACHE_STATS */
done:
@@ -1014,11 +1013,11 @@ H5C__read_cache_image(H5F_t *f, H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(H5F_addr_defined(cache_ptr->image_addr));
- HDassert(cache_ptr->image_len > 0);
- HDassert(cache_ptr->image_buffer);
+ assert(f);
+ assert(cache_ptr);
+ assert(H5F_addr_defined(cache_ptr->image_addr));
+ assert(cache_ptr->image_len > 0);
+ assert(cache_ptr->image_buffer);
#ifdef H5_HAVE_PARALLEL
{
@@ -1026,7 +1025,7 @@ H5C__read_cache_image(H5F_t *f, H5C_t *cache_ptr)
int mpi_result;
if ((NULL == aux_ptr) || (aux_ptr->mpi_rank == 0)) {
- HDassert((NULL == aux_ptr) || (aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC));
+ assert((NULL == aux_ptr) || (aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC));
#endif /* H5_HAVE_PARALLEL */
/* Read the buffer (if serial access, or rank 0 of parallel access) */
@@ -1086,11 +1085,11 @@ H5C__load_cache_image(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* If the image address is defined, load the image, decode it,
* and insert its contents into the metadata cache.
@@ -1103,8 +1102,8 @@ H5C__load_cache_image(H5F_t *f)
*/
if (H5F_addr_defined(cache_ptr->image_addr)) {
/* Sanity checks */
- HDassert(cache_ptr->image_len > 0);
- HDassert(cache_ptr->image_buffer == NULL);
+ assert(cache_ptr->image_len > 0);
+ assert(cache_ptr->image_buffer == NULL);
/* Allocate space for the image */
if (NULL == (cache_ptr->image_buffer = H5MM_malloc(cache_ptr->image_len + 1)))
@@ -1181,11 +1180,11 @@ H5C_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, hbool_
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Set information needed to load cache image */
cache_ptr->image_addr = addr;
@@ -1230,8 +1229,8 @@ H5C__image_entry_cmp(const void *_entry1, const void *_entry2)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(entry1);
- HDassert(entry2);
+ assert(entry1);
+ assert(entry2);
if (entry1->image_fd_height > entry2->image_fd_height)
ret_value = -1;
@@ -1239,8 +1238,8 @@ H5C__image_entry_cmp(const void *_entry1, const void *_entry2)
ret_value = 1;
else {
/* Sanity check */
- HDassert(entry1->lru_rank >= -1);
- HDassert(entry2->lru_rank >= -1);
+ assert(entry1->lru_rank >= -1);
+ assert(entry2->lru_rank >= -1);
if (entry1->lru_rank < entry2->lru_rank)
ret_value = -1;
@@ -1309,13 +1308,13 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(image_generated);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(image_generated);
/* If the file is opened and closed without any access to
* any group or data set, it is possible that the cache image (if
@@ -1346,7 +1345,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
H5C_cache_image_ctl_t default_image_ctl = H5C__DEFAULT_CACHE_IMAGE_CTL;
cache_ptr->image_ctl = default_image_ctl;
- HDassert(!(cache_ptr->image_ctl.generate_image));
+ assert(!(cache_ptr->image_ctl.generate_image));
} /* end if */
/* Generate the cache image, if requested */
@@ -1391,7 +1390,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
*/
if (H5C__prep_for_file_close__scan_entries(f, cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C__prep_for_file_close__scan_entries failed")
- HDassert(HADDR_UNDEF == cache_ptr->image_addr);
+ assert(HADDR_UNDEF == cache_ptr->image_addr);
#ifdef H5_HAVE_PARALLEL
/* In the parallel case, overwrite the image_len with the
@@ -1411,7 +1410,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
(mpi_result = MPI_Bcast(&p0_image_len, 1, MPI_UNSIGNED, 0, aux_ptr->mpi_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result)
- HDassert(p0_image_len == aux_ptr->p0_image_len);
+ assert(p0_image_len == aux_ptr->p0_image_len);
} /* end if */
else {
if (MPI_SUCCESS !=
@@ -1453,7 +1452,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
* shutdown the self referential free space managers after
* we destroy the metadata cache.
*/
- HDassert(HADDR_UNDEF == f->shared->eoa_post_mdci_fsalloc);
+ assert(HADDR_UNDEF == f->shared->eoa_post_mdci_fsalloc);
if (HADDR_UNDEF == (f->shared->eoa_post_mdci_fsalloc = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size")
@@ -1469,7 +1468,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
* a fragment on a cache image allocation, leave the following
* assertion in the code so we will find out.
*/
- HDassert((eoa_frag_size == 0) || (f->shared->alignment != 1));
+ assert((eoa_frag_size == 0) || (f->shared->alignment != 1));
/* Eventually it will be possible for the length of the cache image
* block on file to be greater than the size of the data it
@@ -1533,7 +1532,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated)
sizeof(H5C_image_entry_t), H5C__image_entry_cmp);
} /* end if */
else { /* cancel creation of metadata cache image */
- HDassert(cache_ptr->image_entries == NULL);
+ assert(cache_ptr->image_entries == NULL);
/* To avoid breaking the control flow tests, only delete
* the mdci superblock extension message if the
@@ -1592,9 +1591,9 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache == f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache == f->shared->cache);
/* Check arguments */
if ((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC))
@@ -1613,7 +1612,7 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl
H5C_cache_image_ctl_t default_image_ctl = H5C__DEFAULT_CACHE_IMAGE_CTL;
cache_ptr->image_ctl = default_image_ctl;
- HDassert(!(cache_ptr->image_ctl.generate_image));
+ assert(!(cache_ptr->image_ctl.generate_image));
} /* end if */
else {
#endif /* H5_HAVE_PARALLEL */
@@ -1635,7 +1634,7 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl
H5C_cache_image_ctl_t default_image_ctl = H5C__DEFAULT_CACHE_IMAGE_CTL;
cache_ptr->image_ctl = default_image_ctl;
- HDassert(!(cache_ptr->image_ctl.generate_image));
+ assert(!(cache_ptr->image_ctl.generate_image));
} /* end else */
#ifdef H5_HAVE_PARALLEL
} /* end else */
@@ -1794,16 +1793,16 @@ H5C__decode_cache_image_header(const H5F_t *f, H5C_t *cache_ptr, const uint8_t *
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(buf);
- HDassert(*buf);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(buf);
+ assert(*buf);
/* Point to buffer to decode */
p = *buf;
/* Check signature */
- if (HDmemcmp(p, H5C__MDCI_BLOCK_SIGNATURE, (size_t)H5C__MDCI_BLOCK_SIGNATURE_LEN) != 0)
+ if (memcmp(p, H5C__MDCI_BLOCK_SIGNATURE, (size_t)H5C__MDCI_BLOCK_SIGNATURE_LEN) != 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad metadata cache image header signature")
p += H5C__MDCI_BLOCK_SIGNATURE_LEN;
@@ -1891,17 +1890,17 @@ H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr, const uint
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(cache_ptr == f->shared->cache);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(buf);
- HDassert(*buf);
- HDassert(entry_num < cache_ptr->num_entries_in_image);
+ assert(f);
+ assert(f->shared);
+ assert(cache_ptr == f->shared->cache);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(buf);
+ assert(*buf);
+ assert(entry_num < cache_ptr->num_entries_in_image);
ie_ptr = &(cache_ptr->image_entries[entry_num]);
- HDassert(ie_ptr);
- HDassert(ie_ptr->magic == H5C_IMAGE_ENTRY_T_MAGIC);
+ assert(ie_ptr);
+ assert(ie_ptr->magic == H5C_IMAGE_ENTRY_T_MAGIC);
/* Get pointer to buffer */
p = *buf;
@@ -1922,15 +1921,15 @@ H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr, const uint
/* Decode ring */
ring = *p++;
- HDassert(ring > (uint8_t)(H5C_RING_UNDEFINED));
- HDassert(ring < (uint8_t)(H5C_RING_NTYPES));
+ assert(ring > (uint8_t)(H5C_RING_UNDEFINED));
+ assert(ring < (uint8_t)(H5C_RING_NTYPES));
/* Decode age */
age = *p++;
/* Decode dependency child count */
UINT16DECODE(p, fd_child_count);
- HDassert((is_fd_parent && fd_child_count > 0) || (!is_fd_parent && fd_child_count == 0));
+ assert((is_fd_parent && fd_child_count > 0) || (!is_fd_parent && fd_child_count == 0));
/* Decode dirty dependency child count */
UINT16DECODE(p, fd_dirty_child_count);
@@ -1939,11 +1938,11 @@ H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr, const uint
/* Decode dependency parent count */
UINT16DECODE(p, fd_parent_count);
- HDassert((is_fd_child && fd_parent_count > 0) || (!is_fd_child && fd_parent_count == 0));
+ assert((is_fd_child && fd_parent_count > 0) || (!is_fd_child && fd_parent_count == 0));
/* Decode index in LRU */
INT32DECODE(p, lru_rank);
- HDassert((in_lru && lru_rank >= 0) || (!in_lru && lru_rank == -1));
+ assert((in_lru && lru_rank >= 0) || (!in_lru && lru_rank == -1));
/* Decode entry offset */
H5F_addr_decode(f, &p, &addr);
@@ -2047,20 +2046,20 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(pf_entry_ptr);
- HDassert(pf_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(pf_entry_ptr->type);
- HDassert(pf_entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
- HDassert(pf_entry_ptr->prefetched);
- HDassert(pf_entry_ptr->fd_child_count > 0);
- HDassert(fd_children);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(pf_entry_ptr);
+ assert(pf_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(pf_entry_ptr->type);
+ assert(pf_entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
+ assert(pf_entry_ptr->prefetched);
+ assert(pf_entry_ptr->fd_child_count > 0);
+ assert(fd_children);
/* Scan each entry on the index list */
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Here we look at entry_ptr->flush_dep_nparents and not
* entry_ptr->fd_parent_count as it is possible that some
@@ -2075,17 +2074,17 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
found = FALSE;
/* Sanity checks */
- HDassert(entry_ptr->type);
- HDassert(entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
- HDassert(entry_ptr->fd_parent_count >= entry_ptr->flush_dep_nparents);
- HDassert(entry_ptr->fd_parent_addrs);
- HDassert(entry_ptr->flush_dep_parent);
+ assert(entry_ptr->type);
+ assert(entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID);
+ assert(entry_ptr->fd_parent_count >= entry_ptr->flush_dep_nparents);
+ assert(entry_ptr->fd_parent_addrs);
+ assert(entry_ptr->flush_dep_parent);
/* Look for correct entry */
while (!found && (u < entry_ptr->fd_parent_count)) {
/* Sanity check entry */
- HDassert(entry_ptr->flush_dep_parent[u]);
- HDassert(entry_ptr->flush_dep_parent[u]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->flush_dep_parent[u]);
+ assert(entry_ptr->flush_dep_parent[u]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Correct entry? */
if (pf_entry_ptr == entry_ptr->flush_dep_parent[u])
@@ -2095,7 +2094,7 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
} /* end while */
if (found) {
- HDassert(NULL == fd_children[fd_children_found]);
+ assert(NULL == fd_children[fd_children_found]);
/* Remove flush dependency */
fd_children[fd_children_found] = entry_ptr;
@@ -2118,7 +2117,7 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
found = TRUE;
u++;
} /* end while */
- HDassert(found);
+ assert(found);
#endif /* NDEBUG */
} /* end if */
} /* end if */
@@ -2128,10 +2127,10 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e
} /* end while */
/* Post-op sanity checks */
- HDassert(NULL == fd_children[fd_children_found]);
- HDassert((unsigned)fd_children_found == pf_entry_ptr->fd_child_count);
- HDassert(entries_visited == cache_ptr->index_len);
- HDassert(!pf_entry_ptr->is_pinned);
+ assert(NULL == fd_children[fd_children_found]);
+ assert((unsigned)fd_children_found == pf_entry_ptr->fd_child_count);
+ assert(entries_visited == cache_ptr->index_len);
+ assert(!pf_entry_ptr->is_pinned);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2163,15 +2162,15 @@ H5C__encode_cache_image_header(const H5F_t *f, const H5C_t *cache_ptr, uint8_t *
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
- HDassert(cache_ptr->image_ctl.generate_image);
- HDassert(cache_ptr->index_len == 0);
- HDassert(cache_ptr->image_data_len > 0);
- HDassert(cache_ptr->image_data_len <= cache_ptr->image_len);
- HDassert(buf);
- HDassert(*buf);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
+ assert(cache_ptr->image_ctl.generate_image);
+ assert(cache_ptr->index_len == 0);
+ assert(cache_ptr->image_data_len > 0);
+ assert(cache_ptr->image_data_len <= cache_ptr->image_len);
+ assert(buf);
+ assert(*buf);
/* Set pointer into buffer */
p = *buf;
@@ -2186,7 +2185,7 @@ H5C__encode_cache_image_header(const H5F_t *f, const H5C_t *cache_ptr, uint8_t *
/* setup and write flags */
/* at present we don't support saving resize status */
- HDassert(!cache_ptr->image_ctl.save_resize_status);
+ assert(!cache_ptr->image_ctl.save_resize_status);
if (cache_ptr->image_ctl.save_resize_status)
flags |= H5C__MDCI_HEADER_HAVE_RESIZE_STATUS;
@@ -2194,7 +2193,7 @@ H5C__encode_cache_image_header(const H5F_t *f, const H5C_t *cache_ptr, uint8_t *
/* Encode image data length */
/* this must be true at present */
- HDassert(cache_ptr->image_len == cache_ptr->image_data_len);
+ assert(cache_ptr->image_len == cache_ptr->image_data_len);
H5F_ENCODE_LENGTH(f, p, cache_ptr->image_data_len);
/* write num entries */
@@ -2239,19 +2238,19 @@ H5C__encode_cache_image_entry(H5F_t *f, H5C_t *cache_ptr, uint8_t **buf, unsigne
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(cache_ptr == f->shared->cache);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
- HDassert(cache_ptr->image_ctl.generate_image);
- HDassert(cache_ptr->index_len == 0);
- HDassert(buf);
- HDassert(*buf);
- HDassert(entry_num < cache_ptr->num_entries_in_image);
+ assert(f);
+ assert(f->shared);
+ assert(cache_ptr == f->shared->cache);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
+ assert(cache_ptr->image_ctl.generate_image);
+ assert(cache_ptr->index_len == 0);
+ assert(buf);
+ assert(*buf);
+ assert(entry_num < cache_ptr->num_entries_in_image);
ie_ptr = &(cache_ptr->image_entries[entry_num]);
- HDassert(ie_ptr->magic == H5C_IMAGE_ENTRY_T_MAGIC);
+ assert(ie_ptr->magic == H5C_IMAGE_ENTRY_T_MAGIC);
/* Get pointer to buffer to encode into */
p = *buf;
@@ -2384,8 +2383,8 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Remove from the cache image all dirty entries that are
* flush dependency children of dirty entries that are not in the
@@ -2399,17 +2398,17 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
done = TRUE;
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Should this entry be in the image */
if (entry_ptr->image_dirty && entry_ptr->include_in_image && (entry_ptr->fd_parent_count > 0)) {
- HDassert(entry_ptr->flush_dep_parent != NULL);
+ assert(entry_ptr->flush_dep_parent != NULL);
for (u = 0; u < entry_ptr->flush_dep_nparents; u++) {
parent_ptr = entry_ptr->flush_dep_parent[u];
/* Sanity check parent */
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring == parent_ptr->ring);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring == parent_ptr->ring);
if (parent_ptr->is_dirty && !parent_ptr->include_in_image &&
entry_ptr->include_in_image) {
@@ -2431,7 +2430,7 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
* so. Note that this will change when we start aging entries out
* of the cache image.
*/
- HDassert(entries_removed_from_image == 0);
+ assert(entries_removed_from_image == 0);
/* Next, remove from entries in the cache image, references to
* flush dependency parents or children that are not in the cache image.
@@ -2439,22 +2438,22 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
if (!entry_ptr->include_in_image && entry_ptr->flush_dep_nparents > 0) {
- HDassert(entry_ptr->flush_dep_parent != NULL);
+ assert(entry_ptr->flush_dep_parent != NULL);
for (u = 0; u < entry_ptr->flush_dep_nparents; u++) {
parent_ptr = entry_ptr->flush_dep_parent[u];
/* Sanity check parent */
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring == parent_ptr->ring);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring == parent_ptr->ring);
if (parent_ptr->include_in_image) {
/* Must remove reference to child */
- HDassert(parent_ptr->fd_child_count > 0);
+ assert(parent_ptr->fd_child_count > 0);
parent_ptr->fd_child_count--;
if (entry_ptr->is_dirty) {
- HDassert(parent_ptr->fd_dirty_child_count > 0);
+ assert(parent_ptr->fd_dirty_child_count > 0);
parent_ptr->fd_dirty_child_count--;
} /* end if */
@@ -2464,23 +2463,23 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
} /* end if */
else if (entry_ptr->include_in_image && entry_ptr->flush_dep_nparents > 0) {
/* Sanity checks */
- HDassert(entry_ptr->flush_dep_parent != NULL);
- HDassert(entry_ptr->flush_dep_nparents == entry_ptr->fd_parent_count);
- HDassert(entry_ptr->fd_parent_addrs);
+ assert(entry_ptr->flush_dep_parent != NULL);
+ assert(entry_ptr->flush_dep_nparents == entry_ptr->fd_parent_count);
+ assert(entry_ptr->fd_parent_addrs);
for (u = 0; u < entry_ptr->flush_dep_nparents; u++) {
parent_ptr = entry_ptr->flush_dep_parent[u];
/* Sanity check parent */
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring == parent_ptr->ring);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring == parent_ptr->ring);
if (!parent_ptr->include_in_image) {
/* Must remove reference to parent */
- HDassert(entry_ptr->fd_parent_count > 0);
+ assert(entry_ptr->fd_parent_count > 0);
parent_ptr->fd_child_count--;
- HDassert(parent_ptr->addr == entry_ptr->fd_parent_addrs[u]);
+ assert(parent_ptr->addr == entry_ptr->fd_parent_addrs[u]);
entry_ptr->fd_parent_addrs[u] = HADDR_UNDEF;
external_parent_fd_refs_removed++;
@@ -2509,7 +2508,7 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
} /* end if */
} /* end for */
- HDassert(v == entry_ptr->fd_parent_count);
+ assert(v == entry_ptr->fd_parent_count);
} /* end else-if */
} /* end else-if */
@@ -2520,8 +2519,8 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
* should exist -- hence the following assertions. This will change
* if we support ageout of entries in the cache image.
*/
- HDassert(external_child_fd_refs_removed == 0);
- HDassert(external_parent_fd_refs_removed == 0);
+ assert(external_child_fd_refs_removed == 0);
+ assert(external_parent_fd_refs_removed == 0);
/* At this point we should have removed all flush dependencies that
* cross cache image boundaries. Now compute the flush dependency
@@ -2539,7 +2538,7 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr)
for (u = 0; u < entry_ptr->fd_parent_count; u++) {
parent_ptr = entry_ptr->flush_dep_parent[u];
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (parent_ptr->include_in_image && parent_ptr->image_fd_height <= 0)
H5C__prep_for_file_close__compute_fd_heights_real(parent_ptr, 1);
} /* end for */
@@ -2606,23 +2605,23 @@ H5C__prep_for_file_close__compute_fd_heights_real(H5C_cache_entry_t *entry_ptr,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->include_in_image);
- HDassert((entry_ptr->image_fd_height == 0) || (entry_ptr->image_fd_height < fd_height));
- HDassert(((fd_height == 0) && (entry_ptr->fd_child_count == 0)) ||
- ((fd_height > 0) && (entry_ptr->fd_child_count > 0)));
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->include_in_image);
+ assert((entry_ptr->image_fd_height == 0) || (entry_ptr->image_fd_height < fd_height));
+ assert(((fd_height == 0) && (entry_ptr->fd_child_count == 0)) ||
+ ((fd_height > 0) && (entry_ptr->fd_child_count > 0)));
entry_ptr->image_fd_height = fd_height;
if (entry_ptr->flush_dep_nparents > 0) {
unsigned u;
- HDassert(entry_ptr->flush_dep_parent);
+ assert(entry_ptr->flush_dep_parent);
for (u = 0; u < entry_ptr->fd_parent_count; u++) {
H5C_cache_entry_t *parent_ptr;
parent_ptr = entry_ptr->flush_dep_parent[u];
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (parent_ptr->include_in_image && parent_ptr->image_fd_height <= fd_height)
H5C__prep_for_file_close__compute_fd_heights_real(parent_ptr, fd_height + 1);
@@ -2658,12 +2657,12 @@ H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
- HDassert(cache_ptr->pl_len == 0);
- HDassert(cache_ptr->num_entries_in_image > 0);
- HDassert(cache_ptr->image_entries == NULL);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
+ assert(cache_ptr->pl_len == 0);
+ assert(cache_ptr->num_entries_in_image > 0);
+ assert(cache_ptr->image_entries == NULL);
/* Allocate and initialize image_entries array */
if (NULL == (image_entries = (H5C_image_entry_t *)H5MM_calloc(
@@ -2682,15 +2681,15 @@ H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_ptr)
u = 0;
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (entry_ptr->include_in_image) {
/* Since we have already serialized the cache, the following
* should hold.
*/
- HDassert(entry_ptr->image_up_to_date);
- HDassert(entry_ptr->image_ptr);
- HDassert(entry_ptr->type);
+ assert(entry_ptr->image_up_to_date);
+ assert(entry_ptr->image_ptr);
+ assert(entry_ptr->type);
image_entries[u].addr = entry_ptr->addr;
image_entries[u].size = entry_ptr->size;
@@ -2733,7 +2732,7 @@ H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_ptr)
u++;
- HDassert(u <= cache_ptr->num_entries_in_image);
+ assert(u <= cache_ptr->num_entries_in_image);
} /* end if */
entries_visited++;
@@ -2742,11 +2741,11 @@ H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_ptr)
} /* end while */
/* Sanity checks */
- HDassert(entries_visited == cache_ptr->index_len);
- HDassert(u == cache_ptr->num_entries_in_image);
+ assert(entries_visited == cache_ptr->index_len);
+ assert(u == cache_ptr->num_entries_in_image);
- HDassert(image_entries[u].fd_parent_addrs == NULL);
- HDassert(image_entries[u].image_ptr == NULL);
+ assert(image_entries[u].fd_parent_addrs == NULL);
+ assert(image_entries[u].image_ptr == NULL);
cache_ptr->image_entries = image_entries;
@@ -2801,13 +2800,13 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
- HDassert(cache_ptr->pl_len == 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
+ assert(cache_ptr->pl_len == 0);
/* Initialize image len to the size of the metadata cache image block
* header.
@@ -2818,13 +2817,13 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
/* Scan each entry on the index list */
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
/* Since we have already serialized the cache, the following
* should hold.
*/
- HDassert(entry_ptr->image_up_to_date);
- HDassert(entry_ptr->image_ptr);
+ assert(entry_ptr->image_up_to_date);
+ assert(entry_ptr->image_ptr);
/* Initially, we mark all entries in the rings included
* in the cache image as being included in the in the
@@ -2854,15 +2853,15 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
/* parent addresses array should already be allocated
* and of the correct size.
*/
- HDassert(entry_ptr->fd_parent_addrs);
+ assert(entry_ptr->fd_parent_addrs);
} /* end if */
else if (entry_ptr->fd_parent_count > 0) {
- HDassert(entry_ptr->fd_parent_addrs);
+ assert(entry_ptr->fd_parent_addrs);
entry_ptr->fd_parent_addrs = (haddr_t *)H5MM_xfree(entry_ptr->fd_parent_addrs);
} /* end else-if */
else {
- HDassert(entry_ptr->fd_parent_count == 0);
- HDassert(entry_ptr->fd_parent_addrs == NULL);
+ assert(entry_ptr->fd_parent_count == 0);
+ assert(entry_ptr->fd_parent_addrs == NULL);
} /* end else */
entry_ptr->fd_parent_count = entry_ptr->flush_dep_nparents;
@@ -2874,15 +2873,15 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
for (int i = 0; i < (int)(entry_ptr->fd_parent_count); i++) {
entry_ptr->fd_parent_addrs[i] = entry_ptr->flush_dep_parent[i]->addr;
- HDassert(H5F_addr_defined(entry_ptr->fd_parent_addrs[i]));
+ assert(H5F_addr_defined(entry_ptr->fd_parent_addrs[i]));
} /* end for */
} /* end if */
else if (entry_ptr->fd_parent_count > 0) {
- HDassert(entry_ptr->fd_parent_addrs);
+ assert(entry_ptr->fd_parent_addrs);
entry_ptr->fd_parent_addrs = (haddr_t *)H5MM_xfree(entry_ptr->fd_parent_addrs);
} /* end else-if */
else
- HDassert(entry_ptr->fd_parent_addrs == NULL);
+ assert(entry_ptr->fd_parent_addrs == NULL);
/* Initially, all flush dependency children are included int
* the count of flush dependency child relationships to be
@@ -2903,7 +2902,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
entries_visited++;
entry_ptr = entry_ptr->il_next;
} /* end while */
- HDassert(entries_visited == cache_ptr->index_len);
+ assert(entries_visited == cache_ptr->index_len);
/* Now compute the flush dependency heights of all flush dependency
* relationships to be represented in the image.
@@ -2938,7 +2937,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
entries_visited = 0;
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
if (entry_ptr->include_in_image) {
if (entry_ptr->fd_parent_count > 0)
@@ -2953,8 +2952,8 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
entries_visited++;
entry_ptr = entry_ptr->il_next;
} /* end while */
- HDassert(entries_visited == cache_ptr->index_len);
- HDassert(num_entries_in_image <= num_entries_tentatively_in_image);
+ assert(entries_visited == cache_ptr->index_len);
+ assert(num_entries_in_image <= num_entries_tentatively_in_image);
#ifndef NDEBUG
{
@@ -2963,7 +2962,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
j += cache_ptr->index_ring_len[i];
/* This will change */
- HDassert(entries_visited == (num_entries_tentatively_in_image + j));
+ assert(entries_visited == (num_entries_tentatively_in_image + j));
}
#endif
@@ -2982,8 +2981,8 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
*/
entry_ptr = cache_ptr->LRU_head_ptr;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->type != NULL);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->type != NULL);
/* to avoid confusion, don't set lru_rank on epoch markers.
* Note that we still increment the lru_rank, so that the holes
@@ -3004,7 +3003,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr)
entries_visited++;
entry_ptr = entry_ptr->next;
} /* end while */
- HDassert(entries_visited == cache_ptr->LRU_list_len);
+ assert(entries_visited == cache_ptr->LRU_list_len);
image_len += H5F_SIZEOF_CHKSUM;
cache_ptr->image_data_len = image_len;
@@ -3041,24 +3040,24 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(cache_ptr == f->shared->cache);
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->image_buffer);
- HDassert(cache_ptr->image_len > 0);
+ assert(f);
+ assert(f->shared);
+ assert(cache_ptr == f->shared->cache);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->image_buffer);
+ assert(cache_ptr->image_len > 0);
/* Decode metadata cache image header */
p = (uint8_t *)cache_ptr->image_buffer;
if (H5C__decode_cache_image_header(f, cache_ptr, &p) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDECODE, FAIL, "cache image header decode failed")
- HDassert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_len);
+ assert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_len);
/* The image_data_len and # of entries should be defined now */
- HDassert(cache_ptr->image_data_len > 0);
- HDassert(cache_ptr->image_data_len <= cache_ptr->image_len);
- HDassert(cache_ptr->num_entries_in_image > 0);
+ assert(cache_ptr->image_data_len > 0);
+ assert(cache_ptr->image_data_len <= cache_ptr->image_len);
+ assert(cache_ptr->num_entries_in_image > 0);
/* Reconstruct entries in image */
for (u = 0; u < cache_ptr->num_entries_in_image; u++) {
@@ -3093,8 +3092,8 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
*/
for (v = 0; v < pf_entry_ptr->fd_parent_count; v++) {
/* Sanity checks */
- HDassert(pf_entry_ptr->fd_parent_addrs);
- HDassert(H5F_addr_defined(pf_entry_ptr->fd_parent_addrs[v]));
+ assert(pf_entry_ptr->fd_parent_addrs);
+ assert(H5F_addr_defined(pf_entry_ptr->fd_parent_addrs[v]));
/* Find the parent entry */
parent_ptr = NULL;
@@ -3103,9 +3102,9 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "fd parent not in cache?!?")
/* Sanity checks */
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(parent_ptr->addr == pf_entry_ptr->fd_parent_addrs[v]);
- HDassert(parent_ptr->lru_rank == -1);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(parent_ptr->addr == pf_entry_ptr->fd_parent_addrs[v]);
+ assert(parent_ptr->lru_rank == -1);
/* Must protect parent entry to set up a flush dependency.
* Do this now, and then uprotect when done.
@@ -3129,24 +3128,24 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
*/
pf_entry_ptr = cache_ptr->il_head;
while (pf_entry_ptr != NULL) {
- HDassert(pf_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert((pf_entry_ptr->prefetched && pf_entry_ptr->type == H5AC_PREFETCHED_ENTRY) ||
- (!pf_entry_ptr->prefetched && pf_entry_ptr->type != H5AC_PREFETCHED_ENTRY));
+ assert(pf_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert((pf_entry_ptr->prefetched && pf_entry_ptr->type == H5AC_PREFETCHED_ENTRY) ||
+ (!pf_entry_ptr->prefetched && pf_entry_ptr->type != H5AC_PREFETCHED_ENTRY));
if (pf_entry_ptr->type == H5AC_PREFETCHED_ENTRY)
- HDassert(pf_entry_ptr->fd_parent_count == pf_entry_ptr->flush_dep_nparents);
+ assert(pf_entry_ptr->fd_parent_count == pf_entry_ptr->flush_dep_nparents);
for (v = 0; v < pf_entry_ptr->fd_parent_count; v++) {
parent_ptr = pf_entry_ptr->flush_dep_parent[v];
- HDassert(parent_ptr);
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(pf_entry_ptr->fd_parent_addrs);
- HDassert(pf_entry_ptr->fd_parent_addrs[v] == parent_ptr->addr);
- HDassert(parent_ptr->flush_dep_nchildren > 0);
+ assert(parent_ptr);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(pf_entry_ptr->fd_parent_addrs);
+ assert(pf_entry_ptr->fd_parent_addrs[v] == parent_ptr->addr);
+ assert(parent_ptr->flush_dep_nchildren > 0);
} /* end for */
if (pf_entry_ptr->type == H5AC_PREFETCHED_ENTRY) {
- HDassert(pf_entry_ptr->fd_child_count == pf_entry_ptr->flush_dep_nchildren);
- HDassert(pf_entry_ptr->fd_dirty_child_count == pf_entry_ptr->flush_dep_ndirty_children);
+ assert(pf_entry_ptr->fd_child_count == pf_entry_ptr->flush_dep_nchildren);
+ assert(pf_entry_ptr->fd_dirty_child_count == pf_entry_ptr->flush_dep_ndirty_children);
} /* end if */
pf_entry_ptr = pf_entry_ptr->il_next;
@@ -3163,12 +3162,12 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
i = -1;
entry_ptr = cache_ptr->LRU_head_ptr;
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->type != NULL);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->type != NULL);
if (entry_ptr->prefetched) {
- HDassert(entry_ptr->lru_rank != 0);
- HDassert((entry_ptr->lru_rank == -1) || (entry_ptr->lru_rank > i));
+ assert(entry_ptr->lru_rank != 0);
+ assert((entry_ptr->lru_rank == -1) || (entry_ptr->lru_rank > i));
if ((entry_ptr->lru_rank > 1) && (entry_ptr->lru_rank > i + 1))
lru_rank_holes += entry_ptr->lru_rank - (i + 1);
@@ -3184,7 +3183,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
* the following sanity check will have to be revised when
* we add code to store and restore adaptive resize status.
*/
- HDassert(lru_rank_holes <= H5C__MAX_EPOCH_MARKERS);
+ assert(lru_rank_holes <= H5C__MAX_EPOCH_MARKERS);
} /* end block */
#endif /* NDEBUG */
@@ -3245,10 +3244,10 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->num_entries_in_image > 0);
- HDassert(buf && *buf);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->num_entries_in_image > 0);
+ assert(buf && *buf);
/* Key R/W access off of whether the image will be deleted */
file_is_rw = cache_ptr->delete_image;
@@ -3292,16 +3291,16 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
/* Decode ring */
pf_entry_ptr->ring = *p++;
- HDassert(pf_entry_ptr->ring > (uint8_t)(H5C_RING_UNDEFINED));
- HDassert(pf_entry_ptr->ring < (uint8_t)(H5C_RING_NTYPES));
+ assert(pf_entry_ptr->ring > (uint8_t)(H5C_RING_UNDEFINED));
+ assert(pf_entry_ptr->ring < (uint8_t)(H5C_RING_NTYPES));
/* Decode age */
pf_entry_ptr->age = *p++;
/* Decode dependency child count */
UINT16DECODE(p, pf_entry_ptr->fd_child_count);
- HDassert((is_fd_parent && pf_entry_ptr->fd_child_count > 0) ||
- (!is_fd_parent && pf_entry_ptr->fd_child_count == 0));
+ assert((is_fd_parent && pf_entry_ptr->fd_child_count > 0) ||
+ (!is_fd_parent && pf_entry_ptr->fd_child_count == 0));
/* Decode dirty dependency child count */
UINT16DECODE(p, pf_entry_ptr->fd_dirty_child_count);
@@ -3312,12 +3311,12 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
/* Decode dependency parent count */
UINT16DECODE(p, pf_entry_ptr->fd_parent_count);
- HDassert((is_fd_child && pf_entry_ptr->fd_parent_count > 0) ||
- (!is_fd_child && pf_entry_ptr->fd_parent_count == 0));
+ assert((is_fd_child && pf_entry_ptr->fd_parent_count > 0) ||
+ (!is_fd_child && pf_entry_ptr->fd_parent_count == 0));
/* Decode index in LRU */
INT32DECODE(p, pf_entry_ptr->lru_rank);
- HDassert((in_lru && pf_entry_ptr->lru_rank >= 0) || (!in_lru && pf_entry_ptr->lru_rank == -1));
+ assert((in_lru && pf_entry_ptr->lru_rank >= 0) || (!in_lru && pf_entry_ptr->lru_rank == -1));
/* Decode entry offset */
H5F_addr_decode(f, &p, &pf_entry_ptr->addr);
@@ -3371,7 +3370,7 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b
pf_entry_ptr->prefetched_dirty = is_dirty && (!file_is_rw);
/* Sanity checks */
- HDassert(pf_entry_ptr->size > 0 && pf_entry_ptr->size < H5C_MAX_ENTRY_SIZE);
+ assert(pf_entry_ptr->size > 0 && pf_entry_ptr->size < H5C_MAX_ENTRY_SIZE);
/* Update buffer pointer */
*buf = p;
@@ -3415,13 +3414,13 @@ H5C__write_cache_image_superblock_msg(H5F_t *f, hbool_t create)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->cache);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->cache);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->close_warning_received);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->close_warning_received);
/* Write data into the metadata cache image superblock extension message.
* Note that this data will be bogus when we first create the message.
@@ -3433,7 +3432,7 @@ H5C__write_cache_image_superblock_msg(H5F_t *f, hbool_t create)
H5AC_aux_t *aux_ptr;
aux_ptr = (H5AC_aux_t *)cache_ptr->aux_ptr;
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
+ assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
mdci_msg.size = aux_ptr->p0_image_len;
} /* end if */
else
@@ -3470,18 +3469,18 @@ H5C__write_cache_image(H5F_t *f, const H5C_t *cache_ptr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(cache_ptr);
- HDassert(H5F_addr_defined(cache_ptr->image_addr));
- HDassert(cache_ptr->image_len > 0);
- HDassert(cache_ptr->image_buffer);
+ assert(f);
+ assert(cache_ptr);
+ assert(H5F_addr_defined(cache_ptr->image_addr));
+ assert(cache_ptr->image_len > 0);
+ assert(cache_ptr->image_buffer);
#ifdef H5_HAVE_PARALLEL
{
H5AC_aux_t *aux_ptr = (H5AC_aux_t *)cache_ptr->aux_ptr;
if ((NULL == aux_ptr) || (aux_ptr->mpi_rank == 0)) {
- HDassert((NULL == aux_ptr) || (aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC));
+ assert((NULL == aux_ptr) || (aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC));
#endif /* H5_HAVE_PARALLEL */
/* Write the buffer (if serial access, or rank 0 for parallel access) */
diff --git a/src/H5Clog.c b/src/H5Clog.c
index 25b3cf0..579fdb3 100644
--- a/src/H5Clog.c
+++ b/src/H5Clog.c
@@ -83,8 +83,8 @@ H5C_log_set_up(H5C_t *cache, const char log_location[], H5C_log_style_t style, h
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
- HDassert(log_location);
+ assert(cache);
+ assert(log_location);
/* Check logging flags */
if (cache->log_info->enabled)
@@ -143,7 +143,7 @@ H5C_log_tear_down(H5C_t *cache)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Check logging flags */
if (FALSE == cache->log_info->enabled)
@@ -186,7 +186,7 @@ H5C_start_logging(H5C_t *cache)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Check logging flags */
if (FALSE == cache->log_info->enabled)
@@ -229,7 +229,7 @@ H5C_stop_logging(H5C_t *cache)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Check logging flags */
if (FALSE == cache->log_info->enabled)
@@ -273,9 +273,9 @@ H5C_get_logging_status(const H5C_t *cache, hbool_t *is_enabled, hbool_t *is_curr
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cache);
- HDassert(is_enabled);
- HDassert(is_currently_logging);
+ assert(cache);
+ assert(is_enabled);
+ assert(is_currently_logging);
/* Get logging flags */
*is_enabled = cache->log_info->enabled;
@@ -304,7 +304,7 @@ H5C_log_write_create_cache_msg(H5C_t *cache, herr_t fxn_ret_value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_create_cache_log_msg)
@@ -339,7 +339,7 @@ H5C_log_write_destroy_cache_msg(H5C_t *cache)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_destroy_cache_log_msg)
@@ -370,7 +370,7 @@ H5C_log_write_evict_cache_msg(H5C_t *cache, herr_t fxn_ret_value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_evict_cache_log_msg)
@@ -401,7 +401,7 @@ H5C_log_write_expunge_entry_msg(H5C_t *cache, haddr_t address, int type_id, herr
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_expunge_entry_log_msg)
@@ -433,7 +433,7 @@ H5C_log_write_flush_cache_msg(H5C_t *cache, herr_t fxn_ret_value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_flush_cache_log_msg)
@@ -465,7 +465,7 @@ H5C_log_write_insert_entry_msg(H5C_t *cache, haddr_t address, int type_id, unsig
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_insert_entry_log_msg)
@@ -497,10 +497,10 @@ H5C_log_write_mark_entry_dirty_msg(H5C_t *cache, const H5C_cache_entry_t *entry,
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_mark_entry_dirty_log_msg)
if (cache->log_info->cls->write_mark_entry_dirty_log_msg(cache->log_info->udata, entry,
fxn_ret_value) < 0)
@@ -530,10 +530,10 @@ H5C_log_write_mark_entry_clean_msg(H5C_t *cache, const H5C_cache_entry_t *entry,
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_mark_entry_clean_log_msg)
if (cache->log_info->cls->write_mark_entry_clean_log_msg(cache->log_info->udata, entry,
fxn_ret_value) < 0)
@@ -563,10 +563,10 @@ H5C_log_write_mark_unserialized_entry_msg(H5C_t *cache, const H5C_cache_entry_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_mark_unserialized_entry_log_msg)
if (cache->log_info->cls->write_mark_unserialized_entry_log_msg(cache->log_info->udata, entry,
fxn_ret_value) < 0)
@@ -596,10 +596,10 @@ H5C_log_write_mark_serialized_entry_msg(H5C_t *cache, const H5C_cache_entry_t *e
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_mark_serialized_entry_log_msg)
if (cache->log_info->cls->write_mark_serialized_entry_log_msg(cache->log_info->udata, entry,
fxn_ret_value) < 0)
@@ -630,7 +630,7 @@ H5C_log_write_move_entry_msg(H5C_t *cache, haddr_t old_addr, haddr_t new_addr, i
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_move_entry_log_msg)
@@ -662,10 +662,10 @@ H5C_log_write_pin_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, herr_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_pin_entry_log_msg)
if (cache->log_info->cls->write_pin_entry_log_msg(cache->log_info->udata, entry, fxn_ret_value) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific pin entry call failed")
@@ -696,11 +696,11 @@ H5C_log_write_create_fd_msg(H5C_t *cache, const H5C_cache_entry_t *parent, const
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(parent);
- HDassert(child);
+ assert(parent);
+ assert(child);
if (cache->log_info->cls->write_create_fd_log_msg)
if (cache->log_info->cls->write_create_fd_log_msg(cache->log_info->udata, parent, child,
fxn_ret_value) < 0)
@@ -731,10 +731,10 @@ H5C_log_write_protect_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, in
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_protect_entry_log_msg)
if (cache->log_info->cls->write_protect_entry_log_msg(cache->log_info->udata, entry, type_id, flags,
fxn_ret_value) < 0)
@@ -765,10 +765,10 @@ H5C_log_write_resize_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, siz
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_resize_entry_log_msg)
if (cache->log_info->cls->write_resize_entry_log_msg(cache->log_info->udata, entry, new_size,
fxn_ret_value) < 0)
@@ -798,10 +798,10 @@ H5C_log_write_unpin_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, herr
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_unpin_entry_log_msg)
if (cache->log_info->cls->write_unpin_entry_log_msg(cache->log_info->udata, entry, fxn_ret_value) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific unpin entry call failed")
@@ -832,11 +832,11 @@ H5C_log_write_destroy_fd_msg(H5C_t *cache, const H5C_cache_entry_t *parent, cons
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(parent);
- HDassert(child);
+ assert(parent);
+ assert(child);
if (cache->log_info->cls->write_destroy_fd_log_msg)
if (cache->log_info->cls->write_destroy_fd_log_msg(cache->log_info->udata, parent, child,
fxn_ret_value) < 0)
@@ -867,7 +867,7 @@ H5C_log_write_unprotect_entry_msg(H5C_t *cache, haddr_t address, int type_id, un
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
if (cache->log_info->cls->write_unprotect_entry_log_msg)
@@ -899,10 +899,10 @@ H5C_log_write_set_cache_config_msg(H5C_t *cache, const H5AC_cache_config_t *conf
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(config);
+ assert(config);
if (cache->log_info->cls->write_set_cache_config_log_msg)
if (cache->log_info->cls->write_set_cache_config_log_msg(cache->log_info->udata, config,
fxn_ret_value) < 0)
@@ -932,10 +932,10 @@ H5C_log_write_remove_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, her
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache);
+ assert(cache);
/* Write a log message */
- HDassert(entry);
+ assert(entry);
if (cache->log_info->cls->write_remove_entry_log_msg)
if (cache->log_info->cls->write_remove_entry_log_msg(cache->log_info->udata, entry, fxn_ret_value) <
0)
diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c
index ad27c94..d5a45be 100644
--- a/src/H5Clog_json.c
+++ b/src/H5Clog_json.c
@@ -166,15 +166,15 @@ H5C__json_write_log_message(H5C_log_json_udata_t *json_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->outfile);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->outfile);
+ assert(json_udata->message);
/* Write the log message and flush */
n_chars = HDstrlen(json_udata->message);
- if ((int)n_chars != HDfprintf(json_udata->outfile, "%s", json_udata->message))
+ if ((int)n_chars != fprintf(json_udata->outfile, "%s", json_udata->message))
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message")
- HDmemset((void *)(json_udata->message), 0, (size_t)(n_chars * sizeof(char)));
+ memset((void *)(json_udata->message), 0, (size_t)(n_chars * sizeof(char)));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -215,8 +215,8 @@ H5C_log_json_set_up(H5C_log_info_t *log_info, const char log_location[], int mpi
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(log_info);
- HDassert(log_location);
+ assert(log_info);
+ assert(log_location);
/* Set up the class struct */
log_info->cls = &H5C_json_log_class_g;
@@ -249,7 +249,7 @@ H5C_log_json_set_up(H5C_log_info_t *log_info, const char log_location[], int mpi
HDsnprintf(file_name, n_chars, "RANK_%d.%s", mpi_rank, log_location);
/* Open log file and set it to be unbuffered */
- if (NULL == (json_udata->outfile = HDfopen(file_name, "w")))
+ if (NULL == (json_udata->outfile = fopen(file_name, "w")))
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "can't create mdc log file")
HDsetbuf(json_udata->outfile, NULL);
@@ -294,7 +294,7 @@ H5C__json_tear_down_logging(H5C_log_info_t *log_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(log_info);
+ assert(log_info);
/* Alias */
json_udata = (H5C_log_json_udata_t *)(log_info->udata);
@@ -339,8 +339,8 @@ H5C__json_write_start_log_msg(void *udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string (opens the JSON array) */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -382,8 +382,8 @@ H5C__json_write_stop_log_msg(void *udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string (closes the JSON array) */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -424,8 +424,8 @@ H5C__json_write_create_cache_log_msg(void *udata, herr_t fxn_ret_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -466,8 +466,8 @@ H5C__json_write_destroy_cache_log_msg(void *udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -507,8 +507,8 @@ H5C__json_write_evict_cache_log_msg(void *udata, herr_t fxn_ret_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -549,8 +549,8 @@ H5C__json_write_expunge_entry_log_msg(void *udata, haddr_t address, int type_id,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -593,8 +593,8 @@ H5C__json_write_flush_cache_log_msg(void *udata, herr_t fxn_ret_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -636,8 +636,8 @@ H5C__json_write_insert_entry_log_msg(void *udata, haddr_t address, int type_id,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -683,9 +683,9 @@ H5C__json_write_mark_entry_dirty_log_msg(void *udata, const H5C_cache_entry_t *e
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -727,9 +727,9 @@ H5C__json_write_mark_entry_clean_log_msg(void *udata, const H5C_cache_entry_t *e
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -772,9 +772,9 @@ H5C__json_write_mark_unserialized_entry_log_msg(void *udata, const H5C_cache_ent
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -817,9 +817,9 @@ H5C__json_write_mark_serialized_entry_log_msg(void *udata, const H5C_cache_entry
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -862,8 +862,8 @@ H5C__json_write_move_entry_log_msg(void *udata, haddr_t old_addr, haddr_t new_ad
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -908,9 +908,9 @@ H5C__json_write_pin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry, h
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -954,10 +954,10 @@ H5C__json_write_create_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(parent);
- HDassert(child);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(parent);
+ assert(child);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -1003,9 +1003,9 @@ H5C__json_write_protect_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
if (H5C__READ_ONLY_FLAG == flags)
HDstrcpy(rw_s, "READ");
@@ -1057,9 +1057,9 @@ H5C__json_write_resize_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -1102,9 +1102,9 @@ H5C__json_write_unpin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -1148,10 +1148,10 @@ H5C__json_write_destroy_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(parent);
- HDassert(child);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(parent);
+ assert(child);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -1196,8 +1196,8 @@ H5C__json_write_unprotect_entry_log_msg(void *udata, haddr_t address, int type_i
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
+ assert(json_udata);
+ assert(json_udata->message);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -1242,9 +1242,9 @@ H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(config);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(config);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
@@ -1285,9 +1285,9 @@ H5C__json_write_remove_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(json_udata);
- HDassert(json_udata->message);
- HDassert(entry);
+ assert(json_udata);
+ assert(json_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(json_udata->message, H5C_MAX_JSON_LOG_MSG_SIZE, "\
diff --git a/src/H5Clog_trace.c b/src/H5Clog_trace.c
index 74f33ed..d9e7be7 100644
--- a/src/H5Clog_trace.c
+++ b/src/H5Clog_trace.c
@@ -161,15 +161,15 @@ H5C__trace_write_log_message(H5C_log_trace_udata_t *trace_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->outfile);
- HDassert(trace_udata->message);
+ assert(trace_udata);
+ assert(trace_udata->outfile);
+ assert(trace_udata->message);
/* Write the log message and flush */
n_chars = HDstrlen(trace_udata->message);
- if ((int)n_chars != HDfprintf(trace_udata->outfile, "%s", trace_udata->message))
+ if ((int)n_chars != fprintf(trace_udata->outfile, "%s", trace_udata->message))
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message")
- HDmemset((void *)(trace_udata->message), 0, (size_t)(n_chars * sizeof(char)));
+ memset((void *)(trace_udata->message), 0, (size_t)(n_chars * sizeof(char)));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -210,8 +210,8 @@ H5C_log_trace_set_up(H5C_log_info_t *log_info, const char log_location[], int mp
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(log_info);
- HDassert(log_location);
+ assert(log_info);
+ assert(log_location);
/* Set up the class struct */
log_info->cls = &H5C_trace_log_class_g;
@@ -244,12 +244,12 @@ H5C_log_trace_set_up(H5C_log_info_t *log_info, const char log_location[], int mp
HDsnprintf(file_name, n_chars, "%s.%d", log_location, mpi_rank);
/* Open log file and set it to be unbuffered */
- if (NULL == (trace_udata->outfile = HDfopen(file_name, "w")))
+ if (NULL == (trace_udata->outfile = fopen(file_name, "w")))
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "can't create mdc log file")
HDsetbuf(trace_udata->outfile, NULL);
/* Write the header */
- HDfprintf(trace_udata->outfile, "### HDF5 metadata cache trace file version 1 ###\n");
+ fprintf(trace_udata->outfile, "### HDF5 metadata cache trace file version 1 ###\n");
done:
if (file_name)
@@ -292,7 +292,7 @@ H5C__trace_tear_down_logging(H5C_log_info_t *log_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(log_info);
+ assert(log_info);
/* Alias */
trace_udata = (H5C_log_trace_udata_t *)(log_info->udata);
@@ -337,8 +337,8 @@ H5C__trace_write_expunge_entry_log_msg(void *udata, haddr_t address, int type_id
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
+ assert(trace_udata);
+ assert(trace_udata->message);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_expunge_entry 0x%lx %d %d\n",
@@ -373,8 +373,8 @@ H5C__trace_write_flush_cache_log_msg(void *udata, herr_t fxn_ret_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
+ assert(trace_udata);
+ assert(trace_udata->message);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_flush %d\n", (int)fxn_ret_value);
@@ -409,8 +409,8 @@ H5C__trace_write_insert_entry_log_msg(void *udata, haddr_t address, int type_id,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
+ assert(trace_udata);
+ assert(trace_udata->message);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_insert_entry 0x%lx %d 0x%x %d %d\n",
@@ -445,9 +445,9 @@ H5C__trace_write_mark_entry_dirty_log_msg(void *udata, const H5C_cache_entry_t *
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_dirty 0x%lx %d\n",
@@ -482,9 +482,9 @@ H5C__trace_write_mark_entry_clean_log_msg(void *udata, const H5C_cache_entry_t *
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_clean 0x%lx %d\n",
@@ -520,9 +520,9 @@ H5C__trace_write_mark_unserialized_entry_log_msg(void *udata, const H5C_cache_en
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_unserialized 0x%lx %d\n",
@@ -558,9 +558,9 @@ H5C__trace_write_mark_serialized_entry_log_msg(void *udata, const H5C_cache_entr
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_mark_entry_serialized 0x%lx %d\n",
@@ -596,8 +596,8 @@ H5C__trace_write_move_entry_log_msg(void *udata, haddr_t old_addr, haddr_t new_a
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
+ assert(trace_udata);
+ assert(trace_udata->message);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_move_entry 0x%lx 0x%lx %d %d\n",
@@ -632,9 +632,9 @@ H5C__trace_write_pin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_pin_protected_entry 0x%lx %d\n",
@@ -671,10 +671,10 @@ H5C__trace_write_create_fd_log_msg(void *udata, const H5C_cache_entry_t *parent,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(parent);
- HDassert(child);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(parent);
+ assert(child);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE,
@@ -711,9 +711,9 @@ H5C__trace_write_protect_entry_log_msg(void *udata, const H5C_cache_entry_t *ent
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_protect 0x%lx %d 0x%x %d %d\n",
@@ -749,9 +749,9 @@ H5C__trace_write_resize_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_resize_entry 0x%lx %d %d\n",
@@ -786,9 +786,9 @@ H5C__trace_write_unpin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_unpin_entry 0x%lx %d\n",
@@ -825,10 +825,10 @@ H5C__trace_write_destroy_fd_log_msg(void *udata, const H5C_cache_entry_t *parent
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(parent);
- HDassert(child);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(parent);
+ assert(child);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE,
@@ -865,8 +865,8 @@ H5C__trace_write_unprotect_entry_log_msg(void *udata, haddr_t address, int type_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
+ assert(trace_udata);
+ assert(trace_udata->message);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_unprotect 0x%lx %d 0x%x %d\n",
@@ -902,9 +902,9 @@ H5C__trace_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(config);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(config);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE,
@@ -951,9 +951,9 @@ H5C__trace_write_remove_entry_log_msg(void *udata, const H5C_cache_entry_t *entr
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(trace_udata);
- HDassert(trace_udata->message);
- HDassert(entry);
+ assert(trace_udata);
+ assert(trace_udata->message);
+ assert(entry);
/* Create the log message string */
HDsnprintf(trace_udata->message, H5C_MAX_TRACE_LOG_MSG_SIZE, "H5AC_remove_entry 0x%lx %d\n",
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index a92ac10..82b0705 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -181,34 +181,34 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(num_candidates > 0);
- HDassert((!cache_ptr->slist_enabled) || (num_candidates <= cache_ptr->slist_len));
- HDassert(candidates_list_ptr != NULL);
- HDassert(0 <= mpi_rank);
- HDassert(mpi_rank < mpi_size);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(num_candidates > 0);
+ assert((!cache_ptr->slist_enabled) || (num_candidates <= cache_ptr->slist_len));
+ assert(candidates_list_ptr != NULL);
+ assert(0 <= mpi_rank);
+ assert(mpi_rank < mpi_size);
/* Initialize the entries_to_flush and entries_to_clear arrays */
- HDmemset(entries_to_flush, 0, sizeof(entries_to_flush));
- HDmemset(entries_to_clear, 0, sizeof(entries_to_clear));
+ memset(entries_to_flush, 0, sizeof(entries_to_flush));
+ memset(entries_to_clear, 0, sizeof(entries_to_clear));
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout, "%s:%d: setting up candidate assignment table.\n", __func__, mpi_rank);
+ fprintf(stdout, "%s:%d: setting up candidate assignment table.\n", __func__, mpi_rank);
- HDmemset(tbl_buf, 0, sizeof(tbl_buf));
+ memset(tbl_buf, 0, sizeof(tbl_buf));
HDsnprintf(tbl_buf, sizeof(tbl_buf), "candidate list = ");
for (u = 0; u < num_candidates; u++)
HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " 0x%llx", (long long)(*(candidates_list_ptr + u)));
HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
- HDfprintf(stdout, "%s", tbl_buf);
+ fprintf(stdout, "%s", tbl_buf);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
if (f->shared->coll_md_write) {
/* Sanity check */
- HDassert(NULL == cache_ptr->coll_write_list);
+ assert(NULL == cache_ptr->coll_write_list);
/* Create skip list of entries for collective write */
if (NULL == (cache_ptr->coll_write_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
@@ -242,7 +242,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
candidate_assignment_table[u] = candidate_assignment_table[u - 1] + n;
} /* end else */
} /* end else */
- HDassert((candidate_assignment_table[mpi_size - 1] + n) == num_candidates);
+ assert((candidate_assignment_table[mpi_size - 1] + n) == num_candidates);
#ifdef H5C_DO_SANITY_CHECKS
/* Verify that the candidate assignment table has the expected form */
@@ -252,9 +252,9 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
a = candidate_assignment_table[u] - candidate_assignment_table[u - 1];
b = candidate_assignment_table[u + 1] - candidate_assignment_table[u];
- HDassert(n + 1 >= a);
- HDassert(a >= b);
- HDassert(b >= n);
+ assert(n + 1 >= a);
+ assert(a >= b);
+ assert(b >= n);
}
#endif /* H5C_DO_SANITY_CHECKS */
@@ -268,17 +268,17 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
for (u = 0; u <= (unsigned)mpi_size; u++)
HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " %u", candidate_assignment_table[u]);
HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
- HDfprintf(stdout, "%s", tbl_buf);
+ fprintf(stdout, "%s", tbl_buf);
- HDfprintf(stdout, "%s:%d: flush entries [%u, %u].\n", __func__, mpi_rank, first_entry_to_flush,
- last_entry_to_flush);
+ fprintf(stdout, "%s:%d: flush entries [%u, %u].\n", __func__, mpi_rank, first_entry_to_flush,
+ last_entry_to_flush);
- HDfprintf(stdout, "%s:%d: marking entries.\n", __func__, mpi_rank);
+ fprintf(stdout, "%s:%d: marking entries.\n", __func__, mpi_rank);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
for (u = 0; u < num_candidates; u++) {
addr = candidates_list_ptr[u];
- HDassert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(addr));
#ifdef H5C_DO_SANITY_CHECKS
if (u > 0) {
@@ -304,11 +304,11 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry is protected?!?!?")
/* Sanity checks */
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring >= H5C_RING_USER);
- HDassert(entry_ptr->ring <= H5C_RING_SB);
- HDassert(!entry_ptr->flush_immediately);
- HDassert(!entry_ptr->clear_on_unprotect);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->ring >= H5C_RING_USER);
+ assert(entry_ptr->ring <= H5C_RING_SB);
+ assert(!entry_ptr->flush_immediately);
+ assert(!entry_ptr->clear_on_unprotect);
/* Determine whether the entry is to be cleared or flushed,
* and mark it accordingly. We will scan the protected and
@@ -346,13 +346,13 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
n += entries_to_clear[u];
} /* end if */
- HDassert((unsigned)m == total_entries_to_flush);
- HDassert(n == total_entries_to_clear);
+ assert((unsigned)m == total_entries_to_flush);
+ assert(n == total_entries_to_clear);
#endif /* H5C_DO_SANITY_CHECKS */
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n", __func__, mpi_rank,
- num_candidates, total_entries_to_clear, total_entries_to_flush);
+ fprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n", __func__, mpi_rank,
+ num_candidates, total_entries_to_clear, total_entries_to_flush);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
/* We have now marked all the entries on the candidate list for
@@ -371,7 +371,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
/* If we've deferred writing to do it collectively, take care of that now */
if (f->shared->coll_md_write) {
/* Sanity check */
- HDassert(cache_ptr->coll_write_list);
+ assert(cache_ptr->coll_write_list);
/* Write collective list */
if (H5C__collective_write(f) < 0)
@@ -416,8 +416,8 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* As a sanity check, set space needed to the dirty_index_size. This
* should be the sum total of the sizes of all the dirty entries
@@ -426,14 +426,14 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
*/
space_needed = cache_ptr->dirty_index_size;
- HDassert((!cache_ptr->slist_enabled) || (space_needed == cache_ptr->slist_size));
+ assert((!cache_ptr->slist_enabled) || (space_needed == cache_ptr->slist_size));
/* We shouldn't have any protected entries at this point, but it is
* possible that some dirty entries may reside on the pinned list.
*/
- HDassert(cache_ptr->dirty_index_size <= (cache_ptr->dLRU_list_size + cache_ptr->pel_size));
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_len <= (cache_ptr->dLRU_list_len + cache_ptr->pel_len)));
+ assert(cache_ptr->dirty_index_size <= (cache_ptr->dLRU_list_size + cache_ptr->pel_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_len <= (cache_ptr->dLRU_list_len + cache_ptr->pel_len)));
if (space_needed > 0) {
H5C_cache_entry_t *entry_ptr;
@@ -441,7 +441,7 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
size_t nominated_entries_size = 0;
haddr_t nominated_addr;
- HDassert((!cache_ptr->slist_enabled) || (cache_ptr->slist_len > 0));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_len > 0));
/* Scan the dirty LRU list from tail forward and nominate sufficient
* entries to free up the necessary space.
@@ -450,11 +450,11 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
while ((nominated_entries_size < space_needed) &&
((!cache_ptr->slist_enabled) || (nominated_entries_count < cache_ptr->slist_len)) &&
(entry_ptr != NULL)) {
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->is_read_only));
- HDassert(entry_ptr->ro_ref_count == 0);
- HDassert(entry_ptr->is_dirty);
- HDassert((!cache_ptr->slist_enabled) || (entry_ptr->in_slist));
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_read_only));
+ assert(entry_ptr->ro_ref_count == 0);
+ assert(entry_ptr->is_dirty);
+ assert((!cache_ptr->slist_enabled) || (entry_ptr->in_slist));
nominated_addr = entry_ptr->addr;
if (H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0)
@@ -466,7 +466,7 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
entry_ptr = entry_ptr->aux_prev;
} /* end while */
- HDassert(entry_ptr == NULL);
+ assert(entry_ptr == NULL);
/* it is possible that there are some dirty entries on the
* protected entry list as well -- scan it too if necessary
@@ -476,11 +476,11 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
((!cache_ptr->slist_enabled) || (nominated_entries_count < cache_ptr->slist_len)) &&
(entry_ptr != NULL)) {
if (entry_ptr->is_dirty) {
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->is_read_only));
- HDassert(entry_ptr->ro_ref_count == 0);
- HDassert(entry_ptr->is_dirty);
- HDassert(entry_ptr->in_slist);
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_read_only));
+ assert(entry_ptr->ro_ref_count == 0);
+ assert(entry_ptr->is_dirty);
+ assert(entry_ptr->in_slist);
nominated_addr = entry_ptr->addr;
if (H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0)
@@ -493,8 +493,8 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr)
entry_ptr = entry_ptr->next;
} /* end while */
- HDassert((!cache_ptr->slist_enabled) || (nominated_entries_count == cache_ptr->slist_len));
- HDassert(nominated_entries_size == space_needed);
+ assert((!cache_ptr->slist_enabled) || (nominated_entries_count == cache_ptr->slist_len));
+ assert(nominated_entries_size == space_needed);
} /* end if */
done:
@@ -527,8 +527,8 @@ H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* compute the number of bytes (if any) that must be flushed to get the
* cache back within its min clean constraints.
@@ -554,7 +554,7 @@ H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr)
unsigned nominated_entries_count = 0;
size_t nominated_entries_size = 0;
- HDassert((!cache_ptr->slist_enabled) || (cache_ptr->slist_len > 0));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_len > 0));
/* Scan the dirty LRU list from tail forward and nominate sufficient
* entries to free up the necessary space.
@@ -565,11 +565,11 @@ H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr)
(entry_ptr != NULL) && (!entry_ptr->flush_me_last)) {
haddr_t nominated_addr;
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->is_read_only));
- HDassert(entry_ptr->ro_ref_count == 0);
- HDassert(entry_ptr->is_dirty);
- HDassert((!cache_ptr->slist_enabled) || (entry_ptr->in_slist));
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->is_read_only));
+ assert(entry_ptr->ro_ref_count == 0);
+ assert(entry_ptr->is_dirty);
+ assert((!cache_ptr->slist_enabled) || (entry_ptr->in_slist));
nominated_addr = entry_ptr->addr;
if (H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0)
@@ -581,9 +581,9 @@ H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr)
entry_ptr = entry_ptr->aux_prev;
} /* end while */
- HDassert((!cache_ptr->slist_enabled) || (nominated_entries_count <= cache_ptr->slist_len));
- HDassert(nominated_entries_size <= cache_ptr->dirty_index_size);
- HDassert(nominated_entries_size >= space_needed);
+ assert((!cache_ptr->slist_enabled) || (nominated_entries_count <= cache_ptr->slist_len));
+ assert(nominated_entries_size <= cache_ptr->dirty_index_size);
+ assert(nominated_entries_size >= space_needed);
} /* end if */
done:
@@ -644,14 +644,14 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(ce_array_len > 0);
- HDassert(ce_array_ptr != NULL);
+ assert(ce_array_len > 0);
+ assert(ce_array_ptr != NULL);
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 ||
@@ -679,20 +679,19 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
#endif /* H5C_DO_SANITY_CHECKS */
- HDassert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(addr));
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
if (entry_ptr == NULL) {
#ifdef H5C_DO_SANITY_CHECKS
- HDfprintf(stdout, "H5C_mark_entries_as_clean: entry[%u] = %" PRIuHADDR " not in cache.\n", u,
- addr);
+ fprintf(stdout, "H5C_mark_entries_as_clean: entry[%u] = %" PRIuHADDR " not in cache.\n", u, addr);
#endif /* H5C_DO_SANITY_CHECKS */
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not in cache?!?!?")
} /* end if */
else if (!entry_ptr->is_dirty) {
#ifdef H5C_DO_SANITY_CHECKS
- HDfprintf(stdout, "H5C_mark_entries_as_clean: entry %" PRIuHADDR " is not dirty!?!\n", addr);
+ fprintf(stdout, "H5C_mark_entries_as_clean: entry %" PRIuHADDR " is not dirty!?!\n", addr);
#endif /* H5C_DO_SANITY_CHECKS */
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?")
} /* end else-if */
@@ -762,7 +761,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
} /* end while */
#ifdef H5C_DO_SANITY_CHECKS
- HDassert(entries_cleared == other_entries_marked);
+ assert(entries_cleared == other_entries_marked);
#endif /* H5C_DO_SANITY_CHECKS */
/* It is also possible that some of the cleared entries are on the
@@ -793,11 +792,11 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
} /* end while */
#ifdef H5C_DO_SANITY_CHECKS
- HDassert(entries_cleared == pinned_entries_marked + other_entries_marked);
- HDassert(entries_cleared + protected_entries_marked == ce_array_len);
+ assert(entries_cleared == pinned_entries_marked + other_entries_marked);
+ assert(entries_cleared + protected_entries_marked == ce_array_len);
#endif /* H5C_DO_SANITY_CHECKS */
- HDassert((entries_cleared == ce_array_len) || ((ce_array_len - entries_cleared) <= cache_ptr->pl_len));
+ assert((entries_cleared == ce_array_len) || ((ce_array_len - entries_cleared) <= cache_ptr->pl_len));
#ifdef H5C_DO_SANITY_CHECKS
u = 0;
@@ -807,7 +806,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
u++;
entry_ptr = entry_ptr->next;
}
- HDassert((entries_cleared + u) == ce_array_len);
+ assert((entries_cleared + u) == ce_array_len);
#endif /* H5C_DO_SANITY_CHECKS */
done:
@@ -853,7 +852,7 @@ H5C_clear_coll_entries(H5C_t *cache_ptr, hbool_t partial)
H5C_cache_entry_t *prev_ptr = entry_ptr->coll_prev;
/* Sanity check */
- HDassert(entry_ptr->coll_access);
+ assert(entry_ptr->coll_access);
/* Mark entry as independent */
entry_ptr->coll_access = FALSE;
@@ -901,10 +900,10 @@ H5C__collective_write(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f != NULL);
+ assert(f != NULL);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->coll_write_list != NULL);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->coll_write_list != NULL);
/* Get original transfer mode */
if (H5CX_get_io_xfer_mode(&orig_xfer_mode) < 0)
@@ -935,12 +934,12 @@ H5C__collective_write(H5F_t *f)
/* Fill arrays */
node = H5SL_first(cache_ptr->coll_write_list);
- HDassert(node);
+ assert(node);
if (NULL == (entry_ptr = (H5C_cache_entry_t *)H5SL_item(node)))
HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't retrieve skip list item")
/* Set up initial array position & buffer base address */
- HDassert(entry_ptr->type);
+ assert(entry_ptr->type);
base_buf = entry_ptr->image_ptr;
addrs[0] = entry_ptr->addr;
sizes[0] = entry_ptr->size;
@@ -958,7 +957,7 @@ H5C__collective_write(H5F_t *f)
HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't retrieve skip list item")
/* Set up array position */
- HDassert(entry_ptr->type);
+ assert(entry_ptr->type);
addrs[i] = entry_ptr->addr;
sizes[i] = entry_ptr->size;
bufs[i] = entry_ptr->image_ptr;
@@ -1051,25 +1050,25 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_ptr);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_ptr);
- HDassert(entries_to_flush[H5C_RING_UNDEFINED] == 0);
- HDassert(entries_to_clear[H5C_RING_UNDEFINED] == 0);
+ assert(entries_to_flush[H5C_RING_UNDEFINED] == 0);
+ assert(entries_to_clear[H5C_RING_UNDEFINED] == 0);
#ifdef H5C_DO_SANITY_CHECKS
- HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
- HDassert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
- HDassert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->dirty_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
+ assert(cache_ptr->slist_ring_len[H5C_RING_UNDEFINED] == 0);
+ assert(cache_ptr->slist_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
for (i = H5C_RING_USER; i < H5C_RING_NTYPES; i++) {
index_len += cache_ptr->index_ring_len[i];
@@ -1081,12 +1080,12 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
slist_size += cache_ptr->slist_ring_size[i];
} /* end for */
- HDassert(cache_ptr->index_len == index_len);
- HDassert(cache_ptr->index_size == index_size);
- HDassert(cache_ptr->clean_index_size == clean_index_size);
- HDassert(cache_ptr->dirty_index_size == dirty_index_size);
- HDassert(cache_ptr->slist_len == slist_len);
- HDassert(cache_ptr->slist_size == slist_size);
+ assert(cache_ptr->index_len == index_len);
+ assert(cache_ptr->index_size == index_size);
+ assert(cache_ptr->clean_index_size == clean_index_size);
+ assert(cache_ptr->dirty_index_size == dirty_index_size);
+ assert(cache_ptr->slist_len == slist_len);
+ assert(cache_ptr->slist_size == slist_size);
#endif /* H5C_DO_SANITY_CHECKS */
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
@@ -1172,14 +1171,14 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->slist_ptr);
- HDassert(ring > H5C_RING_UNDEFINED);
- HDassert(ring < H5C_RING_NTYPES);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr->slist_ptr);
+ assert(ring > H5C_RING_UNDEFINED);
+ assert(ring < H5C_RING_NTYPES);
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
@@ -1209,7 +1208,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
H5C_cache_entry_t *next_ptr;
/* Entries in the LRU must not have flush dependency children */
- HDassert(entry_ptr->flush_dep_nchildren == 0);
+ assert(entry_ptr->flush_dep_nchildren == 0);
/* Remember dirty state of entry to advance to */
if (entry_ptr->prev != NULL)
@@ -1219,7 +1218,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
if (entry_ptr->ring == ring) {
/* If this process needs to clear this entry. */
if (entry_ptr->clear_on_unprotect) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
/* Set entry and flags for operation */
op_ptr = entry_ptr;
@@ -1233,7 +1232,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
entries_cleared++;
} /* end if */
else if (entry_ptr->flush_immediately) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
/* Set entry and flags for operation */
op_ptr = entry_ptr;
@@ -1306,13 +1305,13 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
* present. Hence the following assertion which should be
* removed if the above changes.
*/
- HDassert(!restart_scan);
- HDassert(entry_ptr->is_dirty == prev_is_dirty);
- HDassert(entry_ptr->next == next_ptr);
- HDassert(!entry_ptr->is_protected);
- HDassert(!entry_ptr->is_pinned);
+ assert(!restart_scan);
+ assert(entry_ptr->is_dirty == prev_is_dirty);
+ assert(entry_ptr->next == next_ptr);
+ assert(!entry_ptr->is_protected);
+ assert(!entry_ptr->is_pinned);
- HDassert(FALSE); /* see comment above */
+ assert(FALSE); /* see comment above */
restart_scan = FALSE;
entry_ptr = cache_ptr->LRU_tail_ptr;
@@ -1351,7 +1350,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
H5C_cache_entry_t *prev_ptr;
hbool_t next_is_dirty = FALSE;
- HDassert(entry_ptr->is_pinned);
+ assert(entry_ptr->is_pinned);
/* Remember dirty state of entry to advance to */
if (entry_ptr->next != NULL)
@@ -1359,7 +1358,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
if (entry_ptr->ring == ring && entry_ptr->flush_dep_ndirty_children == 0) {
if (entry_ptr->clear_on_unprotect) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
/* Set entry and flags for operation */
op_ptr = entry_ptr;
@@ -1371,7 +1370,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
progress = TRUE;
} /* end if */
else if (entry_ptr->flush_immediately) {
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->is_dirty);
/* Set entry and flags for operation */
op_ptr = entry_ptr;
@@ -1431,11 +1430,11 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
* over from the head.
*/
- HDassert(!restart_scan);
- HDassert(entry_ptr->is_dirty == next_is_dirty);
- HDassert(entry_ptr->prev == prev_ptr);
- HDassert(!entry_ptr->is_protected);
- HDassert(entry_ptr->is_pinned);
+ assert(!restart_scan);
+ assert(entry_ptr->is_dirty == next_is_dirty);
+ assert(entry_ptr->prev == prev_ptr);
+ assert(!entry_ptr->is_protected);
+ assert(entry_ptr->is_pinned);
/* This code should be un-reachable at present,
* as all the operations by entries on flush that could cause
@@ -1443,7 +1442,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
* present. Hence the following assertion which should be
* removed if the above changes.
*/
- HDassert(FALSE);
+ assert(FALSE);
restart_scan = FALSE;
@@ -1467,14 +1466,14 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
*/
#ifdef H5C_DO_SANITY_CHECKS
- HDassert(init_index_len == cache_ptr->index_len);
+ assert(init_index_len == cache_ptr->index_len);
#endif /* H5C_DO_SANITY_CHECKS */
if (entries_flushed != entries_to_flush || entries_cleared != entries_to_clear) {
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
- HDassert(!entry_ptr->clear_on_unprotect || (entry_ptr->ring > ring));
- HDassert(!entry_ptr->flush_immediately || (entry_ptr->ring > ring));
+ assert(!entry_ptr->clear_on_unprotect || (entry_ptr->ring > ring));
+ assert(!entry_ptr->flush_immediately || (entry_ptr->ring > ring));
entry_ptr = entry_ptr->il_next;
} /* end while */
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 7bd7087..095dc8b 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -1173,7 +1173,7 @@ if ( ( (cache_ptr)->index_size != \
} \
if((entry_ptr)->flush_me_last) { \
(cache_ptr)->num_last_entries++; \
- HDassert((cache_ptr)->num_last_entries <= 2); \
+ assert((cache_ptr)->num_last_entries <= 2); \
} \
H5C__IL_DLL_APPEND((entry_ptr), (cache_ptr)->il_head, \
(cache_ptr)->il_tail, (cache_ptr)->il_len, \
@@ -1211,7 +1211,7 @@ if ( ( (cache_ptr)->index_size != \
} \
if((entry_ptr)->flush_me_last) { \
(cache_ptr)->num_last_entries--; \
- HDassert((cache_ptr)->num_last_entries <= 1); \
+ assert((cache_ptr)->num_last_entries <= 1); \
} \
H5C__IL_DLL_REMOVE((entry_ptr), (cache_ptr)->il_head, \
(cache_ptr)->il_tail, (cache_ptr)->il_len, \
@@ -1233,7 +1233,7 @@ if ( ( (cache_ptr)->index_size != \
if(entry_ptr != ((cache_ptr)->index)[k]) { \
if((entry_ptr)->ht_next) \
(entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \
- HDassert((entry_ptr)->ht_prev != NULL); \
+ assert((entry_ptr)->ht_prev != NULL); \
(entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \
((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \
(entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \
@@ -1353,21 +1353,21 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
\
if ( (cache_ptr)->slist_enabled ) { \
\
- HDassert( (entry_ptr) ); \
- HDassert( (entry_ptr)->size > 0 ); \
- HDassert( H5F_addr_defined((entry_ptr)->addr) ); \
- HDassert( !((entry_ptr)->in_slist) ); \
- HDassert( ! H5C_ENTRY_IN_SLIST((cache_ptr), (entry_ptr)) ); \
- HDassert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
- HDassert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
- HDassert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
+ assert( (entry_ptr) ); \
+ assert( (entry_ptr)->size > 0 ); \
+ assert( H5F_addr_defined((entry_ptr)->addr) ); \
+ assert( !((entry_ptr)->in_slist) ); \
+ assert( ! H5C_ENTRY_IN_SLIST((cache_ptr), (entry_ptr)) ); \
+ assert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
+ assert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
+ assert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
(cache_ptr)->slist_len ); \
- HDassert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
+ assert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
(cache_ptr)->slist_size ); \
\
if ( H5SL_insert((cache_ptr)->slist_ptr, entry_ptr, \
@@ -1384,13 +1384,13 @@ if ( ( (cache_ptr)->index_size != \
(cache_ptr)->slist_len_increase++; \
(cache_ptr)->slist_size_increase += (int64_t)((entry_ptr)->size); \
\
- HDassert( (cache_ptr)->slist_len > 0 ); \
- HDassert( (cache_ptr)->slist_size > 0 ); \
+ assert( (cache_ptr)->slist_len > 0 ); \
+ assert( (cache_ptr)->slist_size > 0 ); \
\
} else { /* slist disabled */ \
\
- HDassert( (cache_ptr)->slist_len == 0 ); \
- HDassert( (cache_ptr)->slist_size == 0 ); \
+ assert( (cache_ptr)->slist_len == 0 ); \
+ assert( (cache_ptr)->slist_size == 0 ); \
} \
} /* H5C__INSERT_ENTRY_IN_SLIST */
@@ -1398,23 +1398,23 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
\
if ( (cache_ptr)->slist_enabled ) { \
\
- HDassert( (entry_ptr) ); \
- HDassert( (entry_ptr)->size > 0 ); \
- HDassert( ! H5C_ENTRY_IN_SLIST((cache_ptr), (entry_ptr)) ); \
- HDassert( H5F_addr_defined((entry_ptr)->addr) ); \
- HDassert( !((entry_ptr)->in_slist) ); \
- HDassert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
- HDassert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
- HDassert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
+ assert( (entry_ptr) ); \
+ assert( (entry_ptr)->size > 0 ); \
+ assert( ! H5C_ENTRY_IN_SLIST((cache_ptr), (entry_ptr)) ); \
+ assert( H5F_addr_defined((entry_ptr)->addr) ); \
+ assert( !((entry_ptr)->in_slist) ); \
+ assert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
+ assert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
+ assert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
(cache_ptr)->slist_len ); \
- HDassert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
+ assert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
(cache_ptr)->slist_size ); \
- HDassert( (cache_ptr)->slist_ptr ); \
+ assert( (cache_ptr)->slist_ptr ); \
\
if ( H5SL_insert((cache_ptr)->slist_ptr, entry_ptr, \
&((entry_ptr)->addr)) < 0) \
@@ -1428,13 +1428,13 @@ if ( ( (cache_ptr)->index_size != \
((cache_ptr)->slist_ring_len[(entry_ptr)->ring])++; \
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) += (entry_ptr)->size;\
\
- HDassert( (cache_ptr)->slist_len > 0 ); \
- HDassert( (cache_ptr)->slist_size > 0 ); \
+ assert( (cache_ptr)->slist_len > 0 ); \
+ assert( (cache_ptr)->slist_size > 0 ); \
\
} else { /* slist disabled */ \
\
- HDassert( (cache_ptr)->slist_len == 0 ); \
- HDassert( (cache_ptr)->slist_size == 0 ); \
+ assert( (cache_ptr)->slist_len == 0 ); \
+ assert( (cache_ptr)->slist_size == 0 ); \
} \
} /* H5C__INSERT_ENTRY_IN_SLIST */
@@ -1459,38 +1459,38 @@ if ( ( (cache_ptr)->index_size != \
#ifdef H5C_DO_SANITY_CHECKS
#define H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, during_flush) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
\
if ( (cache_ptr)->slist_enabled ) { \
\
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
- HDassert( (entry_ptr)->in_slist ); \
- HDassert( (cache_ptr)->slist_ptr ); \
- HDassert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
- HDassert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
- HDassert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
+ assert( (entry_ptr)->in_slist ); \
+ assert( (cache_ptr)->slist_ptr ); \
+ assert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
+ assert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
+ assert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
(cache_ptr)->slist_len ); \
- HDassert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
+ assert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
(cache_ptr)->slist_size ); \
- HDassert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \
+ assert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \
\
if ( H5SL_remove((cache_ptr)->slist_ptr, &(entry_ptr)->addr) \
!= (entry_ptr) ) \
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, \
"can't delete entry from skip list") \
\
- HDassert( (cache_ptr)->slist_len > 0 ); \
+ assert( (cache_ptr)->slist_len > 0 ); \
if(!(during_flush)) \
(cache_ptr)->slist_changed = TRUE; \
(cache_ptr)->slist_len--; \
- HDassert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \
+ assert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \
(cache_ptr)->slist_size -= (entry_ptr)->size; \
((cache_ptr)->slist_ring_len[(entry_ptr)->ring])--; \
- HDassert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] >= \
+ assert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] >= \
(entry_ptr)->size ); \
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) -= (entry_ptr)->size;\
(cache_ptr)->slist_len_increase--; \
@@ -1499,8 +1499,8 @@ if ( ( (cache_ptr)->index_size != \
\
} else { /* slist disabled */ \
\
- HDassert( (cache_ptr)->slist_len == 0 ); \
- HDassert( (cache_ptr)->slist_size == 0 ); \
+ assert( (cache_ptr)->slist_len == 0 ); \
+ assert( (cache_ptr)->slist_size == 0 ); \
} \
} /* H5C__REMOVE_ENTRY_FROM_SLIST */
@@ -1508,21 +1508,21 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, during_flush) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
\
if ( (cache_ptr)->slist_enabled ) { \
\
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->in_slist ); \
- HDassert( (cache_ptr)->slist_ptr ); \
- HDassert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
- HDassert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
- HDassert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->in_slist ); \
+ assert( (cache_ptr)->slist_ptr ); \
+ assert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
+ assert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
+ assert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
(cache_ptr)->slist_len ); \
- HDassert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
+ assert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
(cache_ptr)->slist_size ); \
\
if ( H5SL_remove((cache_ptr)->slist_ptr, &(entry_ptr)->addr) \
@@ -1530,22 +1530,22 @@ if ( ( (cache_ptr)->index_size != \
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, \
"can't delete entry from skip list") \
\
- HDassert( (cache_ptr)->slist_len > 0 ); \
+ assert( (cache_ptr)->slist_len > 0 ); \
if(!(during_flush)) \
(cache_ptr)->slist_changed = TRUE; \
(cache_ptr)->slist_len--; \
- HDassert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \
+ assert( (cache_ptr)->slist_size >= (entry_ptr)->size ); \
(cache_ptr)->slist_size -= (entry_ptr)->size; \
((cache_ptr)->slist_ring_len[(entry_ptr)->ring])--; \
- HDassert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] >= \
+ assert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] >= \
(entry_ptr)->size ); \
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) -= (entry_ptr)->size;\
(entry_ptr)->in_slist = FALSE; \
\
} else { /* slist disabled */ \
\
- HDassert( (cache_ptr)->slist_len == 0 ); \
- HDassert( (cache_ptr)->slist_size == 0 ); \
+ assert( (cache_ptr)->slist_len == 0 ); \
+ assert( (cache_ptr)->slist_size == 0 ); \
} \
} /* H5C__REMOVE_ENTRY_FROM_SLIST */
@@ -1570,28 +1570,28 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
\
if ( (cache_ptr)->slist_enabled ) { \
\
- HDassert( (old_size) > 0 ); \
- HDassert( (new_size) > 0 ); \
- HDassert( (old_size) <= (cache_ptr)->slist_size ); \
- HDassert( (cache_ptr)->slist_len > 0 ); \
- HDassert( ((cache_ptr)->slist_len > 1) || \
+ assert( (old_size) > 0 ); \
+ assert( (new_size) > 0 ); \
+ assert( (old_size) <= (cache_ptr)->slist_size ); \
+ assert( (cache_ptr)->slist_len > 0 ); \
+ assert( ((cache_ptr)->slist_len > 1) || \
( (cache_ptr)->slist_size == (old_size) ) ); \
- HDassert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
- HDassert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
- HDassert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
+ assert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
+ assert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
+ assert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
(cache_ptr)->slist_len ); \
- HDassert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
+ assert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
(cache_ptr)->slist_size ); \
\
(cache_ptr)->slist_size -= (old_size); \
(cache_ptr)->slist_size += (new_size); \
\
- HDassert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] \
+ assert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] \
>= (old_size) ); \
\
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) -= (old_size); \
@@ -1600,14 +1600,14 @@ if ( ( (cache_ptr)->index_size != \
(cache_ptr)->slist_size_increase -= (int64_t)(old_size); \
(cache_ptr)->slist_size_increase += (int64_t)(new_size); \
\
- HDassert( (new_size) <= (cache_ptr)->slist_size ); \
- HDassert( ( (cache_ptr)->slist_len > 1 ) || \
+ assert( (new_size) <= (cache_ptr)->slist_size ); \
+ assert( ( (cache_ptr)->slist_len > 1 ) || \
( (cache_ptr)->slist_size == (new_size) ) ); \
\
} else { /* slist disabled */ \
\
- HDassert( (cache_ptr)->slist_len == 0 ); \
- HDassert( (cache_ptr)->slist_size == 0 ); \
+ assert( (cache_ptr)->slist_len == 0 ); \
+ assert( (cache_ptr)->slist_size == 0 ); \
} \
} /* H5C__UPDATE_SLIST_FOR_SIZE_CHANGE */
@@ -1615,40 +1615,40 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
\
if ( (cache_ptr)->slist_enabled ) { \
\
- HDassert( (old_size) > 0 ); \
- HDassert( (new_size) > 0 ); \
- HDassert( (old_size) <= (cache_ptr)->slist_size ); \
- HDassert( (cache_ptr)->slist_len > 0 ); \
- HDassert( ((cache_ptr)->slist_len > 1) || \
+ assert( (old_size) > 0 ); \
+ assert( (new_size) > 0 ); \
+ assert( (old_size) <= (cache_ptr)->slist_size ); \
+ assert( (cache_ptr)->slist_len > 0 ); \
+ assert( ((cache_ptr)->slist_len > 1) || \
( (cache_ptr)->slist_size == (old_size) ) ); \
- HDassert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
- HDassert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
- HDassert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
+ assert( (entry_ptr)->ring > H5C_RING_UNDEFINED ); \
+ assert( (entry_ptr)->ring < H5C_RING_NTYPES ); \
+ assert( (cache_ptr)->slist_ring_len[(entry_ptr)->ring] <= \
(cache_ptr)->slist_len ); \
- HDassert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
+ assert( (cache_ptr)->slist_ring_size[(entry_ptr)->ring] <= \
(cache_ptr)->slist_size ); \
\
(cache_ptr)->slist_size -= (old_size); \
(cache_ptr)->slist_size += (new_size); \
\
- HDassert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] >= \
+ assert( (cache_ptr)->slist_ring_size[((entry_ptr)->ring)] >= \
(old_size) ); \
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) -= (old_size); \
((cache_ptr)->slist_ring_size[(entry_ptr)->ring]) += (new_size); \
\
- HDassert( (new_size) <= (cache_ptr)->slist_size ); \
- HDassert( ( (cache_ptr)->slist_len > 1 ) || \
+ assert( (new_size) <= (cache_ptr)->slist_size ); \
+ assert( ( (cache_ptr)->slist_len > 1 ) || \
( (cache_ptr)->slist_size == (new_size) ) ); \
\
} else { /* slist disabled */ \
\
- HDassert( (cache_ptr)->slist_len == 0 ); \
- HDassert( (cache_ptr)->slist_size == 0 ); \
+ assert( (cache_ptr)->slist_len == 0 ); \
+ assert( (cache_ptr)->slist_size == 0 ); \
} \
} /* H5C__UPDATE_SLIST_FOR_SIZE_CHANGE */
@@ -1684,14 +1684,14 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( !((entry_ptr)->is_pinned) ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( !((entry_ptr)->is_pinned) ); \
+ assert( (entry_ptr)->size > 0 ); \
\
/* modified LRU specific code */ \
\
@@ -1726,14 +1726,14 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( !((entry_ptr)->is_pinned) ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( !((entry_ptr)->is_pinned) ); \
+ assert( (entry_ptr)->size > 0 ); \
\
/* modified LRU specific code */ \
\
@@ -1771,13 +1771,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( ! ((entry_ptr)->is_pinned) ) { \
\
@@ -1833,13 +1833,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( ! ((entry_ptr)->is_pinned) ) { \
\
@@ -1897,13 +1897,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_INSERT_APPEND(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -1947,13 +1947,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_INSERT_APPEND(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -2003,13 +2003,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -2053,13 +2053,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -2113,13 +2113,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -2175,13 +2175,13 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -2240,12 +2240,12 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( ! ( (entry_ptr)->is_pinned ) && ! ( ((entry_ptr)->is_protected ) ) ) {\
\
@@ -2317,12 +2317,12 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
\
if ( ! ( (entry_ptr)->is_pinned ) && ! ( ((entry_ptr)->is_protected ) ) ) {\
\
@@ -2378,14 +2378,14 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
- HDassert( new_size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
+ assert( new_size > 0 ); \
\
if ( (entry_ptr)->coll_access ) { \
\
@@ -2443,14 +2443,14 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
- HDassert( new_size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->size > 0 ); \
+ assert( new_size > 0 ); \
\
if ( (entry_ptr)->is_pinned ) { \
\
@@ -2505,14 +2505,14 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->is_pinned); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->is_pinned); \
+ assert( (entry_ptr)->size > 0 ); \
\
/* Regardless of the replacement policy, remove the entry from the \
* pinned entry list. \
@@ -2561,14 +2561,14 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->is_pinned); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( !((entry_ptr)->is_protected) ); \
+ assert( !((entry_ptr)->is_read_only) ); \
+ assert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ assert( (entry_ptr)->is_pinned); \
+ assert( (entry_ptr)->size > 0 ); \
\
/* Regardless of the replacement policy, remove the entry from the \
* pinned entry list. \
@@ -2620,11 +2620,11 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( (entry_ptr)->is_protected); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( (entry_ptr)->is_protected); \
+ assert( (entry_ptr)->size > 0 ); \
\
/* Regardless of the replacement policy, remove the entry from the \
* protected list. \
@@ -2679,11 +2679,11 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( (entry_ptr)->is_protected); \
- HDassert( (entry_ptr)->size > 0 ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
+ assert( (entry_ptr)->is_protected); \
+ assert( (entry_ptr)->size > 0 ); \
\
/* Regardless of the replacement policy, remove the entry from the \
* protected list. \
@@ -2873,9 +2873,9 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__INSERT_IN_COLL_LIST(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
\
/* insert the entry at the head of the list. */ \
\
@@ -2903,9 +2903,9 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__REMOVE_FROM_COLL_LIST(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
+ assert( (cache_ptr) ); \
+ assert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ assert( (entry_ptr) ); \
\
/* remove the entry from the list. */ \
\
@@ -2933,9 +2933,9 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__MOVE_TO_TOP_IN_COLL_LIST(cache_ptr, entry_ptr, fail_val) \
{ \
- HDassert((cache_ptr)); \
- HDassert((cache_ptr)->magic == H5C__H5C_T_MAGIC); \
- HDassert((entry_ptr)); \
+ assert((cache_ptr)); \
+ assert((cache_ptr)->magic == H5C__H5C_T_MAGIC); \
+ assert((entry_ptr)); \
\
/* Remove entry and insert at the head of the list. */ \
H5C__COLL_DLL_REMOVE((entry_ptr), (cache_ptr)->coll_head_ptr, \
@@ -3314,7 +3314,7 @@ typedef struct H5C_tag_info_t {
* Note: At this time, the this field will only be applied to
* two types of entries: the superblock and the file driver info
* message. The code utilizing these flags is protected with
- * HDasserts to enforce this.
+ * asserts to enforce this.
*
* The cache must deal with the case in which entries may be dirtied, moved,
* or have their sizes changed during a flush. To allow sanity checks in this
diff --git a/src/H5Cprefetched.c b/src/H5Cprefetched.c
index 8ce9419..ccaccad 100644
--- a/src/H5Cprefetched.c
+++ b/src/H5Cprefetched.c
@@ -210,9 +210,9 @@ H5C__prefetched_entry_notify(H5C_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->prefetched);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(entry_ptr->prefetched);
switch (action) {
case H5C_NOTIFY_ACTION_AFTER_INSERT:
@@ -232,11 +232,11 @@ H5C__prefetched_entry_notify(H5C_notify_action_t action, void *_thing)
H5C_cache_entry_t *parent_ptr;
/* Sanity checks */
- HDassert(entry_ptr->flush_dep_parent);
+ assert(entry_ptr->flush_dep_parent);
parent_ptr = entry_ptr->flush_dep_parent[u];
- HDassert(parent_ptr);
- HDassert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(parent_ptr->flush_dep_nchildren > 0);
+ assert(parent_ptr);
+ assert(parent_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(parent_ptr->flush_dep_nchildren > 0);
/* Destroy flush dependency with flush dependency parent */
if (H5C_destroy_flush_dependency(parent_ptr, entry_ptr) < 0)
@@ -249,7 +249,7 @@ H5C__prefetched_entry_notify(H5C_notify_action_t action, void *_thing)
* field to reflect the destruction of the flush
* dependency relationship.
*/
- HDassert(parent_ptr->fd_child_count > 0);
+ assert(parent_ptr->fd_child_count > 0);
(parent_ptr->fd_child_count)--;
} /* end if */
} /* end for */
@@ -288,17 +288,17 @@ H5C__prefetched_entry_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(entry_ptr->prefetched);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(entry_ptr->prefetched);
/* Release array for flush dependency parent addresses */
if (entry_ptr->fd_parent_addrs != NULL) {
- HDassert(entry_ptr->fd_parent_count > 0);
+ assert(entry_ptr->fd_parent_count > 0);
entry_ptr->fd_parent_addrs = (haddr_t *)H5MM_xfree((void *)entry_ptr->fd_parent_addrs);
} /* end if */
else
- HDassert(entry_ptr->fd_parent_count == 0);
+ assert(entry_ptr->fd_parent_count == 0);
if (entry_ptr->image_ptr != NULL)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "prefetched entry image buffer still attached?")
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index a5330ce..b678392 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -1112,7 +1112,7 @@ typedef int H5C_ring_t;
* Note: At this time, the flush_me_last flag will only be applied to
* two types of entries: the superblock and the file driver info
* message. The code utilizing these flags is protected with
- * HDasserts to enforce this.
+ * asserts to enforce this.
*
* clear_on_unprotect: Boolean flag used only in PHDF5. When H5C is used
* to implement the metadata cache In the parallel case, only
diff --git a/src/H5Cquery.c b/src/H5Cquery.c
index db73d65..c8fc954 100644
--- a/src/H5Cquery.c
+++ b/src/H5Cquery.c
@@ -194,8 +194,8 @@ H5C_get_cache_hit_rate(const H5C_t *cache_ptr, double *hit_rate_ptr)
if (hit_rate_ptr == NULL)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad hit_rate_ptr on entry.")
- HDassert(cache_ptr->cache_hits >= 0);
- HDassert(cache_ptr->cache_accesses >= cache_ptr->cache_hits);
+ assert(cache_ptr->cache_hits >= 0);
+ assert(cache_ptr->cache_accesses >= cache_ptr->cache_hits);
if (cache_ptr->cache_accesses > 0)
*hit_rate_ptr = ((double)(cache_ptr->cache_hits)) / ((double)(cache_ptr->cache_accesses));
@@ -241,15 +241,15 @@ H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, hbool_t *in
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(H5F_addr_defined(addr));
- HDassert(in_cache_ptr != NULL);
+ assert(cache_ptr != NULL);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(H5F_addr_defined(addr));
+ assert(in_cache_ptr != NULL);
/* this test duplicates two of the above asserts, but we need an
* invocation of HGOTO_ERROR to keep the compiler happy.
@@ -342,8 +342,8 @@ H5C_get_aux_ptr(const H5C_t *cache_ptr)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
FUNC_LEAVE_NOAPI(cache_ptr->aux_ptr)
} /* H5C_get_aux_ptr() */
@@ -373,12 +373,12 @@ H5C_get_entry_ring(const H5F_t *f, haddr_t addr, H5C_ring_t *ring)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(H5F_addr_defined(addr));
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(H5F_addr_defined(addr));
/* Locate the entry at the address */
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
diff --git a/src/H5Ctag.c b/src/H5Ctag.c
index 10089e4..4fbc5d4 100644
--- a/src/H5Ctag.c
+++ b/src/H5Ctag.c
@@ -126,8 +126,8 @@ H5C_ignore_tags(H5C_t *cache)
FUNC_ENTER_NOAPI_NOERR
/* Assertions */
- HDassert(cache != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Set variable to ignore tag values upon assignment */
cache->ignore_tags = TRUE;
@@ -154,8 +154,8 @@ H5C_get_ignore_tags(const H5C_t *cache)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cache);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Return ignore tag value */
FUNC_LEAVE_NOAPI(cache->ignore_tags)
@@ -179,8 +179,8 @@ H5C_get_num_objs_corked(const H5C_t *cache)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cache);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Return value for num_objs_corked */
FUNC_LEAVE_NOAPI(cache->num_objs_corked)
@@ -212,9 +212,9 @@ H5C__tag_entry(H5C_t *cache, H5C_cache_entry_t *entry)
FUNC_ENTER_PACKAGE
/* Assertions */
- HDassert(cache != NULL);
- HDassert(entry != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(entry != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Get the tag */
tag = H5CX_get_tag();
@@ -254,12 +254,12 @@ H5C__tag_entry(H5C_t *cache, H5C_cache_entry_t *entry)
HASH_ADD(hh, cache->tag_list, tag, sizeof(haddr_t), tag_info);
}
else
- HDassert(tag_info->corked || (tag_info->entry_cnt > 0 && tag_info->head));
+ assert(tag_info->corked || (tag_info->entry_cnt > 0 && tag_info->head));
/* Sanity check entry, to avoid double insertions, etc */
- HDassert(entry->tl_next == NULL);
- HDassert(entry->tl_prev == NULL);
- HDassert(entry->tag_info == NULL);
+ assert(entry->tl_next == NULL);
+ assert(entry->tl_prev == NULL);
+ assert(entry->tag_info == NULL);
/* Add the entry to the list for the tagged object */
entry->tl_next = tag_info->head;
@@ -296,9 +296,9 @@ H5C__untag_entry(H5C_t *cache, H5C_cache_entry_t *entry)
FUNC_ENTER_PACKAGE_NOERR
/* Assertions */
- HDassert(cache != NULL);
- HDassert(entry != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(entry != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Get the entry's tag info struct */
if (NULL != (tag_info = entry->tag_info)) {
@@ -319,14 +319,14 @@ H5C__untag_entry(H5C_t *cache, H5C_cache_entry_t *entry)
/* Remove the tag info from the tag list, if there's no more entries with this tag */
if (!tag_info->corked && 0 == tag_info->entry_cnt) {
/* Sanity check */
- HDassert(NULL == tag_info->head);
+ assert(NULL == tag_info->head);
/* Release the tag info */
HASH_DELETE(hh, cache->tag_list, tag_info);
tag_info = H5FL_FREE(H5C_tag_info_t, tag_info);
}
else
- HDassert(tag_info->corked || NULL != tag_info->head);
+ assert(tag_info->corked || NULL != tag_info->head);
}
FUNC_LEAVE_NOAPI(ret_value)
@@ -355,8 +355,8 @@ H5C__iter_tagged_entries_real(H5C_t *cache, haddr_t tag, H5C_tag_iter_cb_t cb, v
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Search the list of tagged object addresses in the cache */
HASH_FIND(hh, cache->tag_list, &tag, sizeof(haddr_t), tag_info);
@@ -367,8 +367,8 @@ H5C__iter_tagged_entries_real(H5C_t *cache, haddr_t tag, H5C_tag_iter_cb_t cb, v
H5C_cache_entry_t *next_entry; /* Pointer to next entry in hash bucket chain */
/* Sanity check */
- HDassert(tag_info->head);
- HDassert(tag_info->entry_cnt > 0);
+ assert(tag_info->head);
+ assert(tag_info->entry_cnt > 0);
/* Iterate over the entries for this tag */
entry = tag_info->head;
@@ -411,8 +411,8 @@ H5C__iter_tagged_entries(H5C_t *cache, haddr_t tag, hbool_t match_global, H5C_ta
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cache != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Iterate over the entries for this tag */
if (H5C__iter_tagged_entries_real(cache, tag, cb, cb_ctx) < 0)
@@ -456,8 +456,8 @@ H5C__evict_tagged_entries_cb(H5C_cache_entry_t *entry, void *_ctx)
FUNC_ENTER_PACKAGE
/* Santify checks */
- HDassert(entry);
- HDassert(ctx);
+ assert(entry);
+ assert(ctx);
/* Attempt to evict entry */
if (entry->is_protected)
@@ -508,11 +508,11 @@ H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache = f->shared->cache; /* Get cache pointer */
- HDassert(cache != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Construct context for iterator callbacks */
ctx.f = f;
@@ -583,7 +583,7 @@ H5C__mark_tagged_entries_cb(H5C_cache_entry_t *entry, void H5_ATTR_UNUSED *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(entry);
+ assert(entry);
/* We only want to set the flush marker on entries that
* actually need flushed (i.e., dirty ones) */
@@ -616,8 +616,8 @@ H5C__mark_tagged_entries(H5C_t *cache, haddr_t tag)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(cache);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Iterate through hash table entries, marking those with specified tag, as
* well as any major global entries which should always be flushed
@@ -725,8 +725,8 @@ H5C_flush_tagged_entries(H5F_t *f, haddr_t tag)
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Get cache pointer */
cache = f->shared->cache;
@@ -767,7 +767,7 @@ H5C_retag_entries(H5C_t *cache, haddr_t src_tag, haddr_t dest_tag)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(cache);
+ assert(cache);
/* Remove tag info from tag list */
HASH_FIND(hh, cache->tag_list, &src_tag, sizeof(haddr_t), tag_info);
@@ -809,8 +809,8 @@ H5C__expunge_tag_type_metadata_cb(H5C_cache_entry_t *entry, void *_ctx)
FUNC_ENTER_PACKAGE
/* Santify checks */
- HDassert(entry);
- HDassert(ctx);
+ assert(entry);
+ assert(ctx);
/* Found one with the same tag and type id */
if (entry->type->id == ctx->type_id)
@@ -846,11 +846,11 @@ H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
cache = f->shared->cache; /* Get cache pointer */
- HDassert(cache != NULL);
- HDassert(cache->magic == H5C__H5C_T_MAGIC);
+ assert(cache != NULL);
+ assert(cache->magic == H5C__H5C_T_MAGIC);
/* Construct context for iterator callbacks */
ctx.f = f;
@@ -885,9 +885,9 @@ H5C_get_tag(const void *thing, haddr_t *tag)
FUNC_ENTER_NOAPI_NOERR
- HDassert(entry);
- HDassert(entry->tag_info);
- HDassert(tag);
+ assert(entry);
+ assert(entry->tag_info);
+ assert(tag);
/* Return the tag */
*tag = entry->tag_info->tag;
diff --git a/src/H5Ctest.c b/src/H5Ctest.c
index 6097e25..d0be0f9 100644
--- a/src/H5Ctest.c
+++ b/src/H5Ctest.c
@@ -93,8 +93,8 @@ H5C__verify_cork_tag_test_cb(H5C_cache_entry_t *entry, void *_ctx)
FUNC_ENTER_PACKAGE
/* Santify checks */
- HDassert(entry);
- HDassert(ctx);
+ assert(entry);
+ assert(ctx);
/* Retrieve corked status for entry */
is_corked = entry->tag_info ? entry->tag_info->corked : FALSE;
diff --git a/src/H5D.c b/src/H5D.c
index 66e3541..f9b17c5 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -1755,14 +1755,14 @@ H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf
if (0 ==
(nelmts_gathered = H5D__gather_mem(src_buf, iter, MIN(dst_buf_nelmts, (size_t)nelmts), dst_buf)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "gather failed")
- HDassert(nelmts_gathered == MIN(dst_buf_nelmts, (size_t)nelmts));
+ assert(nelmts_gathered == MIN(dst_buf_nelmts, (size_t)nelmts));
/* Make callback to process dst_buf */
if (op && op(dst_buf, nelmts_gathered * type_size, op_data) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CALLBACK, FAIL, "callback operator returned failure")
nelmts -= (hssize_t)nelmts_gathered;
- HDassert(op || (nelmts == 0));
+ assert(op || (nelmts == 0));
} /* end while */
done:
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index a9dfad6..d45632a 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -203,10 +203,10 @@ H5D__btree_get_shared(const H5F_t H5_ATTR_UNUSED *f, const void *_udata)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(udata);
- HDassert(udata->storage);
- HDassert(udata->storage->idx_type == H5D_CHUNK_IDX_BTREE);
- HDassert(udata->storage->u.btree.shared);
+ assert(udata);
+ assert(udata->storage);
+ assert(udata->storage->idx_type == H5D_CHUNK_IDX_BTREE);
+ assert(udata->storage->u.btree.shared);
/* Return the pointer to the ref-count object */
FUNC_LEAVE_NOAPI(udata->storage->u.btree.shared)
@@ -243,16 +243,16 @@ H5D__btree_new_node(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5B_ins_t op, void *_lt_key,
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(lt_key);
- HDassert(rt_key);
- HDassert(udata);
- HDassert(udata->common.layout->ndims > 0 && udata->common.layout->ndims < H5O_LAYOUT_NDIMS);
- HDassert(addr_p);
+ assert(f);
+ assert(lt_key);
+ assert(rt_key);
+ assert(udata);
+ assert(udata->common.layout->ndims > 0 && udata->common.layout->ndims < H5O_LAYOUT_NDIMS);
+ assert(addr_p);
/* Set address */
- HDassert(H5F_addr_defined(udata->chunk_block.offset));
- HDassert(udata->chunk_block.length > 0);
+ assert(H5F_addr_defined(udata->chunk_block.offset));
+ assert(udata->chunk_block.length > 0);
*addr_p = udata->chunk_block.offset;
/*
@@ -272,7 +272,7 @@ H5D__btree_new_node(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5B_ins_t op, void *_lt_key,
rt_key->nbytes = 0;
rt_key->filter_mask = 0;
for (u = 0; u < udata->common.layout->ndims; u++) {
- HDassert(udata->common.scaled[u] + 1 > udata->common.scaled[u]);
+ assert(udata->common.scaled[u] + 1 > udata->common.scaled[u]);
rt_key->scaled[u] = udata->common.scaled[u] + 1;
} /* end if */
} /* end if */
@@ -309,10 +309,10 @@ H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(lt_key);
- HDassert(rt_key);
- HDassert(udata);
- HDassert(udata->layout->ndims > 0 && udata->layout->ndims <= H5O_LAYOUT_NDIMS);
+ assert(lt_key);
+ assert(rt_key);
+ assert(udata);
+ assert(udata->layout->ndims > 0 && udata->layout->ndims <= H5O_LAYOUT_NDIMS);
/* Compare the offsets but ignore the other fields */
ret_value = H5VM_vector_cmp_u(udata->layout->ndims, lt_key->scaled, rt_key->scaled);
@@ -357,10 +357,10 @@ H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(lt_key);
- HDassert(rt_key);
- HDassert(udata);
- HDassert(udata->layout->ndims > 0 && udata->layout->ndims <= H5O_LAYOUT_NDIMS);
+ assert(lt_key);
+ assert(rt_key);
+ assert(udata);
+ assert(udata->layout->ndims > 0 && udata->layout->ndims <= H5O_LAYOUT_NDIMS);
/* Special case for faster checks on 1-D chunks */
/* (Checking for ndims==2 because last dimension is the datatype size) */
@@ -422,11 +422,11 @@ H5D__btree_found(H5F_t H5_ATTR_UNUSED *f, haddr_t addr, const void *_lt_key, hbo
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(lt_key);
- HDassert(found);
- HDassert(udata);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(lt_key);
+ assert(found);
+ assert(udata);
/* Is this *really* the requested chunk? */
for (u = 0; u < udata->common.layout->ndims; u++)
@@ -436,7 +436,7 @@ H5D__btree_found(H5F_t H5_ATTR_UNUSED *f, haddr_t addr, const void *_lt_key, hbo
}
/* Initialize return values */
- HDassert(lt_key->nbytes > 0);
+ assert(lt_key->nbytes > 0);
udata->chunk_block.offset = addr;
udata->chunk_block.length = lt_key->nbytes;
udata->filter_mask = lt_key->filter_mask;
@@ -470,9 +470,9 @@ H5D__chunk_disjoint(unsigned n, const hsize_t *scaled1, const hsize_t *scaled2)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(n);
- HDassert(scaled1);
- HDassert(scaled2);
+ assert(n);
+ assert(scaled1);
+ assert(scaled2);
/* Loop over two chunks, detecting disjointness and getting out quickly */
for (u = 0; u < n; u++)
@@ -527,17 +527,17 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(lt_key);
- HDassert(lt_key_changed);
- HDassert(md_key);
- HDassert(udata);
- HDassert(rt_key);
- HDassert(new_node_p);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(lt_key);
+ assert(lt_key_changed);
+ assert(md_key);
+ assert(udata);
+ assert(rt_key);
+ assert(new_node_p);
cmp = H5D__btree_cmp3(lt_key, udata, rt_key);
- HDassert(cmp <= 0);
+ assert(cmp <= 0);
if (cmp < 0) {
/* Negative indices not supported yet */
@@ -551,7 +551,7 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED
*/
if (lt_key->nbytes != udata->chunk_block.length) {
/* Set node's address (already re-allocated by main chunk routines) */
- HDassert(H5F_addr_defined(udata->chunk_block.offset));
+ assert(H5F_addr_defined(udata->chunk_block.offset));
*new_node_p = udata->chunk_block.offset;
H5_CHECKED_ASSIGN(lt_key->nbytes, uint32_t, udata->chunk_block.length, hsize_t);
lt_key->filter_mask = udata->filter_mask;
@@ -560,12 +560,12 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED
}
else {
/* Already have address in udata, from main chunk routines */
- HDassert(H5F_addr_defined(udata->chunk_block.offset));
+ assert(H5F_addr_defined(udata->chunk_block.offset));
ret_value = H5B_INS_NOOP;
}
}
else if (H5D__chunk_disjoint(udata->common.layout->ndims, lt_key->scaled, udata->common.scaled)) {
- HDassert(H5D__chunk_disjoint(udata->common.layout->ndims, rt_key->scaled, udata->common.scaled));
+ assert(H5D__chunk_disjoint(udata->common.layout->ndims, rt_key->scaled, udata->common.scaled));
/*
* Split this node, inserting the new new node to the right of the
* current node. The MD_KEY is where the split occurs.
@@ -575,7 +575,7 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED
for (u = 0; u < udata->common.layout->ndims; u++)
md_key->scaled[u] = udata->common.scaled[u];
- HDassert(H5F_addr_defined(udata->chunk_block.offset));
+ assert(H5F_addr_defined(udata->chunk_block.offset));
*new_node_p = udata->chunk_block.offset;
ret_value = H5B_INS_RIGHT;
}
@@ -640,11 +640,11 @@ H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key
FUNC_ENTER_PACKAGE
- HDassert(shared);
- HDassert(raw);
- HDassert(key);
+ assert(shared);
+ assert(raw);
+ assert(key);
layout = (const H5O_layout_chunk_t *)shared->udata;
- HDassert(layout);
+ assert(layout);
if (layout->ndims > H5O_LAYOUT_NDIMS)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "bad number of dimensions")
@@ -691,12 +691,12 @@ H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(shared);
- HDassert(raw);
- HDassert(key);
+ assert(shared);
+ assert(raw);
+ assert(key);
layout = (const H5O_layout_chunk_t *)shared->udata;
- HDassert(layout);
- HDassert(layout->ndims > 0 && layout->ndims <= H5O_LAYOUT_NDIMS);
+ assert(layout);
+ assert(layout->ndims > 0 && layout->ndims <= H5O_LAYOUT_NDIMS);
/* encode */
UINT32ENCODE(raw, key->nbytes);
@@ -731,13 +731,13 @@ H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key, con
FUNC_ENTER_PACKAGE_NOERR
- HDassert(key);
+ assert(key);
- HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)key->nbytes);
- HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", key->filter_mask);
- HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
+ fprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)key->nbytes);
+ fprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", key->filter_mask);
+ fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
for (u = 0; u < udata->ndims; u++)
- HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", (key->scaled[u] * udata->common.layout->dim[u]));
+ fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", (key->scaled[u] * udata->common.layout->dim[u]));
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -844,12 +844,12 @@ H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNUS
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(dset_ohdr_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(dset_ohdr_addr));
idx_info->storage->u.btree.dset_ohdr_addr = dset_ohdr_addr;
@@ -888,12 +888,12 @@ H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr));
/* Initialize "user" data for B-tree callbacks, etc. */
udata.layout = idx_info->layout;
@@ -925,7 +925,7 @@ H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__btree_idx_is_space_alloc() */
@@ -950,13 +950,13 @@ H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
FUNC_ENTER_PACKAGE
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/*
* Create the chunk it if it doesn't exist, or reallocate the chunk if
@@ -991,14 +991,14 @@ H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udat
FUNC_ENTER_PACKAGE
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->layout->ndims > 0);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->layout->ndims > 0);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Go get the chunk information from the B-tree */
found = FALSE;
@@ -1075,17 +1075,17 @@ H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t c
FUNC_ENTER_PACKAGE_NOERR
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(chunk_cb);
- HDassert(chunk_udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(chunk_cb);
+ assert(chunk_udata);
/* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = idx_info->layout;
udata.common.storage = idx_info->storage;
udata.cb = chunk_cb;
@@ -1118,13 +1118,13 @@ H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
FUNC_ENTER_PACKAGE
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Remove the chunk from the v1 B-tree index and release the space for the
* chunk (in the B-tree callback).
@@ -1158,11 +1158,11 @@ H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
/* Check if the index data structure has been allocated */
if (H5F_addr_defined(idx_info->storage->idx_addr)) {
@@ -1177,7 +1177,7 @@ H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
/* Set up B-tree user data */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.layout = idx_info->layout;
udata.storage = &tmp_storage;
@@ -1215,17 +1215,17 @@ H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_
FUNC_ENTER_PACKAGE_TAG(H5AC__COPIED_TAG)
- HDassert(idx_info_src);
- HDassert(idx_info_src->f);
- HDassert(idx_info_src->pline);
- HDassert(idx_info_src->layout);
- HDassert(idx_info_src->storage);
- HDassert(idx_info_dst);
- HDassert(idx_info_dst->f);
- HDassert(idx_info_dst->pline);
- HDassert(idx_info_dst->layout);
- HDassert(idx_info_dst->storage);
- HDassert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(idx_info_src);
+ assert(idx_info_src->f);
+ assert(idx_info_src->pline);
+ assert(idx_info_src->layout);
+ assert(idx_info_src->storage);
+ assert(idx_info_dst);
+ assert(idx_info_dst->f);
+ assert(idx_info_dst->pline);
+ assert(idx_info_dst->layout);
+ assert(idx_info_dst->storage);
+ assert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Create shared B-tree info for each file */
if (H5D__btree_shared_create(idx_info_src->f, idx_info_src->storage, idx_info_src->layout) < 0)
@@ -1237,7 +1237,7 @@ H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_
/* Create the root of the B-tree that describes chunked storage in the dest. file */
if (H5D__btree_idx_create(idx_info_dst) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
- HDassert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
@@ -1262,8 +1262,8 @@ H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk
FUNC_ENTER_PACKAGE
- HDassert(storage_src);
- HDassert(storage_dst);
+ assert(storage_src);
+ assert(storage_dst);
/* Decrement refcount on shared B-tree info */
if (H5UC_DEC(storage_src->u.btree.shared) < 0)
@@ -1298,15 +1298,15 @@ H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(index_size);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(index_size);
/* Initialize B-tree node user-data */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.layout = idx_info->layout;
udata.storage = idx_info->storage;
@@ -1338,7 +1338,7 @@ H5D__btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(storage);
+ assert(storage);
/* Reset index info */
if (reset_addr)
@@ -1365,10 +1365,10 @@ H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(storage);
- HDassert(stream);
+ assert(storage);
+ assert(stream);
- HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
+ fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__btree_idx_dump() */
@@ -1392,11 +1392,11 @@ H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
/* Free the raw B-tree node buffer */
if (NULL == idx_info->storage->u.btree.shared)
@@ -1434,11 +1434,11 @@ H5D_btree_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, un
FUNC_ENTER_NOAPI(FAIL)
/* Reset "fake" storage info */
- HDmemset(&storage, 0, sizeof(storage));
+ memset(&storage, 0, sizeof(storage));
storage.idx_type = H5D_CHUNK_IDX_BTREE;
/* Reset "fake" layout info */
- HDmemset(&layout, 0, sizeof(layout));
+ memset(&layout, 0, sizeof(layout));
layout.ndims = ndims;
for (u = 0; u < ndims; u++)
layout.dim[u] = dim[u];
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c
index c9f5ee9..104673e 100644
--- a/src/H5Dbtree2.c
+++ b/src/H5Dbtree2.c
@@ -221,9 +221,9 @@ H5D__bt2_crt_context(void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(udata->ndims > 0 && udata->ndims < H5O_LAYOUT_NDIMS);
+ assert(udata);
+ assert(udata->f);
+ assert(udata->ndims > 0 && udata->ndims < H5O_LAYOUT_NDIMS);
/* Allocate callback context */
if (NULL == (ctx = H5FL_MALLOC(H5D_bt2_ctx_t)))
@@ -275,7 +275,7 @@ H5D__bt2_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Free array for chunk dimension sizes */
if (ctx->dim)
@@ -336,8 +336,8 @@ H5D__bt2_compare(const void *_udata, const void *_rec2, int *result)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(rec1);
- HDassert(rec2);
+ assert(rec1);
+ assert(rec2);
/* Compare the offsets but ignore the other fields */
*result = H5VM_vector_cmp_u(udata->ndims, rec1->scaled, rec2->scaled);
@@ -368,7 +368,7 @@ H5D__bt2_unfilt_encode(uint8_t *raw, const void *_record, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, record->chunk_addr);
@@ -402,7 +402,7 @@ H5D__bt2_unfilt_decode(const uint8_t *raw, void *_record, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &record->chunk_addr);
@@ -436,15 +436,15 @@ H5D__bt2_unfilt_debug(FILE *stream, int indent, int fwidth, const void *_record,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(record);
- HDassert(ctx->chunk_size == record->nbytes);
- HDassert(0 == record->filter_mask);
+ assert(record);
+ assert(ctx->chunk_size == record->nbytes);
+ assert(0 == record->filter_mask);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
- HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
+ fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
for (u = 0; u < ctx->ndims; u++)
- HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]);
+ fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]);
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -473,10 +473,10 @@ H5D__bt2_filt_encode(uint8_t *raw, const void *_record, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
- HDassert(record);
- HDassert(H5F_addr_defined(record->chunk_addr));
- HDassert(0 != record->nbytes);
+ assert(ctx);
+ assert(record);
+ assert(H5F_addr_defined(record->chunk_addr));
+ assert(0 != record->nbytes);
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, record->chunk_addr);
@@ -511,8 +511,8 @@ H5D__bt2_filt_decode(const uint8_t *raw, void *_record, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
- HDassert(record);
+ assert(ctx);
+ assert(record);
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &record->chunk_addr);
@@ -522,8 +522,8 @@ H5D__bt2_filt_decode(const uint8_t *raw, void *_record, void *_ctx)
UINT64DECODE(raw, record->scaled[u]);
/* Sanity checks */
- HDassert(H5F_addr_defined(record->chunk_addr));
- HDassert(0 != record->nbytes);
+ assert(H5F_addr_defined(record->chunk_addr));
+ assert(0 != record->nbytes);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5D__bt2_filt_decode() */
@@ -550,17 +550,17 @@ H5D__bt2_filt_debug(FILE *stream, int indent, int fwidth, const void *_record, c
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(record);
- HDassert(H5F_addr_defined(record->chunk_addr));
- HDassert(0 != record->nbytes);
+ assert(record);
+ assert(H5F_addr_defined(record->chunk_addr));
+ assert(0 != record->nbytes);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
- HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)record->nbytes);
- HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", record->filter_mask);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
+ fprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)record->nbytes);
+ fprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", record->filter_mask);
- HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
+ fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
for (u = 0; u < ctx->ndims; u++)
- HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]);
+ fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]);
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -585,7 +585,7 @@ H5D__bt2_idx_init(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, const H5S_t
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(H5F_addr_defined(dset_ohdr_addr));
+ assert(H5F_addr_defined(dset_ohdr_addr));
idx_info->storage->u.btree2.dset_ohdr_addr = dset_ohdr_addr;
@@ -617,16 +617,16 @@ H5D__btree2_idx_depend(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_BT2 == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5D_CHUNK_IDX_BT2 == idx_info->storage->idx_type);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(idx_info->storage->u.btree2.bt2);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(H5D_CHUNK_IDX_BT2 == idx_info->layout->idx_type);
+ assert(idx_info->storage);
+ assert(H5D_CHUNK_IDX_BT2 == idx_info->storage->idx_type);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info->storage->u.btree2.bt2);
/* Set up object header location for dataset */
H5O_loc_reset(&oloc);
@@ -680,14 +680,14 @@ H5D__bt2_idx_open(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_BT2 == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(NULL == idx_info->storage->u.btree2.bt2);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(H5D_CHUNK_IDX_BT2 == idx_info->layout->idx_type);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(NULL == idx_info->storage->u.btree2.bt2);
/* Set up the user data */
u_ctx.f = idx_info->f;
@@ -731,12 +731,12 @@ H5D__bt2_idx_create(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr));
bt2_cparam.rrec_size = H5F_SIZEOF_ADDR(idx_info->f) /* Address of chunk */
+ (idx_info->layout->ndims - 1) * 8; /* # of dimensions x 64-bit chunk offsets */
@@ -804,7 +804,7 @@ H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__bt2_idx_is_space_alloc() */
@@ -837,7 +837,7 @@ H5D__bt2_mod_cb(void *_record, void *_op_data, hbool_t *changed)
unsigned u; /* Local index variable */
for (u = 0; u < op_data->ndims; u++)
- HDassert(record->scaled[u] == op_data->rec.scaled[u]);
+ assert(record->scaled[u] == op_data->rec.scaled[u]);
}
#endif /* NDEBUG */
@@ -880,14 +880,14 @@ H5D__bt2_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
- HDassert(H5F_addr_defined(udata->chunk_block.offset));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
+ assert(H5F_addr_defined(udata->chunk_block.offset));
/* Check if the v2 B-tree is open yet */
if (NULL == idx_info->storage->u.btree2.bt2) {
@@ -974,14 +974,14 @@ H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->layout->ndims > 0);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->layout->ndims > 0);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the v2 B-tree is open yet */
if (NULL == idx_info->storage->u.btree2.bt2) {
@@ -1017,7 +1017,7 @@ H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
/* Check if chunk was found */
if (found) {
/* Sanity check */
- HDassert(0 != found_rec.nbytes);
+ assert(0 != found_rec.nbytes);
/* Set common info for the chunk */
udata->chunk_block.offset = found_rec.chunk_addr;
@@ -1096,14 +1096,14 @@ H5D__bt2_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chu
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(chunk_cb);
- HDassert(chunk_udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(chunk_cb);
+ assert(chunk_udata);
/* Check if the v2 B-tree is open yet */
if (NULL == idx_info->storage->u.btree2.bt2) {
@@ -1155,7 +1155,7 @@ H5D__bt2_remove_cb(const void *_record, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
+ assert(f);
/* Free the space in the file for the object being removed */
H5_CHECK_OVERFLOW(record->nbytes, uint32_t, hsize_t);
@@ -1188,13 +1188,13 @@ H5D__bt2_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *u
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the v2 B-tree is open yet */
if (NULL == idx_info->storage->u.btree2.bt2) {
@@ -1250,11 +1250,11 @@ H5D__bt2_idx_delete(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
/* Check if the index data structure has been allocated */
if (H5F_addr_defined(idx_info->storage->idx_addr)) {
@@ -1301,19 +1301,19 @@ H5D__bt2_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_id
FUNC_ENTER_PACKAGE
/* Source file */
- HDassert(idx_info_src);
- HDassert(idx_info_src->f);
- HDassert(idx_info_src->pline);
- HDassert(idx_info_src->layout);
- HDassert(idx_info_src->storage);
+ assert(idx_info_src);
+ assert(idx_info_src->f);
+ assert(idx_info_src->pline);
+ assert(idx_info_src->layout);
+ assert(idx_info_src->storage);
/* Destination file */
- HDassert(idx_info_dst);
- HDassert(idx_info_dst->f);
- HDassert(idx_info_dst->pline);
- HDassert(idx_info_dst->layout);
- HDassert(idx_info_dst->storage);
- HDassert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(idx_info_dst);
+ assert(idx_info_dst->f);
+ assert(idx_info_dst->pline);
+ assert(idx_info_dst->layout);
+ assert(idx_info_dst->storage);
+ assert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Check if the source v2 B-tree is open yet */
if (NULL == idx_info_src->storage->u.btree2.bt2)
@@ -1326,7 +1326,7 @@ H5D__bt2_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_id
/* Create v2 B-tree that describes the chunked dataset in the destination file */
if (H5D__bt2_idx_create(idx_info_dst) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
- HDassert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Reset metadata tag */
H5_END_TAG
@@ -1354,10 +1354,10 @@ H5D__bt2_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk_t
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(storage_src);
- HDassert(storage_src->u.btree2.bt2);
- HDassert(storage_dst);
- HDassert(storage_dst->u.btree2.bt2);
+ assert(storage_src);
+ assert(storage_src->u.btree2.bt2);
+ assert(storage_dst);
+ assert(storage_dst->u.btree2.bt2);
/* Close v2 B-tree for source file */
if (H5B2_close(storage_src->u.btree2.bt2) < 0)
@@ -1394,13 +1394,13 @@ H5D__bt2_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(index_size);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(index_size);
/* Open v2 B-tree */
if (H5D__bt2_idx_open(idx_info) < 0)
@@ -1439,7 +1439,7 @@ H5D__bt2_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(storage);
+ assert(storage);
/* Reset index info */
if (reset_addr)
@@ -1466,10 +1466,10 @@ H5D__bt2_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(storage);
- HDassert(stream);
+ assert(storage);
+ assert(stream);
- HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
+ fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__bt2_idx_dump() */
@@ -1493,9 +1493,9 @@ H5D__bt2_idx_dest(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->storage);
/* Check if the v2-btree is open */
if (idx_info->storage->u.btree2.bt2) {
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 0ab4da1..239f58c 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -79,12 +79,12 @@
/* Sanity check on chunk index types: commonly used by a lot of routines in this file */
#define H5D_CHUNK_STORAGE_INDEX_CHK(storage) \
- HDassert((H5D_CHUNK_IDX_EARRAY == (storage)->idx_type && H5D_COPS_EARRAY == (storage)->ops) || \
- (H5D_CHUNK_IDX_FARRAY == (storage)->idx_type && H5D_COPS_FARRAY == (storage)->ops) || \
- (H5D_CHUNK_IDX_BT2 == (storage)->idx_type && H5D_COPS_BT2 == (storage)->ops) || \
- (H5D_CHUNK_IDX_BTREE == (storage)->idx_type && H5D_COPS_BTREE == (storage)->ops) || \
- (H5D_CHUNK_IDX_SINGLE == (storage)->idx_type && H5D_COPS_SINGLE == (storage)->ops) || \
- (H5D_CHUNK_IDX_NONE == (storage)->idx_type && H5D_COPS_NONE == (storage)->ops));
+ assert((H5D_CHUNK_IDX_EARRAY == (storage)->idx_type && H5D_COPS_EARRAY == (storage)->ops) || \
+ (H5D_CHUNK_IDX_FARRAY == (storage)->idx_type && H5D_COPS_FARRAY == (storage)->ops) || \
+ (H5D_CHUNK_IDX_BT2 == (storage)->idx_type && H5D_COPS_BT2 == (storage)->ops) || \
+ (H5D_CHUNK_IDX_BTREE == (storage)->idx_type && H5D_COPS_BTREE == (storage)->ops) || \
+ (H5D_CHUNK_IDX_SINGLE == (storage)->idx_type && H5D_COPS_SINGLE == (storage)->ops) || \
+ (H5D_CHUNK_IDX_NONE == (storage)->idx_type && H5D_COPS_NONE == (storage)->ops));
/*
* Feature: If this constant is defined then every cache preemption and load
@@ -392,7 +392,7 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Sanity checks */
- HDassert(layout->type == H5D_CHUNKED);
+ assert(layout->type == H5D_CHUNKED);
/* Allocate dataspace and initialize it if it hasn't been. */
if (!H5D__chunk_is_space_alloc(&layout->storage))
@@ -408,8 +408,8 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Set the file block information for the old chunk */
/* (Which is only defined when overwriting an existing chunk) */
@@ -498,10 +498,10 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t *filters, vo
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Check args */
- HDassert(dset && H5D_CHUNKED == layout->type);
- HDassert(offset);
- HDassert(filters);
- HDassert(buf);
+ assert(dset && H5D_CHUNKED == layout->type);
+ assert(offset);
+ assert(filters);
+ assert(buf);
*filters = 0;
@@ -524,8 +524,8 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t *filters, vo
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Check if the requested chunk exists in the chunk cache */
if (UINT_MAX != udata.idx_hint) {
@@ -533,8 +533,8 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t *filters, vo
hbool_t flush;
/* Sanity checks */
- HDassert(udata.idx_hint < rdcc->nslots);
- HDassert(rdcc->slot[udata.idx_hint]);
+ assert(udata.idx_hint < rdcc->nslots);
+ assert(rdcc->slot[udata.idx_hint]);
flush = (ent->dirty == TRUE) ? TRUE : FALSE;
@@ -593,9 +593,9 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Check args */
- HDassert(dset && H5D_CHUNKED == layout->type);
- HDassert(offset);
- HDassert(storage_size);
+ assert(dset && H5D_CHUNKED == layout->type);
+ assert(offset);
+ assert(storage_size);
/* Allocate dataspace and initialize it if it hasn't been. */
if (!(*layout->ops->is_space_alloc)(&layout->storage))
@@ -615,8 +615,8 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* The requested chunk is not in cache or on disk */
if (!H5F_addr_defined(udata.chunk_block.offset) && UINT_MAX == udata.idx_hint)
@@ -629,8 +629,8 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage
H5D_rdcc_ent_t *ent = rdcc->slot[udata.idx_hint];
/* Sanity checks */
- HDassert(udata.idx_hint < rdcc->nslots);
- HDassert(rdcc->slot[udata.idx_hint]);
+ assert(udata.idx_hint < rdcc->nslots);
+ assert(rdcc->slot[udata.idx_hint]);
/* If the cached chunk is dirty, it must be flushed to get accurate size */
if (ent->dirty == TRUE) {
@@ -680,8 +680,8 @@ H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims, const hsize
FUNC_ENTER_PACKAGE
- HDassert(layout);
- HDassert(curr_dims);
+ assert(layout);
+ assert(curr_dims);
/* Can happen when corrupt files are parsed */
if (ndims == 0)
@@ -736,7 +736,7 @@ H5D__chunk_set_info(const H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dset);
+ assert(dset);
/* Set the base layout information */
if (H5D__chunk_set_info_real(&dset->shared->layout.u.chunk, dset->shared->ndims, dset->shared->curr_dims,
@@ -775,7 +775,7 @@ H5D__chunk_set_sizes(H5D_t *dset)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(dset);
+ assert(dset);
/* Increment # of chunk dimensions, to account for datatype size as last element */
dset->shared->layout.u.chunk.ndims++;
@@ -796,7 +796,7 @@ H5D__chunk_set_sizes(H5D_t *dset)
if (enc_bytes_per_dim > max_enc_bytes_per_dim)
max_enc_bytes_per_dim = enc_bytes_per_dim;
} /* end for */
- HDassert(max_enc_bytes_per_dim > 0 && max_enc_bytes_per_dim <= 8);
+ assert(max_enc_bytes_per_dim > 0 && max_enc_bytes_per_dim <= 8);
dset->shared->layout.u.chunk.enc_bytes_per_dim = max_enc_bytes_per_dim;
/* Compute and store the total size of a chunk */
@@ -837,8 +837,8 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(dset);
+ assert(f);
+ assert(dset);
/* Check for invalid chunk dimension rank */
if (0 == dset->shared->layout.u.chunk.ndims)
@@ -849,7 +849,7 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset)
/* Set chunk sizes */
if (H5D__chunk_set_sizes(dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to set chunk sizes")
- HDassert((unsigned)(dset->shared->layout.u.chunk.ndims) <= NELMTS(dset->shared->layout.u.chunk.dim));
+ assert((unsigned)(dset->shared->layout.u.chunk.ndims) <= NELMTS(dset->shared->layout.u.chunk.dim));
/* Chunked storage is not compatible with external storage (currently) */
if (dset->shared->dcpl_cache.efl.nused > 0)
@@ -905,8 +905,8 @@ H5D__chunk_init(H5F_t *f, const H5D_t *const dset, hid_t dapl_id)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(dset);
+ assert(f);
+ assert(dset);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
if (NULL == (dapl = (H5P_genplist_t *)H5I_object(dapl_id)))
@@ -1005,7 +1005,7 @@ H5D__chunk_is_space_alloc(const H5O_storage_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(storage);
+ assert(storage);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Query index layer */
@@ -1032,7 +1032,7 @@ H5D__chunk_is_data_cached(const H5D_shared_t *shared_dset)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(shared_dset);
+ assert(shared_dset);
FUNC_LEAVE_NOAPI(shared_dset->cache.chunk.nused > 0)
} /* end H5D__chunk_is_data_cached() */
@@ -1169,12 +1169,12 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
FUNC_ENTER_PACKAGE
- HDassert(io_info);
- HDassert(dinfo);
+ assert(io_info);
+ assert(dinfo);
/* Set convenience pointers */
fm = dinfo->layout_io_info.chunk_map;
- HDassert(fm);
+ assert(fm);
dataset = dinfo->dset;
mem_type = dinfo->type_info.mem_type;
@@ -1204,14 +1204,14 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to set all selection")
} /* end if */
fm->single_space = dataset->shared->cache.chunk.single_space;
- HDassert(fm->single_space);
+ assert(fm->single_space);
/* Allocate the single chunk information */
if (NULL == dataset->shared->cache.chunk.single_piece_info)
if (NULL == (dataset->shared->cache.chunk.single_piece_info = H5FL_MALLOC(H5D_piece_info_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info")
fm->single_piece_info = dataset->shared->cache.chunk.single_piece_info;
- HDassert(fm->single_piece_info);
+ assert(fm->single_piece_info);
/* Reset chunk template information */
fm->mchunk_tmpl = NULL;
@@ -1229,7 +1229,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
if (NULL == (dataset->shared->cache.chunk.sel_chunks = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't create skip list for chunk selections")
fm->dset_sel_pieces = dataset->shared->cache.chunk.sel_chunks;
- HDassert(fm->dset_sel_pieces);
+ assert(fm->dset_sel_pieces);
/* We are not using single element mode */
fm->use_single = FALSE;
@@ -1255,7 +1255,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
} /* end if */
else {
/* Sanity check */
- HDassert(fm->fsel_type == H5S_SEL_HYPERSLABS);
+ assert(fm->fsel_type == H5S_SEL_HYPERSLABS);
if (H5D__create_piece_file_map_hyper(dinfo, io_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file chunk selections")
@@ -1379,7 +1379,7 @@ H5D__chunk_mem_alloc(size_t size, void *pline)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(size);
+ assert(size);
if (_pline && _pline->nused)
ret_value = H5MM_malloc(size);
@@ -1454,8 +1454,8 @@ H5D__chunk_mem_realloc(void *chk, size_t size, const H5O_pline_t *pline)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(size);
- HDassert(pline);
+ assert(size);
+ assert(pline);
if (pline->nused > 0)
ret_value = H5MM_realloc(chk, size);
@@ -1492,7 +1492,7 @@ H5D__free_piece_info(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *
FUNC_ENTER_PACKAGE_NOERR
- HDassert(piece_info);
+ assert(piece_info);
/* Close the piece's file dataspace, if it's not shared */
if (!piece_info->fspace_shared)
@@ -1539,8 +1539,8 @@ H5D__create_piece_map_single(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
fm = di->layout_io_info.chunk_map;
/* Sanity checks */
- HDassert(fm);
- HDassert(fm->f_ndims > 0);
+ assert(fm);
+ assert(fm->f_ndims > 0);
/* Get coordinate for selection */
if (H5S_SELECT_BOUNDS(di->file_space, sel_start, sel_end) < 0)
@@ -1555,7 +1555,7 @@ H5D__create_piece_map_single(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
/* Validate this chunk dimension */
if (di->layout->u.chunk.dim[u] == 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", u)
- HDassert(sel_start[u] == sel_end[u]);
+ assert(sel_start[u] == sel_end[u]);
piece_info->scaled[u] = sel_start[u] / di->layout->u.chunk.dim[u];
coords[u] = piece_info->scaled[u] * di->layout->u.chunk.dim[u];
} /* end for */
@@ -1637,8 +1637,8 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
fm = di->layout_io_info.chunk_map;
/* Sanity checks */
- HDassert(fm);
- HDassert(fm->f_ndims > 0);
+ assert(fm);
+ assert(fm->f_ndims > 0);
/* Get number of elements selected in file */
sel_points = di->nelmts;
@@ -1649,7 +1649,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
/* Set initial chunk location, partial dimensions, etc */
num_partial_dims = 0;
- HDmemset(zeros, 0, sizeof(zeros));
+ memset(zeros, 0, sizeof(zeros));
for (u = 0; u < fm->f_ndims; u++) {
/* Validate this chunk dimension */
if (di->layout->u.chunk.dim[u] == 0)
@@ -1764,7 +1764,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
/* Check for previous partial chunk in this dimension */
if (is_partial_dim[curr_dim] && end[curr_dim] < file_dims[curr_dim]) {
/* Sanity check */
- HDassert(num_partial_dims > 0);
+ assert(num_partial_dims > 0);
/* Reset partial chunk information for this dimension */
curr_partial_clip[curr_dim] = fm->chunk_dim[curr_dim];
@@ -1795,7 +1795,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info)
num_partial_dims++;
/* Sanity check */
- HDassert(num_partial_dims <= fm->f_ndims);
+ assert(num_partial_dims <= fm->f_ndims);
} /* end if */
} /* end if */
} /* end if */
@@ -1845,8 +1845,8 @@ H5D__create_piece_file_map_hyper(H5D_dset_io_info_t *dinfo, H5D_io_info_t *io_in
fm = dinfo->layout_io_info.chunk_map;
/* Sanity checks */
- HDassert(fm);
- HDassert(fm->f_ndims > 0);
+ assert(fm);
+ assert(fm->f_ndims > 0);
/* Get number of elements selected in file */
sel_points = dinfo->nelmts;
@@ -2022,7 +2022,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dinfo->layout_io_info.chunk_map->f_ndims > 0);
+ assert(dinfo->layout_io_info.chunk_map->f_ndims > 0);
/* Set convenience pointer */
fm = dinfo->layout_io_info.chunk_map;
@@ -2034,7 +2034,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
/* Get pointer to piece's information */
piece_info = (H5D_piece_info_t *)H5SL_item(curr_node);
- HDassert(piece_info);
+ assert(piece_info);
/* Just point at the memory dataspace & selection */
piece_info->mspace = dinfo->mem_space;
@@ -2052,7 +2052,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info")
/* Calculate the adjustment for memory selection from file selection */
- HDassert(fm->m_ndims == fm->f_ndims);
+ assert(fm->m_ndims == fm->f_ndims);
for (u = 0; u < fm->f_ndims; u++) {
H5_CHECK_OVERFLOW(file_sel_start[u], hsize_t, hssize_t);
H5_CHECK_OVERFLOW(mem_sel_start[u], hsize_t, hssize_t);
@@ -2060,7 +2060,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
} /* end for */
/* Iterate over each chunk in the chunk list */
- HDassert(fm->dset_sel_pieces);
+ assert(fm->dset_sel_pieces);
curr_node = H5SL_first(fm->dset_sel_pieces);
while (curr_node) {
hsize_t coords[H5S_MAX_RANK]; /* Current coordinates of chunk */
@@ -2069,7 +2069,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
/* Get pointer to piece's information */
piece_info = (H5D_piece_info_t *)H5SL_item(curr_node);
- HDassert(piece_info);
+ assert(piece_info);
/* Compute the chunk coordinates from the scaled coordinates */
for (u = 0; u < fm->f_ndims; u++)
@@ -2098,7 +2098,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo)
} /* end if */
else {
/* Sanity check */
- HDassert(H5S_SEL_HYPERSLABS == chunk_sel_type);
+ assert(H5S_SEL_HYPERSLABS == chunk_sel_type);
/* Copy the file chunk's selection */
if (H5S_SELECT_COPY(piece_info->mspace, piece_info->fspace, FALSE) < 0)
@@ -2149,11 +2149,11 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dinfo->layout_io_info.chunk_map->f_ndims > 0);
+ assert(dinfo->layout_io_info.chunk_map->f_ndims > 0);
/* Set convenience pointer */
fm = dinfo->layout_io_info.chunk_map;
- HDassert(fm);
+ assert(fm);
/* Check for all I/O going to a single chunk */
if (H5SL_count(fm->dset_sel_pieces) == 1) {
@@ -2162,7 +2162,7 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo)
/* Get pointer to chunk's information */
piece_info = (H5D_piece_info_t *)H5SL_item(curr_node);
- HDassert(piece_info);
+ assert(piece_info);
/* Just point at the memory dataspace & selection */
piece_info->mspace = dinfo->mem_space;
@@ -2174,7 +2174,7 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo)
hsize_t mem_sel_start[H5S_MAX_RANK]; /* Offset of low bound of file selection */
hsize_t mem_sel_end[H5S_MAX_RANK]; /* Offset of high bound of file selection */
- HDassert(fm->m_ndims == 1);
+ assert(fm->m_ndims == 1);
if (H5S_SELECT_BOUNDS(dinfo->mem_space, mem_sel_start, mem_sel_end) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info")
@@ -2187,7 +2187,7 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo)
/* Get pointer to chunk's information */
piece_info = (H5D_piece_info_t *)H5SL_item(curr_node);
- HDassert(piece_info);
+ assert(piece_info);
/* Copy the memory dataspace */
if ((piece_info->mspace = H5S_copy(dinfo->mem_space, TRUE, FALSE)) == NULL)
@@ -2457,8 +2457,8 @@ H5D__chunk_mdio_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
/* Add piece to MDIO operation if it has a file address */
if (H5F_addr_defined(piece_info->faddr)) {
- HDassert(io_info->sel_pieces);
- HDassert(io_info->pieces_added < io_info->piece_count);
+ assert(io_info->sel_pieces);
+ assert(io_info->pieces_added < io_info->piece_count);
/* Add to sel_pieces and update pieces_added */
io_info->sel_pieces[io_info->pieces_added++] = piece_info;
@@ -2496,9 +2496,9 @@ H5D__chunk_cacheable(const H5D_io_info_t H5_ATTR_PARALLEL_USED *io_info, H5D_dse
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset_info);
+ assert(dset_info);
dataset = dset_info->dset;
- HDassert(dataset);
+ assert(dataset);
/* Must bring the whole chunk in if there are any filters on the chunk.
* Make sure to check if filters are on the dataset but disabled for the
@@ -2586,11 +2586,11 @@ H5D__chunk_may_use_select_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *d
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
+ assert(io_info);
+ assert(dset_info);
dataset = dset_info->dset;
- HDassert(dataset);
+ assert(dataset);
/* Don't use selection I/O if there are filters on the dataset (for now) */
if (dataset->shared->dcpl_cache.pline.nused > 0) {
@@ -2669,9 +2669,9 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->buf.vp);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->buf.vp);
/* Set up "nonexistent" I/O info object */
H5MM_memcpy(&nonexistent_io_info, io_info, sizeof(nonexistent_io_info));
@@ -2711,10 +2711,10 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Allocate arrays of dataspaces and offsets for use with selection I/O,
* or point to local buffers */
- HDassert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
- sizeof(chunk_file_spaces_local) / sizeof(chunk_file_spaces_local[0]));
- HDassert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
- sizeof(chunk_addrs_local) / sizeof(chunk_addrs_local[0]));
+ assert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
+ sizeof(chunk_file_spaces_local) / sizeof(chunk_file_spaces_local[0]));
+ assert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
+ sizeof(chunk_addrs_local) / sizeof(chunk_addrs_local[0]));
if (num_chunks > (sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]))) {
if (NULL == (chunk_mem_spaces = H5MM_malloc(num_chunks * sizeof(H5S_t *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
@@ -2750,11 +2750,11 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* There should be no chunks cached */
- HDassert(UINT_MAX == udata.idx_hint);
+ assert(UINT_MAX == udata.idx_hint);
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Check for non-existent chunk & skip it if appropriate */
if (H5F_addr_defined(udata.chunk_block.offset)) {
@@ -2767,12 +2767,12 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
} /* end if */
else {
/* Add to mdset selection I/O arrays */
- HDassert(io_info->mem_spaces);
- HDassert(io_info->file_spaces);
- HDassert(io_info->addrs);
- HDassert(io_info->element_sizes);
- HDassert(io_info->rbufs);
- HDassert(io_info->pieces_added < io_info->piece_count);
+ assert(io_info->mem_spaces);
+ assert(io_info->file_spaces);
+ assert(io_info->addrs);
+ assert(io_info->element_sizes);
+ assert(io_info->rbufs);
+ assert(io_info->pieces_added < io_info->piece_count);
io_info->mem_spaces[io_info->pieces_added] = chunk_info->mspace;
io_info->file_spaces[io_info->pieces_added] = chunk_info->fspace;
@@ -2812,8 +2812,8 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Clean up memory */
if (chunk_mem_spaces != chunk_mem_spaces_local) {
- HDassert(chunk_file_spaces != chunk_file_spaces_local);
- HDassert(chunk_addrs != chunk_addrs_local);
+ assert(chunk_file_spaces != chunk_file_spaces_local);
+ assert(chunk_addrs != chunk_addrs_local);
chunk_mem_spaces = H5MM_xfree(chunk_mem_spaces);
chunk_file_spaces = H5MM_xfree(chunk_file_spaces);
chunk_addrs = H5MM_xfree(chunk_addrs);
@@ -2835,7 +2835,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up contiguous I/O info object */
H5MM_memcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
- HDmemcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
+ memcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
ctg_dset_info.store = &ctg_store;
ctg_dset_info.layout_ops = *H5D_LOPS_CONTIG;
ctg_io_info.dsets_info = &ctg_dset_info;
@@ -2847,7 +2847,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up compact I/O info object */
H5MM_memcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
- HDmemcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
+ memcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
cpt_dset_info.store = &cpt_store;
cpt_dset_info.layout_ops = *H5D_LOPS_COMPACT;
cpt_io_info.dsets_info = &cpt_dset_info;
@@ -2871,8 +2871,8 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Check for non-existent chunk & skip it if appropriate */
if (H5F_addr_defined(udata.chunk_block.offset) || UINT_MAX != udata.idx_hint ||
@@ -2919,7 +2919,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
} /* end else */
/* Perform the actual read operation */
- HDassert(chk_io_info->count == 1);
+ assert(chk_io_info->count == 1);
chk_io_info->dsets_info[0].file_space = chunk_info->fspace;
chk_io_info->dsets_info[0].mem_space = chunk_info->mspace;
chk_io_info->dsets_info[0].nelmts = chunk_info->piece_points;
@@ -2949,9 +2949,9 @@ done:
} /* end if */
/* Make sure we cleaned up */
- HDassert(!chunk_mem_spaces || chunk_mem_spaces == chunk_mem_spaces_local);
- HDassert(!chunk_file_spaces || chunk_file_spaces == chunk_file_spaces_local);
- HDassert(!chunk_addrs || chunk_addrs == chunk_addrs_local);
+ assert(!chunk_mem_spaces || chunk_mem_spaces == chunk_mem_spaces_local);
+ assert(!chunk_file_spaces || chunk_file_spaces == chunk_file_spaces_local);
+ assert(!chunk_addrs || chunk_addrs == chunk_addrs_local);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_read() */
@@ -2991,13 +2991,13 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->buf.cvp);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->buf.cvp);
/* Set up contiguous I/O info object */
H5MM_memcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
- HDmemcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
+ memcpy(&ctg_dset_info, dset_info, sizeof(ctg_dset_info));
ctg_dset_info.store = &ctg_store;
ctg_dset_info.layout_ops = *H5D_LOPS_CONTIG;
ctg_io_info.dsets_info = &ctg_dset_info;
@@ -3009,7 +3009,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Set up compact I/O info object */
H5MM_memcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
- HDmemcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
+ memcpy(&cpt_dset_info, dset_info, sizeof(cpt_dset_info));
cpt_dset_info.store = &cpt_store;
cpt_dset_info.layout_ops = *H5D_LOPS_COMPACT;
cpt_io_info.dsets_info = &cpt_dset_info;
@@ -3032,10 +3032,10 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Allocate arrays of dataspaces and offsets for use with selection I/O,
* or point to local buffers */
- HDassert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
- sizeof(chunk_file_spaces_local) / sizeof(chunk_file_spaces_local[0]));
- HDassert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
- sizeof(chunk_addrs_local) / sizeof(chunk_addrs_local[0]));
+ assert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
+ sizeof(chunk_file_spaces_local) / sizeof(chunk_file_spaces_local[0]));
+ assert(sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]) ==
+ sizeof(chunk_addrs_local) / sizeof(chunk_addrs_local[0]));
if (num_chunks > (sizeof(chunk_mem_spaces_local) / sizeof(chunk_mem_spaces_local[0]))) {
if (NULL == (chunk_mem_spaces = H5MM_malloc(num_chunks * sizeof(H5S_t *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
@@ -3074,11 +3074,11 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* There should be no chunks cached */
- HDassert(UINT_MAX == udata.idx_hint);
+ assert(UINT_MAX == udata.idx_hint);
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Set chunk's [scaled] coordinates */
dset_info->store->chunk.scaled = chunk_info->scaled;
@@ -3165,12 +3165,12 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
} /* end if */
else {
/* Add to mdset selection I/O arrays */
- HDassert(io_info->mem_spaces);
- HDassert(io_info->file_spaces);
- HDassert(io_info->addrs);
- HDassert(io_info->element_sizes);
- HDassert(io_info->wbufs);
- HDassert(io_info->pieces_added < io_info->piece_count);
+ assert(io_info->mem_spaces);
+ assert(io_info->file_spaces);
+ assert(io_info->addrs);
+ assert(io_info->element_sizes);
+ assert(io_info->wbufs);
+ assert(io_info->pieces_added < io_info->piece_count);
io_info->mem_spaces[io_info->pieces_added] = chunk_info->mspace;
io_info->file_spaces[io_info->pieces_added] = chunk_info->fspace;
@@ -3201,8 +3201,8 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
/* Clean up memory */
if (chunk_mem_spaces != chunk_mem_spaces_local) {
- HDassert(chunk_file_spaces != chunk_file_spaces_local);
- HDassert(chunk_addrs != chunk_addrs_local);
+ assert(chunk_file_spaces != chunk_file_spaces_local);
+ assert(chunk_addrs != chunk_addrs_local);
chunk_mem_spaces = H5MM_xfree(chunk_mem_spaces);
chunk_file_spaces = H5MM_xfree(chunk_file_spaces);
chunk_addrs = H5MM_xfree(chunk_addrs);
@@ -3235,8 +3235,8 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
- (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
+ assert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ (!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Set chunk's [scaled] coordinates */
dset_info->store->chunk.scaled = chunk_info->scaled;
@@ -3309,7 +3309,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)
} /* end else */
/* Perform the actual write operation */
- HDassert(chk_io_info->count == 1);
+ assert(chk_io_info->count == 1);
chk_io_info->dsets_info[0].file_space = chunk_info->fspace;
chk_io_info->dsets_info[0].mem_space = chunk_info->mspace;
chk_io_info->dsets_info[0].nelmts = chunk_info->piece_points;
@@ -3346,9 +3346,9 @@ done:
} /* end if */
/* Make sure we cleaned up */
- HDassert(!chunk_mem_spaces || chunk_mem_spaces == chunk_mem_spaces_local);
- HDassert(!chunk_file_spaces || chunk_file_spaces == chunk_file_spaces_local);
- HDassert(!chunk_addrs || chunk_addrs == chunk_addrs_local);
+ assert(!chunk_mem_spaces || chunk_mem_spaces == chunk_mem_spaces_local);
+ assert(!chunk_file_spaces || chunk_file_spaces == chunk_file_spaces_local);
+ assert(!chunk_addrs || chunk_addrs == chunk_addrs_local);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_write() */
@@ -3377,7 +3377,7 @@ H5D__chunk_flush(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
/* Loop over all entries in the chunk cache */
for (ent = rdcc->head; ent; ent = next) {
@@ -3411,7 +3411,7 @@ H5D__chunk_io_term(H5D_io_info_t H5_ATTR_UNUSED *io_info, H5D_dset_io_info_t *di
FUNC_ENTER_PACKAGE
- HDassert(di);
+ assert(di);
/* Set convenience pointer */
fm = di->layout_io_info.chunk_map;
@@ -3419,11 +3419,11 @@ H5D__chunk_io_term(H5D_io_info_t H5_ATTR_UNUSED *io_info, H5D_dset_io_info_t *di
/* Single element I/O vs. multiple element I/O cleanup */
if (fm->use_single) {
/* Sanity checks */
- HDassert(fm->dset_sel_pieces == NULL);
- HDassert(fm->last_piece_info == NULL);
- HDassert(fm->single_piece_info);
- HDassert(fm->single_piece_info->fspace_shared);
- HDassert(fm->single_piece_info->mspace_shared);
+ assert(fm->dset_sel_pieces == NULL);
+ assert(fm->last_piece_info == NULL);
+ assert(fm->single_piece_info);
+ assert(fm->single_piece_info->fspace_shared);
+ assert(fm->single_piece_info->mspace_shared);
/* Reset the selection for the single element I/O */
H5S_select_all(fm->single_space, TRUE);
@@ -3480,7 +3480,7 @@ H5D__chunk_dest(H5D_t *dset)
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Sanity checks */
- HDassert(dset);
+ assert(dset);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Flush all the cached chunks */
@@ -3497,7 +3497,7 @@ H5D__chunk_dest(H5D_t *dset)
/* Release cache structures */
if (rdcc->slot)
rdcc->slot = H5FL_SEQ_FREE(H5D_rdcc_ent_ptr_t, rdcc->slot);
- HDmemset(rdcc, 0, sizeof(H5D_rdcc_t));
+ memset(rdcc, 0, sizeof(H5D_rdcc_t));
/* Compose chunked index info struct */
idx_info.f = dset->oloc.file;
@@ -3533,8 +3533,8 @@ H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(storage);
- HDassert(storage->ops);
+ assert(storage);
+ assert(storage->ops);
H5D_CHUNK_STORAGE_INDEX_CHK(storage);
/* Reset index structures */
@@ -3563,7 +3563,7 @@ H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(last);
+ assert(last);
/* Indicate that the cached info is not valid */
last->valid = FALSE;
@@ -3589,10 +3589,10 @@ H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *ud
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(last);
- HDassert(udata);
- HDassert(udata->common.layout);
- HDassert(udata->common.scaled);
+ assert(last);
+ assert(udata);
+ assert(udata->common.layout);
+ assert(udata->common.scaled);
/* Stored the information to cache */
H5MM_memcpy(last->scaled, udata->common.scaled, sizeof(hsize_t) * udata->common.layout->ndims);
@@ -3627,10 +3627,10 @@ H5D__chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *uda
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(last);
- HDassert(udata);
- HDassert(udata->common.layout);
- HDassert(udata->common.scaled);
+ assert(last);
+ assert(udata);
+ assert(udata->common.layout);
+ assert(udata->common.scaled);
/* Check if the cached information is what is desired */
if (last->valid) {
@@ -3680,10 +3680,9 @@ H5D__chunk_create(const H5D_t *dset /*in,out*/)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset);
- HDassert(H5D_CHUNKED == dset->shared->layout.type);
- HDassert(dset->shared->layout.u.chunk.ndims > 0 &&
- dset->shared->layout.u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(dset);
+ assert(H5D_CHUNKED == dset->shared->layout.type);
+ assert(dset->shared->layout.u.chunk.ndims > 0 && dset->shared->layout.u.chunk.ndims <= H5O_LAYOUT_NDIMS);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
#ifndef NDEBUG
@@ -3691,7 +3690,7 @@ H5D__chunk_create(const H5D_t *dset /*in,out*/)
unsigned u; /* Local index variable */
for (u = 0; u < dset->shared->layout.u.chunk.ndims; u++)
- HDassert(dset->shared->layout.u.chunk.dim[u] > 0);
+ assert(dset->shared->layout.u.chunk.dim[u] > 0);
}
#endif
@@ -3732,8 +3731,8 @@ H5D__chunk_hash_val(const H5D_shared_t *shared, const hsize_t *scaled)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(shared);
- HDassert(scaled);
+ assert(shared);
+ assert(scaled);
/* If the fastest changing dimension doesn't have enough entropy, use
* other dimensions too
@@ -3780,11 +3779,11 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5D_chunk_ud_t *udat
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dset);
- HDassert(dset->shared->layout.u.chunk.ndims > 0);
+ assert(dset);
+ assert(dset->shared->layout.u.chunk.ndims > 0);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
- HDassert(scaled);
- HDassert(udata);
+ assert(scaled);
+ assert(udata);
/* Initialize the query information about the chunk we are looking for */
udata->common.layout = &(dset->shared->layout.u.chunk);
@@ -3928,11 +3927,11 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
FUNC_ENTER_PACKAGE
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
- HDassert(ent);
- HDassert(!ent->locked);
+ assert(ent);
+ assert(!ent->locked);
buf = ent->chunk;
if (ent->dirty) {
@@ -4017,7 +4016,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
ent->edge_chunk_state &= ~H5D_RDCC_NEWLY_DISABLED_FILTERS;
} /* end else */
- HDassert(!(ent->edge_chunk_state & H5D_RDCC_NEWLY_DISABLED_FILTERS));
+ assert(!(ent->edge_chunk_state & H5D_RDCC_NEWLY_DISABLED_FILTERS));
/* Check if the chunk needs to be allocated (it also could exist already
* and the chunk alloc operation could resize it)
@@ -4042,7 +4041,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
} /* end if */
/* Write the data to the file */
- HDassert(H5F_addr_defined(udata.chunk_block.offset));
+ assert(H5F_addr_defined(udata.chunk_block.offset));
H5_CHECK_OVERFLOW(udata.chunk_block.length, hsize_t, size_t);
if (H5F_shared_block_write(H5F_SHARED(dset->oloc.file), H5FD_MEM_DRAW, udata.chunk_block.offset,
(size_t)udata.chunk_block.length, buf) < 0)
@@ -4118,10 +4117,10 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dset);
- HDassert(ent);
- HDassert(!ent->locked);
- HDassert(ent->idx < rdcc->nslots);
+ assert(dset);
+ assert(ent);
+ assert(!ent->locked);
+ assert(ent->idx < rdcc->nslots);
if (flush) {
/* Flush */
@@ -4150,7 +4149,7 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush)
/* Unlink from temporary list */
if (ent->tmp_prev) {
- HDassert(rdcc->tmp_head->tmp_next);
+ assert(rdcc->tmp_head->tmp_next);
ent->tmp_prev->tmp_next = ent->tmp_next;
if (ent->tmp_next) {
ent->tmp_next->tmp_prev = ent->tmp_prev;
@@ -4164,7 +4163,7 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush)
rdcc->slot[ent->idx] = NULL;
/* Remove from cache */
- HDassert(rdcc->slot[ent->idx] != ent);
+ assert(rdcc->slot[ent->idx] != ent);
ent->idx = UINT_MAX;
rdcc->nbytes_used -= dset->shared->layout.u.chunk.size;
--rdcc->nused;
@@ -4331,13 +4330,13 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->store);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->store);
dset = dset_info->dset;
- HDassert(dset);
- HDassert(udata);
- HDassert(!(udata->new_unfilt_chunk && prev_unfilt_chunk));
+ assert(dset);
+ assert(udata);
+ assert(!(udata->new_unfilt_chunk && prev_unfilt_chunk));
/* Set convenience pointers */
pline = &(dset->shared->dcpl_cache.pline);
@@ -4346,17 +4345,17 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
fill = &(dset->shared->dcpl_cache.fill);
rdcc = &(dset->shared->cache.chunk);
- HDassert(!rdcc->tmp_head);
+ assert(!rdcc->tmp_head);
/* Get the chunk's size */
- HDassert(layout->u.chunk.size > 0);
+ assert(layout->u.chunk.size > 0);
H5_CHECKED_ASSIGN(chunk_size, size_t, layout->u.chunk.size, uint32_t);
/* Check if the chunk is in the cache */
if (UINT_MAX != udata->idx_hint) {
/* Sanity check */
- HDassert(udata->idx_hint < rdcc->nslots);
- HDassert(rdcc->slot[udata->idx_hint]);
+ assert(udata->idx_hint < rdcc->nslots);
+ assert(rdcc->slot[udata->idx_hint]);
/* Get the entry */
ent = rdcc->slot[udata->idx_hint];
@@ -4367,7 +4366,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* Make sure this is the right chunk */
for (u = 0; u < layout->u.chunk.ndims - 1; u++)
- HDassert(dset_info->store->chunk.scaled[u] == ent->scaled[u]);
+ assert(dset_info->store->chunk.scaled[u] == ent->scaled[u]);
}
#endif /* NDEBUG */
@@ -4384,9 +4383,9 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* If this flag is set then partial chunk filters must be
* disabled, and the chunk must not have previously been a
* partial chunk (with disabled filters) */
- HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
- HDassert(!(ent->edge_chunk_state & H5D_RDCC_DISABLE_FILTERS));
- HDassert(old_pline->nused);
+ assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert(!(ent->edge_chunk_state & H5D_RDCC_DISABLE_FILTERS));
+ assert(old_pline->nused);
/* Disable filters. Set pline to NULL instead of just the
* default pipeline to make a quick failure more likely if the
@@ -4412,9 +4411,9 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* If this flag is set then partial chunk filters must be
* disabled, and the chunk must have previously been a partial
* chunk (with disabled filters) */
- HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
- HDassert((ent->edge_chunk_state & H5D_RDCC_DISABLE_FILTERS));
- HDassert(pline->nused);
+ assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert((ent->edge_chunk_state & H5D_RDCC_DISABLE_FILTERS));
+ assert(pline->nused);
/* Mark the old pipeline as having been disabled */
old_pline = NULL;
@@ -4466,14 +4465,14 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* Check if we should disable filters on this chunk */
if (pline->nused) {
if (udata->new_unfilt_chunk) {
- HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
/* Disable the filters for writing */
disable_filters = TRUE;
pline = NULL;
} /* end if */
else if (prev_unfilt_chunk) {
- HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
/* Mark the filters as having been previously disabled (for the
* chunk as currently on disk) - disable the filters for reading
@@ -4507,7 +4506,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* In the case that some dataset functions look through this data,
* clear it to all 0s. */
- HDmemset(chunk, 0, chunk_size);
+ memset(chunk, 0, chunk_size);
} /* end if */
else {
/*
@@ -4565,7 +4564,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
H5D_fill_value_t fill_status;
/* Sanity check */
- HDassert(fill->alloc_time != H5D_ALLOC_TIME_EARLY);
+ assert(fill->alloc_time != H5D_ALLOC_TIME_EARLY);
/* Chunk size on disk isn't [likely] the same size as the final chunk
* size in memory, so allocate memory big enough. */
@@ -4599,7 +4598,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, NULL, "can't refill fill value buffer")
} /* end if */
else
- HDmemset(chunk, 0, chunk_size);
+ memset(chunk, 0, chunk_size);
/* Increment # of creations */
rdcc->stats.ninits++;
@@ -4640,7 +4639,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
ent->chunk = (uint8_t *)chunk;
/* Add it to the cache */
- HDassert(NULL == rdcc->slot[udata->idx_hint]);
+ assert(NULL == rdcc->slot[udata->idx_hint]);
rdcc->slot[udata->idx_hint] = ent;
ent->idx = udata->idx_hint;
rdcc->nbytes_used += chunk_size;
@@ -4668,7 +4667,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
/* Lock the chunk into the cache */
if (ent) {
- HDassert(!ent->locked);
+ assert(!ent->locked);
ent->locked = TRUE;
chunk = ent->chunk;
} /* end if */
@@ -4730,9 +4729,9 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(udata);
+ assert(io_info);
+ assert(dset_info);
+ assert(udata);
/* Set convenience pointers */
layout = &(dset_info->dset->shared->layout);
@@ -4748,7 +4747,7 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
/* Check if we should disable filters on this chunk */
if (udata->new_unfilt_chunk) {
- HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
is_unfiltered_edge_chunk = TRUE;
} /* end if */
@@ -4762,14 +4761,14 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
if (dirty) {
H5D_rdcc_ent_t fake_ent; /* "fake" chunk cache entry */
- HDmemset(&fake_ent, 0, sizeof(fake_ent));
+ memset(&fake_ent, 0, sizeof(fake_ent));
fake_ent.dirty = TRUE;
if (is_unfiltered_edge_chunk)
fake_ent.edge_chunk_state = H5D_RDCC_DISABLE_FILTERS;
if (udata->new_unfilt_chunk)
fake_ent.edge_chunk_state |= H5D_RDCC_NEWLY_DISABLED_FILTERS;
H5MM_memcpy(fake_ent.scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims);
- HDassert(layout->u.chunk.size > 0);
+ assert(layout->u.chunk.size > 0);
fake_ent.chunk_idx = udata->chunk_idx;
fake_ent.chunk_block.offset = udata->chunk_block.offset;
fake_ent.chunk_block.length = udata->chunk_block.length;
@@ -4788,15 +4787,15 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_
H5D_rdcc_ent_t *ent; /* Chunk's entry in the cache */
/* Sanity check */
- HDassert(udata->idx_hint < rdcc->nslots);
- HDassert(rdcc->slot[udata->idx_hint]);
- HDassert(rdcc->slot[udata->idx_hint]->chunk == chunk);
+ assert(udata->idx_hint < rdcc->nslots);
+ assert(rdcc->slot[udata->idx_hint]);
+ assert(rdcc->slot[udata->idx_hint]->chunk == chunk);
/*
* It's in the cache so unlock it.
*/
ent = rdcc->slot[udata->idx_hint];
- HDassert(ent->locked);
+ assert(ent->locked);
if (dirty) {
ent->dirty = TRUE;
ent->wr_count -= MIN(ent->wr_count, naccessed);
@@ -4861,8 +4860,8 @@ H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes)
FUNC_ENTER_PACKAGE
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Search for cached chunks that haven't been written out */
@@ -4949,8 +4948,8 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset && H5D_CHUNKED == layout->type);
- HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(dset && H5D_CHUNKED == layout->type);
+ assert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Retrieve the dataset dimensions */
@@ -5113,7 +5112,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
continue;
else {
/* Reset the chunk offset indices */
- HDmemset(scaled, 0, (space_ndims * sizeof(scaled[0])));
+ memset(scaled, 0, (space_ndims * sizeof(scaled[0])));
scaled[op_dim] = min_unalloc[op_dim];
if (has_unfilt_edge_chunks) {
@@ -5125,8 +5124,8 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
/* Initialize chunk_size and fill_buf */
if (should_fill && !fb_info.has_vlen_fill_type) {
- HDassert(fb_info_init);
- HDassert(unfilt_fill_buf);
+ assert(fb_info_init);
+ assert(unfilt_fill_buf);
if (nunfilt_edge_chunk_dims) {
fill_buf = &unfilt_fill_buf;
chunk_size = layout->u.chunk.size;
@@ -5150,7 +5149,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
#ifndef NDEBUG
/* None of the chunks should be allocated */
if (H5D_CHUNK_IDX_NONE != sc->idx_type)
- HDassert(!H5F_addr_defined(udata.chunk_block.offset));
+ assert(!H5F_addr_defined(udata.chunk_block.offset));
/* Make sure the chunk is really in the dataset and outside the
* original dimensions */
@@ -5159,21 +5158,21 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
hbool_t outside_orig = FALSE;
for (v = 0; v < space_ndims; v++) {
- HDassert((scaled[v] * chunk_dim[v]) < space_dim[v]);
+ assert((scaled[v] * chunk_dim[v]) < space_dim[v]);
if ((scaled[v] * chunk_dim[v]) >= old_dim[v])
outside_orig = TRUE;
} /* end for */
- HDassert(outside_orig);
+ assert(outside_orig);
} /* end block */
#endif /* NDEBUG */
/* Check for VL datatype & non-default fill value */
if (fb_info_init && fb_info.has_vlen_fill_type) {
/* Sanity check */
- HDassert(should_fill);
- HDassert(!unfilt_fill_buf);
+ assert(should_fill);
+ assert(!unfilt_fill_buf);
#ifdef H5_HAVE_PARALLEL
- HDassert(!using_mpi); /* Can't write VL datatypes in parallel currently */
+ assert(!using_mpi); /* Can't write VL datatypes in parallel currently */
#endif
/* Check to make sure the buffer is large enough. It is
@@ -5221,7 +5220,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
else
chunk_size = layout->u.chunk.size;
- HDassert(*fill_buf == fb_info.fill_buf);
+ assert(*fill_buf == fb_info.fill_buf);
} /* end if */
/* Initialize the chunk information */
@@ -5235,13 +5234,13 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
/* Allocate the chunk (with all processes) */
if (H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, scaled) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
- HDassert(H5F_addr_defined(udata.chunk_block.offset));
+ assert(H5F_addr_defined(udata.chunk_block.offset));
/* Check if fill values should be written to chunks */
if (should_fill) {
/* Sanity check */
- HDassert(fb_info_init);
- HDassert(udata.chunk_block.length == chunk_size);
+ assert(fb_info_init);
+ assert(udata.chunk_block.length == chunk_size);
#ifdef H5_HAVE_PARALLEL
/* Check if this file is accessed with an MPI-capable file driver */
@@ -5302,7 +5301,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
scaled[i] < edge_chunk_scaled[i]) {
nunfilt_edge_chunk_dims--;
if (should_fill && nunfilt_edge_chunk_dims == 0 && !fb_info.has_vlen_fill_type) {
- HDassert(
+ assert(
!H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, scaled, space_dim));
fill_buf = &fb_info.fill_buf;
chunk_size = orig_chunk_size;
@@ -5312,10 +5311,10 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old
else {
/* Check if we just entered the edge in this dimension */
if (unfilt_edge_chunk_dim[i] && scaled[i] == edge_chunk_scaled[i]) {
- HDassert(edge_chunk_scaled[i] == max_unalloc[i]);
+ assert(edge_chunk_scaled[i] == max_unalloc[i]);
nunfilt_edge_chunk_dims++;
if (should_fill && nunfilt_edge_chunk_dims == 1 && !fb_info.has_vlen_fill_type) {
- HDassert(
+ assert(
H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, scaled, space_dim));
fill_buf = &unfilt_fill_buf;
chunk_size = layout->u.chunk.size;
@@ -5405,11 +5404,11 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset && H5D_CHUNKED == layout->type);
- HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(dset && H5D_CHUNKED == layout->type);
+ assert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
H5D_CHUNK_STORAGE_INDEX_CHK(&layout->storage.u.chunk);
- HDassert(dset->shared->dcpl_cache.pline.nused > 0);
- HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert(dset->shared->dcpl_cache.pline.nused > 0);
+ assert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
/* Retrieve the dataset dimensions */
space_dim = dset->shared->curr_dims;
@@ -5477,10 +5476,10 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
if (!new_full_dim[op_dim])
continue;
else {
- HDassert(max_edge_chunk_sc[op_dim] == old_edge_chunk_sc[op_dim]);
+ assert(max_edge_chunk_sc[op_dim] == old_edge_chunk_sc[op_dim]);
/* Reset the chunk offset indices */
- HDmemset(chunk_sc, 0, (space_ndims * sizeof(chunk_sc[0])));
+ memset(chunk_sc, 0, (space_ndims * sizeof(chunk_sc[0])));
chunk_sc[op_dim] = old_edge_chunk_sc[op_dim];
carry = FALSE;
@@ -5490,8 +5489,8 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
int i; /* Local index variable */
/* Make sure the chunk is really a former edge chunk */
- HDassert(H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, chunk_sc, old_dim) &&
- !H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, chunk_sc, space_dim));
+ assert(H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, chunk_sc, old_dim) &&
+ !H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, chunk_sc, space_dim));
/* Lookup the chunk */
if (H5D__chunk_lookup(dset, chunk_sc, &chk_udata) < 0)
@@ -5586,7 +5585,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
* that the "don't filter partial edge chunks" flag is set.
*/
if (partial_chunk_fill_buf)
- HDassert(dset->shared->layout.u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ assert(dset->shared->layout.u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
/* Get the MPI communicator */
if (MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(dset->oloc.file)))
@@ -5683,7 +5682,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
H5_CHECKED_ASSIGN(block_lens[i], int, chunk_fill_info->chunk_info[idx].chunk_size, size_t);
if (chunk_fill_info->chunk_info[idx].unfiltered_partial_chunk) {
- HDassert(partial_chunk_fill_buf);
+ assert(partial_chunk_fill_buf);
block_disps[i] = partial_fill_buf_disp;
}
} /* end for */
@@ -5702,7 +5701,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
size_t);
if (chunk_fill_info->chunk_info[(blocks * mpi_size) + mpi_rank].unfiltered_partial_chunk) {
- HDassert(partial_chunk_fill_buf);
+ assert(partial_chunk_fill_buf);
block_disps[blocks] = partial_fill_buf_disp;
}
@@ -5743,9 +5742,9 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_
* Currently, different block lengths implies that there are partial
* edge chunks and the "don't filter partial edge chunks" flag is set.
*/
- HDassert(partial_chunk_fill_buf);
- HDassert(block_lens);
- HDassert(block_disps);
+ assert(partial_chunk_fill_buf);
+ assert(block_lens);
+ assert(block_disps);
mpi_code = MPI_Type_create_hindexed(blocks, block_lens, chunk_disp_array, MPI_BYTE, &file_type);
if (mpi_code != MPI_SUCCESS)
@@ -5856,7 +5855,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
FUNC_ENTER_PACKAGE
/* Get the chunk's size */
- HDassert(layout->u.chunk.size > 0);
+ assert(layout->u.chunk.size > 0);
H5_CHECKED_ASSIGN(chunk_size, size_t, layout->u.chunk.size, uint32_t);
/* Get the info for the chunk in the file */
@@ -5881,7 +5880,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
/* Compute the # of elements to leave with existing value, in each dimension */
for (u = 0; u < rank; u++) {
count[u] = MIN(layout->u.chunk.dim[u], (udata->space_dim[u] - (scaled[u] * layout->u.chunk.dim[u])));
- HDassert(count[u] > 0);
+ assert(count[u] > 0);
} /* end for */
/* Select all elements in chunk, to begin with */
@@ -6082,8 +6081,8 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset && H5D_CHUNKED == layout->type);
- HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(dset && H5D_CHUNKED == layout->type);
+ assert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Go get the rank & dimensions (including the element size) */
@@ -6119,7 +6118,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Reset hyperslab start array */
/* (hyperslabs will always start from origin) */
- HDmemset(hyper_start, 0, sizeof(hyper_start));
+ memset(hyper_start, 0, sizeof(hyper_start));
/* Set up chunked I/O info object, for operations on chunks (in callback)
* Note that we only need to set scaled once, as the array's address
@@ -6141,7 +6140,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
idx_info.storage = &dset->shared->layout.storage.u.chunk;
/* Initialize the user data for the iteration */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = &layout->u.chunk;
udata.common.storage = sc;
udata.common.scaled = scaled;
@@ -6166,8 +6165,8 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/*
* Determine the chunks which need to be filled or removed
*/
- HDmemset(min_mod_chunk_sc, 0, sizeof(min_mod_chunk_sc));
- HDmemset(max_mod_chunk_sc, 0, sizeof(max_mod_chunk_sc));
+ memset(min_mod_chunk_sc, 0, sizeof(min_mod_chunk_sc));
+ memset(max_mod_chunk_sc, 0, sizeof(max_mod_chunk_sc));
for (op_dim = 0; op_dim < (unsigned)space_ndims; op_dim++) {
/* Validate this chunk dimension */
if (chunk_dim[op_dim] == 0)
@@ -6230,10 +6229,10 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
if (!shrunk_dim[op_dim])
continue;
else {
- HDassert(max_mod_chunk_sc[op_dim] >= min_mod_chunk_sc[op_dim]);
+ assert(max_mod_chunk_sc[op_dim] >= min_mod_chunk_sc[op_dim]);
/* Reset the chunk offset indices */
- HDmemset(scaled, 0, (space_ndims * sizeof(scaled[0])));
+ memset(scaled, 0, (space_ndims * sizeof(scaled[0])));
scaled[op_dim] = min_mod_chunk_sc[op_dim];
/* Initialize "dims_outside_fill" array */
@@ -6254,12 +6253,11 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
udata.common.scaled = scaled;
if (0 == ndims_outside_fill) {
- HDassert(fill_dim[op_dim]);
- HDassert(scaled[op_dim] == min_mod_chunk_sc[op_dim]);
+ assert(fill_dim[op_dim]);
+ assert(scaled[op_dim] == min_mod_chunk_sc[op_dim]);
/* Make sure this is an edge chunk */
- HDassert(
- H5D__chunk_is_partial_edge_chunk(space_ndims, layout->u.chunk.dim, scaled, space_dim));
+ assert(H5D__chunk_is_partial_edge_chunk(space_ndims, layout->u.chunk.dim, scaled, space_dim));
/* Determine if the chunk just became an unfiltered chunk */
if (new_unfilt_dim[op_dim]) {
@@ -6273,10 +6271,10 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Make sure that, if we think this is a new unfiltered chunk,
* it was previously not an edge chunk */
- HDassert(!new_unfilt_dim[op_dim] ||
- (!new_unfilt_chunk != !H5D__chunk_is_partial_edge_chunk(
- space_ndims, layout->u.chunk.dim, scaled, old_dim)));
- HDassert(!new_unfilt_chunk || new_unfilt_dim[op_dim]);
+ assert(!new_unfilt_dim[op_dim] ||
+ (!new_unfilt_chunk != !H5D__chunk_is_partial_edge_chunk(
+ space_ndims, layout->u.chunk.dim, scaled, old_dim)));
+ assert(!new_unfilt_chunk || new_unfilt_dim[op_dim]);
/* Fill the unused parts of the chunk */
if (H5D__chunk_prune_fill(&udata, new_unfilt_chunk) < 0)
@@ -6295,7 +6293,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
outside_dim = TRUE;
break;
} /* end if */
- HDassert(outside_dim);
+ assert(outside_dim);
} /* end block */
#endif /* NDEBUG */
@@ -6436,14 +6434,14 @@ H5D__chunk_addrmap(const H5D_t *dset, haddr_t chunk_addr[])
FUNC_ENTER_PACKAGE
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
sc = &(dset->shared->layout.storage.u.chunk);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
- HDassert(chunk_addr);
+ assert(chunk_addr);
/* Set up user data for B-tree callback */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
udata.common.layout = &dset->shared->layout.u.chunk;
udata.common.storage = sc;
udata.chunk_addr = chunk_addr;
@@ -6490,9 +6488,9 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(oh);
- HDassert(storage);
+ assert(f);
+ assert(oh);
+ assert(storage);
H5D_CHUNK_STORAGE_INDEX_CHK(&storage->u.chunk);
/* Check for I/O pipeline message */
@@ -6504,7 +6502,7 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage)
pline_read = TRUE;
} /* end else if */
else
- HDmemset(&pline, 0, sizeof(pline));
+ memset(&pline, 0, sizeof(pline));
/* Retrieve dataset layout message */
if ((exists = H5O_msg_exists_oh(oh, H5O_LAYOUT_ID)) < 0)
@@ -6565,15 +6563,14 @@ H5D__chunk_update_cache(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset && H5D_CHUNKED == dset->shared->layout.type);
- HDassert(dset->shared->layout.u.chunk.ndims > 0 &&
- dset->shared->layout.u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(dset && H5D_CHUNKED == dset->shared->layout.type);
+ assert(dset->shared->layout.u.chunk.ndims > 0 && dset->shared->layout.u.chunk.ndims <= H5O_LAYOUT_NDIMS);
/* Check the rank */
- HDassert((dset->shared->layout.u.chunk.ndims - 1) > 1);
+ assert((dset->shared->layout.u.chunk.ndims - 1) > 1);
/* Add temporary entry list to rdcc */
- (void)HDmemset(&tmp_head, 0, sizeof(tmp_head));
+ (void)memset(&tmp_head, 0, sizeof(tmp_head));
rdcc->tmp_head = &tmp_head;
tmp_tail = &tmp_head;
@@ -6594,14 +6591,14 @@ H5D__chunk_update_cache(H5D_t *dset)
/* Check if there is already a chunk at this chunk's new location */
old_ent = rdcc->slot[ent->idx];
if (old_ent != NULL) {
- HDassert(old_ent->locked == FALSE);
- HDassert(old_ent->deleted == FALSE);
+ assert(old_ent->locked == FALSE);
+ assert(old_ent->deleted == FALSE);
/* Insert the old entry into the temporary list, but do not
* evict (yet). Make sure we do not make any calls to the index
* until all chunks have updated indices! */
- HDassert(!old_ent->tmp_next);
- HDassert(!old_ent->tmp_prev);
+ assert(!old_ent->tmp_next);
+ assert(!old_ent->tmp_prev);
tmp_tail->tmp_next = old_ent;
old_ent->tmp_prev = tmp_tail;
tmp_tail = old_ent;
@@ -6614,15 +6611,15 @@ H5D__chunk_update_cache(H5D_t *dset)
* not in the hash table, remove it from the temporary list.
* Otherwise clear the old hash table slot. */
if (ent->tmp_prev) {
- HDassert(tmp_head.tmp_next);
- HDassert(tmp_tail != &tmp_head);
+ assert(tmp_head.tmp_next);
+ assert(tmp_tail != &tmp_head);
ent->tmp_prev->tmp_next = ent->tmp_next;
if (ent->tmp_next) {
ent->tmp_next->tmp_prev = ent->tmp_prev;
ent->tmp_next = NULL;
} /* end if */
else {
- HDassert(tmp_tail == ent);
+ assert(tmp_tail == ent);
tmp_tail = ent->tmp_prev;
} /* end else */
ent->tmp_prev = NULL;
@@ -6731,7 +6728,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
"memory allocation failed for raw data chunk")
udata->bkg = new_buf;
if (!udata->cpy_info->expand_ref)
- HDmemset((uint8_t *)udata->bkg + buf_size, 0, (size_t)(nbytes - buf_size));
+ memset((uint8_t *)udata->bkg + buf_size, 0, (size_t)(nbytes - buf_size));
bkg = udata->bkg;
} /* end if */
@@ -6741,7 +6738,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
} /* end if */
if (udata->chunk_in_cache && udata->chunk) {
- HDassert(!H5F_addr_defined(chunk_rec->chunk_addr));
+ assert(!H5F_addr_defined(chunk_rec->chunk_addr));
H5MM_memcpy(buf, udata->chunk, nbytes);
udata->chunk = NULL;
}
@@ -6776,8 +6773,8 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
if (NULL == ent)
HGOTO_ERROR(H5E_IO, H5E_BADVALUE, H5_ITER_ERROR, "NULL chunk entry pointer")
- HDassert(H5F_addr_defined(chunk_rec->chunk_addr));
- HDassert(H5F_addr_defined(ent->chunk_block.offset));
+ assert(H5F_addr_defined(chunk_rec->chunk_addr));
+ assert(H5F_addr_defined(ent->chunk_block.offset));
H5_CHECKED_ASSIGN(nbytes, size_t, shared_fo->layout.u.chunk.size, uint32_t);
H5MM_memcpy(buf, ent->chunk, nbytes);
@@ -6820,7 +6817,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5MM_memcpy(reclaim_buf, buf, reclaim_buf_size);
/* Set background buffer to all zeros */
- HDmemset(bkg, 0, buf_size);
+ memset(bkg, 0, buf_size);
/* Convert from memory to destination file */
if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, udata->nelmts, (size_t)0, (size_t)0, buf, bkg) < 0)
@@ -6880,7 +6877,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
/* Write chunk data to destination file */
- HDassert(H5F_addr_defined(udata_dst.chunk_block.offset));
+ assert(H5F_addr_defined(udata_dst.chunk_block.offset));
if (H5F_block_write(udata->idx_info_dst->f, H5FD_MEM_DRAW, udata_dst.chunk_block.offset, nbytes, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to write raw data to file")
@@ -6945,19 +6942,19 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f_src);
- HDassert(storage_src);
+ assert(f_src);
+ assert(storage_src);
H5D_CHUNK_STORAGE_INDEX_CHK(storage_src);
- HDassert(layout_src);
- HDassert(f_dst);
- HDassert(storage_dst);
+ assert(layout_src);
+ assert(f_dst);
+ assert(storage_dst);
H5D_CHUNK_STORAGE_INDEX_CHK(storage_dst);
- HDassert(ds_extent_src);
- HDassert(dt_src);
+ assert(ds_extent_src);
+ assert(dt_src);
/* Initialize the temporary pipeline info */
if (NULL == pline_src) {
- HDmemset(&_pline, 0, sizeof(_pline));
+ memset(&_pline, 0, sizeof(_pline));
pline = &_pline;
} /* end if */
else
@@ -7094,7 +7091,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
/* Check for reference datatype and no expanding references & clear background buffer */
if (!cpy_info->expand_ref && ((H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) && (f_src != f_dst)))
/* Reset value to zero */
- HDmemset(bkg, 0, buf_size);
+ memset(bkg, 0, buf_size);
} /* end if */
/* Allocate memory for copying the chunk */
@@ -7102,7 +7099,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk")
/* Initialize the callback structure for the source */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = layout_src;
udata.common.storage = storage_src;
udata.file_src = f_src;
@@ -7211,12 +7208,12 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout, hsize_
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(layout);
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(layout);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
- HDassert(index_size);
+ assert(index_size);
/* Check for I/O pipeline message */
if ((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0)
@@ -7227,7 +7224,7 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout, hsize_
pline_read = TRUE;
} /* end else if */
else
- HDmemset(&pline, 0, sizeof(pline));
+ memset(&pline, 0, sizeof(pline));
/* Compose chunked index info struct */
idx_info.f = loc->file;
@@ -7287,20 +7284,19 @@ H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
/* Print header if not already displayed */
if (!udata->header_displayed) {
- HDfprintf(udata->stream, " Flags Bytes Address Logical Offset\n");
- HDfprintf(udata->stream,
- " ========== ======== ========== ==============================\n");
+ fprintf(udata->stream, " Flags Bytes Address Logical Offset\n");
+ fprintf(udata->stream, " ========== ======== ========== ==============================\n");
/* Set flag that the headers has been printed */
udata->header_displayed = TRUE;
} /* end if */
/* Print information about this chunk */
- HDfprintf(udata->stream, " 0x%08x %8" PRIu32 " %10" PRIuHADDR " [", chunk_rec->filter_mask,
- chunk_rec->nbytes, chunk_rec->chunk_addr);
+ fprintf(udata->stream, " 0x%08x %8" PRIu32 " %10" PRIuHADDR " [", chunk_rec->filter_mask,
+ chunk_rec->nbytes, chunk_rec->chunk_addr);
for (u = 0; u < udata->ndims; u++)
- HDfprintf(udata->stream, "%s%" PRIuHSIZE, (u ? ", " : ""),
- (chunk_rec->scaled[u] * udata->chunk_dim[u]));
+ fprintf(udata->stream, "%s%" PRIuHSIZE, (u ? ", " : ""),
+ (chunk_rec->scaled[u] * udata->chunk_dim[u]));
HDfputs("]\n", udata->stream);
} /* end if */
@@ -7330,7 +7326,7 @@ H5D__chunk_dump_index(H5D_t *dset, FILE *stream)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
/* Only display info if stream is defined */
@@ -7394,11 +7390,11 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
HGOTO_DONE(SUCCEED)
if (headers) {
- HDfprintf(H5DEBUG(AC), "H5D: raw data cache statistics\n");
- HDfprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s+%-8s\n", "Layer", "Hits", "Misses", "MissRate",
- "Inits", "Flushes");
- HDfprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s-%-8s\n", "-----", "----", "------", "--------",
- "-----", "-------");
+ fprintf(H5DEBUG(AC), "H5D: raw data cache statistics\n");
+ fprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s+%-8s\n", "Layer", "Hits", "Misses", "MissRate",
+ "Inits", "Flushes");
+ fprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s-%-8s\n", "-----", "----", "------", "--------",
+ "-----", "-------");
}
#ifdef H5AC_DEBUG
@@ -7420,9 +7416,9 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
HDsnprintf(ascii, sizeof(ascii), "%7.2f%%", miss_rate);
}
- HDfprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n", "raw data chunks", rdcc->stats.nhits,
- rdcc->stats.nmisses, ascii, rdcc->stats.ninits,
- (long)(rdcc->stats.nflushes) - (long)(rdcc->stats.ninits));
+ fprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n", "raw data chunks", rdcc->stats.nhits,
+ rdcc->stats.nmisses, ascii, rdcc->stats.ninits,
+ (long)(rdcc->stats.nflushes) - (long)(rdcc->stats.ninits));
}
done:
@@ -7509,13 +7505,13 @@ H5D__nonexistent_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info,
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
- HDassert(chunk_curr_seq);
- HDassert(chunk_len_arr);
- HDassert(chunk_off_arr);
- HDassert(mem_curr_seq);
- HDassert(mem_len_arr);
- HDassert(mem_off_arr);
+ assert(io_info);
+ assert(chunk_curr_seq);
+ assert(chunk_len_arr);
+ assert(chunk_off_arr);
+ assert(mem_curr_seq);
+ assert(mem_len_arr);
+ assert(mem_off_arr);
/* Set up user data for H5VM_opvv() */
udata.rbuf = (unsigned char *)dset_info->buf.vp;
@@ -7555,10 +7551,10 @@ H5D__chunk_is_partial_edge_chunk(unsigned dset_ndims, const uint32_t *chunk_dims
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(scaled);
- HDassert(dset_ndims > 0);
- HDassert(dset_dims);
- HDassert(chunk_dims);
+ assert(scaled);
+ assert(dset_ndims > 0);
+ assert(dset_dims);
+ assert(chunk_dims);
/* check if this is a partial edge chunk */
for (u = 0; u < dset_ndims; u++)
@@ -7593,20 +7589,20 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(new_chunk);
- HDassert(need_insert);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(new_chunk);
+ assert(need_insert);
*need_insert = FALSE;
/* Check for filters on chunks */
if (idx_info->pline->nused > 0) {
/* Sanity/error checking block */
- HDassert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
+ assert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
{
unsigned allow_chunk_size_len; /* Allowed size of encoded chunk size */
unsigned new_chunk_size_len; /* Size of encoded chunk size */
@@ -7630,8 +7626,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
if (old_chunk && H5F_addr_defined(old_chunk->offset)) {
/* Sanity check */
- HDassert(!H5F_addr_defined(new_chunk->offset) ||
- H5F_addr_eq(new_chunk->offset, old_chunk->offset));
+ assert(!H5F_addr_defined(new_chunk->offset) || H5F_addr_eq(new_chunk->offset, old_chunk->offset));
/* Check for chunk being same size */
if (new_chunk->length != old_chunk->length) {
@@ -7652,13 +7647,13 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
} /* end else */
} /* end if */
else {
- HDassert(!H5F_addr_defined(new_chunk->offset));
+ assert(!H5F_addr_defined(new_chunk->offset));
alloc_chunk = TRUE;
} /* end else */
} /* end if */
else {
- HDassert(!H5F_addr_defined(new_chunk->offset));
- HDassert(new_chunk->length == idx_info->layout->size);
+ assert(!H5F_addr_defined(new_chunk->offset));
+ assert(new_chunk->length == idx_info->layout->size);
alloc_chunk = TRUE;
} /* end else */
@@ -7672,7 +7667,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
if ((idx_info->storage->ops->get_addr)(idx_info, &udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query chunk address")
new_chunk->offset = udata.chunk_block.offset;
- HDassert(new_chunk->length == udata.chunk_block.length);
+ assert(new_chunk->length == udata.chunk_block.length);
break;
}
@@ -7681,7 +7676,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
case H5D_CHUNK_IDX_BT2:
case H5D_CHUNK_IDX_BTREE:
case H5D_CHUNK_IDX_SINGLE:
- HDassert(new_chunk->length > 0);
+ assert(new_chunk->length > 0);
H5_CHECK_OVERFLOW(new_chunk->length, /*From: */ uint32_t, /*To: */ hsize_t);
new_chunk->offset = H5MF_alloc(idx_info->f, H5FD_MEM_DRAW, (hsize_t)new_chunk->length);
if (!H5F_addr_defined(new_chunk->offset))
@@ -7691,12 +7686,12 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
case H5D_CHUNK_IDX_NTYPES:
default:
- HDassert(0 && "This should never be executed!");
+ assert(0 && "This should never be executed!");
break;
} /* end switch */
} /* end if */
- HDassert(H5F_addr_defined(new_chunk->offset));
+ assert(H5F_addr_defined(new_chunk->offset));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -7746,7 +7741,7 @@ H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5Z_cb_t filter_cb; /* Filter failure callback struct */
size_t read_size = nbytes; /* Bytes to read */
- HDassert(read_size == new_idx_info->layout->size);
+ assert(read_size == new_idx_info->layout->size);
/* Initialize the filter callback struct */
filter_cb.op_data = NULL;
@@ -7775,7 +7770,7 @@ H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
/* Allocate space for the filtered chunk */
if ((chunk_addr = H5MF_alloc(new_idx_info->f, H5FD_MEM_DRAW, (hsize_t)nbytes)) == HADDR_UNDEF)
HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, H5_ITER_ERROR, "file allocation failed for filtered chunk")
- HDassert(H5F_addr_defined(chunk_addr));
+ assert(H5F_addr_defined(chunk_addr));
/* Write the filtered chunk to disk */
if (H5F_block_write(new_idx_info->f, H5FD_MEM_DRAW, chunk_addr, nbytes, buf) < 0)
@@ -7823,7 +7818,7 @@ H5D__chunk_format_convert(H5D_t *dset, H5D_chk_idx_info_t *idx_info, H5D_chk_idx
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset);
+ assert(dset);
/* Set up user data */
udata.new_idx_info = new_idx_info;
@@ -7889,12 +7884,12 @@ H5D__chunk_index_empty(const H5D_t *dset, hbool_t *empty)
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
- HDassert(dset);
- HDassert(dset->shared);
- HDassert(empty);
+ assert(dset);
+ assert(dset->shared);
+ assert(empty);
rdcc = &(dset->shared->cache.chunk); /* raw data chunk cache */
- HDassert(rdcc);
+ assert(rdcc);
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
@@ -7946,7 +7941,7 @@ H5D__get_num_chunks_cb(const H5D_chunk_rec_t H5_ATTR_UNUSED *chunk_rec, void *_u
FUNC_ENTER_PACKAGE_NOERR
- HDassert(num_chunks);
+ assert(num_chunks);
(*num_chunks)++;
@@ -7980,13 +7975,13 @@ H5D__get_num_chunks(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
- HDassert(dset);
- HDassert(dset->shared);
- HDassert(space);
- HDassert(nchunks);
+ assert(dset);
+ assert(dset->shared);
+ assert(space);
+ assert(nchunks);
rdcc = &(dset->shared->cache.chunk); /* raw data chunk cache */
- HDassert(rdcc);
+ assert(rdcc);
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
@@ -8039,8 +8034,8 @@ H5D__get_chunk_info_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(chunk_rec);
- HDassert(chunk_info);
+ assert(chunk_rec);
+ assert(chunk_info);
/* If this is the queried chunk, retrieve its info and stop iterating */
if (chunk_info->curr_idx == chunk_info->chunk_idx) {
@@ -8094,13 +8089,13 @@ H5D__get_chunk_info(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
- HDassert(dset);
- HDassert(dset->shared);
- HDassert(space);
+ assert(dset);
+ assert(dset->shared);
+ assert(space);
/* Get the raw data chunk cache */
rdcc = &(dset->shared->cache.chunk);
- HDassert(rdcc);
+ assert(rdcc);
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
@@ -8180,8 +8175,8 @@ H5D__get_chunk_info_by_coord_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(chunk_rec);
- HDassert(chunk_info);
+ assert(chunk_rec);
+ assert(chunk_info);
/* Going through the scaled, stop when a mismatch is found */
for (ii = 0; ii < chunk_info->ndims && !different; ii++)
@@ -8230,16 +8225,16 @@ H5D__get_chunk_info_by_coord(const H5D_t *dset, const hsize_t *offset, unsigned
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Check args */
- HDassert(dset);
- HDassert(dset->shared);
- HDassert(offset);
+ assert(dset);
+ assert(dset->shared);
+ assert(offset);
/* Get dataset layout and raw data chunk cache */
layout = &(dset->shared->layout);
rdcc = &(dset->shared->cache.chunk);
- HDassert(layout);
- HDassert(rdcc);
- HDassert(H5D_CHUNKED == layout->type);
+ assert(layout);
+ assert(rdcc);
+ assert(H5D_CHUNKED == layout->type);
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
@@ -8356,15 +8351,15 @@ H5D__chunk_iter(H5D_t *dset, H5D_chunk_iter_op_t op, void *op_data)
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Check args */
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
/* Get dataset layout and raw data chunk cache */
layout = &(dset->shared->layout);
rdcc = &(dset->shared->cache.chunk);
- HDassert(layout);
- HDassert(rdcc);
- HDassert(H5D_CHUNKED == layout->type);
+ assert(layout);
+ assert(rdcc);
+ assert(H5D_CHUNKED == layout->type);
/* Search for cached chunks that haven't been written out */
for (ent = rdcc->head; ent; ent = ent->next)
@@ -8417,15 +8412,15 @@ H5D__chunk_get_offset_copy(const H5D_t *dset, const hsize_t *offset, hsize_t *of
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dset);
- HDassert(offset);
- HDassert(offset_copy);
+ assert(dset);
+ assert(offset);
+ assert(offset_copy);
/* The library's chunking code requires the offset to terminate with a zero.
* So transfer the offset array to an internal offset array that we
* can properly terminate (handled via the memset call).
*/
- HDmemset(offset_copy, 0, H5O_LAYOUT_NDIMS * sizeof(hsize_t));
+ memset(offset_copy, 0, H5O_LAYOUT_NDIMS * sizeof(hsize_t));
for (u = 0; u < dset->shared->ndims; u++) {
/* Make sure the offset doesn't exceed the dataset's dimensions */
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index 5f45da4..f9742ff 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -125,10 +125,10 @@ H5D__compact_fill(const H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset && H5D_COMPACT == dset->shared->layout.type);
- HDassert(dset->shared->layout.storage.u.compact.buf);
- HDassert(dset->shared->type);
- HDassert(dset->shared->space);
+ assert(dset && H5D_COMPACT == dset->shared->layout.type);
+ assert(dset->shared->layout.storage.u.compact.buf);
+ assert(dset->shared->type);
+ assert(dset->shared->space);
/* Initialize the fill value buffer */
/* (use the compact dataset storage buffer as the fill value buffer) */
@@ -176,8 +176,8 @@ H5D__compact_construct(H5F_t *f, H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(dset);
+ assert(f);
+ assert(dset);
/* Check for invalid dataset dimensions */
for (u = 0; u < dset->shared->ndims; u++)
@@ -189,9 +189,9 @@ H5D__compact_construct(H5F_t *f, H5D_t *dset)
* layout.
*/
stmp_size = H5S_GET_EXTENT_NPOINTS(dset->shared->space);
- HDassert(stmp_size >= 0);
+ assert(stmp_size >= 0);
tmp_size = H5T_get_size(dset->shared->type);
- HDassert(tmp_size > 0);
+ assert(tmp_size > 0);
tmp_size = tmp_size * (hsize_t)stmp_size;
H5_CHECKED_ASSIGN(dset->shared->layout.storage.u.compact.size, size_t, tmp_size, hssize_t);
@@ -225,7 +225,7 @@ H5D__compact_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(storage);
+ assert(storage);
/* Compact storage is currently always allocated */
FUNC_LEAVE_NOAPI(TRUE)
@@ -328,8 +328,8 @@ H5D__compact_readvv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset
FUNC_ENTER_PACKAGE
- HDassert(io_info);
- HDassert(dset_info);
+ assert(io_info);
+ assert(dset_info);
/* Check if file driver wishes to do its own memory management */
if (H5F_SHARED_HAS_FEATURE(io_info->f_sh, H5FD_FEAT_MEMMANAGE)) {
@@ -389,8 +389,8 @@ H5D__compact_writevv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dse
FUNC_ENTER_PACKAGE
- HDassert(io_info);
- HDassert(dset_info);
+ assert(io_info);
+ assert(dset_info);
/* Check if file driver wishes to do its own memory management */
if (H5F_SHARED_HAS_FEATURE(io_info->f_sh, H5FD_FEAT_MEMMANAGE)) {
@@ -442,7 +442,7 @@ H5D__compact_flush(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
/* Check if the buffered compact information is dirty */
if (dset->shared->layout.storage.u.compact.dirty) {
@@ -475,7 +475,7 @@ H5D__compact_dest(H5D_t *dset)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(dset);
+ assert(dset);
/* Free the buffer for the raw data for compact datasets */
dset->shared->layout.storage.u.compact.buf = H5MM_xfree(dset->shared->layout.storage.u.compact.buf);
@@ -514,12 +514,12 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f_src);
- HDassert(storage_src);
- HDassert(f_dst);
- HDassert(storage_dst);
- HDassert(storage_dst->buf);
- HDassert(dt_src);
+ assert(f_src);
+ assert(storage_src);
+ assert(f_dst);
+ assert(storage_dst);
+ assert(storage_dst->buf);
+ assert(dt_src);
/* If the dataset is open in the file, point to "layout" in the shared struct */
if (shared_fo != NULL)
@@ -620,7 +620,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
H5MM_memcpy(reclaim_buf, buf, buf_size);
/* Set background buffer to all zeros */
- HDmemset(bkg, 0, buf_size);
+ memset(bkg, 0, buf_size);
/* Convert from memory to destination file */
if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg) < 0)
@@ -643,7 +643,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
} /* end if */
else
/* Reset value to zero */
- HDmemset(storage_dst->buf, 0, storage_src->size);
+ memset(storage_dst->buf, 0, storage_src->size);
} /* end if */
else
/* Type conversion not necessary */
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index c8c7ee7..24d8de2 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -163,8 +163,8 @@ H5D__contig_alloc(H5F_t *f, H5O_storage_contig_t *storage /*out */)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(storage);
+ assert(f);
+ assert(storage);
/* Allocate space for the contiguous data */
if (HADDR_UNDEF == (storage->addr = H5MF_alloc(f, H5FD_MEM_DRAW, storage->size)))
@@ -211,11 +211,11 @@ H5D__contig_fill(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset && H5D_CONTIGUOUS == dset->shared->layout.type);
- HDassert(H5F_addr_defined(dset->shared->layout.storage.u.contig.addr));
- HDassert(dset->shared->layout.storage.u.contig.size > 0);
- HDassert(dset->shared->space);
- HDassert(dset->shared->type);
+ assert(dset && H5D_CONTIGUOUS == dset->shared->layout.type);
+ assert(H5F_addr_defined(dset->shared->layout.storage.u.contig.addr));
+ assert(dset->shared->layout.storage.u.contig.size > 0);
+ assert(dset->shared->space);
+ assert(dset->shared->type);
#ifdef H5_HAVE_PARALLEL
/* Retrieve MPI parameters */
@@ -359,8 +359,8 @@ H5D__contig_delete(H5F_t *f, const H5O_storage_t *storage)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(storage);
+ assert(f);
+ assert(storage);
/* Free the file space for the chunk */
if (H5MF_xfree(f, H5FD_MEM_DRAW, storage->u.contig.addr, storage->u.contig.size) < 0)
@@ -396,8 +396,8 @@ H5D__contig_construct(H5F_t *f, H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(dset);
+ assert(f);
+ assert(dset);
/*
* The maximum size of the dataset cannot exceed the storage size.
@@ -467,8 +467,8 @@ H5D__contig_init(H5F_t H5_ATTR_UNUSED *f, const H5D_t *dset, hid_t H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(dset);
+ assert(f);
+ assert(dset);
/* Compute the size of the contiguous storage for versions of the
* layout message less than version 3 because versions 1 & 2 would
@@ -535,7 +535,7 @@ H5D__contig_is_space_alloc(const H5O_storage_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(storage);
+ assert(storage);
/* Set return value */
ret_value = (hbool_t)H5F_addr_defined(storage->u.contig.addr);
@@ -561,7 +561,7 @@ H5D__contig_is_data_cached(const H5D_shared_t *shared_dset)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(shared_dset);
+ assert(shared_dset);
FUNC_LEAVE_NOAPI(shared_dset->cache.contig.sieve_size > 0)
} /* end H5D__contig_is_data_cached() */
@@ -721,8 +721,8 @@ H5D__contig_mdio_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
/* Add piece if it exists */
if (dinfo->layout_io_info.contig_piece_info) {
- HDassert(io_info->sel_pieces);
- HDassert(io_info->pieces_added < io_info->piece_count);
+ assert(io_info->sel_pieces);
+ assert(io_info->pieces_added < io_info->piece_count);
/* Add contiguous data block to sel_pieces */
io_info->sel_pieces[io_info->pieces_added] = dinfo->layout_io_info.contig_piece_info;
@@ -757,10 +757,10 @@ H5D__contig_may_use_select_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->dset);
- HDassert(op_type == H5D_IO_OP_READ || op_type == H5D_IO_OP_WRITE);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->dset);
+ assert(op_type == H5D_IO_OP_READ || op_type == H5D_IO_OP_WRITE);
dataset = dset_info->dset;
@@ -782,7 +782,7 @@ H5D__contig_may_use_select_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *
else {
hbool_t page_buf_enabled;
- HDassert(dset_info->layout_ops.writevv == H5D__contig_writevv);
+ assert(dset_info->layout_ops.writevv == H5D__contig_writevv);
/* Check if the page buffer is enabled */
if (H5PB_enabled(io_info->f_sh, H5FD_MEM_DRAW, &page_buf_enabled) < 0)
@@ -817,11 +817,11 @@ H5D__contig_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dinfo);
- HDassert(dinfo->buf.vp);
- HDassert(dinfo->mem_space);
- HDassert(dinfo->file_space);
+ assert(io_info);
+ assert(dinfo);
+ assert(dinfo->buf.vp);
+ assert(dinfo->mem_space);
+ assert(dinfo->file_space);
if (io_info->use_select_io == H5D_SELECTION_IO_MODE_ON) {
/* Only perform I/O if not performing multi dataset I/O or type conversion,
@@ -842,12 +842,12 @@ H5D__contig_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
else {
if (dinfo->layout_io_info.contig_piece_info) {
/* Add to mdset selection I/O arrays */
- HDassert(io_info->mem_spaces);
- HDassert(io_info->file_spaces);
- HDassert(io_info->addrs);
- HDassert(io_info->element_sizes);
- HDassert(io_info->rbufs);
- HDassert(io_info->pieces_added < io_info->piece_count);
+ assert(io_info->mem_spaces);
+ assert(io_info->file_spaces);
+ assert(io_info->addrs);
+ assert(io_info->element_sizes);
+ assert(io_info->rbufs);
+ assert(io_info->pieces_added < io_info->piece_count);
io_info->mem_spaces[io_info->pieces_added] = dinfo->mem_space;
io_info->file_spaces[io_info->pieces_added] = dinfo->file_space;
@@ -894,11 +894,11 @@ H5D__contig_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dinfo);
- HDassert(dinfo->buf.cvp);
- HDassert(dinfo->mem_space);
- HDassert(dinfo->file_space);
+ assert(io_info);
+ assert(dinfo);
+ assert(dinfo->buf.cvp);
+ assert(dinfo->mem_space);
+ assert(dinfo->file_space);
if (io_info->use_select_io == H5D_SELECTION_IO_MODE_ON) {
/* Only perform I/O if not performing multi dataset I/O or type conversion,
@@ -919,12 +919,12 @@ H5D__contig_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo)
else {
if (dinfo->layout_io_info.contig_piece_info) {
/* Add to mdset selection I/O arrays */
- HDassert(io_info->mem_spaces);
- HDassert(io_info->file_spaces);
- HDassert(io_info->addrs);
- HDassert(io_info->element_sizes);
- HDassert(io_info->wbufs);
- HDassert(io_info->pieces_added < io_info->piece_count);
+ assert(io_info->mem_spaces);
+ assert(io_info->file_spaces);
+ assert(io_info->addrs);
+ assert(io_info->element_sizes);
+ assert(io_info->wbufs);
+ assert(io_info->pieces_added < io_info->piece_count);
io_info->mem_spaces[io_info->pieces_added] = dinfo->mem_space;
io_info->file_spaces[io_info->pieces_added] = dinfo->file_space;
@@ -978,7 +978,7 @@ H5D__contig_write_one(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, hsi
FUNC_ENTER_PACKAGE
- HDassert(io_info);
+ assert(io_info);
if (H5D__contig_writevv(io_info, dset_info, (size_t)1, &dset_curr_seq, &dset_len, &dset_off, (size_t)1,
&mem_curr_seq, &mem_len, &mem_off) < 0)
@@ -1212,14 +1212,14 @@ H5D__contig_readvv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_curr_seq);
- HDassert(dset_len_arr);
- HDassert(dset_off_arr);
- HDassert(mem_curr_seq);
- HDassert(mem_len_arr);
- HDassert(mem_off_arr);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_curr_seq);
+ assert(dset_len_arr);
+ assert(dset_off_arr);
+ assert(mem_curr_seq);
+ assert(mem_len_arr);
+ assert(mem_off_arr);
/* Check if data sieving is enabled */
if (H5F_SHARED_HAS_FEATURE(io_info->f_sh, H5FD_FEAT_DATA_SIEVE)) {
@@ -1316,7 +1316,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void
/* Clear memory */
if (dset_contig->sieve_size > len)
- HDmemset(dset_contig->sieve_buf + len, 0, (dset_contig->sieve_size - len));
+ memset(dset_contig->sieve_buf + len, 0, (dset_contig->sieve_size - len));
/* Determine the new sieve buffer size & location */
dset_contig->sieve_loc = addr;
@@ -1531,14 +1531,14 @@ H5D__contig_writevv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_curr_seq);
- HDassert(dset_len_arr);
- HDassert(dset_off_arr);
- HDassert(mem_curr_seq);
- HDassert(mem_len_arr);
- HDassert(mem_off_arr);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_curr_seq);
+ assert(dset_len_arr);
+ assert(dset_off_arr);
+ assert(mem_curr_seq);
+ assert(mem_len_arr);
+ assert(mem_off_arr);
/* Check if data sieving is enabled */
if (H5F_SHARED_HAS_FEATURE(io_info->f_sh, H5FD_FEAT_DATA_SIEVE)) {
@@ -1595,7 +1595,7 @@ H5D__contig_flush(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
/* Flush any data in sieve buffer */
if (H5D__flush_sieve_buf(dset) < 0)
@@ -1621,7 +1621,7 @@ H5D__contig_io_term(H5D_io_info_t H5_ATTR_UNUSED *io_info, H5D_dset_io_info_t *d
FUNC_ENTER_PACKAGE
- HDassert(di);
+ assert(di);
/* Free piece info */
if (di->layout_io_info.contig_piece_info) {
@@ -1686,11 +1686,11 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f_src);
- HDassert(storage_src);
- HDassert(f_dst);
- HDassert(storage_dst);
- HDassert(dt_src);
+ assert(f_src);
+ assert(storage_src);
+ assert(f_dst);
+ assert(storage_dst);
+ assert(dt_src);
/* Allocate space for destination raw data */
if (H5D__contig_alloc(f_dst, storage_dst) < 0)
@@ -1787,7 +1787,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
} /* end else */
/* Allocate space for copy buffer */
- HDassert(buf_size);
+ assert(buf_size);
if (NULL == (buf = H5FL_BLK_MALLOC(type_conv, buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer")
@@ -1859,7 +1859,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
H5MM_memcpy(reclaim_buf, buf, mem_nbytes);
/* Set background buffer to all zeros */
- HDmemset(bkg, 0, buf_size);
+ memset(bkg, 0, buf_size);
/* Convert from memory to destination file */
if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg) < 0)
@@ -1881,7 +1881,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f
} /* end if */
else
/* Reset value to zero */
- HDmemset(buf, 0, src_nbytes);
+ memset(buf, 0, src_nbytes);
} /* end if */
/* Write raw data to destination file */
diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c
index 0dc6bd7..569dad9 100644
--- a/src/H5Ddbg.c
+++ b/src/H5Ddbg.c
@@ -77,8 +77,7 @@ H5Ddebug(hid_t dset_id)
if (H5D_CHUNKED == dset->shared->layout.type)
(void)H5D__chunk_dump_index(dset, stdout);
else if (H5D_CONTIGUOUS == dset->shared->layout.type)
- HDfprintf(stdout, " %-10s %" PRIuHADDR "\n",
- "Address:", dset->shared->layout.storage.u.contig.addr);
+ fprintf(stdout, " %-10s %" PRIuHADDR "\n", "Address:", dset->shared->layout.storage.u.contig.addr);
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index d334d28..f8467b2 100644
--- a/src/H5Dearray.c
+++ b/src/H5Dearray.c
@@ -221,9 +221,9 @@ H5D__earray_crt_context(void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(udata->chunk_size > 0);
+ assert(udata);
+ assert(udata->f);
+ assert(udata->chunk_size > 0);
/* Allocate new context structure */
if (NULL == (ctx = H5FL_MALLOC(H5D_earray_ctx_t)))
@@ -268,7 +268,7 @@ H5D__earray_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(ctx);
+ assert(ctx);
/* Release context structure */
ctx = H5FL_FREE(H5D_earray_ctx_t, ctx);
@@ -297,8 +297,8 @@ H5D__earray_fill(void *nat_blk, size_t nelmts)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(nat_blk);
- HDassert(nelmts);
+ assert(nat_blk);
+ assert(nelmts);
H5VM_array_fill(nat_blk, &fill_val, H5EA_CLS_CHUNK->nat_elmt_size, nelmts);
@@ -327,10 +327,10 @@ H5D__earray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(ctx);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(ctx);
/* Encode native elements into raw elements */
while (nelmts) {
@@ -371,9 +371,9 @@ H5D__earray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
/* Decode raw elements into native elements */
while (nelmts) {
@@ -412,12 +412,12 @@ H5D__earray_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(stream);
- HDassert(elmt);
+ assert(stream);
+ assert(elmt);
/* Print element */
HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_debug() */
@@ -443,9 +443,9 @@ H5D__earray_filt_fill(void *nat_blk, size_t nelmts)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(nat_blk);
- HDassert(nelmts);
- HDassert(sizeof(fill_val) == H5EA_CLS_FILT_CHUNK->nat_elmt_size);
+ assert(nat_blk);
+ assert(nelmts);
+ assert(sizeof(fill_val) == H5EA_CLS_FILT_CHUNK->nat_elmt_size);
H5VM_array_fill(nat_blk, &fill_val, H5EA_CLS_FILT_CHUNK->nat_elmt_size, nelmts);
@@ -476,10 +476,10 @@ H5D__earray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(ctx);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(ctx);
/* Encode native elements into raw elements */
while (nelmts) {
@@ -523,9 +523,9 @@ H5D__earray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
/* Decode raw elements into native elements */
while (nelmts) {
@@ -568,13 +568,13 @@ H5D__earray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(stream);
- HDassert(elmt);
+ assert(stream);
+ assert(elmt);
/* Print element */
HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr,
- elmt->nbytes, elmt->filter_mask);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr,
+ elmt->nbytes, elmt->filter_mask);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_filt_debug() */
@@ -604,8 +604,8 @@ H5D__earray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5F_addr_defined(obj_addr));
+ assert(f);
+ assert(H5F_addr_defined(obj_addr));
/* Allocate context for debugging callback */
if (NULL == (dbg_ctx = H5FL_MALLOC(H5D_earray_ctx_ud_t)))
@@ -675,7 +675,7 @@ H5D__earray_dst_dbg_context(void *_dbg_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dbg_ctx);
+ assert(dbg_ctx);
/* Release context structure */
dbg_ctx = H5FL_FREE(H5D_earray_ctx_ud_t, dbg_ctx);
@@ -708,16 +708,16 @@ H5D__earray_idx_depend(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_EARRAY == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5D_CHUNK_IDX_EARRAY == idx_info->storage->idx_type);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(idx_info->storage->u.earray.ea);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(H5D_CHUNK_IDX_EARRAY == idx_info->layout->idx_type);
+ assert(idx_info->storage);
+ assert(H5D_CHUNK_IDX_EARRAY == idx_info->storage->idx_type);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info->storage->u.earray.ea);
/* Set up object header location for dataset */
H5O_loc_reset(&oloc);
@@ -772,15 +772,15 @@ H5D__earray_idx_open(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_EARRAY == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5D_CHUNK_IDX_EARRAY == idx_info->storage->idx_type);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(NULL == idx_info->storage->u.earray.ea);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(H5D_CHUNK_IDX_EARRAY == idx_info->layout->idx_type);
+ assert(idx_info->storage);
+ assert(H5D_CHUNK_IDX_EARRAY == idx_info->storage->idx_type);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(NULL == idx_info->storage->u.earray.ea);
/* Set up the user data */
udata.f = idx_info->f;
@@ -826,13 +826,13 @@ H5D__earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space, had
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(space);
- HDassert(H5F_addr_defined(dset_ohdr_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(space);
+ assert(H5F_addr_defined(dset_ohdr_addr));
/* Get the dim info for dataset */
if ((sndims = H5S_get_simple_extent_dims(space, NULL, max_dims)) < 0)
@@ -895,13 +895,13 @@ H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(NULL == idx_info->storage->u.earray.ea);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(NULL == idx_info->storage->u.earray.ea);
/* General parameters */
if (idx_info->pline->nused > 0) {
@@ -922,15 +922,15 @@ H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info)
cparam.raw_elmt_size = (uint8_t)H5F_SIZEOF_ADDR(idx_info->f);
} /* end else */
cparam.max_nelmts_bits = idx_info->layout->u.earray.cparam.max_nelmts_bits;
- HDassert(cparam.max_nelmts_bits > 0);
+ assert(cparam.max_nelmts_bits > 0);
cparam.idx_blk_elmts = idx_info->layout->u.earray.cparam.idx_blk_elmts;
- HDassert(cparam.idx_blk_elmts > 0);
+ assert(cparam.idx_blk_elmts > 0);
cparam.sup_blk_min_data_ptrs = idx_info->layout->u.earray.cparam.sup_blk_min_data_ptrs;
- HDassert(cparam.sup_blk_min_data_ptrs > 0);
+ assert(cparam.sup_blk_min_data_ptrs > 0);
cparam.data_blk_min_elmts = idx_info->layout->u.earray.cparam.data_blk_min_elmts;
- HDassert(cparam.data_blk_min_elmts > 0);
+ assert(cparam.data_blk_min_elmts > 0);
cparam.max_dblk_page_nelmts_bits = idx_info->layout->u.earray.cparam.max_dblk_page_nelmts_bits;
- HDassert(cparam.max_dblk_page_nelmts_bits > 0);
+ assert(cparam.max_dblk_page_nelmts_bits > 0);
/* Set up the user data */
udata.f = idx_info->f;
@@ -972,7 +972,7 @@ H5D__earray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__earray_idx_is_space_alloc() */
@@ -998,13 +998,13 @@ H5D__earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the extensible array is open yet */
if (NULL == idx_info->storage->u.earray.ea) {
@@ -1069,13 +1069,13 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the extensible array is open yet */
if (NULL == idx_info->storage->u.earray.ea) {
@@ -1162,7 +1162,7 @@ H5D__earray_idx_resize(H5O_layout_chunk_t *layout)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(layout);
+ assert(layout);
/* "Swizzle" constant dimensions for this dataset */
if (layout->u.earray.unlim_dim > 0) {
@@ -1232,7 +1232,7 @@ H5D__earray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
/* Update coordinates of chunk in dataset */
ndims = udata->common.layout->ndims - 1;
- HDassert(ndims > 0);
+ assert(ndims > 0);
curr_dim = (int)(ndims - 1);
while (curr_dim >= 0) {
/* Increment coordinate in current dimension */
@@ -1278,14 +1278,14 @@ H5D__earray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(chunk_cb);
- HDassert(chunk_udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(chunk_cb);
+ assert(chunk_udata);
/* Check if the extensible array is open yet */
if (NULL == idx_info->storage->u.earray.ea) {
@@ -1307,10 +1307,10 @@ H5D__earray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
H5D_earray_it_ud_t udata; /* User data for iteration callback */
/* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = idx_info->layout;
udata.common.storage = idx_info->storage;
- HDmemset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
+ memset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
udata.filtered = (idx_info->pline->nused > 0);
if (!udata.filtered) {
udata.chunk_rec.nbytes = idx_info->layout->size;
@@ -1350,13 +1350,13 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the extensible array is open yet */
if (NULL == idx_info->storage->u.earray.ea) {
@@ -1402,7 +1402,7 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info")
/* Remove raw data chunk from file if not doing SWMR writes */
- HDassert(H5F_addr_defined(elmt.addr));
+ assert(H5F_addr_defined(elmt.addr));
if (!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)) {
H5_CHECK_OVERFLOW(elmt.nbytes, /*From: */ uint32_t, /*To: */ hsize_t);
if (H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, elmt.addr, (hsize_t)elmt.nbytes) < 0)
@@ -1424,7 +1424,7 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
/* Remove raw data chunk from file if not doing SWMR writes */
- HDassert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(addr));
if (!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)) {
H5_CHECK_OVERFLOW(idx_info->layout->size, /*From: */ uint32_t, /*To: */ hsize_t);
if (H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, addr, (hsize_t)idx_info->layout->size) < 0)
@@ -1463,10 +1463,10 @@ H5D__earray_idx_delete_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(chunk_rec);
- HDassert(H5F_addr_defined(chunk_rec->chunk_addr));
- HDassert(chunk_rec->nbytes > 0);
- HDassert(f);
+ assert(chunk_rec);
+ assert(H5F_addr_defined(chunk_rec->chunk_addr));
+ assert(chunk_rec->nbytes > 0);
+ assert(f);
/* Remove raw data chunk from file */
H5_CHECK_OVERFLOW(chunk_rec->nbytes, /*From: */ uint32_t, /*To: */ hsize_t);
@@ -1503,11 +1503,11 @@ H5D__earray_idx_delete(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
/* Check if the index data structure has been allocated */
if (H5F_addr_defined(idx_info->storage->idx_addr)) {
@@ -1532,7 +1532,7 @@ H5D__earray_idx_delete(const H5D_chk_idx_info_t *idx_info)
idx_info->storage->idx_addr = HADDR_UNDEF;
} /* end if */
else
- HDassert(NULL == idx_info->storage->u.earray.ea);
+ assert(NULL == idx_info->storage->u.earray.ea);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1558,17 +1558,17 @@ H5D__earray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info_src);
- HDassert(idx_info_src->f);
- HDassert(idx_info_src->pline);
- HDassert(idx_info_src->layout);
- HDassert(idx_info_src->storage);
- HDassert(idx_info_dst);
- HDassert(idx_info_dst->f);
- HDassert(idx_info_dst->pline);
- HDassert(idx_info_dst->layout);
- HDassert(idx_info_dst->storage);
- HDassert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(idx_info_src);
+ assert(idx_info_src->f);
+ assert(idx_info_src->pline);
+ assert(idx_info_src->layout);
+ assert(idx_info_src->storage);
+ assert(idx_info_dst);
+ assert(idx_info_dst->f);
+ assert(idx_info_dst->pline);
+ assert(idx_info_dst->layout);
+ assert(idx_info_dst->storage);
+ assert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Check if the source extensible array is open yet */
if (NULL == idx_info_src->storage->u.earray.ea)
@@ -1582,7 +1582,7 @@ H5D__earray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk
/* Create the extensible array that describes chunked storage in the dest. file */
if (H5D__earray_idx_create(idx_info_dst) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
- HDassert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Reset metadata tag */
H5_END_TAG
@@ -1611,10 +1611,10 @@ H5D__earray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chun
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(storage_src);
- HDassert(storage_src->u.earray.ea);
- HDassert(storage_dst);
- HDassert(storage_dst->u.earray.ea);
+ assert(storage_src);
+ assert(storage_src->u.earray.ea);
+ assert(storage_dst);
+ assert(storage_dst->u.earray.ea);
/* Close extensible arrays */
if (H5EA_close(storage_src->u.earray.ea) < 0)
@@ -1651,13 +1651,13 @@ H5D__earray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(index_size);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(index_size);
/* Open the extensible array in file */
if (H5D__earray_idx_open(idx_info) < 0)
@@ -1702,7 +1702,7 @@ H5D__earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
/* Reset index info */
if (reset_addr) {
@@ -1732,10 +1732,10 @@ H5D__earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
- HDassert(stream);
+ assert(storage);
+ assert(stream);
- HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
+ fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_idx_dump() */
@@ -1760,9 +1760,9 @@ H5D__earray_idx_dest(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->storage);
/* Check if the extensible array is open */
if (idx_info->storage->u.earray.ea) {
diff --git a/src/H5Defl.c b/src/H5Defl.c
index 7509df7..ecd97a4 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -126,8 +126,8 @@ H5D__efl_construct(H5F_t *f, H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(dset);
+ assert(f);
+ assert(dset);
/*
* The maximum size of the dataset cannot exceed the storage size.
@@ -158,7 +158,7 @@ H5D__efl_construct(H5F_t *f, H5D_t *dset)
/* Compute the total size of dataset */
stmp_size = H5S_GET_EXTENT_NPOINTS(dset->shared->space);
- HDassert(stmp_size >= 0);
+ assert(stmp_size >= 0);
tmp_size = (hsize_t)stmp_size * dt_size;
H5_CHECKED_ASSIGN(dset->shared->layout.storage.u.contig.size, hsize_t, tmp_size, hssize_t);
@@ -187,7 +187,7 @@ H5D__efl_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(storage);
+ assert(storage);
/* EFL storage is currently always treated as allocated */
FUNC_LEAVE_NOAPI(TRUE)
@@ -252,10 +252,10 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(efl && efl->nused > 0);
- HDassert(H5F_addr_defined(addr));
- HDassert(size < SIZE_MAX);
- HDassert(buf || 0 == size);
+ assert(efl && efl->nused > 0);
+ assert(H5F_addr_defined(addr));
+ assert(size < SIZE_MAX);
+ assert(buf || 0 == size);
/* Find the first efl member from which to read */
for (u = 0, cur = 0; u < efl->nused; u++) {
@@ -268,7 +268,7 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size
/* Read the data */
while (size) {
- HDassert(buf);
+ assert(buf);
if (u >= efl->nused)
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "read past logical end of file")
if (H5F_OVERFLOW_HSIZET2OFFT((hsize_t)efl->slot[u].offset + skip))
@@ -289,7 +289,7 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size
if ((n = HDread(fd, buf, to_read)) < 0)
HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "read error in external raw data file")
else if ((size_t)n < to_read)
- HDmemset(buf + n, 0, to_read - (size_t)n);
+ memset(buf + n, 0, to_read - (size_t)n);
full_name = (char *)H5MM_xfree(full_name);
HDclose(fd);
fd = -1;
@@ -340,10 +340,10 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(efl && efl->nused > 0);
- HDassert(H5F_addr_defined(addr));
- HDassert(size < SIZE_MAX);
- HDassert(buf || 0 == size);
+ assert(efl && efl->nused > 0);
+ assert(H5F_addr_defined(addr));
+ assert(size < SIZE_MAX);
+ assert(buf || 0 == size);
/* Find the first efl member in which to write */
for (u = 0, cur = 0; u < efl->nused; u++) {
@@ -356,7 +356,7 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz
/* Write the data */
while (size) {
- HDassert(buf);
+ assert(buf);
if (u >= efl->nused)
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "write past logical end of file")
if (H5F_OVERFLOW_HSIZET2OFFT((hsize_t)efl->slot[u].offset + skip))
@@ -452,18 +452,18 @@ H5D__efl_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->store->efl.nused > 0);
- HDassert(dset_info->buf.vp);
- HDassert(dset_info->dset);
- HDassert(dset_info->dset->shared);
- HDassert(dset_curr_seq);
- HDassert(dset_len_arr);
- HDassert(dset_off_arr);
- HDassert(mem_curr_seq);
- HDassert(mem_len_arr);
- HDassert(mem_off_arr);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->store->efl.nused > 0);
+ assert(dset_info->buf.vp);
+ assert(dset_info->dset);
+ assert(dset_info->dset->shared);
+ assert(dset_curr_seq);
+ assert(dset_len_arr);
+ assert(dset_off_arr);
+ assert(mem_curr_seq);
+ assert(mem_len_arr);
+ assert(mem_off_arr);
/* Set up user data for H5VM_opvv() */
udata.efl = &(dset_info->store->efl);
@@ -533,18 +533,18 @@ H5D__efl_writevv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_d
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->store->efl.nused > 0);
- HDassert(dset_info->buf.cvp);
- HDassert(dset_info->dset);
- HDassert(dset_info->dset->shared);
- HDassert(dset_curr_seq);
- HDassert(dset_len_arr);
- HDassert(dset_off_arr);
- HDassert(mem_curr_seq);
- HDassert(mem_len_arr);
- HDassert(mem_off_arr);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->store->efl.nused > 0);
+ assert(dset_info->buf.cvp);
+ assert(dset_info->dset);
+ assert(dset_info->dset->shared);
+ assert(dset_curr_seq);
+ assert(dset_len_arr);
+ assert(dset_off_arr);
+ assert(mem_curr_seq);
+ assert(mem_len_arr);
+ assert(mem_off_arr);
/* Set up user data for H5VM_opvv() */
udata.efl = &(dset_info->store->efl);
@@ -580,10 +580,10 @@ H5D__efl_bh_info(H5F_t *f, H5O_efl_t *efl, hsize_t *heap_size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(efl);
- HDassert(H5F_addr_defined(efl->heap_addr));
- HDassert(heap_size);
+ assert(f);
+ assert(efl);
+ assert(H5F_addr_defined(efl->heap_addr));
+ assert(heap_size);
/* Get the size of the local heap for EFL's file list */
if (H5HL_heapsize(f, efl->heap_addr, heap_size) < 0)
diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c
index c0d58b2..0aa1dc6 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -220,9 +220,9 @@ H5D__farray_crt_context(void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(udata->chunk_size > 0);
+ assert(udata);
+ assert(udata->f);
+ assert(udata->chunk_size > 0);
/* Allocate new context structure */
if (NULL == (ctx = H5FL_MALLOC(H5D_farray_ctx_t)))
@@ -266,7 +266,7 @@ H5D__farray_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(ctx);
+ assert(ctx);
/* Release context structure */
ctx = H5FL_FREE(H5D_farray_ctx_t, ctx);
@@ -295,8 +295,8 @@ H5D__farray_fill(void *nat_blk, size_t nelmts)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(nat_blk);
- HDassert(nelmts);
+ assert(nat_blk);
+ assert(nelmts);
H5VM_array_fill(nat_blk, &fill_val, H5FA_CLS_CHUNK->nat_elmt_size, nelmts);
@@ -325,10 +325,10 @@ H5D__farray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(ctx);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(ctx);
/* Encode native elements into raw elements */
while (nelmts) {
@@ -369,9 +369,9 @@ H5D__farray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
/* Decode raw elements into native elements */
while (nelmts) {
@@ -410,12 +410,12 @@ H5D__farray_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(stream);
- HDassert(elmt);
+ assert(stream);
+ assert(elmt);
/* Print element */
HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_debug() */
@@ -446,8 +446,8 @@ H5D__farray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5F_addr_defined(obj_addr));
+ assert(f);
+ assert(H5F_addr_defined(obj_addr));
/* Allocate context for debugging callback */
if (NULL == (dbg_ctx = H5FL_MALLOC(H5D_farray_ctx_ud_t)))
@@ -516,7 +516,7 @@ H5D__farray_dst_dbg_context(void *_dbg_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dbg_ctx);
+ assert(dbg_ctx);
/* Release context structure */
dbg_ctx = H5FL_FREE(H5D_farray_ctx_ud_t, dbg_ctx);
@@ -545,9 +545,9 @@ H5D__farray_filt_fill(void *nat_blk, size_t nelmts)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(nat_blk);
- HDassert(nelmts);
- HDassert(sizeof(fill_val) == H5FA_CLS_FILT_CHUNK->nat_elmt_size);
+ assert(nat_blk);
+ assert(nelmts);
+ assert(sizeof(fill_val) == H5FA_CLS_FILT_CHUNK->nat_elmt_size);
H5VM_array_fill(nat_blk, &fill_val, H5FA_CLS_FILT_CHUNK->nat_elmt_size, nelmts);
@@ -578,10 +578,10 @@ H5D__farray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(ctx);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(ctx);
/* Encode native elements into raw elements */
while (nelmts) {
@@ -625,9 +625,9 @@ H5D__farray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
/* Decode raw elements into native elements */
while (nelmts) {
@@ -670,13 +670,13 @@ H5D__farray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(stream);
- HDassert(elmt);
+ assert(stream);
+ assert(elmt);
/* Print element */
HDsnprintf(temp_str, sizeof(temp_str), "Element #%" PRIuHSIZE ":", idx);
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr,
- elmt->nbytes, elmt->filter_mask);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr,
+ elmt->nbytes, elmt->filter_mask);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_filt_debug() */
@@ -706,16 +706,16 @@ H5D__farray_idx_depend(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_FARRAY == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5D_CHUNK_IDX_FARRAY == idx_info->storage->idx_type);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(idx_info->storage->u.farray.fa);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(H5D_CHUNK_IDX_FARRAY == idx_info->layout->idx_type);
+ assert(idx_info->storage);
+ assert(H5D_CHUNK_IDX_FARRAY == idx_info->storage->idx_type);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info->storage->u.farray.fa);
/* Set up object header location for dataset */
H5O_loc_reset(&oloc);
@@ -762,9 +762,9 @@ H5D__farray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(dset_ohdr_addr));
+ assert(idx_info);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(dset_ohdr_addr));
idx_info->storage->u.farray.dset_ohdr_addr = dset_ohdr_addr;
@@ -794,15 +794,15 @@ H5D__farray_idx_open(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_FARRAY == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5D_CHUNK_IDX_FARRAY == idx_info->storage->idx_type);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(NULL == idx_info->storage->u.farray.fa);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(H5D_CHUNK_IDX_FARRAY == idx_info->layout->idx_type);
+ assert(idx_info->storage);
+ assert(H5D_CHUNK_IDX_FARRAY == idx_info->storage->idx_type);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(NULL == idx_info->storage->u.farray.fa);
/* Set up the user data */
udata.f = idx_info->f;
@@ -851,14 +851,14 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(NULL == idx_info->storage->u.farray.fa);
- HDassert(idx_info->layout->nchunks);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(NULL == idx_info->storage->u.farray.fa);
+ assert(idx_info->layout->nchunks);
/* General parameters */
if (idx_info->pline->nused > 0) {
@@ -879,7 +879,7 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
cparam.raw_elmt_size = (uint8_t)H5F_SIZEOF_ADDR(idx_info->f);
} /* end else */
cparam.max_dblk_page_nelmts_bits = idx_info->layout->u.farray.cparam.max_dblk_page_nelmts_bits;
- HDassert(cparam.max_dblk_page_nelmts_bits > 0);
+ assert(cparam.max_dblk_page_nelmts_bits > 0);
cparam.nelmts = idx_info->layout->max_nchunks;
/* Set up the user data */
@@ -922,7 +922,7 @@ H5D__farray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__farray_idx_is_space_alloc() */
@@ -948,13 +948,13 @@ H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the fixed array is open yet */
if (NULL == idx_info->storage->u.farray.fa) {
@@ -1019,13 +1019,13 @@ H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the fixed array is open yet */
if (NULL == idx_info->storage->u.farray.fa) {
@@ -1115,7 +1115,7 @@ H5D__farray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
/* Update coordinates of chunk in dataset */
ndims = udata->common.layout->ndims - 1;
- HDassert(ndims > 0);
+ assert(ndims > 0);
curr_dim = (int)(ndims - 1);
while (curr_dim >= 0) {
/* Increment coordinate in current dimension */
@@ -1157,14 +1157,14 @@ H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(chunk_cb);
- HDassert(chunk_udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(chunk_cb);
+ assert(chunk_udata);
/* Check if the fixed array is open yet */
if (NULL == idx_info->storage->u.farray.fa) {
@@ -1187,10 +1187,10 @@ H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
H5D_farray_it_ud_t udata; /* User data for iteration callback */
/* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
+ memset(&udata, 0, sizeof udata);
udata.common.layout = idx_info->layout;
udata.common.storage = idx_info->storage;
- HDmemset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
+ memset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
udata.filtered = (idx_info->pline->nused > 0);
if (!udata.filtered) {
udata.chunk_rec.nbytes = idx_info->layout->size;
@@ -1230,13 +1230,13 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(udata);
/* Check if the fixed array is open yet */
if (NULL == idx_info->storage->u.farray.fa) {
@@ -1264,7 +1264,7 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info")
/* Remove raw data chunk from file if not doing SWMR writes */
- HDassert(H5F_addr_defined(elmt.addr));
+ assert(H5F_addr_defined(elmt.addr));
if (!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)) {
H5_CHECK_OVERFLOW(elmt.nbytes, /*From: */ uint32_t, /*To: */ hsize_t);
if (H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, elmt.addr, (hsize_t)elmt.nbytes) < 0)
@@ -1286,7 +1286,7 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
/* Remove raw data chunk from file if not doing SWMR writes */
- HDassert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(addr));
if (!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)) {
H5_CHECK_OVERFLOW(idx_info->layout->size, /*From: */ uint32_t, /*To: */ hsize_t);
if (H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, addr, (hsize_t)idx_info->layout->size) < 0)
@@ -1325,10 +1325,10 @@ H5D__farray_idx_delete_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(chunk_rec);
- HDassert(H5F_addr_defined(chunk_rec->chunk_addr));
- HDassert(chunk_rec->nbytes > 0);
- HDassert(f);
+ assert(chunk_rec);
+ assert(H5F_addr_defined(chunk_rec->chunk_addr));
+ assert(chunk_rec->nbytes > 0);
+ assert(f);
/* Remove raw data chunk from file */
H5_CHECK_OVERFLOW(chunk_rec->nbytes, /*From: */ uint32_t, /*To: */ hsize_t);
@@ -1361,11 +1361,11 @@ H5D__farray_idx_delete(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
/* Check if the index data structure has been allocated */
if (H5F_addr_defined(idx_info->storage->idx_addr)) {
@@ -1390,7 +1390,7 @@ H5D__farray_idx_delete(const H5D_chk_idx_info_t *idx_info)
idx_info->storage->idx_addr = HADDR_UNDEF;
} /* end if */
else
- HDassert(NULL == idx_info->storage->u.farray.fa);
+ assert(NULL == idx_info->storage->u.farray.fa);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1416,17 +1416,17 @@ H5D__farray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info_src);
- HDassert(idx_info_src->f);
- HDassert(idx_info_src->pline);
- HDassert(idx_info_src->layout);
- HDassert(idx_info_src->storage);
- HDassert(idx_info_dst);
- HDassert(idx_info_dst->f);
- HDassert(idx_info_dst->pline);
- HDassert(idx_info_dst->layout);
- HDassert(idx_info_dst->storage);
- HDassert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(idx_info_src);
+ assert(idx_info_src->f);
+ assert(idx_info_src->pline);
+ assert(idx_info_src->layout);
+ assert(idx_info_src->storage);
+ assert(idx_info_dst);
+ assert(idx_info_dst->f);
+ assert(idx_info_dst->pline);
+ assert(idx_info_dst->layout);
+ assert(idx_info_dst->storage);
+ assert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Check if the source fixed array is open yet */
if (NULL == idx_info_src->storage->u.farray.fa)
@@ -1440,7 +1440,7 @@ H5D__farray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk
/* Create the fixed array that describes chunked storage in the dest. file */
if (H5D__farray_idx_create(idx_info_dst) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
- HDassert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
+ assert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Reset metadata tag */
H5_END_TAG
@@ -1469,10 +1469,10 @@ H5D__farray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chun
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(storage_src);
- HDassert(storage_src->u.farray.fa);
- HDassert(storage_dst);
- HDassert(storage_dst->u.farray.fa);
+ assert(storage_src);
+ assert(storage_src->u.farray.fa);
+ assert(storage_dst);
+ assert(storage_dst->u.farray.fa);
/* Close fixed arrays */
if (H5FA_close(storage_src->u.farray.fa) < 0)
@@ -1509,13 +1509,13 @@ H5D__farray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(index_size);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(index_size);
/* Open the fixed array in file */
if (H5D__farray_idx_open(idx_info) < 0)
@@ -1559,7 +1559,7 @@ H5D__farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
/* Reset index info */
if (reset_addr)
@@ -1587,10 +1587,10 @@ H5D__farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
- HDassert(stream);
+ assert(storage);
+ assert(stream);
- HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
+ fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_idx_dump() */
@@ -1615,9 +1615,9 @@ H5D__farray_idx_dest(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->storage);
/* Check if the fixed array is open */
if (idx_info->storage->u.farray.fa) {
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index 5275323..bfcad71 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -128,10 +128,10 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(fill_type);
- HDassert(buf);
- HDassert(buf_type);
- HDassert(space);
+ assert(fill_type);
+ assert(buf);
+ assert(buf_type);
+ assert(space);
/* Make sure the dataspace has an extent set (or is NULL) */
if (!(H5S_has_extent(space)))
@@ -313,13 +313,13 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(fb_info);
- HDassert(fill);
- HDassert(dset_type);
- HDassert(dset_type_id > 0);
+ assert(fb_info);
+ assert(fill);
+ assert(dset_type);
+ assert(dset_type_id > 0);
/* Reset fill buffer information */
- HDmemset(fb_info, 0, sizeof(*fb_info));
+ memset(fb_info, 0, sizeof(*fb_info));
/* Cache constant information from the dataset */
fb_info->fill = fill;
@@ -349,9 +349,9 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
/* Retrieve sizes of memory & file datatypes */
fb_info->mem_elmt_size = H5T_get_size(fb_info->mem_type);
- HDassert(fb_info->mem_elmt_size > 0);
+ assert(fb_info->mem_elmt_size > 0);
fb_info->file_elmt_size = H5T_get_size(dset_type);
- HDassert(fb_info->file_elmt_size == (size_t)fill->size);
+ assert(fb_info->file_elmt_size == (size_t)fill->size);
/* If fill value is not library default, use it to set the element size */
fb_info->max_elmt_size = MAX(fb_info->mem_elmt_size, fb_info->file_elmt_size);
@@ -361,7 +361,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
fb_info->elmts_per_buf = MIN(total_nelmts, MAX(1, (max_buf_size / fb_info->max_elmt_size)));
else
fb_info->elmts_per_buf = max_buf_size / fb_info->max_elmt_size;
- HDassert(fb_info->elmts_per_buf > 0);
+ assert(fb_info->elmts_per_buf > 0);
/* Compute the buffer size to use */
fb_info->fill_buf_size = MIN(max_buf_size, (fb_info->elmts_per_buf * fb_info->max_elmt_size));
@@ -406,7 +406,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
} /* end if */
else {
/* If fill value is not library default, use it to set the element size */
- HDassert(fill->size >= 0);
+ assert(fill->size >= 0);
fb_info->max_elmt_size = fb_info->file_elmt_size = fb_info->mem_elmt_size = (size_t)fill->size;
/* Compute the number of elements that fit within a buffer to write */
@@ -414,7 +414,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
fb_info->elmts_per_buf = MIN(total_nelmts, MAX(1, (max_buf_size / fb_info->max_elmt_size)));
else
fb_info->elmts_per_buf = max_buf_size / fb_info->max_elmt_size;
- HDassert(fb_info->elmts_per_buf > 0);
+ assert(fb_info->elmts_per_buf > 0);
/* Compute the buffer size to use */
fb_info->fill_buf_size = MIN(max_buf_size, fb_info->elmts_per_buf * fb_info->max_elmt_size);
@@ -440,14 +440,14 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
else { /* Fill the buffer with the default fill value */
/* Retrieve size of elements */
fb_info->max_elmt_size = fb_info->file_elmt_size = fb_info->mem_elmt_size = H5T_get_size(dset_type);
- HDassert(fb_info->max_elmt_size > 0);
+ assert(fb_info->max_elmt_size > 0);
/* Compute the number of elements that fit within a buffer to write */
if (total_nelmts > 0)
fb_info->elmts_per_buf = MIN(total_nelmts, MAX(1, (max_buf_size / fb_info->max_elmt_size)));
else
fb_info->elmts_per_buf = max_buf_size / fb_info->max_elmt_size;
- HDassert(fb_info->elmts_per_buf > 0);
+ assert(fb_info->elmts_per_buf > 0);
/* Compute the buffer size to use */
fb_info->fill_buf_size = MIN(max_buf_size, (fb_info->elmts_per_buf * fb_info->max_elmt_size));
@@ -457,19 +457,19 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat
fb_info->fill_buf = caller_fill_buf;
fb_info->use_caller_fill_buf = TRUE;
- HDmemset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
+ memset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
} /* end if */
else {
if (alloc_func) {
fb_info->fill_buf = alloc_func(fb_info->fill_buf_size, alloc_info);
- HDmemset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
+ memset(fb_info->fill_buf, 0, fb_info->fill_buf_size);
} /* end if */
else {
htri_t buf_avail = H5FL_BLK_AVAIL(
zero_fill,
fb_info->fill_buf_size); /* Check if there is an already zeroed out buffer available */
- HDassert(buf_avail != FAIL);
+ assert(buf_avail != FAIL);
/* Allocate temporary buffer (zeroing it if no buffer is available) */
if (!buf_avail)
@@ -512,16 +512,16 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(fb_info);
- HDassert(fb_info->has_vlen_fill_type);
- HDassert(fb_info->fill_buf);
+ assert(fb_info);
+ assert(fb_info->has_vlen_fill_type);
+ assert(fb_info->fill_buf);
/* Make a copy of the (disk-based) fill value into the buffer */
H5MM_memcpy(fb_info->fill_buf, fb_info->fill->buf, fb_info->file_elmt_size);
/* Reset first element of background buffer, if necessary */
if (H5T_path_bkg(fb_info->fill_to_mem_tpath))
- HDmemset(fb_info->bkg_buf, 0, fb_info->max_elmt_size);
+ memset(fb_info->bkg_buf, 0, fb_info->max_elmt_size);
/* Type convert the dataset buffer, to copy any VL components */
if (H5T_convert(fb_info->fill_to_mem_tpath, fb_info->file_tid, fb_info->mem_tid, (size_t)1, (size_t)0,
@@ -535,7 +535,7 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts)
/* Reset the entire background buffer, if necessary */
if (H5T_path_bkg(fb_info->mem_to_dset_tpath))
- HDmemset(fb_info->bkg_buf, 0, fb_info->bkg_buf_size);
+ memset(fb_info->bkg_buf, 0, fb_info->bkg_buf_size);
/* Make a copy of the fill buffer so we can free dynamic elements after conversion */
if (fb_info->fill_alloc_func)
@@ -592,8 +592,8 @@ H5D__fill_release(H5D_fill_buf_info_t *fb_info)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(fb_info);
- HDassert(fb_info->fill);
+ assert(fb_info);
+ assert(fb_info->fill);
/* Free the buffer for fill values */
if (!fb_info->use_caller_fill_buf && fb_info->fill_buf) {
@@ -629,7 +629,7 @@ H5D__fill_term(H5D_fill_buf_info_t *fb_info)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(fb_info);
+ assert(fb_info);
/* Free the buffer for fill values */
H5D__fill_release(fb_info);
diff --git a/src/H5Dint.c b/src/H5Dint.c
index e930c6a..041fd58 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -166,7 +166,7 @@ H5D_init(void)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize interface")
/* Reset the "default dataset" information */
- HDmemset(&H5D_def_dset, 0, sizeof(H5D_shared_t));
+ memset(&H5D_def_dset, 0, sizeof(H5D_shared_t));
H5D_def_dset.type_id = H5I_INVALID_HID;
H5D_def_dset.dapl_id = H5I_INVALID_HID;
H5D_def_dset.dcpl_id = H5I_INVALID_HID;
@@ -265,7 +265,7 @@ H5D_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(0 == H5I_nmembers(H5I_DATASET));
+ assert(0 == H5I_nmembers(H5I_DATASET));
/* Destroy the dataset object id group */
n += (H5I_dec_type_ref(H5I_DATASET) > 0);
@@ -290,7 +290,7 @@ H5D__close_cb(H5VL_object_t *dset_vol_obj, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset_vol_obj);
+ assert(dset_vol_obj);
/* Close the dataset */
if (H5VL_dataset_close(dset_vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0)
@@ -325,13 +325,13 @@ H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id, const H
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(type_id != H5P_DEFAULT);
- HDassert(space);
- HDassert(lcpl_id != H5P_DEFAULT);
- HDassert(dcpl_id != H5P_DEFAULT);
- HDassert(dapl_id != H5P_DEFAULT);
+ assert(loc);
+ assert(name && *name);
+ assert(type_id != H5P_DEFAULT);
+ assert(space);
+ assert(lcpl_id != H5P_DEFAULT);
+ assert(dcpl_id != H5P_DEFAULT);
+ assert(dapl_id != H5P_DEFAULT);
/* Set up dataset creation info */
dcrt_info.type_id = type_id;
@@ -347,7 +347,7 @@ H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id, const H
/* Create the new dataset and link it to its parent group */
if (H5L_link_object(loc, name, &ocrt_info, lcpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create and link to dataset")
- HDassert(ocrt_info.new_obj);
+ assert(ocrt_info.new_obj);
/* Set the return value */
ret_value = (H5D_t *)ocrt_info.new_obj;
@@ -373,7 +373,7 @@ H5D__get_space_status(const H5D_t *dset, H5D_space_status_t *allocation)
FUNC_ENTER_PACKAGE
- HDassert(dset);
+ assert(dset);
/* Check for chunked layout */
if (dset->shared->layout.type == H5D_CHUNKED) {
@@ -384,7 +384,7 @@ H5D__get_space_status(const H5D_t *dset, H5D_space_status_t *allocation)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL,
"unable to retrieve number of allocated chunks in dataset")
- HDassert(n_chunks_alloc <= n_chunks_total);
+ assert(n_chunks_alloc <= n_chunks_total);
if (n_chunks_alloc == 0)
*allocation = H5D_SPACE_STATUS_NOT_ALLOCATED;
@@ -497,9 +497,9 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, H5T_t *type)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(file);
- HDassert(dset);
- HDassert(type);
+ assert(file);
+ assert(dset);
+ assert(type);
/* Check whether the datatype is relocatable */
if ((relocatable = H5T_is_relocatable(type)) < 0)
@@ -569,7 +569,7 @@ H5D__cache_dataspace_info(const H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(dset);
+ assert(dset);
/* Cache info for dataset's dataspace */
if ((sndims = H5S_get_simple_extent_dims(dset->shared->space, dset->shared->curr_dims,
@@ -608,9 +608,9 @@ H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(file);
- HDassert(dset);
- HDassert(space);
+ assert(file);
+ assert(dset);
+ assert(space);
/* Copy dataspace for dataset */
if (NULL == (dset->shared->space = H5S_copy(space, FALSE, TRUE)))
@@ -653,8 +653,8 @@ H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize)
FUNC_ENTER_PACKAGE
- HDassert(file);
- HDassert(minimize);
+ assert(file);
+ assert(minimize);
/* Get the dataset object header minimize flag for this call */
if (H5CX_get_dset_min_ohdr_flag(minimize) < 0)
@@ -694,9 +694,9 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr)
FUNC_ENTER_PACKAGE
- HDassert(file);
- HDassert(dset);
- HDassert(ohdr);
+ assert(file);
+ assert(dset);
+ assert(ohdr);
type = dset->shared->type;
fill_prop = &(dset->shared->dcpl_cache.fill);
@@ -774,7 +774,7 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr)
/* Modification Time message size */
if (H5O_HDR_STORE_TIMES & H5O_OH_GET_FLAGS(ohdr)) {
- HDassert(H5O_OH_GET_VERSION(ohdr) >= 1); /* 1 :: H5O_VERSION_1 (H5Opkg.h) */
+ assert(H5O_OH_GET_VERSION(ohdr) >= 1); /* 1 :: H5O_VERSION_1 (H5Opkg.h) */
if (H5O_OH_GET_VERSION(ohdr) == 1) {
/* v1 object headers store modification time as a message */
@@ -812,9 +812,9 @@ H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc)
FUNC_ENTER_PACKAGE
- HDassert(file);
- HDassert(dset);
- HDassert(oloc);
+ assert(file);
+ assert(dset);
+ assert(oloc);
oh = H5O_create_ohdr(file, dset->shared->dcpl_id);
if (NULL == oh)
@@ -860,8 +860,8 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(file);
- HDassert(dset);
+ assert(file);
+ assert(dset);
/* Set some local variables, for convenience */
oloc = &dset->oloc;
@@ -916,7 +916,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
H5P_genplist_t *dc_plist; /* Dataset's creation property list */
/* Get dataset's property list object */
- HDassert(dset->shared->dcpl_id != H5P_DATASET_CREATE_DEFAULT);
+ assert(dset->shared->dcpl_id != H5P_DATASET_CREATE_DEFAULT);
if (NULL == (dc_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
@@ -944,7 +944,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset object header")
} /* if using default/minimized object headers */
- HDassert(file == dset->oloc.file);
+ assert(file == dset->oloc.file);
/* Pin the object header */
if (NULL == (oh = H5O_pin(oloc)))
@@ -1062,10 +1062,10 @@ H5D__build_file_prefix(const H5D_t *dset, H5F_prefix_open_t prefix_type, char **
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dset);
- HDassert(dset->oloc.file);
+ assert(dset);
+ assert(dset->oloc.file);
filepath = H5F_EXTPATH(dset->oloc.file);
- HDassert(filepath);
+ assert(filepath);
/* XXX: Future thread-safety note - getenv is not required
* to be reentrant.
@@ -1153,10 +1153,10 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file);
- HDassert(H5I_DATATYPE == H5I_get_type(type_id));
- HDassert(space);
- HDassert(H5I_GENPROP_LST == H5I_get_type(dcpl_id));
+ assert(file);
+ assert(H5I_DATATYPE == H5I_get_type(type_id));
+ assert(space);
+ assert(H5I_GENPROP_LST == H5I_get_type(dcpl_id));
/* Get the dataset's datatype */
if (NULL == (dt = (H5T_t *)H5I_object(type_id)))
@@ -1410,8 +1410,8 @@ H5D__open_name(const H5G_loc_t *loc, const char *name, hid_t dapl_id)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(loc);
- HDassert(name);
+ assert(loc);
+ assert(name);
/* Set up dataset location to fill in */
dset_loc.oloc = &oloc;
@@ -1467,7 +1467,7 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(loc);
+ assert(loc);
/* Allocate the dataset structure */
if (NULL == (dataset = H5FL_CALLOC(H5D_t)))
@@ -1600,11 +1600,11 @@ H5D__append_flush_setup(H5D_t *dset, hid_t dapl_id)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
/* Set default append flush values */
- HDmemset(&dset->shared->append_flush, 0, sizeof(dset->shared->append_flush));
+ memset(&dset->shared->append_flush, 0, sizeof(dset->shared->append_flush));
/* If the dataset is chunked and there is a non-default DAPL */
if (dapl_id != H5P_DATASET_ACCESS_DEFAULT && dset->shared->layout.type == H5D_CHUNKED) {
@@ -1679,7 +1679,7 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id)
FUNC_ENTER_PACKAGE_TAG(dataset->oloc.addr)
/* check args */
- HDassert(dataset);
+ assert(dataset);
/* (Set the 'vl_type' parameter to FALSE since it doesn't matter from here) */
if (NULL == (dataset->shared = H5D__new(H5P_DATASET_CREATE_DEFAULT, dapl_id, FALSE, FALSE)))
@@ -1732,7 +1732,7 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id)
size_t dset_type_size = H5T_GET_SIZE(dataset->shared->type);
size_t dset_data_size = 0;
- HDassert(H5D_COMPACT == dataset->shared->layout.storage.type);
+ assert(H5D_COMPACT == dataset->shared->layout.storage.type);
if ((dset_nelemts = H5S_GET_EXTENT_NPOINTS(dataset->shared->space)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get number of elements in dataset's dataspace")
@@ -1870,8 +1870,8 @@ H5D_close(H5D_t *dataset)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(dataset && dataset->oloc.file && dataset->shared);
- HDassert(dataset->shared->fo_count > 0);
+ assert(dataset && dataset->oloc.file && dataset->shared);
+ assert(dataset->shared->fo_count > 0);
/* Dump debugging info */
#ifdef H5D_CHUNK_DEBUG
@@ -1903,7 +1903,7 @@ H5D_close(H5D_t *dataset)
case H5D_CHUNKED:
/* Check for skip list for iterating over chunks during I/O to close */
if (dataset->shared->cache.chunk.sel_chunks) {
- HDassert(H5SL_count(dataset->shared->cache.chunk.sel_chunks) == 0);
+ assert(H5SL_count(dataset->shared->cache.chunk.sel_chunks) == 0);
H5SL_close(dataset->shared->cache.chunk.sel_chunks);
dataset->shared->cache.chunk.sel_chunks = NULL;
} /* end if */
@@ -1929,14 +1929,14 @@ H5D_close(H5D_t *dataset)
case H5D_VIRTUAL: {
size_t i, j;
- HDassert(dataset->shared->layout.storage.u.virt.list ||
- (dataset->shared->layout.storage.u.virt.list_nused == 0));
+ assert(dataset->shared->layout.storage.u.virt.list ||
+ (dataset->shared->layout.storage.u.virt.list_nused == 0));
/* Close source datasets */
for (i = 0; i < dataset->shared->layout.storage.u.virt.list_nused; i++) {
/* Close source dataset */
if (dataset->shared->layout.storage.u.virt.list[i].source_dset.dset) {
- HDassert(dataset->shared->layout.storage.u.virt.list[i].source_dset.dset != dataset);
+ assert(dataset->shared->layout.storage.u.virt.list[i].source_dset.dset != dataset);
if (H5D_close(dataset->shared->layout.storage.u.virt.list[i].source_dset.dset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to close source dataset")
dataset->shared->layout.storage.u.virt.list[i].source_dset.dset = NULL;
@@ -1945,8 +1945,8 @@ H5D_close(H5D_t *dataset)
/* Close sub datasets */
for (j = 0; j < dataset->shared->layout.storage.u.virt.list[i].sub_dset_nused; j++)
if (dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset) {
- HDassert(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset !=
- dataset);
+ assert(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset !=
+ dataset);
if (H5D_close(dataset->shared->layout.storage.u.virt.list[i].sub_dset[j].dset) <
0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
@@ -1960,7 +1960,7 @@ H5D_close(H5D_t *dataset)
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout")
#endif /* NDEBUG */
@@ -2019,7 +2019,7 @@ H5D_close(H5D_t *dataset)
/*
* Free memory. Before freeing the memory set the file pointer to NULL.
* We always check for a null file pointer in other H5D functions to be
- * sure we're not accessing an already freed dataset (see the HDassert()
+ * sure we're not accessing an already freed dataset (see the assert()
* above).
*/
dataset->oloc.file = NULL;
@@ -2079,10 +2079,10 @@ H5D_mult_refresh_close(hid_t dset_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
/* check args */
- HDassert(dataset);
- HDassert(dataset->oloc.file);
- HDassert(dataset->shared);
- HDassert(dataset->shared->fo_count > 0);
+ assert(dataset);
+ assert(dataset->oloc.file);
+ assert(dataset->shared);
+ assert(dataset->shared->fo_count > 0);
if (dataset->shared->fo_count > 1) {
/* Free cached information for each kind of dataset */
@@ -2097,7 +2097,7 @@ H5D_mult_refresh_close(hid_t dset_id)
case H5D_CHUNKED:
/* Check for skip list for iterating over chunks during I/O to close */
if (dataset->shared->cache.chunk.sel_chunks) {
- HDassert(H5SL_count(dataset->shared->cache.chunk.sel_chunks) == 0);
+ assert(H5SL_count(dataset->shared->cache.chunk.sel_chunks) == 0);
H5SL_close(dataset->shared->cache.chunk.sel_chunks);
dataset->shared->cache.chunk.sel_chunks = NULL;
} /* end if */
@@ -2124,7 +2124,7 @@ H5D_mult_refresh_close(hid_t dset_id)
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout")
#endif /* NDEBUG */
@@ -2156,8 +2156,8 @@ H5D_mult_refresh_reopen(H5D_t *dataset)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(dataset && dataset->oloc.file && dataset->shared);
- HDassert(dataset->shared->fo_count > 0);
+ assert(dataset && dataset->oloc.file && dataset->shared);
+ assert(dataset->shared->fo_count > 0);
if (dataset->shared->fo_count > 1) {
/* Release dataspace info */
@@ -2241,9 +2241,9 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(dset);
+ assert(dset);
f = dset->oloc.file;
- HDassert(f);
+ assert(f);
/* If the data is stored in external files, don't set an address for the layout
* We assume that external storage is already
@@ -2308,7 +2308,7 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"unable to allocate memory for compact dataset")
if (!full_overwrite)
- HDmemset(layout->storage.u.compact.buf, 0, layout->storage.u.compact.size);
+ memset(layout->storage.u.compact.buf, 0, layout->storage.u.compact.size);
layout->storage.u.compact.dirty = TRUE;
/* Indicate that we should initialize storage space */
@@ -2333,7 +2333,7 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout")
#endif /* NDEBUG */
@@ -2409,7 +2409,7 @@ H5D__init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[])
FUNC_ENTER_PACKAGE
- HDassert(dset);
+ assert(dset);
switch (dset->shared->layout.type) {
case H5D_COMPACT:
@@ -2454,7 +2454,7 @@ H5D__init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[])
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
#ifdef NDEBUG
HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout")
#endif /* NDEBUG */
@@ -2538,7 +2538,7 @@ H5D__get_offset(const H5D_t *dset)
FUNC_ENTER_PACKAGE
- HDassert(dset);
+ assert(dset);
switch (dset->shared->layout.type) {
case H5D_VIRTUAL:
@@ -2624,9 +2624,9 @@ H5D__vlen_get_buf_size_cb(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned H5_
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(H5I_DATATYPE == H5I_get_type(type_id));
- HDassert(point);
- HDassert(op_data);
+ assert(H5I_DATATYPE == H5I_get_type(type_id));
+ assert(point);
+ assert(op_data);
/* Select point to read in */
if (H5S_select_elements(vlen_bufsize->fspace, H5S_SELECT_SET, (size_t)1, point) < 0)
@@ -2777,8 +2777,8 @@ H5D__vlen_get_buf_size_gen_cb(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(point);
- HDassert(op_data);
+ assert(point);
+ assert(op_data);
/* Check args */
if (NULL == (dt = (H5T_t *)H5I_object(type_id)))
@@ -2938,7 +2938,7 @@ H5D__check_filters(H5D_t *dataset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dataset);
+ assert(dataset);
/* Check if the filters in the DCPL will need to encode, and if so, can they?
*
@@ -2991,8 +2991,8 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size)
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Check args */
- HDassert(dset);
- HDassert(size);
+ assert(dset);
+ assert(size);
/* Check if we are allowed to modify this file */
if (0 == (H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR))
@@ -3175,12 +3175,12 @@ H5D__flush_sieve_buf(H5D_t *dataset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dataset);
+ assert(dataset);
/* Flush the raw data buffer, if we have a dirty one */
if (dataset->shared->cache.contig.sieve_buf && dataset->shared->cache.contig.sieve_dirty) {
- HDassert(dataset->shared->layout.type !=
- H5D_COMPACT); /* We should never have a sieve buffer for compact storage */
+ assert(dataset->shared->layout.type !=
+ H5D_COMPACT); /* We should never have a sieve buffer for compact storage */
/* Write dirty data sieve buffer to file */
if (H5F_shared_block_write(
@@ -3213,8 +3213,8 @@ H5D__flush_real(H5D_t *dataset)
FUNC_ENTER_PACKAGE_TAG(dataset->oloc.addr)
/* Check args */
- HDassert(dataset);
- HDassert(dataset->shared);
+ assert(dataset);
+ assert(dataset->shared);
/* Avoid flushing the dataset (again) if it's closing */
if (!dataset->shared->closing)
@@ -3243,8 +3243,8 @@ H5D__flush(H5D_t *dset, hid_t dset_id)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
/* Currently, H5Oflush causes H5Fclose to trigger an assertion failure in metadata cache.
* Leave this situation for the future solution */
@@ -3287,11 +3287,11 @@ H5D__format_convert(H5D_t *dataset)
FUNC_ENTER_PACKAGE_TAG(dataset->oloc.addr)
/* Check args */
- HDassert(dataset);
+ assert(dataset);
switch (dataset->shared->layout.type) {
case H5D_CHUNKED:
- HDassert(dataset->shared->layout.u.chunk.idx_type != H5D_CHUNK_IDX_BTREE);
+ assert(dataset->shared->layout.u.chunk.idx_type != H5D_CHUNK_IDX_BTREE);
if (NULL == (newlayout = (H5O_layout_t *)H5MM_calloc(sizeof(H5O_layout_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate buffer")
@@ -3362,7 +3362,7 @@ H5D__format_convert(H5D_t *dataset)
case H5D_CONTIGUOUS:
case H5D_COMPACT:
- HDassert(dataset->shared->layout.version > H5O_LAYOUT_VERSION_DEFAULT);
+ assert(dataset->shared->layout.version > H5O_LAYOUT_VERSION_DEFAULT);
dataset->shared->layout.version = H5O_LAYOUT_VERSION_DEFAULT;
if (H5O_msg_write(&(dataset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME,
&(dataset->shared->layout)) < 0)
@@ -3436,8 +3436,8 @@ H5D__mark(const H5D_t *dataset, unsigned flags)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dataset);
- HDassert(!(flags & (unsigned)~(H5D_MARK_SPACE | H5D_MARK_LAYOUT)));
+ assert(dataset);
+ assert(!(flags & (unsigned)~(H5D_MARK_SPACE | H5D_MARK_LAYOUT)));
/* Mark aspects of the dataset as dirty */
if (flags) {
@@ -3466,7 +3466,7 @@ H5D__mark(const H5D_t *dataset, unsigned flags)
} /* end if */
/* _Somebody_ should have update the modification time! */
- HDassert(update_flags == 0);
+ assert(update_flags == 0);
} /* end if */
done:
@@ -3497,8 +3497,8 @@ H5D__flush_all_cb(void *_dataset, hid_t H5_ATTR_UNUSED id, void *_udata)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dataset);
- HDassert(f);
+ assert(dataset);
+ assert(f);
/* Check for dataset in same file */
if (f == dataset->oloc.file)
@@ -3527,7 +3527,7 @@ H5D_flush_all(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(f);
+ assert(f);
/* Iterate over all the open datasets */
if (H5I_iterate(H5I_DATASET, H5D__flush_all_cb, f, FALSE) < 0)
@@ -3584,7 +3584,7 @@ H5D_get_create_plist(const H5D_t *dset)
switch (copied_layout.type) {
case H5D_COMPACT:
copied_layout.storage.u.compact.buf = H5MM_xfree(copied_layout.storage.u.compact.buf);
- HDmemset(&copied_layout.storage.u.compact, 0, sizeof(copied_layout.storage.u.compact));
+ memset(&copied_layout.storage.u.compact, 0, sizeof(copied_layout.storage.u.compact));
break;
case H5D_CONTIGUOUS:
@@ -3615,7 +3615,7 @@ H5D_get_create_plist(const H5D_t *dset)
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert(0 && "Unknown layout type!");
+ assert(0 && "Unknown layout type!");
} /* end switch */
/* Set back the (possibly modified) layout property to property list */
@@ -3948,8 +3948,8 @@ H5D__refresh(H5D_t *dset, hid_t dset_id)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
- HDassert(dset->shared);
+ assert(dset);
+ assert(dset->shared);
/* If the layout is virtual... */
if (dset->shared->layout.type == H5D_VIRTUAL) {
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 1cd5835..e313a3e 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -215,7 +215,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
(unsigned)H5S_GET_EXTENT_NDIMS(dset_info[i].file_space),
(hsize_t)dset_info[i].type_info.dst_type_size, &buf_adj) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to construct projected memory dataspace")
- HDassert(dset_info[i].mem_space);
+ assert(dset_info[i].mem_space);
/* Adjust the buffer by the given amount */
dset_info[i].buf.vp = (void *)(((uint8_t *)dset_info[i].buf.vp) + buf_adj);
@@ -264,7 +264,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
/* Sanity check that space is allocated, if there are elements */
if (dset_info[i].nelmts > 0)
- HDassert(
+ assert(
(*dset_info[i].dset->shared->layout.ops->is_space_alloc)(
&dset_info[i].dset->shared->layout.storage) ||
(dset_info[i].dset->shared->layout.ops->is_data_cached &&
@@ -284,7 +284,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
}
} /* end of for loop */
- HDassert(io_op_init + io_skipped == count);
+ assert(io_op_init + io_skipped == count);
/* If no datasets have I/O, we're done */
if (io_op_init == 0)
@@ -312,8 +312,8 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
if (io_info.md_io_ops.multi_read_md) {
/* Create sel_pieces array if any pieces are selected */
if (io_info.piece_count > 0) {
- HDassert(!io_info.sel_pieces);
- HDassert(io_info.pieces_added == 0);
+ assert(!io_info.sel_pieces);
+ assert(io_info.pieces_added == 0);
/* Allocate sel_pieces array */
if (NULL ==
@@ -632,7 +632,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
(unsigned)H5S_GET_EXTENT_NDIMS(dset_info[i].file_space),
dset_info[i].type_info.src_type_size, &buf_adj) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to construct projected memory dataspace")
- HDassert(dset_info[i].mem_space);
+ assert(dset_info[i].mem_space);
/* Adjust the buffer by the given amount */
dset_info[i].buf.cvp = (const void *)(((const uint8_t *)dset_info[i].buf.cvp) + buf_adj);
@@ -692,7 +692,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
H5AC_tag(prev_tag, NULL);
} /* end of for loop */
- HDassert(io_op_init == count);
+ assert(io_op_init == count);
/* Perform second phase of type info initialization */
if (H5D__typeinfo_init_phase2(&io_info) < 0)
@@ -716,8 +716,8 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (io_info.md_io_ops.multi_write_md) {
/* Create sel_pieces array if any pieces are selected */
if (io_info.piece_count > 0) {
- HDassert(!io_info.sel_pieces);
- HDassert(io_info.pieces_added == 0);
+ assert(!io_info.sel_pieces);
+ assert(io_info.pieces_added == 0);
/* Allocate sel_pieces array */
if (NULL ==
@@ -773,7 +773,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
/* loop with serial & single-dset write IO path */
for (i = 0; i < count; i++) {
- HDassert(!dset_info[i].skip_io);
+ assert(!dset_info[i].skip_io);
/* set metadata tagging with dset oheader addr */
H5AC_tag(dset_info->dset->oloc.addr, &prev_tag);
@@ -848,7 +848,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
done:
/* Shut down the I/O op information */
for (i = 0; i < io_op_init; i++) {
- HDassert(!dset_info[i].skip_io);
+ assert(!dset_info[i].skip_io);
if (dset_info[i].layout_ops.io_term &&
(*dset_info[i].layout_ops.io_term)(&io_info, &(dset_info[i])) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down I/O op info")
@@ -908,13 +908,13 @@ H5D__ioinfo_init(size_t count, H5D_io_op_type_t op_type, H5D_dset_io_info_t *dse
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(count > 0);
- HDassert(dset_info);
- HDassert(dset_info[0].dset->oloc.file);
- HDassert(io_info);
+ assert(count > 0);
+ assert(dset_info);
+ assert(dset_info[0].dset->oloc.file);
+ assert(io_info);
/* Zero out struct */
- HDmemset(io_info, 0, sizeof(*io_info));
+ memset(io_info, 0, sizeof(*io_info));
/* Set up simple fields */
io_info->op_type = op_type;
@@ -970,9 +970,9 @@ H5D__dset_ioinfo_init(H5D_t *dset, H5D_dset_io_info_t *dset_info, H5D_storage_t
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(dset);
- HDassert(dset->oloc.file);
- HDassert(dset_info->type_info.tpath);
+ assert(dset);
+ assert(dset->oloc.file);
+ assert(dset_info->type_info.tpath);
/* Set up "normal" I/O fields */
dset_info->dset = dset;
@@ -1032,20 +1032,20 @@ H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, hid_t
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(io_info);
- HDassert(dset_info);
+ assert(io_info);
+ assert(dset_info);
/* Set convenience pointers */
type_info = &dset_info->type_info;
dset = dset_info->dset;
- HDassert(dset);
+ assert(dset);
/* Patch the top level file pointer for dt->shared->u.vlen.f if needed */
if (H5T_patch_vlen_file(dset->shared->type, H5F_VOL_OBJ(dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch VL datatype file pointer")
/* Initialize type info safely */
- HDmemset(type_info, 0, sizeof(*type_info));
+ memset(type_info, 0, sizeof(*type_info));
/* Get the memory & dataset datatypes */
if (NULL == (type_info->mem_type = (const H5T_t *)H5I_object_verify(mem_type_id, H5I_DATATYPE)))
@@ -1144,7 +1144,7 @@ H5D__typeinfo_init_phase2(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(io_info);
+ assert(io_info);
/* If selection I/O mode is default (auto), enable it here if the VFD supports it (it will be turned off
* later if something else conflicts), otherwise disable it. If we're using the MPIO VFD, the automatic
@@ -1232,12 +1232,12 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(io_info);
+ assert(io_info);
/* check the first dset, should exist either single or multi dset cases */
- HDassert(io_info->dsets_info[0].dset);
+ assert(io_info->dsets_info[0].dset);
dset0 = io_info->dsets_info[0].dset;
- HDassert(dset0->oloc.file);
+ assert(dset0->oloc.file);
/* Reset the actual io mode properties to the default values in case
* the DXPL (if it's non-default) was previously used in a collective
@@ -1367,7 +1367,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(io_info);
+ assert(io_info);
/* Check if we need to allocate a shared type conversion buffer */
if (io_info->max_tconv_type_size) {
@@ -1411,7 +1411,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
size_t i;
/* Make sure selection I/O is disabled (DEFAULT should have been handled by now) */
- HDassert(io_info->use_select_io == H5D_SELECTION_IO_MODE_OFF);
+ assert(io_info->use_select_io == H5D_SELECTION_IO_MODE_OFF);
/* Get max buffer size from API context */
if (H5CX_get_max_temp_buf(&max_temp_buf) < 0)
@@ -1497,11 +1497,11 @@ H5D__typeinfo_term(H5D_io_info_t *io_info)
/* Check for releasing datatype conversion & background buffers */
if (io_info->tconv_buf_allocated) {
- HDassert(io_info->tconv_buf);
+ assert(io_info->tconv_buf);
(void)H5FL_BLK_FREE(type_conv, io_info->tconv_buf);
} /* end if */
if (io_info->bkg_buf_allocated) {
- HDassert(io_info->bkg_buf);
+ assert(io_info->bkg_buf);
(void)H5FL_BLK_FREE(type_conv, io_info->bkg_buf);
} /* end if */
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index 804054e..75e3d0b 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -79,7 +79,7 @@ H5D__layout_set_io_ops(const H5D_t *dataset)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(dataset);
+ assert(dataset);
/* Set the I/O functions for each layout type */
switch (dataset->shared->layout.type) {
@@ -121,7 +121,7 @@ H5D__layout_set_io_ops(const H5D_t *dataset)
case H5D_CHUNK_IDX_NTYPES:
default:
- HDassert(0 && "Unknown chunk index method!");
+ assert(0 && "Unknown chunk index method!");
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown chunk index method")
} /* end switch */
break;
@@ -167,8 +167,8 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(layout);
+ assert(f);
+ assert(layout);
ret_value = 1 + /* Version number */
1; /* layout class type */
@@ -191,7 +191,7 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ
case H5D_CHUNKED:
if (layout->version < H5O_LAYOUT_VERSION_4) {
/* Number of dimensions (1 byte) */
- HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
ret_value++;
/* B-tree address */
@@ -205,11 +205,11 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ
ret_value++;
/* Number of dimensions (1 byte) */
- HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
ret_value++;
/* Encoded # of bytes for each chunk dimension */
- HDassert(layout->u.chunk.enc_bytes_per_dim > 0 && layout->u.chunk.enc_bytes_per_dim <= 8);
+ assert(layout->u.chunk.enc_bytes_per_dim > 0 && layout->u.chunk.enc_bytes_per_dim <= 8);
ret_value++;
/* Dimension sizes */
@@ -295,8 +295,8 @@ H5D__layout_set_version(H5F_t *f, H5O_layout_t *layout)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(layout);
- HDassert(f);
+ assert(layout);
+ assert(f);
/* Upgrade to the version indicated by the file's low bound if higher */
version = MAX(layout->version, H5O_layout_ver_bounds[H5F_LOW_BOUND(f)]);
@@ -332,9 +332,9 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, const
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(layout);
- HDassert(space);
- HDassert(dcpl_cache);
+ assert(layout);
+ assert(space);
+ assert(dcpl_cache);
/* The indexing methods only apply to chunked datasets (currently) */
if (layout->type == H5D_CHUNKED) {
@@ -460,9 +460,9 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id)
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
/* Sanity checking */
- HDassert(file);
- HDassert(oh);
- HDassert(dset);
+ assert(file);
+ assert(oh);
+ assert(dset);
/* Set some local variables, for convenience */
layout = &dset->shared->layout;
@@ -596,8 +596,8 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dapl_id, H5P_genplist_t *plist)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(dataset);
- HDassert(plist);
+ assert(dataset);
+ assert(plist);
/* Get the optional filters message */
if ((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_PLINE_ID)) < 0)
@@ -640,7 +640,7 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dapl_id, H5P_genplist_t *plist)
} /* end if */
/* Sanity check that the layout operations are set up */
- HDassert(dataset->shared->layout.ops);
+ assert(dataset->shared->layout.ops);
/* Initialize the layout information for the dataset */
if (dataset->shared->layout.ops->init &&
@@ -697,8 +697,8 @@ H5D__layout_oh_write(const H5D_t *dataset, H5O_t *oh, unsigned update_flags)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(dataset);
- HDassert(oh);
+ assert(dataset);
+ assert(oh);
/* Check if the layout message has been added to the dataset's header */
if ((msg_exists = H5O_msg_exists_oh(oh, H5O_LAYOUT_ID)) < 0)
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index 29410f8..921142b 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -100,7 +100,7 @@
*/
#define H5D_MPIO_INIT_CHUNK_UD_INFO(chunk_ud, index_info_ptr) \
do { \
- HDmemset(&chunk_ud, 0, sizeof(H5D_chunk_ud_t)); \
+ memset(&chunk_ud, 0, sizeof(H5D_chunk_ud_t)); \
chunk_ud.common.layout = (index_info_ptr)->layout; \
chunk_ud.common.storage = (index_info_ptr)->storage; \
} while (0)
@@ -409,8 +409,8 @@ static FILE *debug_stream = NULL;
#define H5D_MPIO_DEBUG(rank, string) \
do { \
if (debug_stream && H5D_MPIO_DEBUG_THIS_RANK(rank)) { \
- HDfprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank); \
- HDfflush(debug_stream); \
+ fprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank); \
+ fflush(debug_stream); \
} \
} while (0)
@@ -418,8 +418,8 @@ static FILE *debug_stream = NULL;
#define H5D_MPIO_DEBUG_VA(rank, string, ...) \
do { \
if (debug_stream && H5D_MPIO_DEBUG_THIS_RANK(rank)) { \
- HDfprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank, __VA_ARGS__); \
- HDfflush(debug_stream); \
+ fprintf(debug_stream, "%*s(Rank %d) " string "\n", debug_indent, "", rank, __VA_ARGS__); \
+ fflush(debug_stream); \
} \
} while (0)
@@ -474,7 +474,7 @@ H5D__mpio_parse_debug_str(const char *s)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(s);
+ assert(s);
while (*s) {
int c = (int)(*s);
@@ -521,10 +521,10 @@ H5D__mpio_debug_init(void)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(!H5D_mpio_debug_inited);
+ assert(!H5D_mpio_debug_inited);
/* Clear the debug flag buffer */
- HDmemset(H5D_mpio_debug_flags_s, 0, sizeof(H5D_mpio_debug_flags_s));
+ memset(H5D_mpio_debug_flags_s, 0, sizeof(H5D_mpio_debug_flags_s));
/* Retrieve and parse the H5Dmpio debug string */
debug_str = HDgetenv("H5D_mpio_Debug");
@@ -573,11 +573,11 @@ H5D__mpio_opt_possible(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
+ assert(io_info);
for (i = 0; i < io_info->count; i++) {
- HDassert(io_info->dsets_info[i].file_space);
- HDassert(io_info->dsets_info[i].mem_space);
+ assert(io_info->dsets_info[i].file_space);
+ assert(io_info->dsets_info[i].mem_space);
}
/* For independent I/O, get out quickly and don't try to form consensus */
@@ -648,7 +648,7 @@ H5D__mpio_opt_possible(H5D_io_info_t *io_info)
if ((io_info->use_select_io == H5D_SELECTION_IO_MODE_OFF) && local_cause[0] &&
!(local_cause[0] &
~((unsigned)H5D_MPIO_DATATYPE_CONVERSION | (unsigned)H5D_MPIO_DATA_TRANSFORMS))) {
- HDassert(io_info->no_selection_io_cause & H5D_MPIO_NO_SELECTION_IO_CAUSES);
+ assert(io_info->no_selection_io_cause & H5D_MPIO_NO_SELECTION_IO_CAUSES);
local_cause[0] |= H5D_MPIO_NO_SELECTION_IO;
}
@@ -718,8 +718,8 @@ H5D__mpio_opt_possible(H5D_io_info_t *io_info)
* selection I/O and re-enable collective I/O since it's supported by selection I/O */
if (global_cause[0] && !(global_cause[0] & ~((unsigned)H5D_MPIO_DATATYPE_CONVERSION |
(unsigned)H5D_MPIO_DATA_TRANSFORMS))) {
- HDassert(!(local_cause[0] &
- ~((unsigned)H5D_MPIO_DATATYPE_CONVERSION | (unsigned)H5D_MPIO_DATA_TRANSFORMS)));
+ assert(!(local_cause[0] &
+ ~((unsigned)H5D_MPIO_DATATYPE_CONVERSION | (unsigned)H5D_MPIO_DATA_TRANSFORMS)));
local_cause[0] = 0;
global_cause[0] = 0;
io_info->use_select_io = H5D_SELECTION_IO_MODE_ON;
@@ -777,7 +777,7 @@ H5D__mpio_get_no_coll_cause_strings(char *local_cause, size_t local_cause_len, c
FUNC_ENTER_PACKAGE
- HDassert((local_cause && local_cause_len > 0) || (global_cause && global_cause_len > 0));
+ assert((local_cause && local_cause_len > 0) || (global_cause && global_cause_len > 0));
/*
* Use compile-time assertion so this routine is updated
@@ -844,7 +844,7 @@ H5D__mpio_get_no_coll_cause_strings(char *local_cause, size_t local_cause_len, c
case H5D_MPIO_COLLECTIVE:
case H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE:
default:
- HDassert(0 && "invalid no collective cause reason");
+ assert(0 && "invalid no collective cause reason");
break;
}
@@ -1026,7 +1026,7 @@ H5D__mpio_get_sum_chunk_dset(const H5D_io_info_t *io_info, const H5D_dset_io_inf
/* Check for non-chunked dataset, in this case we know the number of "chunks"
* is simply the mpi size */
- HDassert(dset_info->layout->type == H5D_CHUNKED);
+ assert(dset_info->layout->type == H5D_CHUNKED);
/* Get the number of chunks to perform I/O on */
num_chunkf = 0;
@@ -1099,9 +1099,9 @@ H5D__piece_io(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(io_info);
- HDassert(io_info->using_mpi_vfd);
- HDassert(io_info->count > 0);
+ assert(io_info);
+ assert(io_info->using_mpi_vfd);
+ assert(io_info->count > 0);
/* Obtain the current rank of the process and the number of ranks */
if ((mpi_rank = H5F_mpi_get_rank(io_info->dsets_info[0].dset->oloc.file)) < 0)
@@ -1122,12 +1122,12 @@ H5D__piece_io(H5D_io_info_t *io_info)
HDsnprintf(debug_log_filename, 1024, "H5Dmpio_debug.rank%d", mpi_rank);
- if (NULL == (debug_log_file = HDfopen(debug_log_filename, "a")))
+ if (NULL == (debug_log_file = fopen(debug_log_filename, "a")))
HGOTO_ERROR(H5E_IO, H5E_OPENERROR, FAIL, "couldn't open debugging log file")
/* Print a short header for this I/O operation */
time_now = HDtime(NULL);
- HDfprintf(debug_log_file, "##### %s", HDasctime(HDlocaltime(&time_now)));
+ fprintf(debug_log_file, "##### %s", HDasctime(HDlocaltime(&time_now)));
debug_stream = debug_log_file;
}
@@ -1221,7 +1221,7 @@ H5D__piece_io(H5D_io_info_t *io_info)
}
else {
/* Chunked I/O path */
- HDassert(io_info->dsets_info[i].layout->type == H5D_CHUNKED);
+ assert(io_info->dsets_info[i].layout->type == H5D_CHUNKED);
/* Recalculate io_option if necessary */
if (recalc_io_option) {
@@ -1333,7 +1333,7 @@ done:
#ifdef H5Dmpio_DEBUG
/* Close debugging log file */
if (debug_log_file) {
- HDfprintf(debug_log_file, "##############\n\n");
+ fprintf(debug_log_file, "##############\n\n");
if (EOF == HDfclose(debug_log_file))
HDONE_ERROR(H5E_IO, H5E_CLOSEERROR, FAIL, "couldn't close debugging log file")
debug_stream = H5DEBUG(D);
@@ -1449,7 +1449,7 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
/* set actual_io_mode */
for (i = 0; i < io_info->count; i++) {
- HDassert(io_info->dsets_info[i].dset->shared->dcpl_cache.pline.nused == 0);
+ assert(io_info->dsets_info[i].dset->shared->dcpl_cache.pline.nused == 0);
if (io_info->dsets_info[i].layout->type == H5D_CHUNKED)
actual_io_mode |= H5D_MPIO_CHUNK_COLLECTIVE;
else if (io_info->dsets_info[i].layout->type == H5D_CONTIGUOUS)
@@ -1489,9 +1489,9 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
hbool_t need_sort = FALSE;
/* Check if sel_pieces array is sorted */
- HDassert(io_info->sel_pieces[0]->faddr != HADDR_UNDEF);
+ assert(io_info->sel_pieces[0]->faddr != HADDR_UNDEF);
for (i = 1; i < num_chunk; i++) {
- HDassert(io_info->sel_pieces[i]->faddr != HADDR_UNDEF);
+ assert(io_info->sel_pieces[i]->faddr != HADDR_UNDEF);
if (io_info->sel_pieces[i]->faddr < io_info->sel_pieces[i - 1]->faddr) {
need_sort = TRUE;
@@ -1572,7 +1572,7 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
/* Sanity check */
if (is_permuted)
- HDassert(permute_map);
+ assert(permute_map);
if (H5S_mpio_space_type(piece_info->mspace, piece_info->dset_info->type_info.dst_type_size,
&chunk_mtype[i], &chunk_mpi_mem_counts[i],
&(chunk_mbt_is_derived_array[i]), FALSE, /* this is a memory
@@ -1592,7 +1592,7 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI buf type")
/* Sanity check */
if (is_permuted)
- HDassert(!permute_map);
+ assert(!permute_map);
/* Piece address relative to the first piece addr
* Assign piece address to MPI displacement
@@ -1790,7 +1790,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_
FUNC_ENTER_PACKAGE_TAG(dset_info->dset->oloc.addr)
- HDassert(io_info);
+ assert(io_info);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -1837,7 +1837,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_
"unable to send chunk modification data between MPI ranks")
/* Make sure the local chunk list was updated correctly */
- HDassert(chunk_list_num_entries == rank_chunks_assigned_map[mpi_rank]);
+ assert(chunk_list_num_entries == rank_chunks_assigned_map[mpi_rank]);
}
/* Proceed to update all the chunks this rank owns with its own
@@ -1989,7 +1989,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_
FUNC_ENTER_PACKAGE_TAG(dset_info->dset->oloc.addr)
- HDassert(dset_info->layout->type == H5D_CHUNKED);
+ assert(dset_info->layout->type == H5D_CHUNKED);
/* Get the current I/O collective opt mode so we can restore it later */
if (H5CX_get_mpio_coll_opt(&orig_coll_opt_mode) < 0)
@@ -2000,7 +2000,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_
/* Retrieve total # of chunks in dataset */
H5_CHECKED_ASSIGN(total_chunk, size_t, dset_info->layout->u.chunk.nchunks, hsize_t);
- HDassert(total_chunk != 0);
+ assert(total_chunk != 0);
/* Allocate memories */
chunk_io_option = (uint8_t *)H5MM_calloc(total_chunk);
@@ -2045,8 +2045,8 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_
/* Check if this chunk is the next chunk in the skip list, if there are
* selected chunks left to process */
- HDassert(!num_chunk || next_chunk_info);
- HDassert(!num_chunk || next_chunk_info->index >= u);
+ assert(!num_chunk || next_chunk_info);
+ assert(!num_chunk || next_chunk_info->index >= u);
if (num_chunk && next_chunk_info->index == u) {
/* Next chunk is this chunk */
chunk_info = next_chunk_info;
@@ -2116,7 +2116,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_
u);
#endif
- HDassert(chunk_io_option[u] == 0);
+ assert(chunk_io_option[u] == 0);
/* Set the file & memory dataspaces */
if (chunk_info) {
@@ -2266,7 +2266,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info
FUNC_ENTER_PACKAGE_TAG(dset_info->dset->oloc.addr)
- HDassert(io_info);
+ assert(io_info);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -2495,7 +2495,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain MPI rank")
#endif
- HDassert(io_info);
+ assert(io_info);
if ((file_space != NULL) && (mem_space != NULL)) {
int mpi_file_count; /* Number of file "objects" to transfer */
@@ -2505,7 +2505,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
point selection of the file space */
hbool_t is_permuted = FALSE;
- HDassert(di);
+ assert(di);
/* Obtain disk and memory MPI derived datatype */
/* NOTE: The permute_map array can be allocated within H5S_mpio_space_type
@@ -2527,7 +2527,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI file type")
/* Sanity check */
if (is_permuted)
- HDassert(permute_map);
+ assert(permute_map);
if (H5S_mpio_space_type(mem_space, di->type_info.src_type_size, &mpi_buf_type, &mpi_buf_count,
&mbt_is_derived, /* OUT: datatype created */
FALSE, /* this is a memory space, so if
@@ -2546,7 +2546,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI buffer type")
/* Sanity check */
if (is_permuted)
- HDassert(!permute_map);
+ assert(!permute_map);
} /* end if */
else {
/* For non-selection, participate with a none MPI derived datatype, the count is 0. */
@@ -2875,7 +2875,7 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_dset_io_info_t *di, uint8_t as
FUNC_ENTER_PACKAGE
- HDassert(di->layout->type == H5D_CHUNKED);
+ assert(di->layout->type == H5D_CHUNKED);
/* Assign the rank 0 to the root */
root = 0;
@@ -3015,7 +3015,7 @@ done:
if (mergebuf)
H5MM_free(mergebuf);
if (recv_io_mode_info) {
- HDassert(mpi_rank == root);
+ assert(mpi_rank == root);
H5MM_free(recv_io_mode_info);
} /* end if */
@@ -3051,16 +3051,16 @@ H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info, const
FUNC_ENTER_PACKAGE
- HDassert(io_info);
- HDassert(di);
- HDassert(chunk_list);
- HDassert(num_entries);
+ assert(io_info);
+ assert(di);
+ assert(chunk_list);
+ assert(num_entries);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
H5D_MPIO_TIME_START(mpi_rank, "Filtered Collective I/O Setup");
#endif
- HDassert(di->layout->type == H5D_CHUNKED);
+ assert(di->layout->type == H5D_CHUNKED);
/* Each rank builds a local list of the chunks they have selected */
if ((num_chunks_selected = H5SL_count(di->layout_io_info.chunk_map->dset_sel_pieces))) {
@@ -3270,9 +3270,9 @@ H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_li
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == chunk_list_num_entries);
- HDassert(io_info);
- HDassert(mpi_size > 1); /* No chunk sharing is possible for MPI Comm size of 1 */
+ assert(chunk_list || 0 == chunk_list_num_entries);
+ assert(io_info);
+ assert(mpi_size > 1); /* No chunk sharing is possible for MPI Comm size of 1 */
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -3413,10 +3413,10 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
FUNC_ENTER_PACKAGE
- HDassert(num_chunks_assigned_map);
- HDassert(chunk_list || 0 == num_chunks_assigned_map[mpi_rank]);
- HDassert(io_info);
- HDassert(mpi_size > 1);
+ assert(num_chunks_assigned_map);
+ assert(chunk_list || 0 == num_chunks_assigned_map[mpi_rank]);
+ assert(io_info);
+ assert(mpi_size > 1);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -3501,7 +3501,7 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
int new_chunk_owner;
/* Clear the mapping from rank value -> number of assigned chunks */
- HDmemset(num_chunks_assigned_map, 0, (size_t)mpi_size * sizeof(*num_chunks_assigned_map));
+ memset(num_chunks_assigned_map, 0, (size_t)mpi_size * sizeof(*num_chunks_assigned_map));
/* Sort collective chunk list according to chunk index */
HDqsort(coll_chunk_list, coll_chunk_list_num_entries, sizeof(H5D_chunk_redistribute_info_t),
@@ -3554,7 +3554,7 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
} while (++i < coll_chunk_list_num_entries && chunk_entry->chunk_idx == curr_chunk_idx);
/* We should never have more writers to a chunk than the number of MPI ranks */
- HDassert(num_writers <= mpi_size);
+ assert(num_writers <= mpi_size);
/* Set all processed chunk entries' "new_owner" and "num_writers" fields */
for (; set_begin_index < i; set_begin_index++) {
@@ -3749,13 +3749,13 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
FUNC_ENTER_PACKAGE
- HDassert(chunk_list_num_entries);
- HDassert(chunk_list || 0 == *chunk_list_num_entries);
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(mpi_size > 1);
- HDassert(chunk_msg_bufs);
- HDassert(chunk_msg_bufs_len);
+ assert(chunk_list_num_entries);
+ assert(chunk_list || 0 == *chunk_list_num_entries);
+ assert(io_info);
+ assert(dset_info);
+ assert(mpi_size > 1);
+ assert(chunk_msg_bufs);
+ assert(chunk_msg_bufs_len);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -3852,7 +3852,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
mod_data_p = msg_send_bufs[num_send_requests];
/* Store the chunk's index into the buffer */
- HDmemcpy(mod_data_p, &chunk_entry->index_info.chunk_idx, sizeof(hsize_t));
+ memcpy(mod_data_p, &chunk_entry->index_info.chunk_idx, sizeof(hsize_t));
mod_data_p += sizeof(hsize_t);
/* Serialize the chunk's file dataspace into the buffer */
@@ -3967,7 +3967,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk
if (msg_size <= 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "invalid chunk modification message size")
- HDassert((num_recv_requests + 1) <= num_msgs_incoming);
+ assert((num_recv_requests + 1) <= num_msgs_incoming);
if (NULL ==
(msg_recv_bufs[num_recv_requests] = H5MM_malloc((size_t)msg_size * sizeof(unsigned char))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL,
@@ -4153,8 +4153,8 @@ H5D__mpio_collective_filtered_chunk_common_io(H5D_filtered_collective_io_info_t
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == chunk_list_num_entries);
- HDassert(io_info);
+ assert(chunk_list || 0 == chunk_list_num_entries);
+ assert(io_info);
/* Initialize temporary I/O info */
coll_io_info = *io_info;
@@ -4175,7 +4175,7 @@ H5D__mpio_collective_filtered_chunk_common_io(H5D_filtered_collective_io_info_t
*/
if (io_info->op_type == H5D_IO_OP_READ) {
for (i = 0, num_chunks = 0; i < chunk_list_num_entries; i++) {
- HDassert(chunk_list[i].buf);
+ assert(chunk_list[i].buf);
if (chunk_list[i].need_read) {
if (!H5F_addr_defined(base_read_offset))
@@ -4274,9 +4274,9 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == chunk_list_num_entries);
- HDassert(io_info);
- HDassert(di);
+ assert(chunk_list || 0 == chunk_list_num_entries);
+ assert(io_info);
+ assert(di);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -4319,7 +4319,7 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
* chunk size would of course be bad.
*/
for (i = 0; i < chunk_list_num_entries; i++) {
- HDassert(chunk_list[i].need_read);
+ assert(chunk_list[i].need_read);
chunk_list[i].chunk_buf_size = MAX(chunk_list[i].chunk_current.length, file_chunk_size);
@@ -4356,7 +4356,7 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
if (!fb_info_init) {
hsize_t chunk_dims[H5S_MAX_RANK];
- HDassert(di->dset->shared->ndims == di->dset->shared->layout.u.chunk.ndims - 1);
+ assert(di->dset->shared->ndims == di->dset->shared->layout.u.chunk.ndims - 1);
for (size_t j = 0; j < di->dset->shared->layout.u.chunk.ndims - 1; j++)
chunk_dims[j] = (hsize_t)di->dset->shared->layout.u.chunk.dim[j];
@@ -4377,7 +4377,7 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun
}
/* Write fill value to memory buffer */
- HDassert(fb_info.fill_buf);
+ assert(fb_info.fill_buf);
if (H5D__fill(fb_info.fill_buf, di->dset->shared->type, chunk_list[i].buf,
di->type_info.mem_type, fill_space) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't fill chunk buffer with fill value")
@@ -4497,10 +4497,10 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == chunk_list_num_entries);
- HDassert((chunk_msg_bufs && chunk_hash_table) || 0 == chunk_msg_bufs_len);
- HDassert(io_info);
- HDassert(di);
+ assert(chunk_list || 0 == chunk_list_num_entries);
+ assert((chunk_msg_bufs && chunk_hash_table) || 0 == chunk_msg_bufs_len);
+ assert(io_info);
+ assert(di);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -4509,7 +4509,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
/* Set convenience pointers */
type_info = &(di->type_info);
- HDassert(type_info);
+ assert(type_info);
if (chunk_list_num_entries) {
/* Retrieve filter settings from API context */
@@ -4547,7 +4547,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
* chunk size would of course be bad.
*/
for (i = 0; i < chunk_list_num_entries; i++) {
- HDassert(mpi_rank == chunk_list[i].new_owner);
+ assert(mpi_rank == chunk_list[i].new_owner);
chunk_list[i].chunk_buf_size = MAX(chunk_list[i].chunk_current.length, file_chunk_size);
@@ -4596,7 +4596,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
if (!fb_info_init) {
hsize_t chunk_dims[H5S_MAX_RANK];
- HDassert(di->dset->shared->ndims == di->dset->shared->layout.u.chunk.ndims - 1);
+ assert(di->dset->shared->ndims == di->dset->shared->layout.u.chunk.ndims - 1);
for (size_t j = 0; j < di->dset->shared->layout.u.chunk.ndims - 1; j++)
chunk_dims[j] = (hsize_t)di->dset->shared->layout.u.chunk.dim[j];
@@ -4619,7 +4619,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
}
/* Write fill value to memory buffer */
- HDassert(fb_info.fill_buf);
+ assert(fb_info.fill_buf);
if (H5D__fill(fb_info.fill_buf, di->dset->shared->type, chunk_list[i].buf,
type_info->mem_type, fill_space) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
@@ -4670,7 +4670,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
/* Process all chunks with data from the owning rank first */
for (i = 0; i < chunk_list_num_entries; i++) {
- HDassert(mpi_rank == chunk_list[i].new_owner);
+ assert(mpi_rank == chunk_list[i].new_owner);
chunk_info = chunk_list[i].chunk_info;
@@ -4705,7 +4705,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
if (msg_ptr) {
/* Retrieve the chunk's index value */
- HDmemcpy(&chunk_idx, msg_ptr, sizeof(hsize_t));
+ memcpy(&chunk_idx, msg_ptr, sizeof(hsize_t));
msg_ptr += sizeof(hsize_t);
/* Find the chunk entry according to its chunk index */
@@ -4842,10 +4842,10 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == chunk_list_num_entries);
- HDassert(io_info);
- HDassert(idx_info);
- HDassert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
+ assert(chunk_list || 0 == chunk_list_num_entries);
+ assert(io_info);
+ assert(idx_info);
+ assert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -4941,8 +4941,8 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
local_chunk = &chunk_list[num_local_chunks_processed];
/* Sanity check that this chunk is actually local */
- HDassert(mpi_rank == local_chunk->orig_owner);
- HDassert(mpi_rank == local_chunk->new_owner);
+ assert(mpi_rank == local_chunk->orig_owner);
+ assert(mpi_rank == local_chunk->new_owner);
local_chunk->chunk_new = coll_entry->chunk_new;
local_chunk->index_info.need_insert = need_insert;
@@ -4956,7 +4956,7 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
haddr_t curr_chunk_offset = local_chunk->chunk_new.offset;
haddr_t prev_chunk_offset = chunk_list[num_local_chunks_processed - 1].chunk_new.offset;
- HDassert(H5F_addr_defined(prev_chunk_offset) && H5F_addr_defined(curr_chunk_offset));
+ assert(H5F_addr_defined(prev_chunk_offset) && H5F_addr_defined(curr_chunk_offset));
if (curr_chunk_offset < prev_chunk_offset)
need_sort = TRUE;
}
@@ -4965,7 +4965,7 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t
}
}
- HDassert(chunk_list_num_entries == num_local_chunks_processed);
+ assert(chunk_list_num_entries == num_local_chunks_processed);
/*
* Ensure this rank's local chunk list is sorted in
@@ -5032,10 +5032,10 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == chunk_list_num_entries);
- HDassert(io_info);
- HDassert(di);
- HDassert(idx_info);
+ assert(chunk_list || 0 == chunk_list_num_entries);
+ assert(io_info);
+ assert(di);
+ assert(idx_info);
#ifdef H5Dmpio_DEBUG
H5D_MPIO_TRACE_ENTER(mpi_rank);
@@ -5167,11 +5167,11 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t *
*/
for (size_t dbg_idx = 0; dbg_idx < chunk_list_num_entries; dbg_idx++) {
if (coll_entry->index_info.chunk_idx == chunk_list[dbg_idx].index_info.chunk_idx) {
- hbool_t coords_match = !HDmemcmp(scaled_coords, chunk_list[dbg_idx].chunk_info->scaled,
- di->dset->shared->ndims * sizeof(hsize_t));
+ hbool_t coords_match = !memcmp(scaled_coords, chunk_list[dbg_idx].chunk_info->scaled,
+ di->dset->shared->ndims * sizeof(hsize_t));
- HDassert(coords_match && "Calculated scaled coordinates for chunk didn't match "
- "chunk's actual scaled coordinates!");
+ assert(coords_match && "Calculated scaled coordinates for chunk didn't match "
+ "chunk's actual scaled coordinates!");
break;
}
}
@@ -5243,10 +5243,10 @@ H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type, hbool_t *
FUNC_ENTER_PACKAGE
- HDassert(contig_type);
- HDassert(contig_type_derived);
- HDassert(resized_type);
- HDassert(resized_type_derived);
+ assert(contig_type);
+ assert(contig_type_derived);
+ assert(resized_type);
+ assert(resized_type_derived);
*contig_type_derived = FALSE;
*resized_type_derived = FALSE;
@@ -5256,7 +5256,7 @@ H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type, hbool_t *
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description")
field_count = 5;
- HDassert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
+ assert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
/*
* Create structure type to pack chunk H5F_block_t structure
@@ -5384,10 +5384,10 @@ H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, hbool_t *contig_
FUNC_ENTER_PACKAGE
- HDassert(contig_type);
- HDassert(contig_type_derived);
- HDassert(resized_type);
- HDassert(resized_type_derived);
+ assert(contig_type);
+ assert(contig_type_derived);
+ assert(resized_type);
+ assert(resized_type_derived);
*contig_type_derived = FALSE;
*resized_type_derived = FALSE;
@@ -5397,7 +5397,7 @@ H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, hbool_t *contig_
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description")
field_count = 3;
- HDassert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
+ assert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
/*
* Create structure type to pack both chunk H5F_block_t structures
@@ -5515,10 +5515,10 @@ H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig
FUNC_ENTER_PACKAGE
- HDassert(contig_type);
- HDassert(contig_type_derived);
- HDassert(resized_type);
- HDassert(resized_type_derived);
+ assert(contig_type);
+ assert(contig_type_derived);
+ assert(resized_type);
+ assert(resized_type_derived);
*contig_type_derived = FALSE;
*resized_type_derived = FALSE;
@@ -5528,7 +5528,7 @@ H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description")
field_count = 4;
- HDassert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
+ assert(field_count == (sizeof(types) / sizeof(MPI_Datatype)));
/*
* Create struct type to pack information into memory as follows:
@@ -5641,11 +5641,11 @@ H5D__mpio_collective_filtered_io_type(H5D_filtered_collective_io_info_t *chunk_l
FUNC_ENTER_PACKAGE
- HDassert(chunk_list || 0 == num_entries);
- HDassert(new_mem_type);
- HDassert(mem_type_derived);
- HDassert(new_file_type);
- HDassert(file_type_derived);
+ assert(chunk_list || 0 == num_entries);
+ assert(new_mem_type);
+ assert(mem_type_derived);
+ assert(new_file_type);
+ assert(file_type_derived);
*mem_type_derived = FALSE;
*file_type_derived = FALSE;
@@ -5745,7 +5745,7 @@ H5D__mpio_collective_filtered_io_type(H5D_filtered_collective_io_info_t *chunk_l
* Set the current chunk entry's offset in the file, relative to
* the first chunk entry
*/
- HDassert(H5F_addr_defined(chunk_block->offset));
+ assert(H5F_addr_defined(chunk_block->offset));
file_offset_array[chunk_count] = (MPI_Aint)(chunk_block->offset - base_offset);
/*
@@ -5753,7 +5753,7 @@ H5D__mpio_collective_filtered_io_type(H5D_filtered_collective_io_info_t *chunk_l
* offset in the file
*/
if (chunk_count)
- HDassert(file_offset_array[chunk_count] > file_offset_array[chunk_count - 1]);
+ assert(file_offset_array[chunk_count] > file_offset_array[chunk_count - 1]);
/* Set the current chunk entry's size for the I/O operation */
H5_CHECK_OVERFLOW(chunk_block->length, hsize_t, int);
@@ -5814,9 +5814,9 @@ H5D__mpio_collective_filtered_io_type(H5D_filtered_collective_io_info_t *chunk_l
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
}
else {
- HDassert(file_offset_array);
- HDassert(length_array);
- HDassert(io_buf_array);
+ assert(file_offset_array);
+ assert(length_array);
+ assert(io_buf_array);
/* Multiple chunks - use an hindexed type for both memory and file */
@@ -5884,7 +5884,7 @@ H5D__mpio_dump_collective_filtered_chunk_list(H5D_filtered_collective_io_info_t
chunk_entry = &chunk_list[i];
- HDassert(chunk_entry->chunk_info);
+ assert(chunk_entry->chunk_info);
chunk_rank = (unsigned)H5S_GET_EXTENT_NDIMS(chunk_entry->chunk_info->fspace);
H5D_MPIO_DEBUG(mpi_rank, " {");
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index 5d24092..94ad831 100644
--- a/src/H5Dnone.c
+++ b/src/H5Dnone.c
@@ -119,14 +119,14 @@ H5D__none_idx_create(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->pline->nused == 0); /* Shouldn't have filter defined on entering here */
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(idx_info->layout->max_nchunks);
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr)); /* address of data shouldn't be defined */
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->pline->nused == 0); /* Shouldn't have filter defined on entering here */
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(idx_info->layout->max_nchunks);
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr)); /* address of data shouldn't be defined */
/* Calculate size of max dataset chunks */
nbytes = idx_info->layout->max_nchunks * idx_info->layout->size;
@@ -160,7 +160,7 @@ H5D__none_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__none_idx_is_space_alloc() */
@@ -183,14 +183,14 @@ H5D__none_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->pline->nused == 0);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(udata);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->pline->nused == 0);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(udata);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
/* Calculate the index of this chunk */
udata->chunk_idx = H5VM_array_offset_pre((idx_info->layout->ndims - 1), idx_info->layout->max_down_chunks,
@@ -231,23 +231,23 @@ H5D__none_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t ch
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(!idx_info->pline->nused);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(chunk_cb);
- HDassert(chunk_udata);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(!idx_info->pline->nused);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(chunk_cb);
+ assert(chunk_udata);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
/* Initialize generic chunk record */
- HDmemset(&chunk_rec, 0, sizeof(chunk_rec));
+ memset(&chunk_rec, 0, sizeof(chunk_rec));
chunk_rec.nbytes = idx_info->layout->size;
chunk_rec.filter_mask = 0;
ndims = idx_info->layout->ndims - 1;
- HDassert(ndims > 0);
+ assert(ndims > 0);
/* Iterate over all the chunks in the dataset's dataspace */
for (u = 0; u < idx_info->layout->nchunks && ret_value == H5_ITER_CONT; u++) {
@@ -330,13 +330,13 @@ H5D__none_idx_delete(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(!idx_info->pline->nused); /* Shouldn't have filter defined on entering here */
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr)); /* should be defined */
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(!idx_info->pline->nused); /* Shouldn't have filter defined on entering here */
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr)); /* should be defined */
/* chunk size * max # of chunks */
nbytes = idx_info->layout->max_nchunks * idx_info->layout->size;
@@ -369,20 +369,20 @@ H5D__none_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_inf
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info_src);
- HDassert(idx_info_src->f);
- HDassert(idx_info_src->pline);
- HDassert(!idx_info_src->pline->nused);
- HDassert(idx_info_src->layout);
- HDassert(idx_info_src->storage);
- HDassert(H5F_addr_defined(idx_info_src->storage->idx_addr));
-
- HDassert(idx_info_dst);
- HDassert(idx_info_dst->f);
- HDassert(idx_info_dst->pline);
- HDassert(!idx_info_dst->pline->nused);
- HDassert(idx_info_dst->layout);
- HDassert(idx_info_dst->storage);
+ assert(idx_info_src);
+ assert(idx_info_src->f);
+ assert(idx_info_src->pline);
+ assert(!idx_info_src->pline->nused);
+ assert(idx_info_src->layout);
+ assert(idx_info_src->storage);
+ assert(H5F_addr_defined(idx_info_src->storage->idx_addr));
+
+ assert(idx_info_dst);
+ assert(idx_info_dst->f);
+ assert(idx_info_dst->pline);
+ assert(!idx_info_dst->pline->nused);
+ assert(idx_info_dst->layout);
+ assert(idx_info_dst->storage);
/* Set copied metadata tag */
H5_BEGIN_TAG(H5AC__COPIED_TAG);
@@ -416,7 +416,7 @@ H5D__none_idx_size(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, hsize_t *i
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(index_size);
+ assert(index_size);
*index_size = 0;
@@ -440,7 +440,7 @@ H5D__none_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
/* Reset index info */
if (reset_addr)
@@ -466,10 +466,10 @@ H5D__none_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
- HDassert(stream);
+ assert(storage);
+ assert(stream);
- HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
+ fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__none_idx_dump() */
diff --git a/src/H5Doh.c b/src/H5Doh.c
index 42cb543..6877f5c 100644
--- a/src/H5Doh.c
+++ b/src/H5Doh.c
@@ -129,7 +129,7 @@ H5O__dset_free_copy_file_udata(void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(udata);
+ assert(udata);
/* Release copy of dataset's dataspace extent, if it was set */
if (udata->src_space_extent)
@@ -174,7 +174,7 @@ H5O__dset_isa(const H5O_t *oh)
FUNC_ENTER_PACKAGE
- HDassert(oh);
+ assert(oh);
/* Datatype */
if ((exists = H5O_msg_exists_oh(oh, H5O_DTYPE_ID)) < 0)
@@ -214,7 +214,7 @@ H5O__dset_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type)
FUNC_ENTER_PACKAGE
- HDassert(obj_loc);
+ assert(obj_loc);
*opened_type = H5I_DATASET;
@@ -278,9 +278,9 @@ H5O__dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(crt_info);
- HDassert(obj_loc);
+ assert(f);
+ assert(crt_info);
+ assert(obj_loc);
/* Create the dataset */
if (NULL ==
@@ -364,11 +364,11 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(oh);
- HDassert(bh_info);
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(oh);
+ assert(bh_info);
/* Get the layout message from the object header */
if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_LAYOUT_ID, &layout))
@@ -399,7 +399,7 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info)
if (exists && H5D__efl_is_space_alloc(&layout.storage)) {
/* Start with clean EFL info */
- HDmemset(&efl, 0, sizeof(efl));
+ memset(&efl, 0, sizeof(efl));
/* Get External File List message from the object header */
if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_EFL_ID, &efl))
@@ -443,8 +443,8 @@ H5O__dset_flush(void *_obj_ptr)
FUNC_ENTER_PACKAGE
- HDassert(dset);
- HDassert(&dset->oloc);
+ assert(dset);
+ assert(&dset->oloc);
/* Check that the object found is the correct type */
if (H5O_obj_type(&dset->oloc, &obj_type) < 0)
diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c
index 802544c..6f30ae6 100644
--- a/src/H5Dscatgath.c
+++ b/src/H5Dscatgath.c
@@ -105,17 +105,17 @@ H5D__scatter_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(_io_info);
- HDassert(_dset_info);
- HDassert(_dset_info->dset);
- HDassert(_dset_info->store);
- HDassert(iter);
- HDassert(nelmts > 0);
- HDassert(_buf);
+ assert(_io_info);
+ assert(_dset_info);
+ assert(_dset_info->dset);
+ assert(_dset_info->store);
+ assert(iter);
+ assert(nelmts > 0);
+ assert(_buf);
/* Set up temporary I/O info object */
H5MM_memcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
- HDmemcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
+ memcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
tmp_io_info.op_type = H5D_IO_OP_WRITE;
tmp_dset_info.buf.cvp = _buf;
tmp_io_info.dsets_info = &tmp_dset_info;
@@ -209,17 +209,17 @@ H5D__gather_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset_
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(_io_info);
- HDassert(_dset_info);
- HDassert(_dset_info->dset);
- HDassert(_dset_info->store);
- HDassert(iter);
- HDassert(nelmts > 0);
- HDassert(_buf);
+ assert(_io_info);
+ assert(_dset_info);
+ assert(_dset_info->dset);
+ assert(_dset_info->store);
+ assert(iter);
+ assert(nelmts > 0);
+ assert(_buf);
/* Set up temporary I/O info object */
H5MM_memcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
- HDmemcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
+ memcpy(&tmp_dset_info, _dset_info, sizeof(*_dset_info));
tmp_io_info.op_type = H5D_IO_OP_READ;
tmp_dset_info.buf.vp = _buf;
tmp_io_info.dsets_info = &tmp_dset_info;
@@ -304,10 +304,10 @@ H5D__scatter_mem(const void *_tscat_buf, H5S_sel_iter_t *iter, size_t nelmts, vo
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(tscat_buf);
- HDassert(iter);
- HDassert(nelmts > 0);
- HDassert(buf);
+ assert(tscat_buf);
+ assert(iter);
+ assert(nelmts > 0);
+ assert(buf);
/* Get info from API context */
if (H5CX_get_vec_size(&dxpl_vec_size) < 0)
@@ -389,10 +389,10 @@ H5D__gather_mem(const void *_buf, H5S_sel_iter_t *iter, size_t nelmts, void *_tg
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(buf);
- HDassert(iter);
- HDassert(nelmts > 0);
- HDassert(tgath_buf);
+ assert(buf);
+ assert(iter);
+ assert(nelmts > 0);
+ assert(tgath_buf);
/* Get info from API context */
if (H5CX_get_vec_size(&dxpl_vec_size) < 0)
@@ -468,11 +468,11 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->mem_space);
- HDassert(dset_info->file_space);
- HDassert(dset_info->buf.vp);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->mem_space);
+ assert(dset_info->file_space);
+ assert(dset_info->buf.vp);
/* Set buf pointer */
buf = dset_info->buf.vp;
@@ -506,7 +506,7 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_
size_t n; /* Elements operated on */
/* Go figure out how many elements to read from the file */
- HDassert(H5S_SELECT_ITER_NELMTS(file_iter) == (dset_info->nelmts - smine_start));
+ assert(H5S_SELECT_ITER_NELMTS(file_iter) == (dset_info->nelmts - smine_start));
smine_nelmts = (size_t)MIN(dset_info->type_info.request_nelmts, (dset_info->nelmts - smine_start));
/*
@@ -613,11 +613,11 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->mem_space);
- HDassert(dset_info->file_space);
- HDassert(dset_info->buf.vp);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->mem_space);
+ assert(dset_info->file_space);
+ assert(dset_info->buf.vp);
/* Set buf pointer */
buf = dset_info->buf.cvp;
@@ -652,7 +652,7 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset
size_t n; /* Elements operated on */
/* Go figure out how many elements to read from the file */
- HDassert(H5S_SELECT_ITER_NELMTS(file_iter) == (dset_info->nelmts - smine_start));
+ assert(H5S_SELECT_ITER_NELMTS(file_iter) == (dset_info->nelmts - smine_start));
smine_nelmts = (size_t)MIN(dset_info->type_info.request_nelmts, (dset_info->nelmts - smine_start));
/*
@@ -755,13 +755,13 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(io_info->count > 0);
- HDassert(io_info->mem_spaces || io_info->pieces_added == 0);
- HDassert(io_info->file_spaces || io_info->pieces_added == 0);
- HDassert(io_info->addrs || io_info->pieces_added == 0);
- HDassert(io_info->element_sizes || io_info->pieces_added == 0);
- HDassert(io_info->rbufs || io_info->pieces_added == 0);
+ assert(io_info);
+ assert(io_info->count > 0);
+ assert(io_info->mem_spaces || io_info->pieces_added == 0);
+ assert(io_info->file_spaces || io_info->pieces_added == 0);
+ assert(io_info->addrs || io_info->pieces_added == 0);
+ assert(io_info->element_sizes || io_info->pieces_added == 0);
+ assert(io_info->rbufs || io_info->pieces_added == 0);
/* Allocate list of buffers (within the tconv buf) */
if (NULL == (tmp_bufs = H5MM_malloc(io_info->pieces_added * sizeof(void *))))
@@ -782,7 +782,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
for (i = 0; i < io_info->pieces_added; i++) {
H5D_dset_io_info_t *dset_info = io_info->sel_pieces[i]->dset_info;
- HDassert(io_info->sel_pieces[i]->piece_points > 0);
+ assert(io_info->sel_pieces[i]->piece_points > 0);
/* Check if this piece is involved in type conversion */
if (dset_info->type_info.is_xform_noop && dset_info->type_info.is_conv_noop) {
@@ -794,7 +794,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
/* Create block memory space */
if (NULL ==
(tmp_mem_spaces[i] = H5S_create_simple(1, &io_info->sel_pieces[i]->piece_points, NULL))) {
- HDmemset(&tmp_mem_spaces[i], 0, (io_info->pieces_added - i) * sizeof(tmp_mem_spaces[0]));
+ memset(&tmp_mem_spaces[i], 0, (io_info->pieces_added - i) * sizeof(tmp_mem_spaces[0]));
HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "unable to create simple memory dataspace")
}
@@ -808,7 +808,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
tconv_bytes_used +=
io_info->sel_pieces[i]->piece_points *
MAX(dset_info->type_info.src_type_size, dset_info->type_info.dst_type_size);
- HDassert(tconv_bytes_used <= io_info->tconv_buf_size);
+ assert(tconv_bytes_used <= io_info->tconv_buf_size);
}
/* Fill background buffer here unless we will use H5D__compound_opt_read(). Must do this before
@@ -816,18 +816,18 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
if (!H5D__SCATGATH_USE_CMPD_OPT_READ(dset_info, io_info->sel_pieces[i])) {
/* Check for background buffer */
if (dset_info->type_info.need_bkg) {
- HDassert(io_info->bkg_buf);
+ assert(io_info->bkg_buf);
/* Calculate background buffer position */
tmp_bkg_buf = io_info->bkg_buf + bkg_bytes_used;
bkg_bytes_used +=
io_info->sel_pieces[i]->piece_points * dset_info->type_info.dst_type_size;
- HDassert(bkg_bytes_used <= io_info->bkg_buf_size);
+ assert(bkg_bytes_used <= io_info->bkg_buf_size);
/* Gather data from read buffer to background buffer if necessary */
if (H5T_BKG_YES == dset_info->type_info.need_bkg) {
/* Initialize memory iterator */
- HDassert(!mem_iter_init);
+ assert(!mem_iter_init);
if (H5S_select_iter_init(mem_iter, io_info->mem_spaces[i],
dset_info->type_info.dst_type_size, 0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
@@ -841,7 +841,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "mem gather failed")
/* Reset selection iterator */
- HDassert(mem_iter_init);
+ assert(mem_iter_init);
if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
mem_iter_init = FALSE;
@@ -864,14 +864,14 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
for (i = 0; i < io_info->pieces_added; i++) {
H5D_dset_io_info_t *dset_info = io_info->sel_pieces[i]->dset_info;
- HDassert(tmp_mem_spaces[i]);
+ assert(tmp_mem_spaces[i]);
/* Check if this piece is involved in type conversion */
if (tmp_mem_spaces[i] != io_info->mem_spaces[i]) {
H5_CHECK_OVERFLOW(io_info->sel_pieces[i]->piece_points, hsize_t, size_t);
/* Initialize memory iterator */
- HDassert(!mem_iter_init);
+ assert(!mem_iter_init);
if (H5S_select_iter_init(mem_iter, io_info->mem_spaces[i], dset_info->type_info.dst_type_size,
0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
@@ -890,13 +890,13 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
else {
/* Check for background buffer */
if (dset_info->type_info.need_bkg) {
- HDassert(io_info->bkg_buf);
+ assert(io_info->bkg_buf);
/* Calculate background buffer position */
tmp_bkg_buf = io_info->bkg_buf + bkg_bytes_used;
bkg_bytes_used +=
io_info->sel_pieces[i]->piece_points * dset_info->type_info.dst_type_size;
- HDassert(bkg_bytes_used <= io_info->bkg_buf_size);
+ assert(bkg_bytes_used <= io_info->bkg_buf_size);
}
/*
@@ -930,7 +930,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info)
}
/* Release selection iterator */
- HDassert(mem_iter_init);
+ assert(mem_iter_init);
if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
mem_iter_init = FALSE;
@@ -992,13 +992,13 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(io_info->count > 0);
- HDassert(io_info->mem_spaces || io_info->pieces_added == 0);
- HDassert(io_info->file_spaces || io_info->pieces_added == 0);
- HDassert(io_info->addrs || io_info->pieces_added == 0);
- HDassert(io_info->element_sizes || io_info->pieces_added == 0);
- HDassert(io_info->wbufs || io_info->pieces_added == 0);
+ assert(io_info);
+ assert(io_info->count > 0);
+ assert(io_info->mem_spaces || io_info->pieces_added == 0);
+ assert(io_info->file_spaces || io_info->pieces_added == 0);
+ assert(io_info->addrs || io_info->pieces_added == 0);
+ assert(io_info->element_sizes || io_info->pieces_added == 0);
+ assert(io_info->wbufs || io_info->pieces_added == 0);
/* Allocate list of buffers (within the tconv buf) */
if (NULL == (write_bufs = (const void **)H5MM_malloc(io_info->pieces_added * sizeof(const void *))))
@@ -1019,7 +1019,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
for (i = 0; i < io_info->pieces_added; i++) {
H5D_dset_io_info_t *dset_info = io_info->sel_pieces[i]->dset_info;
- HDassert(io_info->sel_pieces[i]->piece_points > 0);
+ assert(io_info->sel_pieces[i]->piece_points > 0);
/* Check if this piece is involved in type conversion */
if (dset_info->type_info.is_xform_noop && dset_info->type_info.is_conv_noop) {
@@ -1035,7 +1035,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
H5_CHECK_OVERFLOW(io_info->sel_pieces[i]->piece_points, hsize_t, size_t);
/* Initialize memory iterator */
- HDassert(!mem_iter_init);
+ assert(!mem_iter_init);
if (H5S_select_iter_init(mem_iter, io_info->mem_spaces[i], dset_info->type_info.src_type_size,
0) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
@@ -1064,7 +1064,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
tconv_bytes_used +=
io_info->sel_pieces[i]->piece_points *
MAX(dset_info->type_info.src_type_size, dset_info->type_info.dst_type_size);
- HDassert(tconv_bytes_used <= io_info->tconv_buf_size);
+ assert(tconv_bytes_used <= io_info->tconv_buf_size);
/* Gather data from application buffer into the datatype conversion buffer */
if ((size_t)io_info->sel_pieces[i]->piece_points !=
@@ -1098,22 +1098,22 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
else {
/* Check for background buffer */
if (dset_info->type_info.need_bkg) {
- HDassert(io_info->bkg_buf);
+ assert(io_info->bkg_buf);
/* Calculate background buffer position */
tmp_bkg_buf = io_info->bkg_buf + bkg_bytes_used;
bkg_bytes_used +=
io_info->sel_pieces[i]->piece_points * dset_info->type_info.dst_type_size;
- HDassert(bkg_bytes_used <= io_info->bkg_buf_size);
+ assert(bkg_bytes_used <= io_info->bkg_buf_size);
}
/* Set up background buffer read operation if necessary */
if (H5T_BKG_YES == dset_info->type_info.need_bkg) {
- HDassert(io_info->must_fill_bkg);
+ assert(io_info->must_fill_bkg);
/* Allocate arrays of parameters for selection read to background buffer if necessary */
if (!bkg_mem_spaces) {
- HDassert(!bkg_file_spaces && !bkg_addrs && !bkg_element_sizes && !bkg_bufs);
+ assert(!bkg_file_spaces && !bkg_addrs && !bkg_element_sizes && !bkg_bufs);
if (NULL == (bkg_mem_spaces = H5MM_malloc(io_info->pieces_added * sizeof(H5S_t *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"memory allocation failed for memory space list")
@@ -1133,7 +1133,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
/* Use same (block) memory space, file space, address, and element size as write operation
*/
- HDassert(bkg_mem_spaces && bkg_file_spaces && bkg_addrs && bkg_element_sizes && bkg_bufs);
+ assert(bkg_mem_spaces && bkg_file_spaces && bkg_addrs && bkg_element_sizes && bkg_bufs);
bkg_mem_spaces[bkg_pieces] = write_mem_spaces[i];
bkg_file_spaces[bkg_pieces] = io_info->file_spaces[i];
bkg_addrs[bkg_pieces] = io_info->addrs[i];
@@ -1175,14 +1175,14 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
}
/* Release selection iterator */
- HDassert(mem_iter_init);
+ assert(mem_iter_init);
if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
mem_iter_init = FALSE;
}
}
- HDassert(spaces_added == io_info->pieces_added);
+ assert(spaces_added == io_info->pieces_added);
/* Gather data to background buffer if necessary */
if (io_info->must_fill_bkg) {
@@ -1224,7 +1224,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
/*
* Perform datatype conversion.
*/
- HDassert(j < bkg_pieces);
+ assert(j < bkg_pieces);
if (H5T_convert(dset_info->type_info.tpath, dset_info->type_info.src_type_id,
dset_info->type_info.dst_type_id,
(size_t)io_info->sel_pieces[i]->piece_points, (size_t)0, (size_t)0,
@@ -1236,7 +1236,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info)
}
}
- HDassert(j == bkg_pieces);
+ assert(j == bkg_pieces);
}
/* Write data to disk */
@@ -1260,7 +1260,7 @@ done:
/* Clear and free write_mem_spaces */
if (write_mem_spaces) {
for (i = 0; i < spaces_added; i++) {
- HDassert(write_mem_spaces[i]);
+ assert(write_mem_spaces[i]);
if (write_mem_spaces[i] != io_info->mem_spaces[i] && H5S_close(write_mem_spaces[i]) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "Can't close dataspace")
}
@@ -1331,13 +1331,13 @@ H5D__compound_opt_read(size_t nelmts, H5S_sel_iter_t *iter, const H5D_type_info_
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(nelmts > 0);
- HDassert(iter);
- HDassert(type_info);
- HDassert(type_info->cmpd_subset);
- HDassert(H5T_SUBSET_SRC == type_info->cmpd_subset->subset ||
- H5T_SUBSET_DST == type_info->cmpd_subset->subset);
- HDassert(user_buf);
+ assert(nelmts > 0);
+ assert(iter);
+ assert(type_info);
+ assert(type_info->cmpd_subset);
+ assert(H5T_SUBSET_SRC == type_info->cmpd_subset->subset ||
+ H5T_SUBSET_DST == type_info->cmpd_subset->subset);
+ assert(user_buf);
/* Get info from API context */
if (H5CX_get_vec_size(&dxpl_vec_size) < 0)
@@ -1455,8 +1455,8 @@ H5D__compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info, uint8_t
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(nelmts > 0);
- HDassert(type_info);
+ assert(nelmts > 0);
+ assert(type_info);
/* Initialize values for loop */
src_stride = type_info->src_type_size;
diff --git a/src/H5Dselect.c b/src/H5Dselect.c
index 924104e..dfc8557 100644
--- a/src/H5Dselect.c
+++ b/src/H5Dselect.c
@@ -99,10 +99,10 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(io_info);
- HDassert(dset_info->dset);
- HDassert(dset_info->store);
- HDassert(dset_info->buf.vp);
+ assert(io_info);
+ assert(dset_info->dset);
+ assert(dset_info->store);
+ assert(dset_info->buf.vp);
if (elmt_size == 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "invalid elmt_size of 0")
@@ -138,7 +138,7 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
} /* end if */
else {
- HDassert(io_info->op_type == H5D_IO_OP_WRITE);
+ assert(io_info->op_type == H5D_IO_OP_WRITE);
if ((tmp_file_len = (*dset_info->layout_ops.writevv)(
io_info, dset_info, file_nseq, &curr_file_seq, &single_file_len, &single_file_off,
mem_nseq, &curr_mem_seq, &single_mem_len, &single_mem_off)) < 0)
@@ -146,7 +146,7 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info
} /* end else */
/* Decrement number of elements left to process */
- HDassert(((size_t)tmp_file_len % elmt_size) == 0);
+ assert(((size_t)tmp_file_len % elmt_size) == 0);
} /* end if */
else {
size_t mem_nelem; /* Number of elements used in memory sequences */
@@ -223,7 +223,7 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
} /* end if */
else {
- HDassert(io_info->op_type == H5D_IO_OP_WRITE);
+ assert(io_info->op_type == H5D_IO_OP_WRITE);
if ((tmp_file_len = (*dset_info->layout_ops.writevv)(
io_info, dset_info, file_nseq, &curr_file_seq, file_len, file_off, mem_nseq,
&curr_mem_seq, mem_len, mem_off)) < 0)
@@ -231,7 +231,7 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info
} /* end else */
/* Decrement number of elements left to process */
- HDassert(((size_t)tmp_file_len % elmt_size) == 0);
+ assert(((size_t)tmp_file_len % elmt_size) == 0);
nelmts -= ((size_t)tmp_file_len / elmt_size);
} /* end while */
} /* end else */
@@ -299,10 +299,10 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dst_buf);
- HDassert(dst_space);
- HDassert(src_buf);
- HDassert(src_space);
+ assert(dst_buf);
+ assert(dst_space);
+ assert(src_buf);
+ assert(src_space);
if (elmt_size == 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "invalid elmt_size of 0")
@@ -333,7 +333,7 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s
src_nseq, &curr_src_seq, &single_src_len, &single_src_off)) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed")
- HDassert(((size_t)bytes_copied % elmt_size) == 0);
+ assert(((size_t)bytes_copied % elmt_size) == 0);
}
else {
unsigned sel_iter_flags = H5S_SEL_ITER_GET_SEQ_LIST_SORTED | H5S_SEL_ITER_SHARE_WITH_DATASPACE;
@@ -409,7 +409,7 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed")
/* Decrement number of elements left to process */
- HDassert(((size_t)bytes_copied % elmt_size) == 0);
+ assert(((size_t)bytes_copied % elmt_size) == 0);
nelmts -= ((size_t)bytes_copied / elmt_size);
}
}
diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c
index f845074..23b24c5 100644
--- a/src/H5Dsingle.c
+++ b/src/H5Dsingle.c
@@ -118,11 +118,11 @@ H5D__single_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
if (idx_info->pline->nused) {
idx_info->layout->flags |= H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER;
@@ -156,19 +156,19 @@ H5D__single_idx_create(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(idx_info->layout->max_nchunks == idx_info->layout->nchunks);
- HDassert(idx_info->layout->nchunks == 1);
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(idx_info->layout->max_nchunks == idx_info->layout->nchunks);
+ assert(idx_info->layout->nchunks == 1);
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr));
if (idx_info->pline->nused)
- HDassert(idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER);
+ assert(idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER);
else
- HDassert(!(idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER));
+ assert(!(idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__single_idx_create() */
@@ -190,7 +190,7 @@ H5D__single_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__single_idx_is_space_alloc() */
@@ -214,17 +214,17 @@ H5D__single_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(idx_info->layout->nchunks == 1);
- HDassert(idx_info->layout->max_nchunks == 1);
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(idx_info->layout->nchunks == 1);
+ assert(idx_info->layout->max_nchunks == 1);
+ assert(udata);
/* Set the address for the chunk */
- HDassert(H5F_addr_defined(udata->chunk_block.offset));
+ assert(H5F_addr_defined(udata->chunk_block.offset));
idx_info->storage->idx_addr = udata->chunk_block.offset;
if (idx_info->pline->nused > 0) {
@@ -260,14 +260,14 @@ H5D__single_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(idx_info->layout->nchunks == 1);
- HDassert(idx_info->layout->max_nchunks == 1);
- HDassert(udata);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(idx_info->layout->nchunks == 1);
+ assert(idx_info->layout->max_nchunks == 1);
+ assert(udata);
udata->chunk_block.offset = idx_info->storage->idx_addr;
if (idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) {
@@ -304,17 +304,17 @@ H5D__single_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(chunk_cb);
- HDassert(chunk_udata);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(chunk_cb);
+ assert(chunk_udata);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
/* Initialize generic chunk record */
- HDmemset(&chunk_rec, 0, sizeof(chunk_rec));
+ memset(&chunk_rec, 0, sizeof(chunk_rec));
chunk_rec.chunk_addr = idx_info->storage->idx_addr;
if (idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) {
@@ -353,12 +353,12 @@ H5D__single_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
+ assert(H5F_addr_defined(idx_info->storage->idx_addr));
if (idx_info->layout->flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER)
nbytes = idx_info->storage->u.single.nbytes;
@@ -394,16 +394,16 @@ H5D__single_idx_delete(const H5D_chk_idx_info_t *idx_info)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(idx_info->storage);
+ assert(idx_info);
+ assert(idx_info->f);
+ assert(idx_info->pline);
+ assert(idx_info->layout);
+ assert(idx_info->storage);
if (H5F_addr_defined(idx_info->storage->idx_addr))
ret_value = H5D__single_idx_remove(idx_info, NULL);
else
- HDassert(!H5F_addr_defined(idx_info->storage->idx_addr));
+ assert(!H5F_addr_defined(idx_info->storage->idx_addr));
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__single_idx_delete() */
@@ -428,18 +428,18 @@ H5D__single_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_i
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(idx_info_src);
- HDassert(idx_info_src->f);
- HDassert(idx_info_src->pline);
- HDassert(idx_info_src->layout);
- HDassert(idx_info_src->storage);
- HDassert(H5F_addr_defined(idx_info_src->storage->idx_addr));
-
- HDassert(idx_info_dst);
- HDassert(idx_info_dst->f);
- HDassert(idx_info_dst->pline);
- HDassert(idx_info_dst->layout);
- HDassert(idx_info_dst->storage);
+ assert(idx_info_src);
+ assert(idx_info_src->f);
+ assert(idx_info_src->pline);
+ assert(idx_info_src->layout);
+ assert(idx_info_src->storage);
+ assert(H5F_addr_defined(idx_info_src->storage->idx_addr));
+
+ assert(idx_info_dst);
+ assert(idx_info_dst->f);
+ assert(idx_info_dst->pline);
+ assert(idx_info_dst->layout);
+ assert(idx_info_dst->storage);
/* Set copied metadata tag */
H5_BEGIN_TAG(H5AC__COPIED_TAG);
@@ -473,7 +473,7 @@ H5D__single_idx_size(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info, hsize_t
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(index_size);
+ assert(index_size);
*index_size = 0;
@@ -497,7 +497,7 @@ H5D__single_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
+ assert(storage);
/* Reset index info */
if (reset_addr)
@@ -523,10 +523,10 @@ H5D__single_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(storage);
- HDassert(stream);
+ assert(storage);
+ assert(stream);
- HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
+ fprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__single_idx_dump() */
diff --git a/src/H5Dtest.c b/src/H5Dtest.c
index 1d9d2ca..d6e57c1 100644
--- a/src/H5Dtest.c
+++ b/src/H5Dtest.c
@@ -122,7 +122,7 @@ H5D__layout_contig_size_test(hid_t did, hsize_t *size)
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
if (size) {
- HDassert(dset->shared->layout.type == H5D_CONTIGUOUS);
+ assert(dset->shared->layout.type == H5D_CONTIGUOUS);
*size = dset->shared->layout.storage.u.contig.size;
} /* end if */
@@ -162,7 +162,7 @@ H5D__layout_compact_dirty_test(hid_t did, hbool_t *dirty)
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset")
if (dirty) {
- HDassert(dset->shared->layout.type == H5D_COMPACT);
+ assert(dset->shared->layout.type == H5D_COMPACT);
*dirty = dset->shared->layout.storage.u.compact.dirty;
} /* end if */
@@ -197,7 +197,7 @@ H5D__layout_type_test(hid_t did, H5D_layout_t *layout_type)
FUNC_ENTER_PACKAGE
- HDassert(layout_type);
+ assert(layout_type);
/* Check args */
if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET)))
@@ -282,12 +282,12 @@ H5D__current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
if (nbytes_used) {
- HDassert(dset->shared->layout.type == H5D_CHUNKED);
+ assert(dset->shared->layout.type == H5D_CHUNKED);
*nbytes_used = dset->shared->cache.chunk.nbytes_used;
} /* end if */
if (nused) {
- HDassert(dset->shared->layout.type == H5D_CHUNKED);
+ assert(dset->shared->layout.type == H5D_CHUNKED);
*nused = dset->shared->cache.chunk.nused;
} /* end if */
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index 6695c02..8958918 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -320,9 +320,9 @@ H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(layout);
- HDassert(layout->type == H5D_VIRTUAL);
- HDassert(idx < virt->list_nalloc);
+ assert(layout);
+ assert(layout->type == H5D_VIRTUAL);
+ assert(idx < virt->list_nalloc);
/* Get type of selection */
if (H5S_SEL_ERROR == (sel_type = H5S_GET_SELECT_TYPE(ent->source_dset.virtual_select)))
@@ -373,9 +373,9 @@ H5D_virtual_check_min_dims(const H5D_t *dset)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dset);
- HDassert(dset->shared);
- HDassert(dset->shared->layout.type == H5D_VIRTUAL);
+ assert(dset);
+ assert(dset->shared);
+ assert(dset->shared->layout.type == H5D_VIRTUAL);
/* Get rank of dataspace */
if ((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0)
@@ -429,9 +429,9 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout)
FUNC_ENTER_PACKAGE
/* Sanity checking */
- HDassert(f);
- HDassert(layout);
- HDassert(virt->serial_list_hobjid.addr == HADDR_UNDEF);
+ assert(f);
+ assert(layout);
+ assert(virt->serial_list_hobjid.addr == HADDR_UNDEF);
/* Create block if # of used entries > 0 */
if (virt->list_nused > 0) {
@@ -455,10 +455,10 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout)
H5O_storage_virtual_ent_t *ent = &virt->list[i];
hssize_t select_serial_size; /* Size of serialized selection */
- HDassert(ent->source_file_name);
- HDassert(ent->source_dset_name);
- HDassert(ent->source_select);
- HDassert(ent->source_dset.virtual_select);
+ assert(ent->source_file_name);
+ assert(ent->source_dset_name);
+ assert(ent->source_select);
+ assert(ent->source_dset.virtual_select);
/* Source file name */
str_size[2 * i] = HDstrlen(ent->source_file_name) + (size_t)1;
@@ -562,8 +562,8 @@ H5D__virtual_copy_layout(H5O_layout_t *layout)
FUNC_ENTER_PACKAGE
- HDassert(layout);
- HDassert(layout->type == H5D_VIRTUAL);
+ assert(layout);
+ assert(layout->type == H5D_VIRTUAL);
/* Save original entry list and top-level property lists and reset in layout
* so the originals aren't closed on error */
@@ -576,7 +576,7 @@ H5D__virtual_copy_layout(H5O_layout_t *layout)
/* Copy entry list */
if (virt->list_nused > 0) {
- HDassert(orig_list);
+ assert(orig_list);
/* Allocate memory for the list */
if (NULL == (virt->list = H5MM_calloc(virt->list_nused * sizeof(virt->list[0]))))
@@ -630,8 +630,8 @@ H5D__virtual_copy_layout(H5O_layout_t *layout)
else if (orig_list[i].parsed_source_file_name &&
(orig_list[i].source_dset.file_name !=
orig_list[i].parsed_source_file_name->name_segment)) {
- HDassert(ent->parsed_source_file_name);
- HDassert(ent->parsed_source_file_name->name_segment);
+ assert(ent->parsed_source_file_name);
+ assert(ent->parsed_source_file_name->name_segment);
ent->source_dset.file_name = ent->parsed_source_file_name->name_segment;
} /* end if */
else if (NULL ==
@@ -644,8 +644,8 @@ H5D__virtual_copy_layout(H5O_layout_t *layout)
else if (orig_list[i].parsed_source_dset_name &&
(orig_list[i].source_dset.dset_name !=
orig_list[i].parsed_source_dset_name->name_segment)) {
- HDassert(ent->parsed_source_dset_name);
- HDassert(ent->parsed_source_dset_name->name_segment);
+ assert(ent->parsed_source_dset_name);
+ assert(ent->parsed_source_dset_name->name_segment);
ent->source_dset.dset_name = ent->parsed_source_dset_name->name_segment;
} /* end if */
else if (NULL ==
@@ -721,8 +721,8 @@ H5D__virtual_reset_layout(H5O_layout_t *layout)
FUNC_ENTER_PACKAGE
- HDassert(layout);
- HDassert(layout->type == H5D_VIRTUAL);
+ assert(layout);
+ assert(layout->type == H5D_VIRTUAL);
/* Free the list entries. Note we always attempt to free everything even in
* the case of a failure. Because of this, and because we free the list
@@ -759,7 +759,7 @@ H5D__virtual_reset_layout(H5O_layout_t *layout)
virt->list = H5MM_xfree(virt->list);
virt->list_nalloc = (size_t)0;
virt->list_nused = (size_t)0;
- (void)HDmemset(virt->min_dims, 0, sizeof(virt->min_dims));
+ (void)memset(virt->min_dims, 0, sizeof(virt->min_dims));
/* Close access property lists */
if (virt->source_fapl >= 0) {
@@ -846,9 +846,9 @@ H5D__virtual_delete(H5F_t *f, H5O_storage_t *storage)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(storage);
- HDassert(storage->type == H5D_VIRTUAL);
+ assert(f);
+ assert(storage);
+ assert(storage->type == H5D_VIRTUAL);
/* Check for global heap block */
if (storage->u.virt.serial_list_hobjid.addr != HADDR_UNDEF) {
@@ -894,11 +894,11 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *vir
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(vdset);
- HDassert(source_dset);
- HDassert(!source_dset->dset);
- HDassert(source_dset->file_name);
- HDassert(source_dset->dset_name);
+ assert(vdset);
+ assert(source_dset);
+ assert(!source_dset->dset);
+ assert(source_dset->file_name);
+ assert(source_dset->dset_name);
/* Check if we need to open the source file */
if (HDstrcmp(source_dset->file_name, ".") != 0) {
@@ -986,7 +986,7 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(source_dset);
+ assert(source_dset);
/* Free dataset */
if (source_dset->dset) {
@@ -1000,20 +1000,20 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent,
(source_dset->file_name != virtual_ent->parsed_source_file_name->name_segment))
source_dset->file_name = (char *)H5MM_xfree(source_dset->file_name);
else
- HDassert((source_dset->file_name == virtual_ent->source_file_name) ||
- (virtual_ent->parsed_source_file_name &&
- (source_dset->file_name == virtual_ent->parsed_source_file_name->name_segment)) ||
- !source_dset->file_name);
+ assert((source_dset->file_name == virtual_ent->source_file_name) ||
+ (virtual_ent->parsed_source_file_name &&
+ (source_dset->file_name == virtual_ent->parsed_source_file_name->name_segment)) ||
+ !source_dset->file_name);
/* Free dataset name */
if (virtual_ent->parsed_source_dset_name &&
(source_dset->dset_name != virtual_ent->parsed_source_dset_name->name_segment))
source_dset->dset_name = (char *)H5MM_xfree(source_dset->dset_name);
else
- HDassert((source_dset->dset_name == virtual_ent->source_dset_name) ||
- (virtual_ent->parsed_source_dset_name &&
- (source_dset->dset_name == virtual_ent->parsed_source_dset_name->name_segment)) ||
- !source_dset->dset_name);
+ assert((source_dset->dset_name == virtual_ent->source_dset_name) ||
+ (virtual_ent->parsed_source_dset_name &&
+ (source_dset->dset_name == virtual_ent->parsed_source_dset_name->name_segment)) ||
+ !source_dset->dset_name);
/* Free clipped virtual selection */
if (source_dset->clipped_virtual_select) {
@@ -1040,7 +1040,7 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent,
/* The projected memory space should never exist when this function is
* called */
- HDassert(!source_dset->projected_mem_space);
+ assert(!source_dset->projected_mem_space);
/* Note the lack of a done: label. This is because there are no HGOTO_ERROR
* calls. If one is added, a done: label must also be added */
@@ -1068,17 +1068,17 @@ H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, s
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(src);
- HDassert(src_len > 0);
- HDassert(p);
- HDassert(buf);
- HDassert(*p >= *buf);
- HDassert(buf_size);
+ assert(src);
+ assert(src_len > 0);
+ assert(p);
+ assert(buf);
+ assert(*p >= *buf);
+ assert(buf_size);
/* Allocate or extend buffer if necessary */
if (!*buf) {
- HDassert(!*p);
- HDassert(*buf_size == 0);
+ assert(!*p);
+ assert(*buf_size == 0);
/* Allocate buffer */
if (NULL == (*buf = (char *)H5MM_malloc(src_len + (size_t)1)))
@@ -1150,10 +1150,10 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(source_name);
- HDassert(parsed_name);
- HDassert(static_strlen);
- HDassert(nsubs);
+ assert(source_name);
+ assert(parsed_name);
+ assert(static_strlen);
+ assert(nsubs);
/* Initialize p and tmp_static_strlen */
p = source_name;
@@ -1163,7 +1163,7 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_
/* Note this will not work with UTF-8! We should support this eventually
* -NAF 5/18/2015 */
while ((pct = HDstrchr(p, '%'))) {
- HDassert(pct >= p);
+ assert(pct >= p);
/* Allocate name segment struct if necessary */
if (!*tmp_parsed_name_p)
@@ -1204,11 +1204,11 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_
/* Copy last segment of name, if any, unless the parsed name was not
* allocated */
if (tmp_parsed_name) {
- HDassert(p >= source_name);
+ assert(p >= source_name);
if (*p == '\0')
- HDassert((size_t)(p - source_name) == tmp_strlen);
+ assert((size_t)(p - source_name) == tmp_strlen);
else {
- HDassert((size_t)(p - source_name) < tmp_strlen);
+ assert((size_t)(p - source_name) < tmp_strlen);
/* Allocate name segment struct if necessary */
if (!*tmp_parsed_name_p)
@@ -1230,7 +1230,7 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_
done:
if (tmp_parsed_name) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
H5D_virtual_free_parsed_name(tmp_parsed_name);
} /* end if */
@@ -1260,7 +1260,7 @@ H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, H5O_storage_
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dst);
+ assert(dst);
/* Walk over parsed name, duplicating it */
while (p_src) {
@@ -1285,7 +1285,7 @@ H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, H5O_storage_
done:
if (tmp_dst) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
H5D_virtual_free_parsed_name(tmp_dst);
} /* end if */
@@ -1345,8 +1345,8 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(source_name);
- HDassert(built_name);
+ assert(source_name);
+ assert(built_name);
/* Check for static name */
if (nsubs == 0) {
@@ -1365,7 +1365,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
size_t seg_len;
size_t nsubs_rem = nsubs;
- HDassert(parsed_name);
+ assert(parsed_name);
/* Calculate length of printed block number */
do {
@@ -1388,8 +1388,8 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
/* Add name segment */
if (name_seg->name_segment) {
seg_len = HDstrlen(name_seg->name_segment);
- HDassert(seg_len > 0);
- HDassert(seg_len < name_len_rem);
+ assert(seg_len > 0);
+ assert(seg_len < name_len_rem);
HDstrncpy(p, name_seg->name_segment, name_len_rem);
name_len_rem -= seg_len;
p += seg_len;
@@ -1397,7 +1397,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
/* Add block number */
if (nsubs_rem > 0) {
- HDassert(blockno_len < name_len_rem);
+ assert(blockno_len < name_len_rem);
if (HDsnprintf(p, name_len_rem, "%llu", (long long unsigned)blockno) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write block number to string")
name_len_rem -= blockno_len;
@@ -1416,7 +1416,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
done:
if (tmp_name) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
H5MM_free(tmp_name);
} /* end if */
@@ -1453,10 +1453,10 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
- HDassert(dset->shared->layout.storage.type == H5D_VIRTUAL);
+ assert(dset);
+ assert(dset->shared->layout.storage.type == H5D_VIRTUAL);
storage = &dset->shared->layout.storage.u.virt;
- HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
+ assert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
/* Get rank of VDS */
if ((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0)
@@ -1518,8 +1518,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
/* Close previous clipped virtual selection, if
* any */
if (storage->list[i].source_dset.clipped_virtual_select) {
- HDassert(storage->list[i].source_dset.clipped_virtual_select !=
- storage->list[i].source_dset.virtual_select);
+ assert(storage->list[i].source_dset.clipped_virtual_select !=
+ storage->list[i].source_dset.virtual_select);
if (H5S_close(storage->list[i].source_dset.clipped_virtual_select) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
"unable to release clipped virtual dataspace")
@@ -1541,8 +1541,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
/* Close previous clipped source selection, if any
*/
if (storage->list[i].source_dset.clipped_source_select) {
- HDassert(storage->list[i].source_dset.clipped_source_select !=
- storage->list[i].source_select);
+ assert(storage->list[i].source_dset.clipped_source_select !=
+ storage->list[i].source_select);
if (H5S_close(storage->list[i].source_dset.clipped_source_select) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
"unable to release clipped source dataspace")
@@ -1576,7 +1576,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
0; /* First missing dataset in the current block of missing datasets */
/* Search for source datasets */
- HDassert(storage->printf_gap != HSIZE_UNDEF);
+ assert(storage->printf_gap != HSIZE_UNDEF);
for (j = 0; j <= (storage->printf_gap + first_missing); j++) {
/* Check for running out of space in sub_dset array */
if (j >= (hsize_t)storage->list[i].sub_dset_nalloc) {
@@ -1602,9 +1602,9 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
storage->list[i].sub_dset = tmp_sub_dset;
/* Clear new space in sub_dset */
- (void)HDmemset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0,
- storage->list[i].sub_dset_nalloc *
- sizeof(H5O_storage_virtual_srcdset_t));
+ (void)memset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0,
+ storage->list[i].sub_dset_nalloc *
+ sizeof(H5O_storage_virtual_srcdset_t));
/* Update sub_dset_nalloc */
storage->list[i].sub_dset_nalloc *= 2;
@@ -1766,8 +1766,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
/* Non-printf mapping */
/* Close previous clipped virtual selection, if any */
if (storage->list[i].source_dset.clipped_virtual_select) {
- HDassert(storage->list[i].source_dset.clipped_virtual_select !=
- storage->list[i].source_dset.virtual_select);
+ assert(storage->list[i].source_dset.clipped_virtual_select !=
+ storage->list[i].source_dset.virtual_select);
if (H5S_close(storage->list[i].source_dset.clipped_virtual_select) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
"unable to release clipped virtual dataspace")
@@ -1793,8 +1793,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
if (clip_size != storage->list[i].clip_size_source) {
/* Close previous clipped source selection, if any */
if (storage->list[i].source_dset.clipped_source_select) {
- HDassert(storage->list[i].source_dset.clipped_source_select !=
- storage->list[i].source_select);
+ assert(storage->list[i].source_dset.clipped_source_select !=
+ storage->list[i].source_select);
if (H5S_close(storage->list[i].source_dset.clipped_source_select) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
"unable to release clipped source dataspace")
@@ -1896,7 +1896,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
} /* end if */
else
- HDassert(!storage->list[i].sub_dset[j].clipped_virtual_select);
+ assert(!storage->list[i].sub_dset[j].clipped_virtual_select);
} /* end for */
} /* end if */
@@ -1935,10 +1935,10 @@ H5D__virtual_init_all(const H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
- HDassert(dset->shared->layout.storage.type == H5D_VIRTUAL);
+ assert(dset);
+ assert(dset->shared->layout.storage.type == H5D_VIRTUAL);
storage = &dset->shared->layout.storage.u.virt;
- HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
+ assert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
/* Get current VDS dimensions */
if (H5S_get_simple_extent_dims(dset->shared->space, virtual_dims, NULL) < 0)
@@ -1977,8 +1977,8 @@ H5D__virtual_init_all(const H5D_t *dset)
/* Close previous clipped virtual selection, if any */
if (storage->list[i].source_dset.clipped_virtual_select) {
- HDassert(storage->list[i].source_dset.clipped_virtual_select !=
- storage->list[i].source_dset.virtual_select);
+ assert(storage->list[i].source_dset.clipped_virtual_select !=
+ storage->list[i].source_dset.virtual_select);
if (H5S_close(storage->list[i].source_dset.clipped_virtual_select) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
"unable to release clipped virtual dataspace")
@@ -1991,8 +1991,8 @@ H5D__virtual_init_all(const H5D_t *dset)
/* Close previous clipped source selection, if any */
if (storage->list[i].source_dset.clipped_source_select) {
- HDassert(storage->list[i].source_dset.clipped_source_select !=
- storage->list[i].source_select);
+ assert(storage->list[i].source_dset.clipped_source_select !=
+ storage->list[i].source_select);
if (H5S_close(storage->list[i].source_dset.clipped_source_select) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL,
"unable to release clipped source dataspace")
@@ -2036,8 +2036,8 @@ H5D__virtual_init_all(const H5D_t *dset)
} /* end else */
} /* end if */
else {
- HDassert(!storage->list[i].source_dset.clipped_virtual_select);
- HDassert(!storage->list[i].source_dset.clipped_source_select);
+ assert(!storage->list[i].source_dset.clipped_virtual_select);
+ assert(!storage->list[i].source_dset.clipped_source_select);
} /* end else */
} /* end if */
else {
@@ -2073,9 +2073,9 @@ H5D__virtual_init_all(const H5D_t *dset)
storage->list[i].sub_dset = tmp_sub_dset;
/* Clear new space in sub_dset */
- (void)HDmemset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0,
- (sub_dset_max - storage->list[i].sub_dset_nalloc) *
- sizeof(H5O_storage_virtual_srcdset_t));
+ (void)memset(&storage->list[i].sub_dset[storage->list[i].sub_dset_nalloc], 0,
+ (sub_dset_max - storage->list[i].sub_dset_nalloc) *
+ sizeof(H5O_storage_virtual_srcdset_t));
/* Update sub_dset_nalloc */
storage->list[i].sub_dset_nalloc = sub_dset_max;
@@ -2153,8 +2153,8 @@ H5D__virtual_init_all(const H5D_t *dset)
else {
/* Limited mapping, just make sure the clipped selections were
* already set. Again, no need to open the source file. */
- HDassert(storage->list[i].source_dset.clipped_virtual_select);
- HDassert(storage->list[i].source_dset.clipped_source_select);
+ assert(storage->list[i].source_dset.clipped_virtual_select);
+ assert(storage->list[i].source_dset.clipped_source_select);
} /* end else */
/* Mark layout as fully initialized */
@@ -2189,9 +2189,9 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
storage = &dset->shared->layout.storage.u.virt;
- HDassert(storage->list || (storage->list_nused == 0));
+ assert(storage->list || (storage->list_nused == 0));
/* Check that the dimensions of the VDS are large enough */
if (H5D_virtual_check_min_dims(dset) < 0)
@@ -2208,7 +2208,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
* source_space_status and virtual_space_status because others will be based
* on these and should therefore already have been normalized. */
for (i = 0; i < storage->list_nused; i++) {
- HDassert(storage->list[i].sub_dset_nalloc == 0);
+ assert(storage->list[i].sub_dset_nalloc == 0);
/* Patch extent */
if (H5S_extent_copy(storage->list[i].source_dset.virtual_select, dset->shared->space) < 0)
@@ -2270,7 +2270,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
if (H5P_get(source_fapl, H5F_ACS_CLOSE_DEGREE_NAME, &close_degree) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file close degree")
- HDassert(close_degree == H5F_CLOSE_WEAK);
+ assert(close_degree == H5F_CLOSE_WEAK);
} /* end else */
#endif /* NDEBUG */
@@ -2340,7 +2340,7 @@ H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(shared_dset);
+ assert(shared_dset);
storage = &shared_dset->layout.storage.u.virt;
/* Iterate over mappings */
@@ -2421,10 +2421,10 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(storage);
- HDassert(mem_space);
- HDassert(file_space);
- HDassert(tot_nelmts);
+ assert(storage);
+ assert(mem_space);
+ assert(file_space);
+ assert(tot_nelmts);
/* Initialize layout if necessary */
if (!storage->init)
@@ -2437,13 +2437,13 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
/* Iterate over mappings */
for (i = 0; i < storage->list_nused; i++) {
/* Sanity check that the virtual space has been patched by now */
- HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT);
+ assert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT);
/* Check for "printf" source dataset resolution */
if (storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) {
hbool_t partial_block;
- HDassert(storage->list[i].unlim_dim_virtual >= 0);
+ assert(storage->list[i].unlim_dim_virtual >= 0);
/* Get selection bounds if necessary */
if (!bounds_init) {
@@ -2484,12 +2484,12 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
if (!storage->list[i].sub_dset[j].clipped_virtual_select) {
hsize_t start[H5S_MAX_RANK];
/* This should only be NULL if this is a partial block */
- HDassert((j == (storage->list[i].sub_dset_io_end - 1)) && partial_block);
+ assert((j == (storage->list[i].sub_dset_io_end - 1)) && partial_block);
/* If the source space status is not correct, we must try to
* open the source dataset to patch it */
if (storage->list[i].source_space_status != H5O_VIRTUAL_STATUS_CORRECT) {
- HDassert(!storage->list[i].sub_dset[j].dset);
+ assert(!storage->list[i].sub_dset[j].dset);
if (H5D__virtual_open_source_dset(dset, &storage->list[i],
&storage->list[i].sub_dset[j]) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset")
@@ -2509,7 +2509,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
vbounds_end) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds")
- HDassert(bounds_init);
+ assert(bounds_init);
/* Convert bounds to extent (add 1) */
for (k = 0; k < (size_t)rank; k++)
@@ -2529,7 +2529,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
/* Clip virtual selection to real virtual extent */
- (void)HDmemset(start, 0, sizeof(start));
+ (void)memset(start, 0, sizeof(start));
if (H5S_select_hyperslab(storage->list[i].sub_dset[j].clipped_virtual_select,
H5S_SELECT_AND, start, NULL, tmp_dims, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to clip hyperslab")
@@ -2646,8 +2646,8 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag
* H5Dget_space(). Do not attempt to open it as this might
* affect the extent and we are not going to recalculate it
* here. */
- HDassert(storage->list[i].unlim_dim_virtual >= 0);
- HDassert(!storage->list[i].source_dset.dset);
+ assert(storage->list[i].unlim_dim_virtual >= 0);
+ assert(!storage->list[i].source_dset.dset);
} /* end else */
} /* end else */
} /* end for */
@@ -2677,7 +2677,7 @@ H5D__virtual_post_io(H5O_storage_virtual_t *storage)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(storage);
+ assert(storage);
/* Iterate over mappings */
for (i = 0; i < storage->list_nused; i++)
@@ -2726,14 +2726,14 @@ H5D__virtual_read_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdset
FUNC_ENTER_PACKAGE
- HDassert(source_dset);
+ assert(source_dset);
/* Only perform I/O if there is a projected memory space, otherwise there
* were no elements in the projection or the source dataset could not be
* opened */
if (source_dset->projected_mem_space) {
- HDassert(source_dset->dset);
- HDassert(source_dset->clipped_source_select);
+ assert(source_dset->dset);
+ assert(source_dset->clipped_source_select);
/* Project intersection of file space and mapping virtual space onto
* mapping source space */
@@ -2765,7 +2765,7 @@ H5D__virtual_read_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdset
done:
/* Release allocated resources */
if (projected_src_space) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (H5S_close(projected_src_space) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space")
} /* end if */
@@ -2798,14 +2798,14 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->buf.vp);
- HDassert(dset_info->mem_space);
- HDassert(dset_info->file_space);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->buf.vp);
+ assert(dset_info->mem_space);
+ assert(dset_info->file_space);
storage = &(dset_info->dset->shared->layout.storage.u.virt);
- HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
+ assert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
/* Initialize nelmts */
nelmts = H5S_GET_SELECT_NPOINTS(dset_info->file_space);
@@ -2823,7 +2823,7 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info
/* Iterate over mappings */
for (i = 0; i < storage->list_nused; i++) {
/* Sanity check that the virtual space has been patched by now */
- HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT);
+ assert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT);
/* Check for "printf" source dataset resolution */
if (storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) {
@@ -2887,7 +2887,7 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info
/* Verify number of elements is correct. Note that since we
* don't check for overlap we can't assert that these are equal
*/
- HDassert((tot_nelmts + (hsize_t)select_nelmts) >= nelmts);
+ assert((tot_nelmts + (hsize_t)select_nelmts) >= nelmts);
} /* end block */
#endif /* NDEBUG */
} /* end if */
@@ -2927,13 +2927,13 @@ H5D__virtual_write_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdse
FUNC_ENTER_PACKAGE
- HDassert(source_dset);
+ assert(source_dset);
/* Only perform I/O if there is a projected memory space, otherwise there
* were no elements in the projection */
if (source_dset->projected_mem_space) {
- HDassert(source_dset->dset);
- HDassert(source_dset->clipped_source_select);
+ assert(source_dset->dset);
+ assert(source_dset->clipped_source_select);
/* In the future we may wish to extent this implementation to extend
* source datasets if a write to a virtual dataset goes past the current
@@ -2968,7 +2968,7 @@ H5D__virtual_write_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdse
done:
/* Release allocated resources */
if (projected_src_space) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (H5S_close(projected_src_space) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space")
} /* end if */
@@ -3000,14 +3000,14 @@ H5D__virtual_write(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_inf
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(io_info);
- HDassert(dset_info);
- HDassert(dset_info->buf.cvp);
- HDassert(dset_info->mem_space);
- HDassert(dset_info->file_space);
+ assert(io_info);
+ assert(dset_info);
+ assert(dset_info->buf.cvp);
+ assert(dset_info->mem_space);
+ assert(dset_info->file_space);
storage = &(dset_info->dset->shared->layout.storage.u.virt);
- HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
+ assert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE));
/* Initialize nelmts */
nelmts = H5S_GET_SELECT_NPOINTS(dset_info->file_space);
@@ -3031,7 +3031,7 @@ H5D__virtual_write(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_inf
/* Iterate over mappings */
for (i = 0; i < storage->list_nused; i++) {
/* Sanity check that virtual space has been patched by now */
- HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT);
+ assert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT);
/* Check for "printf" source dataset resolution */
if (storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) {
@@ -3076,7 +3076,7 @@ H5D__virtual_flush(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
storage = &dset->shared->layout.storage.u.virt;
@@ -3123,8 +3123,8 @@ H5D__virtual_hold_source_dset_files(const H5D_t *dset, H5D_virtual_held_file_t *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
- HDassert(head && NULL == *head);
+ assert(dset);
+ assert(head && NULL == *head);
/* Set the convenience pointer */
storage = &dset->shared->layout.storage.u.virt;
@@ -3196,7 +3196,7 @@ H5D__virtual_refresh_source_dset(H5D_t **dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset && *dset);
+ assert(dset && *dset);
/* Get a temporary identifier for this source dataset */
if ((temp_id = H5VL_wrap_register(H5I_DATASET, *dset, FALSE)) < 0)
@@ -3242,7 +3242,7 @@ H5D__virtual_refresh_source_dsets(H5D_t *dset)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dset);
+ assert(dset);
/* Set convenience pointer */
storage = &dset->shared->layout.storage.u.virt;
diff --git a/src/H5E.c b/src/H5E.c
index 4de5c5b..1c82e5d 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -169,7 +169,7 @@ H5E_init(void)
#endif /* H5_HAVE_THREADSAFE */
/* Allocate the HDF5 error class */
- HDassert(H5E_ERR_CLS_g == (-1));
+ assert(H5E_ERR_CLS_g == (-1));
HDsnprintf(lib_vers, sizeof(lib_vers), "%u.%u.%u%s", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE,
(HDstrlen(H5_VERS_SUBRELEASE) > 0 ? "-" H5_VERS_SUBRELEASE : ""));
if (NULL == (cls = H5E__register_class(H5E_CLS_NAME, H5E_CLS_LIB_NAME, lib_vers)))
@@ -333,12 +333,12 @@ H5E__get_stack(void)
/* Win32 has to use LocalAlloc to match the LocalFree in DllMain */
estack = (H5E_t *)LocalAlloc(LPTR, sizeof(H5E_t));
#else
- /* Use HDmalloc here since this has to match the HDfree in the
+ /* Use malloc here since this has to match the free in the
* destructor and we want to avoid the codestack there.
*/
- estack = (H5E_t *)HDmalloc(sizeof(H5E_t));
+ estack = (H5E_t *)malloc(sizeof(H5E_t));
#endif /* H5_HAVE_WIN_THREADS */
- HDassert(estack);
+ assert(estack);
/* Set the thread-specific info */
estack->nused = 0;
@@ -374,7 +374,7 @@ H5E__free_class(H5E_cls_t *cls)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(cls);
+ assert(cls);
/* Free error class structure */
cls->cls_name = (char *)H5MM_xfree((void *)cls->cls_name);
@@ -445,9 +445,9 @@ H5E__register_class(const char *cls_name, const char *lib_name, const char *vers
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(cls_name);
- HDassert(lib_name);
- HDassert(version);
+ assert(cls_name);
+ assert(lib_name);
+ assert(version);
/* Allocate space for new error class */
if (NULL == (cls = H5FL_CALLOC(H5E_cls_t)))
@@ -527,7 +527,7 @@ H5E__unregister_class(H5E_cls_t *cls, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(cls);
+ assert(cls);
/* Iterate over all the messages and delete those in this error class */
if (H5I_iterate(H5I_ERROR_MSG, H5E__close_msg_cb, cls, FALSE) < 0)
@@ -596,7 +596,7 @@ H5E__get_class_name(const H5E_cls_t *cls, char *name, size_t size)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(cls);
+ assert(cls);
/* Get the class's name */
len = (ssize_t)HDstrlen(cls->cls_name);
@@ -636,7 +636,7 @@ H5E__close_msg_cb(void *obj_ptr, hid_t obj_id, void *udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(err_msg);
+ assert(err_msg);
/* Close the message if it is in the class being closed */
if (err_msg->cls == cls) {
@@ -700,7 +700,7 @@ H5E__close_msg(H5E_msg_t *err, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(err);
+ assert(err);
/* Release message */
err->msg = (char *)H5MM_xfree((void *)err->msg);
@@ -777,9 +777,9 @@ H5E__create_msg(H5E_cls_t *cls, H5E_type_t msg_type, const char *msg_str)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(cls);
- HDassert(msg_type == H5E_MAJOR || msg_type == H5E_MINOR);
- HDassert(msg_str);
+ assert(cls);
+ assert(msg_type == H5E_MAJOR || msg_type == H5E_MINOR);
+ assert(msg_str);
/* Allocate new message object */
if (NULL == (msg = H5FL_MALLOC(H5E_msg_t)))
@@ -1052,7 +1052,7 @@ H5E__set_current_stack(H5E_t *estack)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(estack);
+ assert(estack);
/* Get a pointer to the current error stack */
if (NULL == (current_stack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean'
@@ -1150,7 +1150,7 @@ H5E__close_stack(H5E_t *estack, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(estack);
+ assert(estack);
/* Release the stack's error information */
H5E_clear_stack(estack);
@@ -1225,7 +1225,7 @@ H5E__get_num(const H5E_t *estack)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(estack);
+ assert(estack);
FUNC_LEAVE_NOAPI((ssize_t)estack->nused)
} /* end H5E__get_num() */
@@ -1332,7 +1332,7 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid
*/
/* Format the description */
- HDva_start(ap, fmt);
+ va_start(ap, fmt);
va_started = TRUE;
/* Use the vasprintf() routine, since it does what we're trying to do below */
@@ -1345,12 +1345,12 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid
done:
if (va_started)
- HDva_end(ap);
+ va_end(ap);
/* Memory was allocated with HDvasprintf so it needs to be freed
- * with HDfree
+ * with free
*/
if (tmp)
- HDfree(tmp);
+ free(tmp);
FUNC_LEAVE_API(ret_value)
} /* end H5Epush2() */
@@ -1757,8 +1757,8 @@ H5E__append_stack(H5E_t *dst_stack, const H5E_t *src_stack)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dst_stack);
- HDassert(src_stack);
+ assert(dst_stack);
+ assert(src_stack);
/* Copy the errors from the source stack to the destination stack */
for (u = 0; u < src_stack->nused; u++) {
diff --git a/src/H5EA.c b/src/H5EA.c
index 94b4336..0220413 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -122,8 +122,8 @@ H5EA__new(H5F_t *f, haddr_t ea_addr, hbool_t from_open, void *ctx_udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(ea_addr));
+ assert(f);
+ assert(H5F_addr_defined(ea_addr));
/* Allocate extensible array wrapper */
if (NULL == (ea = H5FL_CALLOC(H5EA_t)))
@@ -187,8 +187,8 @@ H5EA_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata)
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
/* H5EA interface sanity check */
HDcompile_assert(H5EA_NUM_CLS_ID == NELMTS(H5EA_client_class_g));
@@ -235,8 +235,8 @@ H5EA_open(H5F_t *f, haddr_t ea_addr, void *ctx_udata)
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(ea_addr));
+ assert(f);
+ assert(H5F_addr_defined(ea_addr));
/* Allocate and initialize new extensible array wrapper */
if (NULL == (ea = H5EA__new(f, ea_addr, TRUE, ctx_udata)))
@@ -272,8 +272,8 @@ H5EA_get_nelmts(const H5EA_t *ea, hsize_t *nelmts)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(ea);
- HDassert(nelmts);
+ assert(ea);
+ assert(nelmts);
/* Retrieve the max. index set */
*nelmts = ea->hdr->stats.stored.max_idx_set;
@@ -299,9 +299,9 @@ H5EA_get_addr(const H5EA_t *ea, haddr_t *addr)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(ea);
- HDassert(ea->hdr);
- HDassert(addr);
+ assert(ea);
+ assert(ea->hdr);
+ assert(addr);
/* Retrieve the address of the extensible array's header */
*addr = ea->hdr->addr;
@@ -341,14 +341,14 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(ea);
- HDassert(hdr);
- HDassert(thing);
- HDassert(thing_elmt_buf);
- HDassert(thing_unprot_func);
+ assert(ea);
+ assert(hdr);
+ assert(thing);
+ assert(thing_elmt_buf);
+ assert(thing_unprot_func);
/* only the H5AC__READ_ONLY_FLAG may be set in thing_acc */
- HDassert((thing_acc & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((thing_acc & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set the shared array header's file context for this operation */
hdr->f = ea->f;
@@ -403,7 +403,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
/* Compute the data block index in index block */
dblk_idx = (size_t)(hdr->sblk_info[sblk_idx].start_dblk +
(elmt_idx / hdr->sblk_info[sblk_idx].dblk_nelmts));
- HDassert(dblk_idx < iblock->ndblk_addrs);
+ assert(dblk_idx < iblock->ndblk_addrs);
/* Check if the data block has been allocated on disk yet */
if (!H5F_addr_defined(iblock->dblk_addrs[dblk_idx])) {
@@ -490,7 +490,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
/* Compute the data block index in super block */
dblk_idx = (size_t)(elmt_idx / sblock->dblk_nelmts);
- HDassert(dblk_idx < sblock->ndblks);
+ assert(dblk_idx < sblock->ndblks);
/* Check if the data block has been allocated on disk yet */
if (!H5F_addr_defined(sblock->dblk_addrs[dblk_idx])) {
@@ -616,8 +616,8 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t
} /* end else */
/* Sanity checks */
- HDassert(*thing != NULL);
- HDassert(*thing_unprot_func != NULL);
+ assert(*thing != NULL);
+ assert(*thing_unprot_func != NULL);
done:
/* Reset 'thing' info on error */
@@ -679,8 +679,8 @@ H5EA_set(const H5EA_t *ea, hsize_t idx, const void *elmt)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(ea);
- HDassert(hdr);
+ assert(ea);
+ assert(hdr);
/* Set the shared array header's file context for this operation */
hdr->f = ea->f;
@@ -692,9 +692,9 @@ H5EA_set(const H5EA_t *ea, hsize_t idx, const void *elmt)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect array metadata")
/* Sanity check */
- HDassert(thing);
- HDassert(thing_elmt_buf);
- HDassert(thing_unprot_func);
+ assert(thing);
+ assert(thing_elmt_buf);
+ assert(thing_unprot_func);
/* Set element in thing's element buffer */
H5MM_memcpy(thing_elmt_buf + (hdr->cparam.cls->nat_elmt_size * thing_elmt_idx), elmt,
@@ -742,8 +742,8 @@ H5EA_get(const H5EA_t *ea, hsize_t idx, void *elmt)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(ea);
- HDassert(hdr);
+ assert(ea);
+ assert(hdr);
/* Check for element beyond max. element in array */
if (idx >= hdr->stats.stored.max_idx_set) {
@@ -805,9 +805,9 @@ H5EA_depend(H5EA_t *ea, H5AC_proxy_entry_t *parent)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(ea);
- HDassert(hdr);
- HDassert(parent);
+ assert(ea);
+ assert(hdr);
+ assert(parent);
/*
* Check to see if a flush dependency between the extensible array
@@ -816,7 +816,7 @@ H5EA_depend(H5EA_t *ea, H5AC_proxy_entry_t *parent)
*/
if (NULL == hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Set the shared array header's file context for this operation */
hdr->f = ea->f;
@@ -853,7 +853,7 @@ H5EA_close(H5EA_t *ea)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(ea);
+ assert(ea);
/* Close the header, if it was set */
if (ea->hdr) {
@@ -889,9 +889,9 @@ H5EA_close(H5EA_t *ea)
"unable to check metadata cache status for extensible array header")
/* Sanity checks on header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PINNED);
- HDassert(!(hdr_status & H5AC_ES__IS_PROTECTED));
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PINNED);
+ assert(!(hdr_status & H5AC_ES__IS_PROTECTED));
}
#endif /* NDEBUG */
@@ -954,8 +954,8 @@ H5EA_delete(H5F_t *f, haddr_t ea_addr, void *ctx_udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(ea_addr));
+ assert(f);
+ assert(H5F_addr_defined(ea_addr));
/* Lock the array header into memory */
if (NULL == (hdr = H5EA__hdr_protect(f, ea_addr, ctx_udata, H5AC__NO_FLAGS_SET)))
@@ -1005,9 +1005,9 @@ H5EA_iterate(H5EA_t *ea, H5EA_operator_t op, void *udata)
FUNC_ENTER_NOAPI(H5_ITER_ERROR)
/* Check arguments */
- HDassert(ea);
- HDassert(op);
- HDassert(udata);
+ assert(ea);
+ assert(op);
+ assert(udata);
/* Allocate space for a native array element */
if (NULL == (elmt = H5FL_BLK_MALLOC(ea_native_elmt, ea->hdr->cparam.cls->nat_elmt_size)))
@@ -1052,8 +1052,8 @@ H5EA_patch_file(H5EA_t *ea, H5F_t *f)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(ea);
- HDassert(f);
+ assert(ea);
+ assert(f);
if (ea->f != f || ea->hdr->f != f)
ea->f = ea->hdr->f = f;
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index 968a933..40e5faa 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -228,9 +228,9 @@ H5EA__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->f);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5EA_HEADER_SIZE_FILE(udata->f);
@@ -262,7 +262,7 @@ H5EA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -299,10 +299,10 @@ H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
- HDassert(H5F_addr_defined(udata->addr));
+ assert(image);
+ assert(udata);
+ assert(udata->f);
+ assert(H5F_addr_defined(udata->addr));
/* Allocate space for the extensible array data structure */
if (NULL == (hdr = H5EA__hdr_alloc(udata->f)))
@@ -313,7 +313,7 @@ H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
hdr->addr = udata->addr;
/* Magic number */
- if (HDmemcmp(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array header signature")
image += H5_SIZEOF_MAGIC;
@@ -373,7 +373,7 @@ H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
/* checksum verification already done in verify_chksum cb */
@@ -381,12 +381,12 @@ H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == len);
+ assert((size_t)(image - (const uint8_t *)_image) == len);
/* Finish initializing extensible array header */
if (H5EA__hdr_init(hdr, udata->ctx_udata) < 0)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, NULL, "initialization failed for extensible array header")
- HDassert(hdr->size == len);
+ assert(hdr->size == len);
/* Set return value */
ret_value = hdr;
@@ -420,8 +420,8 @@ H5EA__cache_hdr_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(hdr);
- HDassert(image_len);
+ assert(hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = hdr->size;
@@ -451,9 +451,9 @@ H5EA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(hdr);
+ assert(f);
+ assert(image);
+ assert(hdr);
/* Magic number */
H5MM_memcpy(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -463,7 +463,7 @@ H5EA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5EA_HDR_VERSION;
/* Extensible array type */
- HDassert(hdr->cparam.cls->id <= 255);
+ assert(hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)hdr->cparam.cls->id;
/* General array creation/configuration information */
@@ -495,7 +495,7 @@ H5EA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5EA__cache_hdr_serialize() */
@@ -521,7 +521,7 @@ H5EA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Check if the file was opened with SWMR-write access */
if (hdr->swmr_write) {
@@ -545,7 +545,7 @@ H5EA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
*/
if (hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Destroy flush dependency on object header proxy */
if (H5AC_proxy_entry_remove_child((H5AC_proxy_entry_t *)hdr->parent,
@@ -569,12 +569,12 @@ H5EA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
} /* end if */
else
- HDassert(NULL == hdr->parent);
+ assert(NULL == hdr->parent);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -601,7 +601,7 @@ H5EA__cache_hdr_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the extensible array header */
if (H5EA__hdr_dest((H5EA_hdr_t *)thing) < 0)
@@ -632,11 +632,11 @@ H5EA__cache_iblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(hdr);
- HDassert(image_len);
+ assert(hdr);
+ assert(image_len);
/* Set up fake index block for computing size on disk */
- HDmemset(&iblock, 0, sizeof(iblock));
+ memset(&iblock, 0, sizeof(iblock));
iblock.hdr = (H5EA_hdr_t *)hdr;
iblock.nsblks = H5EA_SBLK_FIRST_IDX(hdr->cparam.sup_blk_min_data_ptrs);
iblock.ndblk_addrs = 2 * ((size_t)hdr->cparam.sup_blk_min_data_ptrs - 1);
@@ -672,7 +672,7 @@ H5EA__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -710,8 +710,8 @@ H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbo
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(hdr);
+ assert(image);
+ assert(hdr);
/* Allocate the extensible array index block */
if (NULL == (iblock = H5EA__iblock_alloc(hdr)))
@@ -722,7 +722,7 @@ H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbo
iblock->addr = hdr->idx_blk_addr;
/* Magic number */
- if (HDmemcmp(image, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array index block signature")
image += H5_SIZEOF_MAGIC;
@@ -766,7 +766,7 @@ H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbo
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
/* Save the index block's size */
iblock->size = len;
@@ -777,7 +777,7 @@ H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbo
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == iblock->size);
+ assert((size_t)(image - (const uint8_t *)_image) == iblock->size);
/* Set return value */
ret_value = iblock;
@@ -811,8 +811,8 @@ H5EA__cache_iblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(iblock);
- HDassert(image_len);
+ assert(iblock);
+ assert(image_len);
/* Set the image length size */
*image_len = iblock->size;
@@ -843,10 +843,10 @@ H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(iblock);
- HDassert(iblock->hdr);
+ assert(f);
+ assert(image);
+ assert(iblock);
+ assert(iblock->hdr);
/* Get temporary pointer to serialized info */
@@ -858,7 +858,7 @@ H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5EA_IBLOCK_VERSION;
/* Extensible array type */
- HDassert(iblock->hdr->cparam.cls->id <= 255);
+ assert(iblock->hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)iblock->hdr->cparam.cls->id;
/* Address of array header for array which owns this block */
@@ -900,7 +900,7 @@ H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -927,7 +927,7 @@ H5EA__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
+ assert(iblock);
/* Determine which action to take */
switch (action) {
@@ -973,7 +973,7 @@ H5EA__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
@@ -1002,7 +1002,7 @@ H5EA__cache_iblock_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the extensible array index block */
if (H5EA__iblock_dest((H5EA_iblock_t *)thing) < 0)
@@ -1033,15 +1033,15 @@ H5EA__cache_sblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->sblk_idx > 0);
- HDassert(H5F_addr_defined(udata->sblk_addr));
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->sblk_idx > 0);
+ assert(H5F_addr_defined(udata->sblk_addr));
+ assert(image_len);
/* Set up fake super block for computing size on disk */
/* (Note: extracted from H5EA__sblock_alloc) */
- HDmemset(&sblock, 0, sizeof(sblock));
+ memset(&sblock, 0, sizeof(sblock));
sblock.hdr = udata->hdr;
sblock.ndblks = udata->hdr->sblk_info[udata->sblk_idx].ndblks;
sblock.dblk_nelmts = udata->hdr->sblk_info[udata->sblk_idx].dblk_nelmts;
@@ -1052,14 +1052,14 @@ H5EA__cache_sblock_get_initial_load_size(void *_udata, size_t *image_len)
sblock.dblk_npages = sblock.dblk_nelmts / udata->hdr->dblk_page_nelmts;
/* Sanity check that we have at least 2 pages in data block */
- HDassert(sblock.dblk_npages > 1);
+ assert(sblock.dblk_npages > 1);
/* Sanity check for integer truncation */
- HDassert((sblock.dblk_npages * udata->hdr->dblk_page_nelmts) == sblock.dblk_nelmts);
+ assert((sblock.dblk_npages * udata->hdr->dblk_page_nelmts) == sblock.dblk_nelmts);
/* Compute size of buffer for each data block's 'page init' bitmask */
sblock.dblk_page_init_size = ((sblock.dblk_npages) + 7) / 8;
- HDassert(sblock.dblk_page_init_size > 0);
+ assert(sblock.dblk_page_init_size > 0);
} /* end if */
/* Set the image length size */
@@ -1092,7 +1092,7 @@ H5EA__cache_sblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -1130,11 +1130,11 @@ H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, hbo
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->parent);
- HDassert(udata->sblk_idx > 0);
- HDassert(H5F_addr_defined(udata->sblk_addr));
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->parent);
+ assert(udata->sblk_idx > 0);
+ assert(H5F_addr_defined(udata->sblk_addr));
/* Allocate the extensible array super block */
if (NULL == (sblock = H5EA__sblock_alloc(udata->hdr, udata->parent, udata->sblk_idx)))
@@ -1145,7 +1145,7 @@ H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, hbo
sblock->addr = udata->sblk_addr;
/* Magic number */
- if (HDmemcmp(image, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array super block signature")
image += H5_SIZEOF_MAGIC;
@@ -1183,7 +1183,7 @@ H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, hbo
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
/* Save the super block's size */
sblock->size = len;
@@ -1194,7 +1194,7 @@ H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, hbo
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == sblock->size);
+ assert((size_t)(image - (const uint8_t *)_image) == sblock->size);
/* Set return value */
ret_value = sblock;
@@ -1228,8 +1228,8 @@ H5EA__cache_sblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(sblock);
- HDassert(image_len);
+ assert(sblock);
+ assert(image_len);
/* Set the image length size */
*image_len = sblock->size;
@@ -1260,10 +1260,10 @@ H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(sblock);
- HDassert(sblock->hdr);
+ assert(f);
+ assert(image);
+ assert(sblock);
+ assert(sblock->hdr);
/* Magic number */
H5MM_memcpy(image, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -1273,7 +1273,7 @@ H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5EA_SBLOCK_VERSION;
/* Extensible array type */
- HDassert(sblock->hdr->cparam.cls->id <= 255);
+ assert(sblock->hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)sblock->hdr->cparam.cls->id;
/* Address of array header for array which owns this block */
@@ -1305,7 +1305,7 @@ H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5EA__cache_sblock_serialize() */
@@ -1331,7 +1331,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(sblock);
+ assert(sblock);
/* Determine which action to take */
switch (action) {
@@ -1398,7 +1398,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
@@ -1427,7 +1427,7 @@ H5EA__cache_sblock_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the extensible array super block */
if (H5EA__sblock_dest((H5EA_sblock_t *)thing) < 0)
@@ -1458,14 +1458,14 @@ H5EA__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->nelmts > 0);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->nelmts > 0);
+ assert(image_len);
/* Set up fake data block for computing size on disk */
/* (Note: extracted from H5EA__dblock_alloc) */
- HDmemset(&dblock, 0, sizeof(dblock));
+ memset(&dblock, 0, sizeof(dblock));
/* need to set:
*
@@ -1482,7 +1482,7 @@ H5EA__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
if (udata->nelmts > udata->hdr->dblk_page_nelmts) {
/* Set the # of pages in the direct block */
dblock.npages = udata->nelmts / udata->hdr->dblk_page_nelmts;
- HDassert(udata->nelmts == (dblock.npages * udata->hdr->dblk_page_nelmts));
+ assert(udata->nelmts == (dblock.npages * udata->hdr->dblk_page_nelmts));
} /* end if */
/* Set the image length size */
@@ -1518,7 +1518,7 @@ H5EA__cache_dblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -1556,25 +1556,25 @@ H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->parent);
- HDassert(udata->nelmts > 0);
- HDassert(H5F_addr_defined(udata->dblk_addr));
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->parent);
+ assert(udata->nelmts > 0);
+ assert(H5F_addr_defined(udata->dblk_addr));
/* Allocate the extensible array data block */
if (NULL == (dblock = H5EA__dblock_alloc(udata->hdr, udata->parent, udata->nelmts)))
HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL,
"memory allocation failed for extensible array data block")
- HDassert(((!dblock->npages) && (len == H5EA_DBLOCK_SIZE(dblock))) ||
- (len == H5EA_DBLOCK_PREFIX_SIZE(dblock)));
+ assert(((!dblock->npages) && (len == H5EA_DBLOCK_SIZE(dblock))) ||
+ (len == H5EA_DBLOCK_PREFIX_SIZE(dblock)));
/* Set the extensible array data block's information */
dblock->addr = udata->dblk_addr;
/* Magic number */
- if (HDmemcmp(image, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array data block signature")
image += H5_SIZEOF_MAGIC;
@@ -1607,7 +1607,7 @@ H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
/* Set the data block's size */
/* (Note: This is not the same as the image length, for paged data blocks) */
@@ -1619,7 +1619,7 @@ H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == len);
+ assert((size_t)(image - (const uint8_t *)_image) == len);
/* Set return value */
ret_value = dblock;
@@ -1654,8 +1654,8 @@ H5EA__cache_dblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblock);
- HDassert(image_len);
+ assert(dblock);
+ assert(image_len);
/* Set the image length size */
if (!dblock->npages)
@@ -1689,10 +1689,10 @@ H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(dblock);
- HDassert(dblock->hdr);
+ assert(f);
+ assert(image);
+ assert(dblock);
+ assert(dblock->hdr);
/* Magic number */
H5MM_memcpy(image, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -1702,7 +1702,7 @@ H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5EA_DBLOCK_VERSION;
/* Extensible array type */
- HDassert(dblock->hdr->cparam.cls->id <= 255);
+ assert(dblock->hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)dblock->hdr->cparam.cls->id;
/* Address of array header for array which owns this block */
@@ -1730,7 +1730,7 @@ H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1757,7 +1757,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(dblock);
+ assert(dblock);
/* Determine which action to take */
switch (action) {
@@ -1823,7 +1823,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
@@ -1852,7 +1852,7 @@ H5EA__cache_dblock_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the extensible array data block */
if (H5EA__dblock_dest((H5EA_dblock_t *)thing) < 0)
@@ -1899,10 +1899,10 @@ H5EA__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_EARRAY_DBLOCK);
- HDassert(fsf_size);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_EARRAY_DBLOCK);
+ assert(fsf_size);
*fsf_size = dblock->size;
@@ -1929,9 +1929,9 @@ H5EA__cache_dblk_page_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5EA_DBLK_PAGE_SIZE(udata->hdr);
@@ -1963,7 +1963,7 @@ H5EA__cache_dblk_page_verify_chksum(const void *_image, size_t len, void H5_ATTR
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -2000,10 +2000,10 @@ H5EA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->parent);
- HDassert(H5F_addr_defined(udata->dblk_page_addr));
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->parent);
+ assert(H5F_addr_defined(udata->dblk_page_addr));
/* Allocate the extensible array data block page */
if (NULL == (dblk_page = H5EA__dblk_page_alloc(udata->hdr, udata->parent)))
@@ -2024,7 +2024,7 @@ H5EA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5EA_SIZEOF_CHKSUM));
/* Set the data block page's size */
dblk_page->size = len;
@@ -2035,7 +2035,7 @@ H5EA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == dblk_page->size);
+ assert((size_t)(image - (const uint8_t *)_image) == dblk_page->size);
/* Set return value */
ret_value = dblk_page;
@@ -2068,8 +2068,8 @@ H5EA__cache_dblk_page_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblk_page);
- HDassert(image_len);
+ assert(dblk_page);
+ assert(image_len);
/* Set the image length size */
*image_len = dblk_page->size;
@@ -2101,10 +2101,10 @@ H5EA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_ima
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(dblk_page);
- HDassert(dblk_page->hdr);
+ assert(f);
+ assert(image);
+ assert(dblk_page);
+ assert(dblk_page->hdr);
/* Internal information */
@@ -2123,7 +2123,7 @@ H5EA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_ima
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2150,7 +2150,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblk_page);
+ assert(dblk_page);
/* Determine which action to take */
switch (action) {
@@ -2217,7 +2217,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
@@ -2246,7 +2246,7 @@ H5EA__cache_dblk_page_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the extensible array data block page */
if (H5EA__dblk_page_dest((H5EA_dblk_page_t *)thing) < 0)
diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c
index c881582..ec1293b 100644
--- a/src/H5EAdbg.c
+++ b/src/H5EAdbg.c
@@ -90,13 +90,13 @@ H5EA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(cls);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(obj_addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(cls);
/* Check for debugging context callback available */
if (cls->crt_dbg_ctx)
@@ -109,35 +109,35 @@ H5EA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header")
/* Print opening message */
- HDfprintf(stream, "%*sExtensible Array Header...\n", indent, "");
+ fprintf(stream, "%*sExtensible Array Header...\n", indent, "");
/* Print the values */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Log2(Max. # of elements in array):", (unsigned)hdr->cparam.max_nelmts_bits);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of elements in index block:", (unsigned)hdr->cparam.idx_blk_elmts);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Min. # of elements per data block:", (unsigned)hdr->cparam.data_blk_min_elmts);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Min. # of data block pointers for a super block:",
- (unsigned)hdr->cparam.sup_blk_min_data_ptrs);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Log2(Max. # of elements in data block page):",
- (unsigned)hdr->cparam.max_dblk_page_nelmts_bits);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Highest element index stored (+1):", hdr->stats.stored.max_idx_set);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of super blocks created:", hdr->stats.stored.nsuper_blks);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of data blocks created:", hdr->stats.stored.ndata_blks);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of elements 'realized':", hdr->stats.stored.nelmts);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Index Block Address:", hdr->idx_blk_addr);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Log2(Max. # of elements in array):", (unsigned)hdr->cparam.max_nelmts_bits);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "# of elements in index block:", (unsigned)hdr->cparam.idx_blk_elmts);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Min. # of elements per data block:", (unsigned)hdr->cparam.data_blk_min_elmts);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Min. # of data block pointers for a super block:", (unsigned)hdr->cparam.sup_blk_min_data_ptrs);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Log2(Max. # of elements in data block page):", (unsigned)hdr->cparam.max_dblk_page_nelmts_bits);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Highest element index stored (+1):", hdr->stats.stored.max_idx_set);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of super blocks created:", hdr->stats.stored.nsuper_blks);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of data blocks created:", hdr->stats.stored.ndata_blks);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of elements 'realized':", hdr->stats.stored.nelmts);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Index Block Address:", hdr->idx_blk_addr);
done:
if (dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0)
@@ -173,14 +173,14 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(cls);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(H5F_addr_defined(obj_addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(cls);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(H5F_addr_defined(obj_addr));
/* Check for debugging context callback available */
if (cls->crt_dbg_ctx)
@@ -193,7 +193,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header")
/* Sanity check */
- HDassert(H5F_addr_eq(hdr->idx_blk_addr, addr));
+ assert(H5F_addr_eq(hdr->idx_blk_addr, addr));
/* Protect index block */
if (NULL == (iblock = H5EA__iblock_protect(hdr, H5AC__READ_ONLY_FLAG)))
@@ -202,22 +202,22 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
(unsigned long long)hdr->idx_blk_addr)
/* Print opening message */
- HDfprintf(stream, "%*sExtensible Array Index Block...\n", indent, "");
+ fprintf(stream, "%*sExtensible Array Index Block...\n", indent, "");
/* Print the values */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Index Block size:", iblock->size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "# of data block addresses in index block:", iblock->ndblk_addrs);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "# of super block addresses in index block:", iblock->nsblk_addrs);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Index Block size:", iblock->size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "# of data block addresses in index block:", iblock->ndblk_addrs);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "# of super block addresses in index block:", iblock->nsblk_addrs);
/* Check if there are any elements in index block */
if (hdr->cparam.idx_blk_elmts > 0) {
unsigned u; /* Local index variable */
/* Print the elements in the index block */
- HDfprintf(stream, "%*sElements in Index Block:\n", indent, "");
+ fprintf(stream, "%*sElements in Index Block:\n", indent, "");
for (u = 0; u < hdr->cparam.idx_blk_elmts; u++) {
/* Call the class's 'debug' callback */
if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u,
@@ -233,12 +233,12 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
unsigned u; /* Local index variable */
/* Print the data block addresses in the index block */
- HDfprintf(stream, "%*sData Block Addresses in Index Block:\n", indent, "");
+ fprintf(stream, "%*sData Block Addresses in Index Block:\n", indent, "");
for (u = 0; u < iblock->ndblk_addrs; u++) {
/* Print address */
HDsnprintf(temp_str, sizeof(temp_str), "Address #%u:", u);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
- iblock->dblk_addrs[u]);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
+ iblock->dblk_addrs[u]);
} /* end for */
} /* end if */
@@ -248,12 +248,12 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
unsigned u; /* Local index variable */
/* Print the super block addresses in the index block */
- HDfprintf(stream, "%*sSuper Block Addresses in Index Block:\n", indent, "");
+ fprintf(stream, "%*sSuper Block Addresses in Index Block:\n", indent, "");
for (u = 0; u < iblock->nsblk_addrs; u++) {
/* Print address */
HDsnprintf(temp_str, sizeof(temp_str), "Address #%u:", u);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
- iblock->sblk_addrs[u]);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
+ iblock->sblk_addrs[u]);
} /* end for */
} /* end if */
@@ -293,14 +293,14 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(cls);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(H5F_addr_defined(obj_addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(cls);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(H5F_addr_defined(obj_addr));
/* Check for debugging context callback available */
if (cls->crt_dbg_ctx)
@@ -321,15 +321,15 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
(unsigned long long)addr)
/* Print opening message */
- HDfprintf(stream, "%*sExtensible Array Super Block...\n", indent, "");
+ fprintf(stream, "%*sExtensible Array Super Block...\n", indent, "");
/* Print the values */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Super Block size:", sblock->size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "# of data block addresses in super block:", sblock->ndblks);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "# of elements in data blocks from this super block:", sblock->dblk_nelmts);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Super Block size:", sblock->size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "# of data block addresses in super block:", sblock->ndblks);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "# of elements in data blocks from this super block:", sblock->dblk_nelmts);
/* Check if there are any data block addresses in super block */
if (sblock->ndblks > 0) {
@@ -337,12 +337,12 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
unsigned u; /* Local index variable */
/* Print the data block addresses in the super block */
- HDfprintf(stream, "%*sData Block Addresses in Super Block:\n", indent, "");
+ fprintf(stream, "%*sData Block Addresses in Super Block:\n", indent, "");
for (u = 0; u < sblock->ndblks; u++) {
/* Print address */
HDsnprintf(temp_str, sizeof(temp_str), "Address #%u:", u);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
- sblock->dblk_addrs[u]);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str,
+ sblock->dblk_addrs[u]);
} /* end for */
} /* end if */
@@ -383,15 +383,15 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(cls);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(dblk_nelmts > 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(cls);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(H5F_addr_defined(obj_addr));
+ assert(dblk_nelmts > 0);
/* Check for debugging context callback available */
if (cls->crt_dbg_ctx)
@@ -410,14 +410,14 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
"unable to protect extensible array data block, address = %" PRIuHADDR, addr)
/* Print opening message */
- HDfprintf(stream, "%*sExtensible Array data Block...\n", indent, "");
+ fprintf(stream, "%*sExtensible Array data Block...\n", indent, "");
/* Print the values */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data Block size:", dblock->size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data Block size:", dblock->size);
/* Print the elements in the index block */
- HDfprintf(stream, "%*sElements:\n", indent, "");
+ fprintf(stream, "%*sElements:\n", indent, "");
for (u = 0; u < dblk_nelmts; u++) {
/* Call the class's 'debug' callback */
if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u,
diff --git a/src/H5EAdblkpage.c b/src/H5EAdblkpage.c
index c6d4fbb..5a7cb96 100644
--- a/src/H5EAdblkpage.c
+++ b/src/H5EAdblkpage.c
@@ -92,7 +92,7 @@ H5EA__dblk_page_alloc(H5EA_hdr_t *hdr, H5EA_sblock_t *parent)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
+ assert(hdr);
/* Allocate memory for the data block */
if (NULL == (dblk_page = H5FL_CALLOC(H5EA_dblk_page_t)))
@@ -145,7 +145,7 @@ H5EA__dblk_page_create(H5EA_hdr_t *hdr, H5EA_sblock_t *parent, haddr_t addr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Allocate the data block page */
if (NULL == (dblk_page = H5EA__dblk_page_alloc(hdr, parent)))
@@ -215,11 +215,11 @@ H5EA__dblk_page_protect(H5EA_hdr_t *hdr, H5EA_sblock_t *parent, haddr_t dblk_pag
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(dblk_page_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(dblk_page_addr));
/* only the H5AC__READ_ONLY_FLAG may be set */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data */
udata.hdr = hdr;
@@ -279,7 +279,7 @@ H5EA__dblk_page_unprotect(H5EA_dblk_page_t *dblk_page, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblk_page);
+ assert(dblk_page);
/* Unprotect the data block page */
if (H5AC_unprotect(dblk_page->hdr->f, H5AC_EARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, cache_flags) < 0)
@@ -311,8 +311,8 @@ H5EA__dblk_page_dest(H5EA_dblk_page_t *dblk_page)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblk_page);
- HDassert(!dblk_page->has_hdr_depend);
+ assert(dblk_page);
+ assert(!dblk_page->has_hdr_depend);
/* Check if header field has been initialized */
if (dblk_page->hdr) {
@@ -333,7 +333,7 @@ H5EA__dblk_page_dest(H5EA_dblk_page_t *dblk_page)
} /* end if */
/* Sanity check */
- HDassert(NULL == dblk_page->top_proxy);
+ assert(NULL == dblk_page->top_proxy);
/* Free the data block page itself */
dblk_page = H5FL_FREE(H5EA_dblk_page_t, dblk_page);
diff --git a/src/H5EAdblock.c b/src/H5EAdblock.c
index 005de76..5075543 100644
--- a/src/H5EAdblock.c
+++ b/src/H5EAdblock.c
@@ -93,9 +93,9 @@ H5EA__dblock_alloc(H5EA_hdr_t *hdr, void *parent, size_t nelmts)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
- HDassert(parent);
- HDassert(nelmts > 0);
+ assert(hdr);
+ assert(parent);
+ assert(nelmts > 0);
/* Allocate memory for the data block */
if (NULL == (dblock = H5FL_CALLOC(H5EA_dblock_t)))
@@ -115,7 +115,7 @@ H5EA__dblock_alloc(H5EA_hdr_t *hdr, void *parent, size_t nelmts)
if (nelmts > hdr->dblk_page_nelmts) {
/* Set the # of pages in the direct block */
dblock->npages = nelmts / hdr->dblk_page_nelmts;
- HDassert(nelmts == (dblock->npages * hdr->dblk_page_nelmts));
+ assert(nelmts == (dblock->npages * hdr->dblk_page_nelmts));
} /* end if */
else {
/* Allocate buffer for elements in data block */
@@ -158,9 +158,9 @@ H5EA__dblock_create(H5EA_hdr_t *hdr, void *parent, hbool_t *stats_changed, hsize
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(stats_changed);
- HDassert(nelmts > 0);
+ assert(hdr);
+ assert(stats_changed);
+ assert(nelmts > 0);
/* Allocate the data block */
if (NULL == (dblock = H5EA__dblock_alloc(hdr, parent, nelmts)))
@@ -257,8 +257,8 @@ H5EA__dblock_sblk_idx(const H5EA_hdr_t *hdr, hsize_t idx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
- HDassert(idx >= hdr->cparam.idx_blk_elmts);
+ assert(hdr);
+ assert(idx >= hdr->cparam.idx_blk_elmts);
/* Adjust index for elements in index block */
idx -= hdr->cparam.idx_blk_elmts;
@@ -292,12 +292,12 @@ H5EA__dblock_protect(H5EA_hdr_t *hdr, void *parent, haddr_t dblk_addr, size_t db
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(dblk_addr));
- HDassert(dblk_nelmts);
+ assert(hdr);
+ assert(H5F_addr_defined(dblk_addr));
+ assert(dblk_nelmts);
/* only the H5AC__READ_ONLY_FLAG may be set */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data */
udata.hdr = hdr;
@@ -359,7 +359,7 @@ H5EA__dblock_unprotect(H5EA_dblock_t *dblock, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblock);
+ assert(dblock);
/* Unprotect the data block */
if (H5AC_unprotect(dblock->hdr->f, H5AC_EARRAY_DBLOCK, dblock->addr, dblock, cache_flags) < 0)
@@ -393,10 +393,10 @@ H5EA__dblock_delete(H5EA_hdr_t *hdr, void *parent, haddr_t dblk_addr, size_t dbl
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(parent);
- HDassert(H5F_addr_defined(dblk_addr));
- HDassert(dblk_nelmts > 0);
+ assert(hdr);
+ assert(parent);
+ assert(H5F_addr_defined(dblk_addr));
+ assert(dblk_nelmts > 0);
/* Protect data block */
if (NULL == (dblock = H5EA__dblock_protect(hdr, parent, dblk_addr, dblk_nelmts, H5AC__NO_FLAGS_SET)))
@@ -457,15 +457,15 @@ H5EA__dblock_dest(H5EA_dblock_t *dblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblock);
- HDassert(!dblock->has_hdr_depend);
+ assert(dblock);
+ assert(!dblock->has_hdr_depend);
/* Check if shared header field has been initialized */
if (dblock->hdr) {
/* Check if we've got elements in the data block */
if (dblock->elmts && !dblock->npages) {
/* Free buffer for data block elements */
- HDassert(dblock->nelmts > 0);
+ assert(dblock->nelmts > 0);
if (H5EA__hdr_free_elmts(dblock->hdr, dblock->nelmts, dblock->elmts) < 0)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL,
"unable to free extensible array data block element buffer")
@@ -481,7 +481,7 @@ H5EA__dblock_dest(H5EA_dblock_t *dblock)
} /* end if */
/* Sanity check */
- HDassert(NULL == dblock->top_proxy);
+ assert(NULL == dblock->top_proxy);
/* Free the data block itself */
dblock = H5FL_FREE(H5EA_dblock_t, dblock);
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index 7b5aff5..53825a9 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -110,7 +110,7 @@ H5EA__hdr_alloc(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
+ assert(f);
/* Allocate space for the shared information */
if (NULL == (hdr = H5FL_CALLOC(H5EA_hdr_t)))
@@ -183,10 +183,10 @@ H5EA__hdr_init(H5EA_hdr_t *hdr, void *ctx_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->cparam.max_nelmts_bits);
- HDassert(hdr->cparam.data_blk_min_elmts);
- HDassert(hdr->cparam.sup_blk_min_data_ptrs);
+ assert(hdr);
+ assert(hdr->cparam.max_nelmts_bits);
+ assert(hdr->cparam.data_blk_min_elmts);
+ assert(hdr->cparam.sup_blk_min_data_ptrs);
/* Compute general information */
hdr->nsblks = 1 + (hdr->cparam.max_nelmts_bits - H5VM_log2_of2(hdr->cparam.data_blk_min_elmts));
@@ -247,8 +247,8 @@ H5EA__hdr_alloc_elmts(H5EA_hdr_t *hdr, size_t nelmts)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
- HDassert(nelmts > 0);
+ assert(hdr);
+ assert(nelmts > 0);
/* Compute the index of the element buffer factory */
H5_CHECK_OVERFLOW(nelmts, /*From:*/ size_t, /*To:*/ uint32_t);
@@ -266,8 +266,8 @@ H5EA__hdr_alloc_elmts(H5EA_hdr_t *hdr, size_t nelmts)
"memory allocation failed for data block data element buffer factory array")
/* Zero out new elements allocated */
- HDmemset(new_fac + hdr->elmt_fac.nalloc, 0,
- (new_nalloc - hdr->elmt_fac.nalloc) * sizeof(H5FL_fac_head_ptr_t));
+ memset(new_fac + hdr->elmt_fac.nalloc, 0,
+ (new_nalloc - hdr->elmt_fac.nalloc) * sizeof(H5FL_fac_head_ptr_t));
/* Update information about element factories in header */
hdr->elmt_fac.nalloc = new_nalloc;
@@ -316,17 +316,17 @@ H5EA__hdr_free_elmts(H5EA_hdr_t *hdr, size_t nelmts, void *elmts)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(hdr);
- HDassert(nelmts > 0);
- HDassert(elmts);
+ assert(hdr);
+ assert(nelmts > 0);
+ assert(elmts);
/* Compute the index of the element buffer factory */
H5_CHECK_OVERFLOW(nelmts, /*From:*/ size_t, /*To:*/ uint32_t);
idx = H5VM_log2_of2((uint32_t)nelmts) - H5VM_log2_of2((uint32_t)hdr->cparam.data_blk_min_elmts);
/* Free buffer for elements in index block */
- HDassert(idx < hdr->elmt_fac.nalloc);
- HDassert(hdr->elmt_fac.fac[idx]);
+ assert(idx < hdr->elmt_fac.nalloc);
+ assert(hdr->elmt_fac.fac[idx]);
elmts = H5FL_FAC_FREE(hdr->elmt_fac.fac[idx], elmts);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -355,8 +355,8 @@ H5EA__hdr_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
#ifndef NDEBUG
{
@@ -484,7 +484,7 @@ H5EA__hdr_incr(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Mark header as un-evictable when something is depending on it */
if (hdr->rc == 0)
@@ -518,15 +518,15 @@ H5EA__hdr_decr(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->rc);
+ assert(hdr);
+ assert(hdr->rc);
/* Decrement reference count on shared header */
hdr->rc--;
/* Mark header as evictable again when nothing depend on it */
if (hdr->rc == 0) {
- HDassert(hdr->file_rc == 0);
+ assert(hdr->file_rc == 0);
if (H5AC_unpin_entry(hdr) < 0)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNPIN, FAIL, "unable to unpin extensible array header")
}
@@ -553,7 +553,7 @@ H5EA__hdr_fuse_incr(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Increment file reference count on shared header */
hdr->file_rc++;
@@ -582,8 +582,8 @@ H5EA__hdr_fuse_decr(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->file_rc);
+ assert(hdr);
+ assert(hdr->file_rc);
/* Decrement file reference count on shared header */
hdr->file_rc--;
@@ -614,8 +614,8 @@ H5EA__hdr_modified(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->f);
+ assert(hdr);
+ assert(hdr->f);
/* Mark header as dirty in cache */
if (H5AC_mark_entry_dirty(hdr) < 0)
@@ -647,11 +647,11 @@ H5EA__hdr_protect(H5F_t *f, haddr_t ea_addr, void *ctx_udata, unsigned flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(ea_addr));
+ assert(f);
+ assert(H5F_addr_defined(ea_addr));
/* only the H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data for cache callbacks */
udata.f = f;
@@ -703,7 +703,7 @@ H5EA__hdr_unprotect(H5EA_hdr_t *hdr, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Unprotect the header */
if (H5AC_unprotect(hdr->f, H5AC_EARRAY_HDR, hdr->addr, hdr, cache_flags) < 0)
@@ -735,8 +735,8 @@ H5EA__hdr_delete(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(!hdr->file_rc);
+ assert(hdr);
+ assert(!hdr->file_rc);
#ifndef NDEBUG
unsigned hdr_status = 0; /* Array header's status in the metadata cache */
@@ -746,8 +746,8 @@ H5EA__hdr_delete(H5EA_hdr_t *hdr)
HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "unable to check metadata cache status for array header")
/* Sanity checks on array header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PROTECTED);
#endif /* NDEBUG */
/* Check for index block */
@@ -789,8 +789,8 @@ H5EA__hdr_dest(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
- HDassert(hdr->rc == 0);
+ assert(hdr);
+ assert(hdr->rc == 0);
/* Destroy the callback context */
if (hdr->cb_ctx) {
@@ -805,7 +805,7 @@ H5EA__hdr_dest(H5EA_hdr_t *hdr)
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(hdr->elmt_fac.nalloc > 0);
+ assert(hdr->elmt_fac.nalloc > 0);
/* Iterate over factories, shutting them down */
for (u = 0; u < hdr->elmt_fac.nalloc; u++) {
diff --git a/src/H5EAiblock.c b/src/H5EAiblock.c
index d0cdb7e..2a472e5 100644
--- a/src/H5EAiblock.c
+++ b/src/H5EAiblock.c
@@ -99,7 +99,7 @@ H5EA__iblock_alloc(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
+ assert(hdr);
/* Allocate memory for the index block */
if (NULL == (iblock = H5FL_CALLOC(H5EA_iblock_t)))
@@ -172,8 +172,8 @@ H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(stats_changed);
+ assert(hdr);
+ assert(stats_changed);
/* Allocate the index block */
if (NULL == (iblock = H5EA__iblock_alloc(hdr)))
@@ -228,8 +228,8 @@ H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed)
} /* end if */
/* Update extensible array index block statistics */
- HDassert(0 == hdr->stats.computed.nindex_blks);
- HDassert(0 == hdr->stats.computed.index_blk_size);
+ assert(0 == hdr->stats.computed.nindex_blks);
+ assert(0 == hdr->stats.computed.index_blk_size);
hdr->stats.computed.nindex_blks = 1;
hdr->stats.computed.index_blk_size = iblock->size;
@@ -287,10 +287,10 @@ H5EA__iblock_protect(H5EA_hdr_t *hdr, unsigned flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* only the H5AC__READ_ONLY_FLAG may be set */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Protect the index block */
if (NULL ==
@@ -345,7 +345,7 @@ H5EA__iblock_unprotect(H5EA_iblock_t *iblock, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
+ assert(iblock);
/* Unprotect the index block */
if (H5AC_unprotect(iblock->hdr->f, H5AC_EARRAY_IBLOCK, iblock->addr, iblock, cache_flags) < 0)
@@ -378,8 +378,8 @@ H5EA__iblock_delete(H5EA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(hdr->idx_blk_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(hdr->idx_blk_addr));
/* Protect index block */
if (NULL == (iblock = H5EA__iblock_protect(hdr, H5AC__NO_FLAGS_SET)))
@@ -464,21 +464,21 @@ H5EA__iblock_dest(H5EA_iblock_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
+ assert(iblock);
/* Check if shared header field has been initialized */
if (iblock->hdr) {
/* Check if we've got elements in the index block */
if (iblock->elmts) {
/* Free buffer for index block elements */
- HDassert(iblock->hdr->cparam.idx_blk_elmts > 0);
+ assert(iblock->hdr->cparam.idx_blk_elmts > 0);
iblock->elmts = H5FL_BLK_FREE(idx_blk_elmt_buf, iblock->elmts);
} /* end if */
/* Check if we've got data block addresses in the index block */
if (iblock->dblk_addrs) {
/* Free buffer for index block data block addresses */
- HDassert(iblock->ndblk_addrs > 0);
+ assert(iblock->ndblk_addrs > 0);
iblock->dblk_addrs = H5FL_SEQ_FREE(haddr_t, iblock->dblk_addrs);
iblock->ndblk_addrs = 0;
} /* end if */
@@ -486,7 +486,7 @@ H5EA__iblock_dest(H5EA_iblock_t *iblock)
/* Check if we've got super block addresses in the index block */
if (iblock->sblk_addrs) {
/* Free buffer for index block super block addresses */
- HDassert(iblock->nsblk_addrs > 0);
+ assert(iblock->nsblk_addrs > 0);
iblock->sblk_addrs = H5FL_SEQ_FREE(haddr_t, iblock->sblk_addrs);
iblock->nsblk_addrs = 0;
} /* end if */
@@ -499,7 +499,7 @@ H5EA__iblock_dest(H5EA_iblock_t *iblock)
} /* end if */
/* Sanity check */
- HDassert(NULL == iblock->top_proxy);
+ assert(NULL == iblock->top_proxy);
/* Free the index block itself */
iblock = H5FL_FREE(H5EA_iblock_t, iblock);
diff --git a/src/H5EAint.c b/src/H5EAint.c
index 6dabeeb..73b1158 100644
--- a/src/H5EAint.c
+++ b/src/H5EAint.c
@@ -86,8 +86,8 @@ H5EA__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Create a flush dependency between parent and child entry */
if (H5AC_create_flush_dependency(parent_entry, child_entry) < 0)
@@ -117,8 +117,8 @@ H5EA__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Destroy a flush dependency between parent and child entry */
if (H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0)
diff --git a/src/H5EAsblock.c b/src/H5EAsblock.c
index 0ba1fca..176a8e2 100644
--- a/src/H5EAsblock.c
+++ b/src/H5EAsblock.c
@@ -99,7 +99,7 @@ H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, unsigned sblk_idx)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
+ assert(hdr);
/* Allocate memory for the index block */
if (NULL == (sblock = H5FL_CALLOC(H5EA_sblock_t)))
@@ -118,7 +118,7 @@ H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, unsigned sblk_idx)
/* Compute/cache information */
sblock->idx = sblk_idx;
sblock->ndblks = hdr->sblk_info[sblk_idx].ndblks;
- HDassert(sblock->ndblks);
+ assert(sblock->ndblks);
sblock->dblk_nelmts = hdr->sblk_info[sblk_idx].dblk_nelmts;
/* Allocate buffer for data block addresses in super block */
@@ -132,14 +132,14 @@ H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, unsigned sblk_idx)
sblock->dblk_npages = sblock->dblk_nelmts / hdr->dblk_page_nelmts;
/* Sanity check that we have at least 2 pages in data block */
- HDassert(sblock->dblk_npages > 1);
+ assert(sblock->dblk_npages > 1);
/* Sanity check for integer truncation */
- HDassert((sblock->dblk_npages * hdr->dblk_page_nelmts) == sblock->dblk_nelmts);
+ assert((sblock->dblk_npages * hdr->dblk_page_nelmts) == sblock->dblk_nelmts);
/* Compute size of buffer for each data block's 'page init' bitmask */
sblock->dblk_page_init_size = ((sblock->dblk_npages) + 7) / 8;
- HDassert(sblock->dblk_page_init_size > 0);
+ assert(sblock->dblk_page_init_size > 0);
/* Allocate buffer for all 'page init' bitmasks in super block */
if (NULL ==
@@ -186,8 +186,8 @@ H5EA__sblock_create(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, hbool_t *stats_chang
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(stats_changed);
+ assert(hdr);
+ assert(stats_changed);
/* Allocate the super block */
if (NULL == (sblock = H5EA__sblock_alloc(hdr, parent, sblk_idx)))
@@ -280,11 +280,11 @@ H5EA__sblock_protect(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, haddr_t sblk_addr,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(sblk_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(sblk_addr));
/* only the H5AC__READ_ONLY_FLAG may be set */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data */
udata.hdr = hdr;
@@ -345,7 +345,7 @@ H5EA__sblock_unprotect(H5EA_sblock_t *sblock, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(sblock);
+ assert(sblock);
/* Unprotect the super block */
if (H5AC_unprotect(sblock->hdr->f, H5AC_EARRAY_SBLOCK, sblock->addr, sblock, cache_flags) < 0)
@@ -379,8 +379,8 @@ H5EA__sblock_delete(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, haddr_t sblk_addr, u
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(sblk_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(sblk_addr));
/* Protect super block */
if (NULL == (sblock = H5EA__sblock_protect(hdr, parent, sblk_addr, sblk_idx, H5AC__NO_FLAGS_SET)))
@@ -428,8 +428,8 @@ H5EA__sblock_dest(H5EA_sblock_t *sblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(sblock);
- HDassert(!sblock->has_hdr_depend);
+ assert(sblock);
+ assert(!sblock->has_hdr_depend);
/* Check if shared header field has been initialized */
if (sblock->hdr) {
@@ -439,7 +439,7 @@ H5EA__sblock_dest(H5EA_sblock_t *sblock)
/* Free buffer for super block 'page init' bitmask, if there is one */
if (sblock->page_init) {
- HDassert(sblock->dblk_npages > 0);
+ assert(sblock->dblk_npages > 0);
sblock->page_init = H5FL_BLK_FREE(page_init, sblock->page_init);
} /* end if */
@@ -451,7 +451,7 @@ H5EA__sblock_dest(H5EA_sblock_t *sblock)
} /* end if */
/* Sanity check */
- HDassert(NULL == sblock->top_proxy);
+ assert(NULL == sblock->top_proxy);
/* Free the super block itself */
sblock = H5FL_FREE(H5EA_sblock_t, sblock);
diff --git a/src/H5EAstat.c b/src/H5EAstat.c
index 2f955ff..7c8ef1f 100644
--- a/src/H5EAstat.c
+++ b/src/H5EAstat.c
@@ -85,8 +85,8 @@ H5EA_get_stats(const H5EA_t *ea, H5EA_stat_t *stats)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(ea);
- HDassert(stats);
+ assert(ea);
+ assert(stats);
/* Copy extensible array statistics */
H5MM_memcpy(stats, &ea->hdr->stats, sizeof(ea->hdr->stats));
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index 474e925..6167954 100644
--- a/src/H5EAtest.c
+++ b/src/H5EAtest.c
@@ -164,7 +164,7 @@ H5EA__test_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
+ assert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
/* Release context structure */
ctx = H5FL_FREE(H5EA__test_ctx_t, ctx);
@@ -193,8 +193,8 @@ H5EA__test_fill(void *nat_blk, size_t nelmts)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(nat_blk);
- HDassert(nelmts);
+ assert(nat_blk);
+ assert(nelmts);
H5VM_array_fill(nat_blk, &fill_val, sizeof(uint64_t), nelmts);
@@ -224,10 +224,10 @@ H5EA__test_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
/* Check for callback action */
if (ctx->cb) {
@@ -276,10 +276,10 @@ H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_NDE
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(H5EA__TEST_BOGUS_VAL == ctx->bogus);
/* Decode raw elements into native elements */
while (nelmts) {
@@ -317,13 +317,13 @@ H5EA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void *
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(stream);
- HDassert(elmt);
+ assert(stream);
+ assert(elmt);
/* Print element */
HDsnprintf(temp_str, sizeof(temp_str), "Element #%llu:", (unsigned long long)idx);
- HDfprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
- (unsigned long long)*(const uint64_t *)elmt);
+ fprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
+ (unsigned long long)*(const uint64_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5EA__test_debug() */
@@ -379,7 +379,7 @@ H5EA__test_dst_dbg_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(_ctx);
+ assert(_ctx);
/* Release context structure */
ctx = H5FL_FREE(H5EA__ctx_cb_t, ctx);
@@ -406,8 +406,8 @@ H5EA__get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(ea);
- HDassert(cparam);
+ assert(ea);
+ assert(cparam);
/* Get extensible array creation parameters */
cparam->raw_elmt_size = ea->hdr->cparam.raw_elmt_size;
@@ -441,8 +441,8 @@ H5EA__cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(cparam1);
- HDassert(cparam2);
+ assert(cparam1);
+ assert(cparam2);
/* Compare creation parameters for array */
if (cparam1->raw_elmt_size < cparam2->raw_elmt_size)
diff --git a/src/H5ESevent.c b/src/H5ESevent.c
index abd7fbf..c91d052 100644
--- a/src/H5ESevent.c
+++ b/src/H5ESevent.c
@@ -93,8 +93,8 @@ H5ES__event_new(H5VL_t *connector, void *token)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(connector);
- HDassert(token);
+ assert(connector);
+ assert(token);
/* Create vol object for token */
if (NULL == (request = H5VL_create_object(token, connector))) {
@@ -137,7 +137,7 @@ H5ES__event_free(H5ES_event_t *ev)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ev);
+ assert(ev);
/* The 'app_func_name', 'app_file_name', and 'api_name' strings are statically allocated (by the compiler)
* and are not allocated, so there's no need to free them.
@@ -183,7 +183,7 @@ H5ES__event_completed(H5ES_event_t *ev, H5ES_event_list_t *el)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ev);
+ assert(ev);
/* Remove the event from the event list */
H5ES__list_remove(el, ev);
diff --git a/src/H5ESint.c b/src/H5ESint.c
index f820850..192db85 100644
--- a/src/H5ESint.c
+++ b/src/H5ESint.c
@@ -195,7 +195,7 @@ H5ES__close_cb(void *_es, void H5_ATTR_UNUSED **rt)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
+ assert(es);
/* Close the event set object */
if (H5ES__close(es) < 0)
@@ -264,7 +264,7 @@ H5ES__insert(H5ES_t *es, H5VL_t *connector, void *request_token, const char *app
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
+ assert(es);
/* Create new event */
if (NULL == (ev = H5ES__event_new(connector, request_token)))
@@ -291,7 +291,7 @@ H5ES__insert(H5ES_t *es, H5VL_t *connector, void *request_token, const char *app
* there's no need to duplicate it.
*/
ev->op_info.api_name = caller;
- HDassert(ev->op_info.api_args == NULL);
+ assert(ev->op_info.api_args == NULL);
if (api_args && NULL == (ev->op_info.api_args = H5MM_xstrdup(api_args)))
HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, FAIL, "can't copy API routine arguments")
@@ -345,10 +345,10 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(connector);
- HDassert(token);
- HDassert(caller);
- HDassert(caller_args);
+ assert(connector);
+ assert(token);
+ assert(caller);
+ assert(caller_args);
/* Get event set */
if (NULL == (es = (H5ES_t *)H5I_object_verify(es_id, H5I_EVENTSET)))
@@ -359,16 +359,16 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con
HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINSERT, FAIL, "event set has failed operations")
/* Start working on the API routines arguments */
- HDva_start(ap, caller_args);
+ va_start(ap, caller_args);
arg_started = TRUE;
/* Copy the app source information */
- (void)HDva_arg(ap, char *); /* Toss the 'app_file' parameter name */
- app_file = HDva_arg(ap, char *);
- (void)HDva_arg(ap, char *); /* Toss the 'app_func' parameter name */
- app_func = HDva_arg(ap, char *);
- (void)HDva_arg(ap, char *); /* Toss the 'app_line' parameter name */
- app_line = HDva_arg(ap, unsigned);
+ (void)va_arg(ap, char *); /* Toss the 'app_file' parameter name */
+ app_file = va_arg(ap, char *);
+ (void)va_arg(ap, char *); /* Toss the 'app_func' parameter name */
+ app_func = va_arg(ap, char *);
+ (void)va_arg(ap, char *); /* Toss the 'app_line' parameter name */
+ app_line = va_arg(ap, unsigned);
/* Create the string for the API routine's arguments */
if (NULL == (rs = H5RS_create(NULL)))
@@ -376,7 +376,7 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con
/* Copy the string for the API routine's arguments */
/* (skip the six characters from the app's file, function and line # arguments) */
- HDassert(0 == HDstrncmp(caller_args, "*s*sIu", 6));
+ assert(0 == HDstrncmp(caller_args, "*s*sIu", 6));
if (H5_trace_args(rs, caller_args + 6, ap) < 0)
HGOTO_ERROR(H5E_EVENTSET, H5E_CANTSET, FAIL, "can't create formatted API arguments")
if (NULL == (api_args = H5RS_get_str(rs)))
@@ -389,7 +389,7 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con
done:
/* Clean up */
if (arg_started)
- HDva_end(ap);
+ va_end(ap);
if (rs)
H5RS_decr(rs);
@@ -416,9 +416,9 @@ H5ES__insert_request(H5ES_t *es, H5VL_t *connector, void *token)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
- HDassert(connector);
- HDassert(token);
+ assert(es);
+ assert(connector);
+ assert(token);
/* Insert an 'anonymous' operation into the event set */
if (H5ES__insert(es, connector, token, NULL, NULL, 0, NULL, NULL) < 0)
@@ -450,9 +450,9 @@ H5ES__get_requests_cb(H5ES_event_t *ev, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ev);
- HDassert(ctx);
- HDassert(ctx->i < ctx->array_len);
+ assert(ev);
+ assert(ctx);
+ assert(ctx->i < ctx->array_len);
/* Get the connector ID for the event */
if (ctx->connector_ids)
@@ -490,9 +490,9 @@ H5ES__get_requests(H5ES_t *es, H5_iter_order_t order, hid_t *connector_ids, void
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
- HDassert(array_len > 0);
- HDassert(requests || connector_ids);
+ assert(es);
+ assert(array_len > 0);
+ assert(requests || connector_ids);
/* Set up context for iterator callbacks */
ctx.connector_ids = connector_ids;
@@ -526,9 +526,9 @@ H5ES__handle_fail(H5ES_t *es, H5ES_event_t *ev)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(es);
- HDassert(es->active.head);
- HDassert(ev);
+ assert(es);
+ assert(es->active.head);
+ assert(ev);
/* Set error flag for event set */
es->err_occurred = TRUE;
@@ -564,10 +564,10 @@ H5ES__op_complete(H5ES_t *es, H5ES_event_t *ev, H5VL_request_status_t ev_status)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
- HDassert(ev);
- HDassert(H5VL_REQUEST_STATUS_SUCCEED == ev_status || H5VL_REQUEST_STATUS_FAIL == ev_status ||
- H5VL_REQUEST_STATUS_CANCELED == ev_status);
+ assert(es);
+ assert(ev);
+ assert(H5VL_REQUEST_STATUS_SUCCEED == ev_status || H5VL_REQUEST_STATUS_FAIL == ev_status ||
+ H5VL_REQUEST_STATUS_CANCELED == ev_status);
/* Handle each form of event completion */
if (H5VL_REQUEST_STATUS_SUCCEED == ev_status || H5VL_REQUEST_STATUS_CANCELED == ev_status) {
@@ -660,8 +660,8 @@ H5ES__wait_cb(H5ES_event_t *ev, void *_ctx)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ev);
- HDassert(ctx);
+ assert(ev);
+ assert(ctx);
/* Wait on the request */
if (ctx->timeout != H5ES_WAIT_NONE && ctx->timeout != H5ES_WAIT_FOREVER)
@@ -694,7 +694,7 @@ H5ES__wait_cb(H5ES_event_t *ev, void *_ctx)
"received \"can't cancel\" status for operation")
else {
/* Sanity check */
- HDassert(ev_status == H5VL_REQUEST_STATUS_IN_PROGRESS);
+ assert(ev_status == H5VL_REQUEST_STATUS_IN_PROGRESS);
/* Increment "in progress operation" counter */
(*ctx->num_in_progress)++;
@@ -736,9 +736,9 @@ H5ES__wait(H5ES_t *es, uint64_t timeout, size_t *num_in_progress, hbool_t *op_fa
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
- HDassert(num_in_progress);
- HDassert(op_failed);
+ assert(es);
+ assert(num_in_progress);
+ assert(op_failed);
/* Set user's parameters to known values */
*num_in_progress = 0;
@@ -780,8 +780,8 @@ H5ES__cancel_cb(H5ES_event_t *ev, void *_ctx)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ev);
- HDassert(ctx);
+ assert(ev);
+ assert(ctx);
/* Attempt to cancel the request */
if (H5VL_request_cancel(ev->request, &ev_status) < 0)
@@ -813,7 +813,7 @@ H5ES__cancel_cb(H5ES_event_t *ev, void *_ctx)
} /* end else-if */
else {
/* Sanity check */
- HDassert(ev_status == H5VL_REQUEST_STATUS_CANCELED);
+ assert(ev_status == H5VL_REQUEST_STATUS_CANCELED);
/* Handle event completion */
if (H5ES__op_complete(ctx->es, ev, ev_status) < 0)
@@ -845,9 +845,9 @@ H5ES__cancel(H5ES_t *es, size_t *num_not_canceled, hbool_t *op_failed)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
- HDassert(num_not_canceled);
- HDassert(op_failed);
+ assert(es);
+ assert(num_not_canceled);
+ assert(op_failed);
/* Set user's parameters to known values */
*num_not_canceled = 0;
@@ -888,8 +888,8 @@ H5ES__get_err_info_cb(H5ES_event_t *ev, void *_ctx)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ev);
- HDassert(ctx);
+ assert(ev);
+ assert(ctx);
/* Copy operation info for event */
/* The 'app_func_name', 'app_file_name', and 'api_name' strings are statically allocated (by the compiler)
@@ -961,10 +961,10 @@ H5ES__get_err_info(H5ES_t *es, size_t num_err_info, H5ES_err_info_t err_info[],
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
- HDassert(num_err_info);
- HDassert(err_info);
- HDassert(num_cleared);
+ assert(es);
+ assert(num_err_info);
+ assert(err_info);
+ assert(num_cleared);
/* Set up context for iterator callbacks */
ctx.es = es;
@@ -1004,8 +1004,8 @@ H5ES__close_failed_cb(H5ES_event_t *ev, void *_ctx)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ev);
- HDassert(es);
+ assert(ev);
+ assert(es);
/* Remove event from event set's failed list */
H5ES__list_remove(&es->failed, ev);
@@ -1038,7 +1038,7 @@ H5ES__close(H5ES_t *es)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(es);
+ assert(es);
/* Fail if active operations still present */
if (H5ES__list_count(&es->active) > 0)
diff --git a/src/H5ESlist.c b/src/H5ESlist.c
index 61a9dd1..e9cedbf 100644
--- a/src/H5ESlist.c
+++ b/src/H5ESlist.c
@@ -85,8 +85,8 @@ H5ES__list_append(H5ES_event_list_t *el, H5ES_event_t *ev)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(el);
- HDassert(ev);
+ assert(el);
+ assert(ev);
ev->next = NULL;
@@ -123,7 +123,7 @@ H5ES__list_count(const H5ES_event_list_t *el)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(el);
+ assert(el);
FUNC_LEAVE_NOAPI(el->count)
} /* end H5ES__list_count() */
@@ -156,8 +156,8 @@ H5ES__list_iterate(H5ES_event_list_t *el, H5_iter_order_t order, H5ES_list_iter_
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(el);
- HDassert(cb);
+ assert(el);
+ assert(cb);
/* Iterate over events in list */
ev = (order == H5_ITER_DEC) ? el->tail : el->head;
@@ -199,9 +199,9 @@ H5ES__list_remove(H5ES_event_list_t *el, const H5ES_event_t *ev)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(el);
- HDassert(el->head);
- HDassert(ev);
+ assert(el);
+ assert(el->head);
+ assert(ev);
/* Stitch event out of list */
if (ev == el->head)
diff --git a/src/H5Eint.c b/src/H5Eint.c
index b1f11bd..788a083 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -121,7 +121,7 @@ H5E__get_msg(const H5E_msg_t *msg, H5E_type_t *type, char *msg_str, size_t size)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(msg);
+ assert(msg);
/* Get the length of the message string */
len = (ssize_t)HDstrlen(msg->msg);
@@ -192,7 +192,7 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(err_desc);
+ assert(err_desc);
/* If no client data was passed, output to stderr */
if (!client_data)
@@ -226,10 +226,10 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
if (cls_ptr->lib_vers)
eprint->cls.lib_vers = cls_ptr->lib_vers;
- HDfprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
- (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
- (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
- (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
+ fprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
+ (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
+ (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
+ (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
/* try show the process or thread id in multiple processes cases*/
#ifdef H5_HAVE_PARALLEL
@@ -241,15 +241,15 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
if (mpi_initialized && !mpi_finalized) {
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- HDfprintf(stream, "MPI-process %d", mpi_rank);
+ fprintf(stream, "MPI-process %d", mpi_rank);
} /* end if */
else
- HDfprintf(stream, "thread 0");
+ fprintf(stream, "thread 0");
} /* end block */
#else
- HDfprintf(stream, "thread %" PRIu64, H5TS_thread_id());
+ fprintf(stream, "thread %" PRIu64, H5TS_thread_id());
#endif
- HDfprintf(stream, ":\n");
+ fprintf(stream, ":\n");
} /* end if */
/* Check for "real" error description - used to format output more nicely */
@@ -257,11 +257,10 @@ H5E__walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
have_desc = 0;
/* Print error message */
- HDfprintf(stream, "%*s#%03d: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name,
- err_desc->line, err_desc->func_name, (have_desc ? ": " : ""),
- (have_desc ? err_desc->desc : ""));
- HDfprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
- HDfprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
+ fprintf(stream, "%*s#%03d: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name,
+ err_desc->line, err_desc->func_name, (have_desc ? ": " : ""), (have_desc ? err_desc->desc : ""));
+ fprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
+ fprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -315,7 +314,7 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(err_desc);
+ assert(err_desc);
/* If no client data was passed, output to stderr */
if (!client_data)
@@ -354,10 +353,10 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
if (cls_ptr->lib_vers)
eprint->cls.lib_vers = cls_ptr->lib_vers;
- HDfprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
- (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
- (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
- (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
+ fprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
+ (cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
+ (cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
+ (cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
/* try show the process or thread id in multiple processes cases*/
#ifdef H5_HAVE_PARALLEL
@@ -369,15 +368,15 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
if (mpi_initialized && !mpi_finalized) {
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- HDfprintf(stream, "MPI-process %d", mpi_rank);
+ fprintf(stream, "MPI-process %d", mpi_rank);
} /* end if */
else
- HDfprintf(stream, "thread 0");
+ fprintf(stream, "thread 0");
} /* end block */
#else
- HDfprintf(stream, "thread %" PRIu64, H5TS_thread_id());
+ fprintf(stream, "thread %" PRIu64, H5TS_thread_id());
#endif
- HDfprintf(stream, ":\n");
+ fprintf(stream, ":\n");
} /* end if */
/* Check for "real" error description - used to format output more nicely */
@@ -385,11 +384,10 @@ H5E__walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
have_desc = 0;
/* Print error message */
- HDfprintf(stream, "%*s#%03u: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name,
- err_desc->line, err_desc->func_name, (have_desc ? ": " : ""),
- (have_desc ? err_desc->desc : ""));
- HDfprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
- HDfprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
+ fprintf(stream, "%*s#%03u: %s line %u in %s()%s%s\n", H5E_INDENT, "", n, err_desc->file_name,
+ err_desc->line, err_desc->func_name, (have_desc ? ": " : ""), (have_desc ? err_desc->desc : ""));
+ fprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
+ fprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -421,7 +419,7 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(estack);
+ assert(estack);
/* If no stream was given, use stderr */
if (!stream)
@@ -430,7 +428,7 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
eprint.stream = stream;
/* Reset the original error class information */
- HDmemset(&eprint.cls, 0, sizeof(H5E_cls_t));
+ memset(&eprint.cls, 0, sizeof(H5E_cls_t));
/* Walk the error stack */
if (bk_compatible) {
@@ -440,7 +438,7 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
if (H5E__walk(estack, H5E_WALK_DOWNWARD, &walk_op, (void *)&eprint) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack")
#else /* H5_NO_DEPRECATED_SYMBOLS */
- HDassert(0 && "version 1 error stack print without deprecated symbols!");
+ assert(0 && "version 1 error stack print without deprecated symbols!");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* end if */
else {
@@ -493,8 +491,8 @@ H5E__walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *o
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(estack);
- HDassert(op);
+ assert(estack);
+ assert(op);
/* check args, but rather than failing use some default value */
if (direction != H5E_WALK_UPWARD && direction != H5E_WALK_DOWNWARD)
@@ -539,11 +537,11 @@ H5E__walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *o
HERROR(H5E_ERROR, H5E_CANTLIST, "can't walk error stack");
} /* end if */
#else /* H5_NO_DEPRECATED_SYMBOLS */
- HDassert(0 && "version 1 error stack walk without deprecated symbols!");
+ assert(0 && "version 1 error stack walk without deprecated symbols!");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* end if */
else {
- HDassert(op->vers == 2);
+ assert(op->vers == 2);
if (op->u.func2) {
ret_value = SUCCEED;
if (H5E_WALK_UPWARD == direction) {
@@ -585,7 +583,7 @@ H5E__get_auto(const H5E_t *estack, H5E_auto_op_t *op, void **client_data)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(estack);
+ assert(estack);
/* Retrieve the requested information */
if (op)
@@ -624,7 +622,7 @@ H5E__set_auto(H5E_t *estack, const H5E_auto_op_t *op, void *client_data)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(estack);
+ assert(estack);
/* Set the automatic error reporting info */
estack->auto_op = *op;
@@ -664,10 +662,10 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(cls_id > 0);
- HDassert(maj_id > 0);
- HDassert(min_id > 0);
- HDassert(fmt);
+ assert(cls_id > 0);
+ assert(maj_id > 0);
+ assert(min_id > 0);
+ assert(fmt);
/* Note that the variable-argument parsing for the format is identical in
* the H5Epush2() routine - correct errors and make changes in both
@@ -675,7 +673,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
*/
/* Start the variable-argument parsing */
- HDva_start(ap, fmt);
+ va_start(ap, fmt);
va_started = TRUE;
/* Use the vasprintf() routine, since it does what we're trying to do below */
@@ -688,12 +686,12 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
done:
if (va_started)
- HDva_end(ap);
+ va_end(ap);
/* Memory was allocated with HDvasprintf so it needs to be freed
- * with HDfree
+ * with free
*/
if (tmp)
- HDfree(tmp);
+ free(tmp);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_printf_stack() */
@@ -734,9 +732,9 @@ H5E__push_stack(H5E_t *estack, const char *file, const char *func, unsigned line
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(cls_id > 0);
- HDassert(maj_id > 0);
- HDassert(min_id > 0);
+ assert(cls_id > 0);
+ assert(maj_id > 0);
+ assert(min_id > 0);
/* Check for 'default' error stack */
if (estack == NULL)
@@ -758,7 +756,7 @@ H5E__push_stack(H5E_t *estack, const char *file, const char *func, unsigned line
/*
* Push the error if there's room. Otherwise just forget it.
*/
- HDassert(estack);
+ assert(estack);
if (estack->nused < H5E_NSLOTS) {
/* Increment the IDs to indicate that they are used in this stack */
@@ -809,8 +807,8 @@ H5E__clear_entries(H5E_t *estack, size_t nentries)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(estack);
- HDassert(estack->nused >= nentries);
+ assert(estack);
+ assert(estack->nused >= nentries);
/* Empty the error stack from the top down */
for (u = 0; nentries > 0; nentries--, u++) {
@@ -869,7 +867,7 @@ H5E_clear_stack(H5E_t *estack)
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Empty the error stack */
- HDassert(estack);
+ assert(estack);
if (estack->nused)
if (H5E__clear_entries(estack, estack->nused) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't clear error stack")
@@ -899,8 +897,8 @@ H5E__pop(H5E_t *estack, size_t count)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(estack);
- HDassert(estack->nused >= count);
+ assert(estack);
+ assert(estack->nused >= count);
/* Remove the entries from the error stack */
if (H5E__clear_entries(estack, count) < 0)
@@ -935,7 +933,7 @@ H5E_dump_api_stack(hbool_t is_api)
if (is_api) {
H5E_t *estack = H5E__get_my_stack();
- HDassert(estack);
+ assert(estack);
#ifdef H5_NO_DEPRECATED_SYMBOLS
if (estack->auto_op.func2)
diff --git a/src/H5F.c b/src/H5F.c
index f533a8d..7b88519 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1259,7 +1259,7 @@ H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "can't create VOL object for root group")
} /* end if */
else {
- HDassert(H5I_GROUP == loc_type);
+ assert(H5I_GROUP == loc_type);
if (NULL == (loc_vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get location object")
} /* end else */
@@ -1292,7 +1292,7 @@ H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id)
done:
/* Clean up if we temporarily opened the root group for a file */
if (grp) {
- HDassert(loc_vol_obj);
+ assert(loc_vol_obj);
if (H5VL_group_close(loc_vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_FILE, H5E_CLOSEERROR, FAIL, "unable to release group")
if (H5VL_free_object(loc_vol_obj) < 0)
@@ -1369,7 +1369,7 @@ H5Funmount(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "can't create VOL object for root group")
} /* end if */
else {
- HDassert(H5I_GROUP == loc_type);
+ assert(H5I_GROUP == loc_type);
if (NULL == (loc_vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get location object")
} /* end else */
@@ -1388,7 +1388,7 @@ H5Funmount(hid_t loc_id, const char *name)
done:
/* Clean up if we temporarily opened the root group for a file */
if (grp) {
- HDassert(loc_vol_obj);
+ assert(loc_vol_obj);
if (H5VL_group_close(loc_vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_FILE, H5E_CLOSEERROR, FAIL, "unable to release group")
if (H5VL_free_object(loc_vol_obj) < 0)
diff --git a/src/H5FA.c b/src/H5FA.c
index 59ec66f..1efc749 100644
--- a/src/H5FA.c
+++ b/src/H5FA.c
@@ -111,8 +111,8 @@ H5FA__new(H5F_t *f, haddr_t fa_addr, hbool_t from_open, void *ctx_udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(fa_addr));
+ assert(f);
+ assert(H5F_addr_defined(fa_addr));
/* Allocate fixed array wrapper */
if (NULL == (fa = H5FL_CALLOC(H5FA_t)))
@@ -175,8 +175,8 @@ H5FA_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata)
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
/* H5FA interface sanity check */
HDcompile_assert(H5FA_NUM_CLS_ID == NELMTS(H5FA_client_class_g));
@@ -223,8 +223,8 @@ H5FA_open(H5F_t *f, haddr_t fa_addr, void *ctx_udata)
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(fa_addr));
+ assert(f);
+ assert(H5F_addr_defined(fa_addr));
/* Allocate and initialize new fixed array wrapper */
if (NULL == (fa = H5FA__new(f, fa_addr, TRUE, ctx_udata)))
@@ -260,8 +260,8 @@ H5FA_get_nelmts(const H5FA_t *fa, hsize_t *nelmts)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(fa);
- HDassert(nelmts);
+ assert(fa);
+ assert(nelmts);
/* Retrieve the current number of elements in the fixed array */
*nelmts = fa->hdr->stats.nelmts;
@@ -287,9 +287,9 @@ H5FA_get_addr(const H5FA_t *fa, haddr_t *addr)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(fa);
- HDassert(fa->hdr);
- HDassert(addr);
+ assert(fa);
+ assert(fa->hdr);
+ assert(addr);
/* Retrieve the address of the fixed array's header */
*addr = fa->hdr->addr;
@@ -324,8 +324,8 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(fa);
- HDassert(fa->hdr);
+ assert(fa);
+ assert(fa->hdr);
/* Set the shared array header's file context for this operation */
hdr->f = fa->f;
@@ -338,7 +338,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, FAIL, "unable to create fixed array data block")
}
- HDassert(idx < hdr->cparam.nelmts);
+ assert(idx < hdr->cparam.nelmts);
/* Protect data block */
if (NULL == (dblock = H5FA__dblock_protect(hdr, hdr->dblk_addr, H5AC__NO_FLAGS_SET)))
@@ -435,8 +435,8 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(fa);
- HDassert(fa->hdr);
+ assert(fa);
+ assert(fa->hdr);
/* Set the shared array header's file context for this operation */
hdr->f = fa->f;
@@ -449,7 +449,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt)
} /* end if */
else {
/* Get the data block */
- HDassert(H5F_addr_defined(hdr->dblk_addr));
+ assert(H5F_addr_defined(hdr->dblk_addr));
if (NULL == (dblock = H5FA__dblock_protect(hdr, hdr->dblk_addr, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL,
"unable to protect fixed array data block, address = %llu",
@@ -538,7 +538,7 @@ H5FA_close(H5FA_t *fa)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(fa);
+ assert(fa);
/* Close the header if it was set */
if (fa->hdr) {
@@ -574,9 +574,9 @@ H5FA_close(H5FA_t *fa)
"unable to check metadata cache status for fixed array header")
/* Sanity checks on header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PINNED);
- HDassert(!(hdr_status & H5AC_ES__IS_PROTECTED));
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PINNED);
+ assert(!(hdr_status & H5AC_ES__IS_PROTECTED));
}
#endif /* NDEBUG */
@@ -639,8 +639,8 @@ H5FA_delete(H5F_t *f, haddr_t fa_addr, void *ctx_udata)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(fa_addr));
+ assert(f);
+ assert(H5F_addr_defined(fa_addr));
/* Lock the array header into memory */
if (NULL == (hdr = H5FA__hdr_protect(f, fa_addr, ctx_udata, H5AC__NO_FLAGS_SET)))
@@ -693,9 +693,9 @@ H5FA_iterate(H5FA_t *fa, H5FA_operator_t op, void *udata)
FUNC_ENTER_NOAPI(H5_ITER_ERROR)
/* Check arguments */
- HDassert(fa);
- HDassert(op);
- HDassert(udata);
+ assert(fa);
+ assert(op);
+ assert(udata);
/* Allocate space for a native array element */
if (NULL == (elmt = H5FL_BLK_MALLOC(fa_native_elmt, fa->hdr->cparam.cls->nat_elmt_size)))
@@ -744,9 +744,9 @@ H5FA_depend(H5FA_t *fa, H5AC_proxy_entry_t *parent)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(fa);
- HDassert(hdr);
- HDassert(parent);
+ assert(fa);
+ assert(hdr);
+ assert(parent);
/*
* Check to see if a flush dependency between the fixed array
@@ -755,7 +755,7 @@ H5FA_depend(H5FA_t *fa, H5AC_proxy_entry_t *parent)
*/
if (NULL == hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Set the shared array header's file context for this operation */
hdr->f = fa->f;
@@ -788,8 +788,8 @@ H5FA_patch_file(H5FA_t *fa, H5F_t *f)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(fa);
- HDassert(f);
+ assert(fa);
+ assert(f);
if (fa->f != f || fa->hdr->f != f)
fa->f = fa->hdr->f = f;
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index fdd56ff..562c56a 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -174,9 +174,9 @@ H5FA__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->f);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5FA_HEADER_SIZE_FILE(udata->f);
@@ -208,7 +208,7 @@ H5FA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -246,9 +246,9 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(H5F_addr_defined(udata->addr));
+ assert(udata);
+ assert(udata->f);
+ assert(H5F_addr_defined(udata->addr));
/* Allocate space for the fixed array data structure */
if (NULL == (hdr = H5FA__hdr_alloc(udata->f)))
@@ -258,7 +258,7 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
hdr->addr = udata->addr;
/* Magic number */
- if (HDmemcmp(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, NULL, "wrong fixed array header signature")
image += H5_SIZEOF_MAGIC;
@@ -305,7 +305,7 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM));
/* checksum verification already done in verify_chksum cb */
@@ -313,12 +313,12 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == len);
+ assert((size_t)(image - (const uint8_t *)_image) == len);
/* Finish initializing fixed array header */
if (H5FA__hdr_init(hdr, udata->ctx_udata) < 0)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL, "initialization failed for fixed array header")
- HDassert(hdr->size == len);
+ assert(hdr->size == len);
/* Set return value */
ret_value = hdr;
@@ -352,8 +352,8 @@ H5FA__cache_hdr_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(hdr);
- HDassert(image_len);
+ assert(hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = hdr->size;
@@ -383,9 +383,9 @@ H5FA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(hdr);
+ assert(f);
+ assert(image);
+ assert(hdr);
/* Magic number */
H5MM_memcpy(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -395,7 +395,7 @@ H5FA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5FA_HDR_VERSION;
/* Fixed array type */
- HDassert(hdr->cparam.cls->id <= 255);
+ assert(hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)hdr->cparam.cls->id;
/* General array creation/configuration information */
@@ -417,7 +417,7 @@ H5FA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FA__cache_hdr_serialize() */
@@ -443,7 +443,7 @@ H5FA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Check if the file was opened with SWMR-write access */
if (hdr->swmr_write) {
@@ -467,7 +467,7 @@ H5FA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
*/
if (hdr->parent) {
/* Sanity check */
- HDassert(hdr->top_proxy);
+ assert(hdr->top_proxy);
/* Destroy flush dependency on object header proxy */
if (H5AC_proxy_entry_remove_child((H5AC_proxy_entry_t *)hdr->parent,
@@ -491,12 +491,12 @@ H5FA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
} /* end if */
else
- HDassert(NULL == hdr->parent);
+ assert(NULL == hdr->parent);
done:
@@ -524,7 +524,7 @@ H5FA__cache_hdr_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the extensible array header */
if (H5FA__hdr_dest((H5FA_hdr_t *)thing) < 0)
@@ -556,13 +556,13 @@ H5FA__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(image_len);
/* Set up fake data block for computing size on disk */
/* (Note: extracted from H5FA__dblock_alloc) */
- HDmemset(&dblock, 0, sizeof(dblock));
+ memset(&dblock, 0, sizeof(dblock));
/* Set up fake data block for computing size on disk
*
@@ -610,7 +610,7 @@ H5FA__cache_dblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -648,21 +648,21 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(udata);
- HDassert(udata->hdr);
+ assert(udata);
+ assert(udata->hdr);
/* Allocate the fixed array data block */
if (NULL == (dblock = H5FA__dblock_alloc(udata->hdr)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for fixed array data block")
- HDassert(((!dblock->npages) && (len == (size_t)H5FA_DBLOCK_SIZE(dblock))) ||
- (len == (size_t)H5FA_DBLOCK_PREFIX_SIZE(dblock)));
+ assert(((!dblock->npages) && (len == (size_t)H5FA_DBLOCK_SIZE(dblock))) ||
+ (len == (size_t)H5FA_DBLOCK_PREFIX_SIZE(dblock)));
/* Set the fixed array data block's information */
dblock->addr = udata->dblk_addr;
/* Magic number */
- if (HDmemcmp(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, NULL, "wrong fixed array data block signature")
image += H5_SIZEOF_MAGIC;
@@ -697,7 +697,7 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM));
/* Set the data block's size */
dblock->size = H5FA_DBLOCK_SIZE(dblock);
@@ -708,7 +708,7 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == len);
+ assert((size_t)(image - (const uint8_t *)_image) == len);
/* Set return value */
ret_value = dblock;
@@ -742,8 +742,8 @@ H5FA__cache_dblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblock);
- HDassert(image_len);
+ assert(dblock);
+ assert(image_len);
/* Set the image length size */
if (!dblock->npages)
@@ -777,10 +777,10 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(dblock);
- HDassert(dblock->hdr);
+ assert(f);
+ assert(image);
+ assert(dblock);
+ assert(dblock->hdr);
/* Magic number */
H5MM_memcpy(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -790,7 +790,7 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5FA_DBLOCK_VERSION;
/* Fixed array type */
- HDassert(dblock->hdr->cparam.cls->id <= 255);
+ assert(dblock->hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)dblock->hdr->cparam.cls->id;
/* Address of array header for array which owns this block */
@@ -822,7 +822,7 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -849,7 +849,7 @@ H5FA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblock);
+ assert(dblock);
/* Check if the file was opened with SWMR-write access */
if (dblock->hdr->swmr_write) {
@@ -893,7 +893,7 @@ H5FA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif
} /* end switch */
} /* end if */
@@ -924,7 +924,7 @@ H5FA__cache_dblock_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(dblock);
+ assert(dblock);
/* Release the fixed array data block */
if (H5FA__dblock_dest(dblock) < 0)
@@ -971,10 +971,10 @@ H5FA__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FARRAY_DBLOCK);
- HDassert(fsf_size);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FARRAY_DBLOCK);
+ assert(fsf_size);
*fsf_size = dblock->size;
@@ -1001,10 +1001,10 @@ H5FA__cache_dblk_page_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->nelmts > 0);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->nelmts > 0);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5FA_DBLK_PAGE_SIZE(udata->hdr, udata->nelmts);
@@ -1036,7 +1036,7 @@ H5FA__cache_dblk_page_verify_chksum(const void *_image, size_t len, void H5_ATTR
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -1073,10 +1073,10 @@ H5FA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
/* Sanity check */
FUNC_ENTER_PACKAGE
- HDassert(udata);
- HDassert(udata->hdr);
- HDassert(udata->nelmts > 0);
- HDassert(H5F_addr_defined(udata->dblk_page_addr));
+ assert(udata);
+ assert(udata->hdr);
+ assert(udata->nelmts > 0);
+ assert(H5F_addr_defined(udata->dblk_page_addr));
/* Allocate the fixed array data block page */
if (NULL == (dblk_page = H5FA__dblk_page_alloc(udata->hdr, udata->nelmts)))
@@ -1096,7 +1096,7 @@ H5FA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (len - H5FA_SIZEOF_CHKSUM));
/* Set the data block page's size */
dblk_page->size = len;
@@ -1107,7 +1107,7 @@ H5FA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata,
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == dblk_page->size);
+ assert((size_t)(image - (const uint8_t *)_image) == dblk_page->size);
/* Set return value */
ret_value = dblk_page;
@@ -1142,8 +1142,8 @@ H5FA__cache_dblk_page_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblk_page);
- HDassert(image_len);
+ assert(dblk_page);
+ assert(image_len);
/* Set the image length size */
*image_len = dblk_page->size;
@@ -1175,10 +1175,10 @@ H5FA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_ima
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(image);
- HDassert(dblk_page);
- HDassert(dblk_page->hdr);
+ assert(f);
+ assert(image);
+ assert(dblk_page);
+ assert(dblk_page->hdr);
/* Internal information */
@@ -1197,7 +1197,7 @@ H5FA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_ima
UINT32ENCODE(image, metadata_chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1224,7 +1224,7 @@ H5FA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblk_page);
+ assert(dblk_page);
/* Determine which action to take */
switch (action) {
@@ -1258,7 +1258,7 @@ H5FA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
@@ -1287,7 +1287,7 @@ H5FA__cache_dblk_page_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(thing);
+ assert(thing);
/* Release the fixed array data block page */
if (H5FA__dblk_page_dest((H5FA_dblk_page_t *)thing) < 0)
diff --git a/src/H5FAdbg.c b/src/H5FAdbg.c
index 2ec1463..713e671 100644
--- a/src/H5FAdbg.c
+++ b/src/H5FAdbg.c
@@ -90,13 +90,13 @@ H5FA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(H5F_addr_defined(obj_addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(cls);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(obj_addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(cls);
/* Check for debugging context callback available */
if (cls->crt_dbg_ctx)
@@ -109,24 +109,24 @@ H5FA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to load fixed array header")
/* Print opening message */
- HDfprintf(stream, "%*sFixed Array Header...\n", indent, "");
+ fprintf(stream, "%*sFixed Array Header...\n", indent, "");
/* Print the values */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of elements in data block page:",
- (unsigned)((size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits));
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of elements in data block page:",
+ (unsigned)((size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits));
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of elements in Fixed Array:", hdr->stats.nelmts);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of elements in Fixed Array:", hdr->stats.nelmts);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Fixed Array Data Block Address:", hdr->dblk_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Fixed Array Data Block Address:", hdr->dblk_addr);
done:
if (dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0)
@@ -163,14 +163,14 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(cls);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(H5F_addr_defined(obj_addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(cls);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(H5F_addr_defined(obj_addr));
/* Check for debugging context callback available */
if (cls->crt_dbg_ctx)
@@ -188,24 +188,24 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
"unable to protect fixed array data block, address = %llu", (unsigned long long)addr)
/* Print opening message */
- HDfprintf(stream, "%*sFixed Array data Block...\n", indent, "");
+ fprintf(stream, "%*sFixed Array data Block...\n", indent, "");
/* Print the values */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of Data Block:", dblock->addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Data Block size:", dblock->size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of elements in Data Block:", hdr->cparam.nelmts);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Number of pages in Data Block:", dblock->npages);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Number of elements per Data Block page:", dblock->dblk_page_nelmts);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of Data Block:", dblock->addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Data Block size:", dblock->size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of elements in Data Block:", hdr->cparam.nelmts);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Number of pages in Data Block:", dblock->npages);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Number of elements per Data Block page:", dblock->dblk_page_nelmts);
if (dblock->npages) { /* paging */
size_t dblk_page_nelmts; /* # of elements in a data block page */
haddr_t dblk_page_addr; /* Address of a data block page */
size_t page_idx; /* Page index within data block */
- HDfprintf(stream, "%*sPaging:\n", indent, "");
+ fprintf(stream, "%*sPaging:\n", indent, "");
/* Iterate over the pages */
dblk_page_addr = dblock->addr + H5FA_DBLOCK_PREFIX_SIZE(dblock);
@@ -214,7 +214,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/* Read and print each page's elements in the data block */
for (page_idx = 0; page_idx < dblock->npages; page_idx++) {
if (!H5VM_bit_get(dblock->dblk_page_init, page_idx)) {
- HDfprintf(stream, "%*s%-*s %zu %s\n", indent, "", fwidth, "Page %zu:", page_idx, "empty");
+ fprintf(stream, "%*s%-*s %zu %s\n", indent, "", fwidth, "Page %zu:", page_idx, "empty");
} /* end if */
else { /* get the page */
@@ -232,7 +232,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
"unable to protect fixed array data block page, address = %llu",
(unsigned long long)dblk_page_addr)
- HDfprintf(stream, "%*sElements in page %zu:\n", indent, "", page_idx);
+ fprintf(stream, "%*sElements in page %zu:\n", indent, "", page_idx);
for (u = 0; u < dblk_page_nelmts; u++) {
/* Call the class's 'debug' callback */
if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u,
@@ -251,7 +251,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
} /* end if */
else { /* not paging */
/* Print the elements in the data block */
- HDfprintf(stream, "%*sElements:\n", indent, "");
+ fprintf(stream, "%*sElements:\n", indent, "");
for (u = 0; u < hdr->cparam.nelmts; u++) {
/* Call the class's 'debug' callback */
if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u,
diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c
index 35d79ae..4af1fd4 100644
--- a/src/H5FAdblkpage.c
+++ b/src/H5FAdblkpage.c
@@ -92,7 +92,7 @@ H5FA__dblk_page_alloc(H5FA_hdr_t *hdr, size_t nelmts)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
+ assert(hdr);
/* Allocate memory for the data block */
if (NULL == (dblk_page = H5FL_CALLOC(H5FA_dblk_page_t)))
@@ -146,11 +146,11 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts)
FUNC_ENTER_PACKAGE
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: Called, addr = %" PRIuHADDR "\n", __func__, addr);
+ fprintf(stderr, "%s: Called, addr = %" PRIuHADDR "\n", __func__, addr);
#endif /* H5FA_DEBUG */
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Allocate the data block page */
if (NULL == (dblk_page = H5FA__dblk_page_alloc(hdr, nelmts)))
@@ -161,7 +161,7 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts)
dblk_page->addr = addr;
dblk_page->size = H5FA_DBLK_PAGE_SIZE(hdr, nelmts);
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: dblk_page->size = %Zu\n", __func__, dblk_page->size);
+ fprintf(stderr, "%s: dblk_page->size = %Zu\n", __func__, dblk_page->size);
#endif /* H5FA_DEBUG */
/* Clear any elements in data block page to fill value */
@@ -222,15 +222,15 @@ H5FA__dblk_page_protect(H5FA_hdr_t *hdr, haddr_t dblk_page_addr, size_t dblk_pag
FUNC_ENTER_PACKAGE
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: Called\n", __func__);
+ fprintf(stderr, "%s: Called\n", __func__);
#endif /* H5FA_DEBUG */
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(dblk_page_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(dblk_page_addr));
/* only the H5AC__READ_ONLY_FLAG is permitted */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data */
udata.hdr = hdr;
@@ -292,11 +292,11 @@ H5FA__dblk_page_unprotect(H5FA_dblk_page_t *dblk_page, unsigned cache_flags)
FUNC_ENTER_PACKAGE
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: Called\n", __func__);
+ fprintf(stderr, "%s: Called\n", __func__);
#endif /* H5FA_DEBUG */
/* Sanity check */
- HDassert(dblk_page);
+ assert(dblk_page);
/* Unprotect the data block page */
if (H5AC_unprotect(dblk_page->hdr->f, H5AC_FARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, cache_flags) < 0)
@@ -328,7 +328,7 @@ H5FA__dblk_page_dest(H5FA_dblk_page_t *dblk_page)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblk_page);
+ assert(dblk_page);
/* Check if header field has been initialized */
if (dblk_page->hdr) {
@@ -346,7 +346,7 @@ H5FA__dblk_page_dest(H5FA_dblk_page_t *dblk_page)
} /* end if */
/* Sanity check */
- HDassert(NULL == dblk_page->top_proxy);
+ assert(NULL == dblk_page->top_proxy);
/* Free the data block page itself */
dblk_page = H5FL_FREE(H5FA_dblk_page_t, dblk_page);
diff --git a/src/H5FAdblock.c b/src/H5FAdblock.c
index 8fe026f..c67e5d0 100644
--- a/src/H5FAdblock.c
+++ b/src/H5FAdblock.c
@@ -96,8 +96,8 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
- HDassert(hdr->cparam.nelmts > 0);
+ assert(hdr);
+ assert(hdr->cparam.nelmts > 0);
/* Allocate memory for the data block */
if (NULL == (dblock = H5FL_CALLOC(H5FA_dblock_t)))
@@ -120,11 +120,11 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr)
H5_CHECKED_ASSIGN(dblock->npages, size_t, npages, hsize_t);
/* Sanity check that we have at least 1 page */
- HDassert(dblock->npages > 0);
+ assert(dblock->npages > 0);
/* Compute size of 'page init' flag array, in bytes */
dblock->dblk_page_init_size = (dblock->npages + 7) / 8;
- HDassert(dblock->dblk_page_init_size > 0);
+ assert(dblock->dblk_page_init_size > 0);
/* Allocate space for 'page init' flags */
if (NULL == (dblock->dblk_page_init = H5FL_BLK_CALLOC(fa_page_init, dblock->dblk_page_init_size)))
@@ -183,8 +183,8 @@ H5FA__dblock_create(H5FA_hdr_t *hdr, hbool_t *hdr_dirty)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr_dirty);
+ assert(hdr);
+ assert(hdr_dirty);
/* Allocate the data block */
if (NULL == (dblock = H5FA__dblock_alloc(hdr)))
@@ -271,11 +271,11 @@ H5FA__dblock_protect(H5FA_hdr_t *hdr, haddr_t dblk_addr, unsigned flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(dblk_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(dblk_addr));
/* only the H5AC__READ_ONLY_FLAG flag is permitted */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data */
udata.hdr = hdr;
@@ -332,7 +332,7 @@ H5FA__dblock_unprotect(H5FA_dblock_t *dblock, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblock);
+ assert(dblock);
/* Unprotect the data block */
if (H5AC_unprotect(dblock->hdr->f, H5AC_FARRAY_DBLOCK, dblock->addr, dblock, cache_flags) < 0)
@@ -365,8 +365,8 @@ H5FA__dblock_delete(H5FA_hdr_t *hdr, haddr_t dblk_addr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(H5F_addr_defined(dblk_addr));
+ assert(hdr);
+ assert(H5F_addr_defined(dblk_addr));
/* Protect data block */
if (NULL == (dblock = H5FA__dblock_protect(hdr, dblk_addr, H5AC__NO_FLAGS_SET)))
@@ -423,21 +423,21 @@ H5FA__dblock_dest(H5FA_dblock_t *dblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblock);
+ assert(dblock);
/* Check if shared header field has been initialized */
if (dblock->hdr) {
/* Check if we've got elements in the data block */
if (dblock->elmts && !dblock->npages) {
/* Free buffer for data block elements */
- HDassert(dblock->hdr->cparam.nelmts > 0);
+ assert(dblock->hdr->cparam.nelmts > 0);
dblock->elmts = H5FL_BLK_FREE(chunk_elmts, dblock->elmts);
} /* end if */
/* Check if data block is paged */
if (dblock->npages) {
/* Free buffer for 'page init' bitmask, if there is one */
- HDassert(dblock->dblk_page_init_size > 0);
+ assert(dblock->dblk_page_init_size > 0);
if (dblock->dblk_page_init)
dblock->dblk_page_init = H5FL_BLK_FREE(fa_page_init, dblock->dblk_page_init);
} /* end if */
@@ -450,7 +450,7 @@ H5FA__dblock_dest(H5FA_dblock_t *dblock)
} /* end if */
/* Sanity check */
- HDassert(NULL == dblock->top_proxy);
+ assert(NULL == dblock->top_proxy);
/* Free the data block itself */
dblock = H5FL_FREE(H5FA_dblock_t, dblock);
diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c
index ffa8a67..b15988c 100644
--- a/src/H5FAhdr.c
+++ b/src/H5FAhdr.c
@@ -90,7 +90,7 @@ H5FA__hdr_alloc(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
+ assert(f);
/* Allocate space for the shared information */
if (NULL == (hdr = H5FL_CALLOC(H5FA_hdr_t)))
@@ -135,7 +135,7 @@ H5FA__hdr_init(H5FA_hdr_t *hdr, void *ctx_udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
+ assert(hdr);
/* Set size of header on disk (locally and in statistics) */
hdr->stats.hdr_size = hdr->size = H5FA_HEADER_SIZE_HDR(hdr);
@@ -176,8 +176,8 @@ H5FA__hdr_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
#ifndef NDEBUG
{
@@ -271,7 +271,7 @@ H5FA__hdr_incr(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Mark header as un-evictable when something is depending on it */
if (hdr->rc == 0)
@@ -305,15 +305,15 @@ H5FA__hdr_decr(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->rc);
+ assert(hdr);
+ assert(hdr->rc);
/* Decrement reference count on shared header */
hdr->rc--;
/* Mark header as evictable again when nothing depend on it */
if (hdr->rc == 0) {
- HDassert(hdr->file_rc == 0);
+ assert(hdr->file_rc == 0);
if (H5AC_unpin_entry(hdr) < 0)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNPIN, FAIL, "unable to unpin fixed array header")
}
@@ -340,7 +340,7 @@ H5FA__hdr_fuse_incr(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Increment file reference count on shared header */
hdr->file_rc++;
@@ -369,8 +369,8 @@ H5FA__hdr_fuse_decr(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->file_rc);
+ assert(hdr);
+ assert(hdr->file_rc);
/* Decrement file reference count on shared header */
hdr->file_rc--;
@@ -401,7 +401,7 @@ H5FA__hdr_modified(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Mark header as dirty in cache */
if (H5AC_mark_entry_dirty(hdr) < 0)
@@ -433,11 +433,11 @@ H5FA__hdr_protect(H5F_t *f, haddr_t fa_addr, void *ctx_udata, unsigned flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(fa_addr));
+ assert(f);
+ assert(H5F_addr_defined(fa_addr));
/* only the H5AC__READ_ONLY_FLAG is permitted */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up user data for cache callbacks */
udata.f = f;
@@ -489,7 +489,7 @@ H5FA__hdr_unprotect(H5FA_hdr_t *hdr, unsigned cache_flags)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Unprotect the header */
if (H5AC_unprotect(hdr->f, H5AC_FARRAY_HDR, hdr->addr, hdr, cache_flags) < 0)
@@ -521,8 +521,8 @@ H5FA__hdr_delete(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(!hdr->file_rc);
+ assert(hdr);
+ assert(!hdr->file_rc);
#ifndef NDEBUG
@@ -533,8 +533,8 @@ H5FA__hdr_delete(H5FA_hdr_t *hdr)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, "unable to check metadata cache status for array header")
/* Sanity checks on array header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PROTECTED);
#endif /* NDEBUG */
@@ -576,8 +576,8 @@ H5FA__hdr_dest(H5FA_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(hdr);
- HDassert(hdr->rc == 0);
+ assert(hdr);
+ assert(hdr->rc == 0);
/* Destroy the callback context */
if (hdr->cb_ctx) {
diff --git a/src/H5FAint.c b/src/H5FAint.c
index 1a5ab75..0c12f38 100644
--- a/src/H5FAint.c
+++ b/src/H5FAint.c
@@ -86,8 +86,8 @@ H5FA__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Create a flush dependency between parent and child entry */
if (H5AC_create_flush_dependency(parent_entry, child_entry) < 0)
@@ -117,8 +117,8 @@ H5FA__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Destroy a flush dependency between parent and child entry */
if (H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0)
diff --git a/src/H5FAstat.c b/src/H5FAstat.c
index 8238c19..9603648 100644
--- a/src/H5FAstat.c
+++ b/src/H5FAstat.c
@@ -83,12 +83,12 @@ H5FA_get_stats(const H5FA_t *fa, H5FA_stat_t *stats)
FUNC_ENTER_NOAPI_NOERR
#ifdef H5FA_DEBUG
- HDfprintf(stderr, "%s: Called\n", __func__);
+ fprintf(stderr, "%s: Called\n", __func__);
#endif /* H5FA_DEBUG */
/* Check arguments */
- HDassert(fa);
- HDassert(stats);
+ assert(fa);
+ assert(stats);
/* Copy fixed array statistics */
H5MM_memcpy(stats, &fa->hdr->stats, sizeof(fa->hdr->stats));
diff --git a/src/H5FAtest.c b/src/H5FAtest.c
index ffd064d..7159650 100644
--- a/src/H5FAtest.c
+++ b/src/H5FAtest.c
@@ -153,7 +153,7 @@ H5FA__test_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
+ assert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
/* Release context structure */
ctx = H5FL_FREE(H5FA__test_ctx_t, ctx);
@@ -181,8 +181,8 @@ H5FA__test_fill(void *nat_blk, size_t nelmts)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(nat_blk);
- HDassert(nelmts);
+ assert(nat_blk);
+ assert(nelmts);
H5VM_array_fill(nat_blk, &fill_val, sizeof(uint64_t), nelmts);
@@ -212,10 +212,10 @@ H5FA__test_encode(void *raw, const void *_elmt, size_t nelmts, void H5_ATTR_UNUS
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
/* Encode native elements into raw elements */
while (nelmts) {
@@ -257,10 +257,10 @@ H5FA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(raw);
- HDassert(elmt);
- HDassert(nelmts);
- HDassert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
+ assert(raw);
+ assert(elmt);
+ assert(nelmts);
+ assert(H5FA__TEST_BOGUS_VAL == ctx->bogus);
/* Decode raw elements into native elements */
while (nelmts) {
@@ -298,13 +298,13 @@ H5FA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void *
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(stream);
- HDassert(elmt);
+ assert(stream);
+ assert(elmt);
/* Print element */
HDsnprintf(temp_str, sizeof(temp_str), "Element #%llu:", (unsigned long long)idx);
- HDfprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
- (unsigned long long)*(const uint64_t *)elmt);
+ fprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
+ (unsigned long long)*(const uint64_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FA__test_debug() */
@@ -362,8 +362,8 @@ H5FA__get_cparam_test(const H5FA_t *fa, H5FA_create_t *cparam)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(fa);
- HDassert(cparam);
+ assert(fa);
+ assert(cparam);
/* Get fixed array creation parameters */
cparam->raw_elmt_size = fa->hdr->cparam.raw_elmt_size;
@@ -392,8 +392,8 @@ H5FA__cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(cparam1);
- HDassert(cparam2);
+ assert(cparam1);
+ assert(cparam2);
/* Compare creation parameters for array */
if (cparam1->raw_elmt_size < cparam2->raw_elmt_size)
diff --git a/src/H5FD.c b/src/H5FD.c
index 9de4ad9..d7cc876 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -169,7 +169,7 @@ H5FD__free_cls(H5FD_class_t *cls, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(cls);
+ assert(cls);
/* If the file driver has a terminate callback, call it to give the file
* driver a chance to free singletons or other resources which will become
@@ -265,13 +265,13 @@ H5FD_register(const void *_cls, size_t size, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Sanity checks */
- HDassert(cls);
- HDassert(cls->open && cls->close);
- HDassert(cls->get_eoa && cls->set_eoa);
- HDassert(cls->get_eof);
- HDassert(cls->read && cls->write);
+ assert(cls);
+ assert(cls->open && cls->close);
+ assert(cls->get_eoa && cls->set_eoa);
+ assert(cls->get_eof);
+ assert(cls->read && cls->write);
for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; type++) {
- HDassert(cls->fl_map[type] >= H5FD_MEM_NOLIST && cls->fl_map[type] < H5FD_MEM_NTYPES);
+ assert(cls->fl_map[type] >= H5FD_MEM_NOLIST && cls->fl_map[type] < H5FD_MEM_NTYPES);
}
/* Copy the class structure so the caller can reuse or free it */
@@ -449,8 +449,8 @@ H5FD_sb_size(H5FD_t *file)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->sb_size)
@@ -481,8 +481,8 @@ H5FD_sb_encode(H5FD_t *file, char *name /*out*/, uint8_t *buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->sb_encode && (file->cls->sb_encode)(file, name /*out*/, buf /*out*/) < 0)
@@ -509,8 +509,8 @@ H5FD__sb_decode(H5FD_t *file, const char *name, const uint8_t *buf)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->sb_decode && (file->cls->sb_decode)(file, name, buf) < 0)
@@ -537,8 +537,8 @@ H5FD_sb_load(H5FD_t *file, const char *name, const uint8_t *buf)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Check if driver matches driver information saved. Unfortunately, we can't push this
* function to each specific driver because we're checking if the driver is correct.
@@ -586,8 +586,8 @@ H5FD_fapl_get(H5FD_t *file)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->fapl_get)
@@ -757,8 +757,8 @@ H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file image info")
/* If an image is provided, make sure the driver supports this feature */
- HDassert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
- ((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
+ assert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
+ ((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
if ((file_image_info.buffer != NULL) && !(driver_flags & H5FD_FEAT_ALLOW_FILE_IMAGE))
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "file image set, but not supported.")
@@ -860,8 +860,8 @@ H5FD_close(H5FD_t *file)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Prepare to close file by clearing all public fields */
driver = file->cls;
@@ -871,7 +871,7 @@ H5FD_close(H5FD_t *file)
/* Dispatch to the driver for actual close. If the driver fails to
* close the file then the file will be in an unusable state.
*/
- HDassert(driver->close);
+ assert(driver->close);
if ((driver->close)(file) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "close failed")
@@ -1009,9 +1009,9 @@ H5FD__query(const H5FD_t *file, unsigned long *flags /*out*/)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(flags);
+ assert(file);
+ assert(file->cls);
+ assert(flags);
/* Dispatch to driver (if available) */
if (file->cls->query) {
@@ -1293,7 +1293,7 @@ H5FD_get_maxaddr(const H5FD_t *file)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(file);
+ assert(file);
/* Set return value */
ret_value = file->maxaddr;
@@ -1316,8 +1316,8 @@ H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(feature_flags);
+ assert(file);
+ assert(feature_flags);
/* Set feature flags to return */
*feature_flags = file->feature_flags;
@@ -1340,7 +1340,7 @@ H5FD_set_feature_flags(H5FD_t *file, unsigned long feature_flags)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
+ assert(file);
/* Set the file's feature flags */
file->feature_flags = feature_flags;
@@ -1365,9 +1365,9 @@ H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type_map);
+ assert(file);
+ assert(file->cls);
+ assert(type_map);
/* Check for VFD class providing a type map retrieval routine */
if (file->cls->get_type_map) {
@@ -1893,8 +1893,8 @@ H5FD_flush(H5FD_t *file, hbool_t closing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->flush && (file->cls->flush)(file, H5CX_get_dxpl(), closing) < 0)
@@ -1959,8 +1959,8 @@ H5FD_truncate(H5FD_t *file, hbool_t closing)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->truncate && (file->cls->truncate)(file, H5CX_get_dxpl(), closing) < 0)
@@ -2018,8 +2018,8 @@ H5FD_lock(H5FD_t *file, hbool_t rw)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->lock && (file->cls->lock)(file, rw) < 0)
@@ -2077,8 +2077,8 @@ H5FD_unlock(H5FD_t *file)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver */
if (file->cls->unlock && (file->cls->unlock)(file) < 0)
@@ -2166,8 +2166,8 @@ H5FD_ctl(H5FD_t *file, uint64_t op_code, uint64_t flags, const void *input, void
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
+ assert(file);
+ assert(file->cls);
/* Dispatch to driver if the ctl function exists.
*
@@ -2210,8 +2210,8 @@ H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(filenum);
+ assert(file);
+ assert(filenum);
/* Retrieve the file's serial number */
*filenum = file->fileno;
@@ -2277,9 +2277,9 @@ H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl_id, void **file_handle)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(file_handle);
+ assert(file);
+ assert(file->cls);
+ assert(file_handle);
/* Dispatch to driver */
if (NULL == file->cls->get_handle)
@@ -2306,8 +2306,8 @@ H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(H5F_addr_defined(base_addr));
+ assert(file);
+ assert(H5F_addr_defined(base_addr));
/* Set the file's base address */
file->base_addr = base_addr;
@@ -2331,7 +2331,7 @@ H5FD_get_base_addr(const H5FD_t *file)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
+ assert(file);
/* Return the file's base address */
FUNC_LEAVE_NOAPI(file->base_addr)
@@ -2352,7 +2352,7 @@ H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(file);
+ assert(file);
/* Indicate whether paged aggregation for handling file space is enabled or not */
file->paged_aggr = paged;
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 163144d..c422801 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -224,9 +224,9 @@ H5FD__core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end)
FUNC_ENTER_PACKAGE
- HDassert(file);
- HDassert(file->dirty_list);
- HDassert(start <= end);
+ assert(file);
+ assert(file->dirty_list);
+ assert(start <= end);
/* Adjust the dirty region to the nearest block boundaries */
if (start % file->bstore_page_size != 0)
@@ -323,7 +323,7 @@ H5FD__core_destroy_dirty_list(H5FD_core_t *file)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Destroy the list, including any remaining list elements */
if (file->dirty_list) {
@@ -361,7 +361,7 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
#ifndef H5_HAVE_PREADWRITE
/* Seek to the correct location (if we don't have pwrite) */
@@ -407,8 +407,8 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
(unsigned long long)bytes_wrote, (unsigned long long)offset);
} /* end if */
- HDassert(bytes_wrote > 0);
- HDassert((size_t)bytes_wrote <= size);
+ assert(bytes_wrote > 0);
+ assert((size_t)bytes_wrote <= size);
size -= (size_t)bytes_wrote;
ptr = (unsigned char *)ptr + bytes_wrote;
@@ -545,7 +545,7 @@ H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size)
old_fa = H5FD__core_get_default_config();
/* Set VFD info values */
- HDmemset(&fa, 0, sizeof(H5FD_core_fapl_t));
+ memset(&fa, 0, sizeof(H5FD_core_fapl_t));
fa.increment = old_fa->increment;
fa.backing_store = old_fa->backing_store;
fa.write_tracking = is_enabled;
@@ -629,7 +629,7 @@ H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
/* Set VFD info values */
- HDmemset(&fa, 0, sizeof(H5FD_core_fapl_t));
+ memset(&fa, 0, sizeof(H5FD_core_fapl_t));
fa.increment = increment;
fa.backing_store = backing_store;
fa.write_tracking = H5FD_CORE_WRITE_TRACKING_FLAG;
@@ -757,7 +757,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
if (ADDR_OVERFLOW(maxaddr))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "maxaddr overflow")
- HDassert(H5P_DEFAULT != fapl_id);
+ assert(H5P_DEFAULT != fapl_id);
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
if (NULL == (fa = (const H5FD_core_fapl_t *)H5P_peek_driver_info(plist)))
@@ -777,9 +777,9 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get initial file image info")
/* If the file image exists and this is an open, make sure the file doesn't exist */
- HDassert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
- ((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
- HDmemset(&sb, 0, sizeof(sb));
+ assert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) ||
+ ((file_image_info.buffer == NULL) && (file_image_info.size == 0)));
+ memset(&sb, 0, sizeof(sb));
if ((file_image_info.buffer != NULL) && !(H5F_ACC_CREAT & flags)) {
if (HDopen(name, o_flags, H5_POSIX_CREATE_MODE_RW) >= 0)
HGOTO_ERROR(H5E_FILE, H5E_FILEEXISTS, NULL, "file already exists")
@@ -937,8 +937,8 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
(unsigned long long)bytes_read, (unsigned long long)offset);
} /* end if */
- HDassert(bytes_read >= 0);
- HDassert((size_t)bytes_read <= size);
+ assert(bytes_read >= 0);
+ assert((size_t)bytes_read <= size);
mem += bytes_read;
size -= (size_t)bytes_read;
@@ -1030,7 +1030,7 @@ H5FD__core_close(H5FD_t *_file)
else
H5MM_xfree(file->mem);
} /* end if */
- HDmemset(file, 0, sizeof(H5FD_core_t));
+ memset(file, 0, sizeof(H5FD_core_t));
H5MM_xfree(file);
done:
@@ -1092,9 +1092,9 @@ H5FD__core_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
HGOTO_DONE(-1)
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
@@ -1333,8 +1333,8 @@ H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (HADDR_UNDEF == addr)
@@ -1363,7 +1363,7 @@ H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
/* Read zeros for the part which is after the EOF markers */
if (size > 0)
- HDmemset(buf, 0, size);
+ memset(buf, 0, size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1392,8 +1392,8 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (REGION_OVERFLOW(addr, size))
@@ -1428,7 +1428,7 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
"unable to allocate memory block of %llu bytes", (unsigned long long)new_eof)
} /* end else */
- HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
+ memset(x + file->eof, 0, (size_t)(new_eof - file->eof));
file->mem = x;
file->eof = new_eof;
@@ -1561,7 +1561,7 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* if we are closing and not using backing store, do nothing */
if (!closing || file->backing_store) {
@@ -1592,7 +1592,7 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing
} /* end else */
if (file->eof < new_eof)
- HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
+ memset(x + file->eof, 0, (size_t)(new_eof - file->eof));
file->mem = x;
/* Update backing store, if using it and if closing */
@@ -1662,7 +1662,7 @@ H5FD__core_lock(H5FD_t *_file, hbool_t rw)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Only set the lock if there is a file descriptor. If no file
* descriptor, this is a no-op.
@@ -1707,7 +1707,7 @@ H5FD__core_unlock(H5FD_t *_file)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
if (file->fd >= 0)
if (HDflock(file->fd, LOCK_UN) < 0) {
@@ -1743,7 +1743,7 @@ H5FD__core_delete(const char *filename, hid_t fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index ccb8c85..a1449fe 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -349,9 +349,9 @@ H5FD__direct_populate_config(size_t boundary, size_t block_size, size_t cbuf_siz
FUNC_ENTER_PACKAGE
- HDassert(fa_out);
+ assert(fa_out);
- HDmemset(fa_out, 0, sizeof(H5FD_direct_fapl_t));
+ memset(fa_out, 0, sizeof(H5FD_direct_fapl_t));
if (boundary != 0)
fa_out->mboundary = boundary;
@@ -432,7 +432,7 @@ H5FD__direct_fapl_copy(const void *_old_fa)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(new_fa);
+ assert(new_fa);
/* Copy the general information */
H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_direct_fapl_t));
@@ -476,7 +476,7 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
FUNC_ENTER_PACKAGE
/* Sanity check on file offsets */
- HDassert(sizeof(HDoff_t) >= sizeof(size_t));
+ assert(sizeof(HDoff_t) >= sizeof(size_t));
/* Check arguments */
if (!name || !*name)
@@ -549,10 +549,10 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
* is to handle correctly the case that the file is in a different file system
* than the one where the program is running.
*/
- /* NOTE: Use HDmalloc and HDfree here to ensure compatibility with
+ /* NOTE: Use malloc and free here to ensure compatibility with
* HDposix_memalign.
*/
- buf1 = HDmalloc(sizeof(int));
+ buf1 = malloc(sizeof(int));
if (HDposix_memalign(&buf2, file->fa.mboundary, file->fa.fbsize) != 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "HDposix_memalign failed")
@@ -591,9 +591,9 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
}
if (buf1)
- HDfree(buf1);
+ free(buf1);
if (buf2)
- HDfree(buf2);
+ free(buf2);
/* Set return value */
ret_value = (H5FD_t *)file;
@@ -685,9 +685,9 @@ H5FD__direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
HGOTO_DONE(-1)
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
@@ -882,8 +882,8 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (HADDR_UNDEF == addr)
@@ -921,11 +921,11 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
if (0 == nbytes) {
/* end of file but not end of format address space */
- HDmemset(buf, 0, size);
+ memset(buf, 0, size);
break;
}
- HDassert(nbytes >= 0);
- HDassert((size_t)nbytes <= size);
+ assert(nbytes >= 0);
+ assert((size_t)nbytes <= size);
H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
size -= (size_t)nbytes;
H5_CHECK_OVERFLOW(nbytes, ssize_t, haddr_t);
@@ -943,12 +943,12 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
alloc_size = ((copy_offset + size - 1) / _fbsize + 1) * _fbsize;
if (alloc_size > _cbsize)
alloc_size = _cbsize;
- HDassert(!(alloc_size % _fbsize));
+ assert(!(alloc_size % _fbsize));
if (HDposix_memalign(&copy_buf, _boundary, alloc_size) != 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed")
/* look for the aligned position for reading the data */
- HDassert(!(((addr / _fbsize) * _fbsize) % _fbsize));
+ assert(!(((addr / _fbsize) * _fbsize) % _fbsize));
if (HDlseek(file->fd, (HDoff_t)((addr / _fbsize) * _fbsize), SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
@@ -963,7 +963,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
* system calls and partial results like sec2 driver does because the
* data may no longer be aligned. It's especially true when the data in
* file is smaller than ALLOC_SIZE. */
- HDmemset(copy_buf, 0, alloc_size);
+ memset(copy_buf, 0, alloc_size);
/* Calculate how much data we have to read in this iteration
* (including unused parts of blocks) */
@@ -972,7 +972,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
else
read_size = alloc_size;
- HDassert(!(read_size % _fbsize));
+ assert(!(read_size % _fbsize));
do {
nbytes = HDread(file->fd, copy_buf, read_size);
} while (-1 == nbytes && EINTR == errno);
@@ -1003,8 +1003,8 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
addr = (haddr_t)(((addr + size - 1) / _fbsize + 1) * _fbsize);
if (copy_buf) {
- /* Free with HDfree since it came from posix_memalign */
- HDfree(copy_buf);
+ /* Free with free since it came from posix_memalign */
+ free(copy_buf);
copy_buf = NULL;
} /* end if */
}
@@ -1015,9 +1015,9 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
done:
if (ret_value < 0) {
- /* Free with HDfree since it came from posix_memalign */
+ /* Free with free since it came from posix_memalign */
if (copy_buf)
- HDfree(copy_buf);
+ free(copy_buf);
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
@@ -1065,8 +1065,8 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (HADDR_UNDEF == addr)
@@ -1101,8 +1101,8 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
} while (-1 == nbytes && EINTR == errno);
if (-1 == nbytes) /* error */
HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
- HDassert(nbytes > 0);
- HDassert((size_t)nbytes <= size);
+ assert(nbytes > 0);
+ assert((size_t)nbytes <= size);
H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
size -= (size_t)nbytes;
H5_CHECK_OVERFLOW(nbytes, ssize_t, haddr_t);
@@ -1123,7 +1123,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
alloc_size = ((copy_offset + size - 1) / _fbsize + 1) * _fbsize;
if (alloc_size > _cbsize)
alloc_size = _cbsize;
- HDassert(!(alloc_size % _fbsize));
+ assert(!(alloc_size % _fbsize));
if (HDposix_memalign(&copy_buf, _boundary, alloc_size) != 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed")
@@ -1150,11 +1150,11 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
* both ends are misaligned, otherwise only read the block on the
* misaligned end.
*/
- HDmemset(copy_buf, 0, _fbsize);
+ memset(copy_buf, 0, _fbsize);
if (copy_offset > 0) {
if ((write_addr + write_size) > (addr + size)) {
- HDassert((write_addr + write_size) - (addr + size) < _fbsize);
+ assert((write_addr + write_size) - (addr + size) < _fbsize);
read_size = write_size;
p1 = copy_buf;
} /* end if */
@@ -1164,12 +1164,12 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
} /* end else */
} /* end if */
else if ((write_addr + write_size) > (addr + size)) {
- HDassert((write_addr + write_size) - (addr + size) < _fbsize);
+ assert((write_addr + write_size) - (addr + size) < _fbsize);
read_size = _fbsize;
p1 = (unsigned char *)copy_buf + write_size - _fbsize;
/* Seek to the last block, for reading */
- HDassert(!((write_addr + write_size - _fbsize) % _fbsize));
+ assert(!((write_addr + write_size - _fbsize) % _fbsize));
if (HDlseek(file->fd, (HDoff_t)(write_addr + write_size - _fbsize), SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
} /* end if */
@@ -1177,7 +1177,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
p1 = NULL;
if (p1) {
- HDassert(!(read_size % _fbsize));
+ assert(!(read_size % _fbsize));
do {
nbytes = HDread(file->fd, p1, read_size);
} while (-1 == nbytes && EINTR == errno);
@@ -1205,7 +1205,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
} /* end else */
/*look for the aligned position for writing the data*/
- HDassert(!(write_addr % _fbsize));
+ assert(!(write_addr % _fbsize));
if (HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
@@ -1213,7 +1213,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
* Write the data. It doesn't truncate the extra data introduced by
* alignment because that step is done in H5FD_direct_flush.
*/
- HDassert(!(write_size % _fbsize));
+ assert(!(write_size % _fbsize));
do {
nbytes = HDwrite(file->fd, copy_buf, write_size);
} while (-1 == nbytes && EINTR == errno);
@@ -1230,8 +1230,8 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
buf = (const char *)buf + size;
if (copy_buf) {
- /* Free with HDfree since it came from posix_memalign */
- HDfree(copy_buf);
+ /* Free with free since it came from posix_memalign */
+ free(copy_buf);
copy_buf = NULL;
} /* end if */
}
@@ -1244,9 +1244,9 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_
done:
if (ret_value < 0) {
- /* Free with HDfree since it came from posix_memalign */
+ /* Free with free since it came from posix_memalign */
if (copy_buf)
- HDfree(copy_buf);
+ free(copy_buf);
/* Reset last file I/O information */
file->pos = HADDR_UNDEF;
@@ -1279,7 +1279,7 @@ H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_AT
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Extend the file to make sure it's large enough */
if (file->eoa != file->eof) {
@@ -1343,7 +1343,7 @@ H5FD__direct_lock(H5FD_t *_file, hbool_t rw)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Set exclusive or shared lock based on rw status */
lock_flags = rw ? LOCK_EX : LOCK_SH;
@@ -1383,7 +1383,7 @@ H5FD__direct_unlock(H5FD_t *_file)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
if (HDflock(file->fd, LOCK_UN) < 0) {
if (file->ignore_disabled_file_locks && ENOSYS == errno) {
@@ -1416,7 +1416,7 @@ H5FD__direct_delete(const char *filename, hid_t H5_ATTR_UNUSED fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
if (HDremove(filename) < 0)
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file")
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 82c65ec..d7a01d8 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -172,7 +172,7 @@ H5FD__family_get_default_config(H5FD_family_fapl_t *fa_out)
FUNC_ENTER_PACKAGE
- HDassert(fa_out);
+ assert(fa_out);
fa_out->memb_size = H5FD_FAM_DEF_MEM_SIZE;
@@ -226,7 +226,7 @@ H5FD__family_get_default_printf_filename(const char *old_filename)
FUNC_ENTER_PACKAGE
- HDassert(old_filename);
+ assert(old_filename);
old_filename_len = HDstrlen(old_filename);
if (0 == old_filename_len)
@@ -796,7 +796,7 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
unsigned n = MAX(64, 2 * file->amembs);
H5FD_t **x;
- HDassert(n > 0);
+ assert(n > 0);
if (NULL == (x = (H5FD_t **)H5MM_realloc(file->memb, n * sizeof(H5FD_t *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to reallocate members")
file->amembs = n;
@@ -942,8 +942,8 @@ H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f1->nmembs >= 1 && f1->memb[0]);
- HDassert(f2->nmembs >= 1 && f2->memb[0]);
+ assert(f1->nmembs >= 1 && f1->memb[0]);
+ assert(f2->nmembs >= 1 && f2->memb[0]);
ret_value = H5FDcmp(f1->memb[0], f2->memb[0]);
@@ -1137,7 +1137,7 @@ H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
* with `i' equal to that member. If all members have zero EOF then exit
* loop with i==0.
*/
- HDassert(file->nmembs > 0);
+ assert(file->nmembs > 0);
for (i = (int)file->nmembs - 1; i >= 0; --i) {
if ((eof = H5FD_get_eof(file->memb[i], type)) != 0)
break;
@@ -1252,7 +1252,7 @@ H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s
tempreq = SIZE_MAX;
req = MIN(size, (size_t)tempreq);
- HDassert(u < file->nmembs);
+ assert(u < file->nmembs);
if (H5FDread(file->memb[u], type, dxpl_id, sub, req, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "member file read failed")
@@ -1317,7 +1317,7 @@ H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
tempreq = SIZE_MAX;
req = MIN(size, (size_t)tempreq);
- HDassert(u < file->nmembs);
+ assert(u < file->nmembs);
if (H5FDwrite(file->memb[u], type, dxpl_id, sub, req, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "member file write failed")
@@ -1500,7 +1500,7 @@ H5FD__family_delete(const char *filename, hid_t fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
/* Get the driver info (for the member fapl)
* The family_open call accepts H5P_DEFAULT, so we'll accept that here, too.
diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c
index 2c64237..154802c 100644
--- a/src/H5FDhdfs.c
+++ b/src/H5FDhdfs.c
@@ -347,7 +347,7 @@ H5FD_hdfs_init(void)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
if (H5I_VFL != H5I_get_type(H5FD_HDFS_g))
@@ -388,7 +388,7 @@ H5FD__hdfs_term(void)
FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
/* Reset VFL ID */
@@ -422,7 +422,7 @@ H5FD__hdfs_handle_open(const char *path, const char *namenode_name, const int32_
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
if (path == NULL || path[0] == '\0')
@@ -469,7 +469,7 @@ H5FD__hdfs_handle_open(const char *path, const char *namenode_name, const int32_
done:
if (ret_value == NULL && handle != NULL) {
/* error; clean up */
- HDassert(handle->magic == HDFS_HDFST_MAGIC);
+ assert(handle->magic == HDFS_HDFST_MAGIC);
handle->magic++;
if (handle->file != NULL)
if (FAIL == (hdfsCloseFile(handle->filesystem, handle->file)))
@@ -507,7 +507,7 @@ H5FD__hdfs_handle_close(hdfs_t *handle)
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
if (handle == NULL)
@@ -558,7 +558,7 @@ H5FD__hdfs_validate_config(const H5FD_hdfs_fapl_t *fa)
FUNC_ENTER_PACKAGE
- HDassert(fa != NULL);
+ assert(fa != NULL);
if (fa->version != H5FD__CURR_HDFS_FAPL_T_VERSION)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown H5FD_hdfs_fapl_t version");
@@ -595,10 +595,10 @@ H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*#", fapl_id, fa);
- HDassert(fa != NULL);
+ assert(fa != NULL);
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
@@ -639,7 +639,7 @@ H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_dst /*out*/)
H5TRACE2("e", "ix", fapl_id, fa_dst);
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
if (fa_dst == NULL)
@@ -758,7 +758,7 @@ H5FD__hdfs_fapl_free(void *_fa)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(fa != NULL); /* sanity check */
+ assert(fa != NULL); /* sanity check */
H5MM_xfree(fa);
@@ -796,7 +796,7 @@ hdfs__reset_stats(H5FD_hdfs_t *file)
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
if (file == NULL)
@@ -854,7 +854,7 @@ H5FD__hdfs_open(const char *path, unsigned flags, hid_t fapl_id, haddr_t maxaddr
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif /* HDFS_DEBUG */
/* Sanity check on file offsets */
@@ -879,7 +879,7 @@ H5FD__hdfs_open(const char *path, unsigned flags, hid_t fapl_id, haddr_t maxaddr
if (handle == NULL)
HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "could not open")
- HDassert(handle->magic == HDFS_HDFST_MAGIC);
+ assert(handle->magic == HDFS_HDFST_MAGIC);
/* Create new file struct */
file = H5FL_CALLOC(H5FD_hdfs_t);
@@ -1025,10 +1025,10 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file)
* PRINT OVERVIEW *
******************/
- HDfprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta,
- count_raw);
- HDfprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta,
- bytes_raw);
+ fprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta,
+ count_raw);
+ fprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta,
+ bytes_raw);
if (count_raw + count_meta == 0)
goto done;
@@ -1037,60 +1037,60 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file)
* PRINT AGGREGATE STATS *
*************************/
- HDfprintf(stream, "SIZES meta raw\n");
- HDfprintf(stream, " min ");
+ fprintf(stream, "SIZES meta raw\n");
+ fprintf(stream, " min ");
if (count_meta == 0)
- HDfprintf(stream, " 0.000 ");
+ fprintf(stream, " 0.000 ");
else {
re_dub = (double)min_meta;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
}
if (count_raw == 0)
- HDfprintf(stream, " 0.000 \n");
+ fprintf(stream, " 0.000 \n");
else {
re_dub = (double)min_raw;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
}
- HDfprintf(stream, " avg ");
+ fprintf(stream, " avg ");
re_dub = (double)average_meta;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
re_dub = (double)average_raw;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
- HDfprintf(stream, " max ");
+ fprintf(stream, " max ");
re_dub = (double)max_meta;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
re_dub = (double)max_raw;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
/******************************
* PRINT INDIVIDUAL BIN STATS *
******************************/
- HDfprintf(stream, "BINS # of reads total bytes average size\n");
- HDfprintf(stream, " up-to meta raw meta raw meta raw\n");
+ fprintf(stream, "BINS # of reads total bytes average size\n");
+ fprintf(stream, " up-to meta raw meta raw meta raw\n");
for (i = 0; i <= HDFS_STATS_BIN_COUNT; i++) {
const hdfs_statsbin *m;
@@ -1114,51 +1114,51 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file)
if (i == HDFS_STATS_BIN_COUNT) {
range_end = hdfs_stats_boundaries[i - 1];
- HDfprintf(stream, ">");
+ fprintf(stream, ">");
}
else
- HDfprintf(stream, " ");
+ fprintf(stream, " ");
bm_val = (double)m->bytes;
for (suffix_i = 0; bm_val >= 1024.0; suffix_i++)
bm_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
bm_suffix = suffixes[suffix_i];
br_val = (double)r->bytes;
for (suffix_i = 0; br_val >= 1024.0; suffix_i++)
br_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
br_suffix = suffixes[suffix_i];
if (m->count > 0)
am_val = (double)(m->bytes) / (double)(m->count);
for (suffix_i = 0; am_val >= 1024.0; suffix_i++)
am_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
am_suffix = suffixes[suffix_i];
if (r->count > 0)
ar_val = (double)(r->bytes) / (double)(r->count);
for (suffix_i = 0; ar_val >= 1024.0; suffix_i++)
ar_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
ar_suffix = suffixes[suffix_i];
re_dub = (double)range_end;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
-
- HDfprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub,
- suffixes[suffix_i], /* bin ceiling */
- m->count, /* metadata reads */
- r->count, /* raw data reads */
- bm_val, bm_suffix, /* metadata bytes */
- br_val, br_suffix, /* raw data bytes */
- am_val, am_suffix, /* metadata average */
- ar_val, ar_suffix); /* raw data average */
- HDfflush(stream);
+ assert(suffix_i < sizeof(suffixes));
+
+ fprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub,
+ suffixes[suffix_i], /* bin ceiling */
+ m->count, /* metadata reads */
+ r->count, /* raw data reads */
+ bm_val, bm_suffix, /* metadata bytes */
+ br_val, br_suffix, /* raw data bytes */
+ am_val, am_suffix, /* metadata average */
+ ar_val, ar_suffix); /* raw data average */
+ fflush(stream);
}
done:
@@ -1192,13 +1192,13 @@ H5FD__hdfs_close(H5FD_t *_file)
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
/* Sanity checks */
- HDassert(file != NULL);
- HDassert(file->hdfs_handle != NULL);
- HDassert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+ assert(file != NULL);
+ assert(file->hdfs_handle != NULL);
+ assert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
/* Close the underlying request handle */
if (file->hdfs_handle != NULL)
@@ -1248,18 +1248,18 @@ H5FD__hdfs_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif /* HDFS_DEBUG */
- HDassert(f1->hdfs_handle != NULL);
- HDassert(f2->hdfs_handle != NULL);
- HDassert(f1->hdfs_handle->magic == HDFS_HDFST_MAGIC);
- HDassert(f2->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+ assert(f1->hdfs_handle != NULL);
+ assert(f2->hdfs_handle != NULL);
+ assert(f1->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+ assert(f2->hdfs_handle->magic == HDFS_HDFST_MAGIC);
finfo1 = f1->hdfs_handle->fileinfo;
finfo2 = f2->hdfs_handle->fileinfo;
- HDassert(finfo1 != NULL);
- HDassert(finfo2 != NULL);
+ assert(finfo1 != NULL);
+ assert(finfo2 != NULL);
if (finfo1->mKind != finfo2->mKind) {
HGOTO_DONE(-1);
@@ -1321,7 +1321,7 @@ H5FD__hdfs_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
if (flags) {
@@ -1359,7 +1359,7 @@ H5FD__hdfs_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
FUNC_LEAVE_NOAPI(file->eoa)
@@ -1390,7 +1390,7 @@ H5FD__hdfs_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
file->eoa = addr;
@@ -1424,11 +1424,11 @@ H5FD__hdfs_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_PACKAGE_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
- HDassert(file->hdfs_handle != NULL);
- HDassert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+ assert(file->hdfs_handle != NULL);
+ assert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
FUNC_LEAVE_NOAPI((size_t)file->hdfs_handle->fileinfo->mSize)
} /* end H5FD__hdfs_get_eof() */
@@ -1459,7 +1459,7 @@ H5FD__hdfs_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif /* HDFS_DEBUG */
if (!file_handle)
@@ -1509,13 +1509,13 @@ H5FD__hdfs_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif /* HDFS_DEBUG */
- HDassert(file != NULL);
- HDassert(file->hdfs_handle != NULL);
- HDassert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
- HDassert(buf != NULL);
+ assert(file != NULL);
+ assert(file->hdfs_handle != NULL);
+ assert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
+ assert(buf != NULL);
filesize = (size_t)file->hdfs_handle->fileinfo->mSize;
@@ -1581,7 +1581,7 @@ H5FD__hdfs_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file")
@@ -1619,7 +1619,7 @@ H5FD__hdfs_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id,
FUNC_ENTER_PACKAGE
#if HDFS_DEBUG
- HDfprintf(stdout, "called %s.\n", __func__);
+ fprintf(stdout, "called %s.\n", __func__);
#endif
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file")
diff --git a/src/H5FDint.c b/src/H5FDint.c
index 6d90aae..933acbf 100644
--- a/src/H5FDint.c
+++ b/src/H5FDint.c
@@ -155,8 +155,8 @@ H5FD_locate_signature(H5FD_t *file, haddr_t *sig_addr)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
- HDassert(file);
- HDassert(sig_addr);
+ assert(file);
+ assert(sig_addr);
/* Find the least N such that 2^N is larger than the file size */
eof = H5FD_get_eof(file, H5FD_MEM_SUPER);
@@ -177,7 +177,7 @@ H5FD_locate_signature(H5FD_t *file, haddr_t *sig_addr)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to set EOA value for file signature")
if (H5FD_read(file, H5FD_MEM_SUPER, addr, (size_t)H5F_SIGNATURE_LEN, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to read file signature")
- if (!HDmemcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN))
+ if (!memcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN))
break;
}
@@ -215,9 +215,9 @@ H5FD_read(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /*
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(buf);
+ assert(file);
+ assert(file->cls);
+ assert(buf);
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -277,9 +277,9 @@ H5FD_write(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, const void
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(buf);
+ assert(file);
+ assert(file->cls);
+ assert(buf);
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -364,18 +364,18 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -517,7 +517,7 @@ done:
/* undo the base addr offset to the addrs array if necessary */
if (addrs_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -581,18 +581,18 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -723,7 +723,7 @@ done:
/* undo the base addr offset to the addrs array if necessary */
if (addrs_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -793,13 +793,13 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Check if we're using vector I/O */
use_vector = file->cls->read_vector != NULL;
@@ -807,8 +807,8 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
if (count > 0) {
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert(element_sizes[0] != 0);
- HDassert(bufs[0] != NULL);
+ assert(element_sizes[0] != 0);
+ assert(bufs[0] != NULL);
/* Allocate sequence lists for memory and file spaces */
if (NULL == (file_iter = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -867,7 +867,7 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
{
if ((hss_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(mem_spaces[i])) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCOUNT, FAIL, "can't get number of elements selected")
- HDassert((hssize_t)nelmts == hss_nelmts);
+ assert((hssize_t)nelmts == hss_nelmts);
}
#endif /* NDEBUG */
@@ -885,23 +885,23 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
if (H5S_SELECT_ITER_GET_SEQ_LIST(file_iter, H5FD_SEQ_LIST_LEN, SIZE_MAX, &file_nseq,
&seq_nelem, file_off, file_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
- HDassert(file_nseq > 0);
+ assert(file_nseq > 0);
nelmts -= seq_nelem;
file_seq_i = 0;
}
- HDassert(file_seq_i < file_nseq);
+ assert(file_seq_i < file_nseq);
/* Fill/refill memory sequence list if necessary */
if (mem_seq_i == H5FD_SEQ_LIST_LEN) {
if (H5S_SELECT_ITER_GET_SEQ_LIST(mem_iter, H5FD_SEQ_LIST_LEN, SIZE_MAX, &mem_nseq, &seq_nelem,
mem_off, mem_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
- HDassert(mem_nseq > 0);
+ assert(mem_nseq > 0);
mem_seq_i = 0;
}
- HDassert(mem_seq_i < mem_nseq);
+ assert(mem_seq_i < mem_nseq);
/* Calculate length of this IO */
io_len = MIN(file_len[file_seq_i], mem_len[mem_seq_i]);
@@ -912,8 +912,8 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
if (vec_arr_nused == vec_arr_nalloc) {
/* Check if we're using the static arrays */
if (addrs == addrs_local) {
- HDassert(sizes == sizes_local);
- HDassert(vec_bufs == vec_bufs_local);
+ assert(sizes == sizes_local);
+ assert(vec_bufs == vec_bufs_local);
/* Allocate dynamic arrays */
if (NULL == (addrs = H5MM_malloc(sizeof(addrs_local) * 2)))
@@ -1036,9 +1036,9 @@ done:
}
/* Make sure we cleaned up */
- HDassert(!addrs || addrs == addrs_local);
- HDassert(!sizes || sizes == sizes_local);
- HDassert(!vec_bufs || vec_bufs == vec_bufs_local);
+ assert(!addrs || addrs == addrs_local);
+ assert(!sizes || sizes == sizes_local);
+ assert(!vec_bufs || vec_bufs == vec_bufs_local);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__read_selection_translate() */
@@ -1099,18 +1099,18 @@ H5FD_read_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_s
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert((count == 0) || (element_sizes[0] != 0));
- HDassert((count == 0) || (bufs[0] != NULL));
+ assert((count == 0) || (element_sizes[0] != 0));
+ assert((count == 0) || (bufs[0] != NULL));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -1203,7 +1203,7 @@ done:
/* undo the base addr offset to the offsets array if necessary */
if (offsets_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -1263,18 +1263,18 @@ H5FD_read_selection_id(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_space_ids) || (count == 0));
- HDassert((file_space_ids) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_space_ids) || (count == 0));
+ assert((file_space_ids) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert((count == 0) || (element_sizes[0] != 0));
- HDassert((count == 0) || (bufs[0] != NULL));
+ assert((count == 0) || (element_sizes[0] != 0));
+ assert((count == 0) || (bufs[0] != NULL));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -1365,7 +1365,7 @@ done:
/* undo the base addr offset to the offsets array if necessary */
if (offsets_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -1440,13 +1440,13 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Check if we're using vector I/O */
use_vector = file->cls->write_vector != NULL;
@@ -1454,8 +1454,8 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
if (count > 0) {
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert(element_sizes[0] != 0);
- HDassert(bufs[0] != NULL);
+ assert(element_sizes[0] != 0);
+ assert(bufs[0] != NULL);
/* Allocate sequence lists for memory and file spaces */
if (NULL == (file_iter = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -1514,7 +1514,7 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
{
if ((hss_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(mem_spaces[i])) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCOUNT, FAIL, "can't get number of elements selected")
- HDassert((hssize_t)nelmts == hss_nelmts);
+ assert((hssize_t)nelmts == hss_nelmts);
}
#endif /* NDEBUG */
@@ -1532,23 +1532,23 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
if (H5S_SELECT_ITER_GET_SEQ_LIST(file_iter, H5FD_SEQ_LIST_LEN, SIZE_MAX, &file_nseq,
&seq_nelem, file_off, file_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
- HDassert(file_nseq > 0);
+ assert(file_nseq > 0);
nelmts -= seq_nelem;
file_seq_i = 0;
}
- HDassert(file_seq_i < file_nseq);
+ assert(file_seq_i < file_nseq);
/* Fill/refill memory sequence list if necessary */
if (mem_seq_i == H5FD_SEQ_LIST_LEN) {
if (H5S_SELECT_ITER_GET_SEQ_LIST(mem_iter, H5FD_SEQ_LIST_LEN, SIZE_MAX, &mem_nseq, &seq_nelem,
mem_off, mem_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
- HDassert(mem_nseq > 0);
+ assert(mem_nseq > 0);
mem_seq_i = 0;
}
- HDassert(mem_seq_i < mem_nseq);
+ assert(mem_seq_i < mem_nseq);
/* Calculate length of this IO */
io_len = MIN(file_len[file_seq_i], mem_len[mem_seq_i]);
@@ -1559,8 +1559,8 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
if (vec_arr_nused == vec_arr_nalloc) {
/* Check if we're using the static arrays */
if (addrs == addrs_local) {
- HDassert(sizes == sizes_local);
- HDassert(vec_bufs == vec_bufs_local);
+ assert(sizes == sizes_local);
+ assert(vec_bufs == vec_bufs_local);
/* Allocate dynamic arrays */
if (NULL == (addrs = H5MM_malloc(sizeof(addrs_local) * 2)))
@@ -1683,9 +1683,9 @@ done:
}
/* Make sure we cleaned up */
- HDassert(!addrs || addrs == addrs_local);
- HDassert(!sizes || sizes == sizes_local);
- HDassert(!vec_bufs || vec_bufs == vec_bufs_local);
+ assert(!addrs || addrs == addrs_local);
+ assert(!sizes || sizes == sizes_local);
+ assert(!vec_bufs || vec_bufs == vec_bufs_local);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__write_selection_translate() */
@@ -1744,18 +1744,18 @@ H5FD_write_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert((count == 0) || (element_sizes[0] != 0));
- HDassert((count == 0) || (bufs[0] != NULL));
+ assert((count == 0) || (element_sizes[0] != 0));
+ assert((count == 0) || (bufs[0] != NULL));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -1842,7 +1842,7 @@ done:
/* undo the base addr offset to the offsets array if necessary */
if (offsets_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -1899,18 +1899,18 @@ H5FD_write_selection_id(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_space_ids) || (count == 0));
- HDassert((file_space_ids) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_space_ids) || (count == 0));
+ assert((file_space_ids) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert((count == 0) || (element_sizes[0] != 0));
- HDassert((count == 0) || (bufs[0] != NULL));
+ assert((count == 0) || (element_sizes[0] != 0));
+ assert((count == 0) || (bufs[0] != NULL));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -1995,7 +1995,7 @@ done:
/* undo the base addr offset to the offsets array if necessary */
if (offsets_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -2033,8 +2033,8 @@ H5FD_set_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file && file->cls);
- HDassert(H5F_addr_defined(addr) && addr <= file->maxaddr);
+ assert(file && file->cls);
+ assert(H5F_addr_defined(addr) && addr <= file->maxaddr);
/* Dispatch to driver, convert to absolute address */
if ((file->cls->set_eoa)(file, type, addr + file->base_addr) < 0)
@@ -2067,7 +2067,7 @@ H5FD_get_eoa(const H5FD_t *file, H5FD_mem_t type)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
- HDassert(file && file->cls);
+ assert(file && file->cls);
/* Dispatch to driver */
if (HADDR_UNDEF == (ret_value = (file->cls->get_eoa)(file, type)))
@@ -2103,7 +2103,7 @@ H5FD_get_eof(const H5FD_t *file, H5FD_mem_t type)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
- HDassert(file && file->cls);
+ assert(file && file->cls);
/* Dispatch to driver */
if (file->cls->get_eof) {
@@ -2139,8 +2139,8 @@ H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags /*out*/)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(driver);
- HDassert(flags);
+ assert(driver);
+ assert(flags);
/* Check for the driver to query and then query it */
if (driver->query)
@@ -2193,8 +2193,8 @@ H5FD__vsrt_tmp_cmp(const void *element_1, const void *element_2)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(H5F_addr_defined(addr_1));
- HDassert(H5F_addr_defined(addr_2));
+ assert(H5F_addr_defined(addr_1));
+ assert(H5F_addr_defined(addr_2));
/* Compare the addresses */
if (H5F_addr_gt(addr_1, addr_2))
@@ -2219,27 +2219,27 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
/* Sanity checks */
- HDassert(vector_was_sorted);
+ assert(vector_was_sorted);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
- HDassert((count == 0) || ((s_types_ptr) && (NULL == *s_types_ptr)));
- HDassert((count == 0) || ((s_addrs_ptr) && (NULL == *s_addrs_ptr)));
- HDassert((count == 0) || ((s_sizes_ptr) && (NULL == *s_sizes_ptr)));
- HDassert((count == 0) || ((s_bufs_ptr) && (NULL == *s_bufs_ptr)));
+ assert((count == 0) || ((s_types_ptr) && (NULL == *s_types_ptr)));
+ assert((count == 0) || ((s_addrs_ptr) && (NULL == *s_addrs_ptr)));
+ assert((count == 0) || ((s_sizes_ptr) && (NULL == *s_sizes_ptr)));
+ assert((count == 0) || ((s_bufs_ptr) && (NULL == *s_bufs_ptr)));
/* scan the addrs array to see if it is sorted */
for (i = 1; i < count; i++) {
- HDassert(H5F_addr_defined(addrs[i - 1]));
+ assert(H5F_addr_defined(addrs[i - 1]));
if (H5F_addr_gt(addrs[i - 1], addrs[i]))
break;
@@ -2282,7 +2282,7 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
srt_tmp_size = (count * sizeof(struct H5FD_vsrt_tmp_t));
- if (NULL == (srt_tmp = (H5FD_vsrt_tmp_t *)HDmalloc(srt_tmp_size)))
+ if (NULL == (srt_tmp = (H5FD_vsrt_tmp_t *)malloc(srt_tmp_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc srt_tmp")
@@ -2298,23 +2298,23 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
i = 1;
for (i = 1; i < count; i++) {
- HDassert(H5F_addr_lt(srt_tmp[i - 1].addr, srt_tmp[i].addr));
+ assert(H5F_addr_lt(srt_tmp[i - 1].addr, srt_tmp[i].addr));
if (H5F_addr_eq(addrs[i - 1], addrs[i]))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "duplicate addr in vector")
}
- if ((NULL == (*s_types_ptr = (H5FD_mem_t *)HDmalloc(count * sizeof(H5FD_mem_t)))) ||
- (NULL == (*s_addrs_ptr = (haddr_t *)HDmalloc(count * sizeof(haddr_t)))) ||
- (NULL == (*s_sizes_ptr = (size_t *)HDmalloc(count * sizeof(size_t)))) ||
+ if ((NULL == (*s_types_ptr = (H5FD_mem_t *)malloc(count * sizeof(H5FD_mem_t)))) ||
+ (NULL == (*s_addrs_ptr = (haddr_t *)malloc(count * sizeof(haddr_t)))) ||
+ (NULL == (*s_sizes_ptr = (size_t *)malloc(count * sizeof(size_t)))) ||
(NULL ==
- (*s_bufs_ptr = (H5_flexible_const_ptr_t *)HDmalloc(count * sizeof(H5_flexible_const_ptr_t))))) {
+ (*s_bufs_ptr = (H5_flexible_const_ptr_t *)malloc(count * sizeof(H5_flexible_const_ptr_t))))) {
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc sorted vector(s)")
}
- HDassert(sizes[0] != 0);
- HDassert(types[0] != H5FD_MEM_NOLIST);
+ assert(sizes[0] != 0);
+ assert(types[0] != H5FD_MEM_NOLIST);
/* Scan the sizes and types vectors to determine if the fixed size / type
* optimization is in use, and if so, to determine the index of the last
@@ -2329,8 +2329,8 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
fixed_type_index = i - 1;
}
- HDassert(fixed_size_index <= count);
- HDassert(fixed_type_index <= count);
+ assert(fixed_size_index <= count);
+ assert(fixed_type_index <= count);
/* Populate the sorted vectors. Note that the index stored in srt_tmp
* refers to the index in the unsorted array, while the position of
@@ -2349,7 +2349,7 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
done:
if (srt_tmp) {
- HDfree(srt_tmp);
+ free(srt_tmp);
srt_tmp = NULL;
}
@@ -2364,25 +2364,25 @@ done:
/* free space allocated for sorted vectors */
if (*s_types_ptr) {
- HDfree(*s_types_ptr);
+ free(*s_types_ptr);
*s_types_ptr = NULL;
}
if (*s_addrs_ptr) {
- HDfree(*s_addrs_ptr);
+ free(*s_addrs_ptr);
*s_addrs_ptr = NULL;
}
if (*s_sizes_ptr) {
- HDfree(*s_sizes_ptr);
+ free(*s_sizes_ptr);
*s_sizes_ptr = NULL;
}
if (*s_bufs_ptr) {
- HDfree(*s_bufs_ptr);
+ free(*s_bufs_ptr);
*s_bufs_ptr = NULL;
}
}
@@ -2412,7 +2412,7 @@ H5FD_delete(const char *filename, hid_t fapl_id)
/* Sanity checks */
- HDassert(filename);
+ assert(filename);
/* Get file access property list */
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -2461,9 +2461,9 @@ H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, hbool_t *
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cls);
- HDassert(key);
- HDassert(success);
+ assert(cls);
+ assert(key);
+ assert(success);
/* Which kind of key are we looking for? */
if (key->vfd.kind == H5FD_GET_DRIVER_BY_NAME) {
@@ -2473,7 +2473,7 @@ H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, hbool_t *
}
else {
/* Sanity check */
- HDassert(key->vfd.kind == H5FD_GET_DRIVER_BY_VALUE);
+ assert(key->vfd.kind == H5FD_GET_DRIVER_BY_VALUE);
/* Check if plugin value matches VFD class value */
if (cls->value == key->vfd.u.value)
@@ -2510,7 +2510,7 @@ H5FD__get_driver_cb(void *obj, hid_t id, void *_op_data)
} /* end if */
} /* end if */
else {
- HDassert(H5FD_GET_DRIVER_BY_VALUE == op_data->key.kind);
+ assert(H5FD_GET_DRIVER_BY_VALUE == op_data->key.kind);
if (cls->value == op_data->key.u.value) {
op_data->found_id = id;
ret_value = H5_ITER_STOP;
@@ -2548,7 +2548,7 @@ H5FD_register_driver_by_name(const char *name, hbool_t app_ref)
/* If driver is already registered, increment ref count on ID and return ID */
if (driver_is_registered) {
- HDassert(driver_id >= 0);
+ assert(driver_id >= 0);
if (H5I_inc_ref(driver_id, app_ref) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFD")
@@ -2602,7 +2602,7 @@ H5FD_register_driver_by_value(H5FD_class_value_t value, hbool_t app_ref)
/* If driver is already registered, increment ref count on ID and return ID */
if (driver_is_registered) {
- HDassert(driver_id >= 0);
+ assert(driver_id >= 0);
if (H5I_inc_ref(driver_id, app_ref) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFD")
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 225c1a1..3c412c5 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -316,7 +316,7 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, si
/* Do this first, so that we don't try to free a wild pointer if
* H5P_object_verify() fails.
*/
- HDmemset(&fa, 0, sizeof(H5FD_log_fapl_t));
+ memset(&fa, 0, sizeof(H5FD_log_fapl_t));
/* Check arguments */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
@@ -393,7 +393,7 @@ H5FD__log_fapl_copy(const void *_old_fa)
FUNC_ENTER_PACKAGE
- HDassert(old_fa);
+ assert(old_fa);
/* Allocate the new FAPL info */
if (NULL == (new_fa = (H5FD_log_fapl_t *)H5MM_calloc(sizeof(H5FD_log_fapl_t))))
@@ -586,20 +586,20 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
file->iosize = fa->buf_size;
if (file->fa.flags & H5FD_LOG_FILE_READ) {
file->nread = (unsigned char *)H5MM_calloc(file->iosize);
- HDassert(file->nread);
+ assert(file->nread);
}
if (file->fa.flags & H5FD_LOG_FILE_WRITE) {
file->nwrite = (unsigned char *)H5MM_calloc(file->iosize);
- HDassert(file->nwrite);
+ assert(file->nwrite);
}
if (file->fa.flags & H5FD_LOG_FLAVOR) {
file->flavor = (unsigned char *)H5MM_calloc(file->iosize);
- HDassert(file->flavor);
+ assert(file->flavor);
}
/* Set the log file pointer */
if (fa->logfile)
- file->logfp = HDfopen(fa->logfile, "w");
+ file->logfp = fopen(fa->logfile, "w");
else
file->logfp = stderr;
@@ -608,13 +608,13 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5_timevals_t open_times; /* Elapsed time for open() call */
H5_timer_get_times(open_timer, &open_times);
- HDfprintf(file->logfp, "Open took: (%f s)\n", open_times.elapsed);
+ fprintf(file->logfp, "Open took: (%f s)\n", open_times.elapsed);
}
if (file->fa.flags & H5FD_LOG_TIME_STAT) {
H5_timevals_t stat_times; /* Elapsed time for stat() call */
H5_timer_get_times(stat_timer, &stat_times);
- HDfprintf(file->logfp, "Stat took: (%f s)\n", stat_times.elapsed);
+ fprintf(file->logfp, "Stat took: (%f s)\n", stat_times.elapsed);
}
}
@@ -677,7 +677,7 @@ H5FD__log_close(H5FD_t *_file)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file);
+ assert(file);
/* Initialize timer */
H5_timer_init(&close_timer);
@@ -704,89 +704,89 @@ H5FD__log_close(H5FD_t *_file)
H5_timevals_t close_times; /* Elapsed time for close() call */
H5_timer_get_times(close_timer, &close_times);
- HDfprintf(file->logfp, "Close took: (%f s)\n", close_times.elapsed);
+ fprintf(file->logfp, "Close took: (%f s)\n", close_times.elapsed);
}
/* Dump the total number of seek/read/write operations */
if (file->fa.flags & H5FD_LOG_NUM_READ)
- HDfprintf(file->logfp, "Total number of read operations: %llu\n", file->total_read_ops);
+ fprintf(file->logfp, "Total number of read operations: %llu\n", file->total_read_ops);
if (file->fa.flags & H5FD_LOG_NUM_WRITE)
- HDfprintf(file->logfp, "Total number of write operations: %llu\n", file->total_write_ops);
+ fprintf(file->logfp, "Total number of write operations: %llu\n", file->total_write_ops);
if (file->fa.flags & H5FD_LOG_NUM_SEEK)
- HDfprintf(file->logfp, "Total number of seek operations: %llu\n", file->total_seek_ops);
+ fprintf(file->logfp, "Total number of seek operations: %llu\n", file->total_seek_ops);
if (file->fa.flags & H5FD_LOG_NUM_TRUNCATE)
- HDfprintf(file->logfp, "Total number of truncate operations: %llu\n", file->total_truncate_ops);
+ fprintf(file->logfp, "Total number of truncate operations: %llu\n", file->total_truncate_ops);
/* Dump the total time in seek/read/write */
if (file->fa.flags & H5FD_LOG_TIME_READ)
- HDfprintf(file->logfp, "Total time in read operations: %f s\n", file->total_read_time);
+ fprintf(file->logfp, "Total time in read operations: %f s\n", file->total_read_time);
if (file->fa.flags & H5FD_LOG_TIME_WRITE)
- HDfprintf(file->logfp, "Total time in write operations: %f s\n", file->total_write_time);
+ fprintf(file->logfp, "Total time in write operations: %f s\n", file->total_write_time);
if (file->fa.flags & H5FD_LOG_TIME_SEEK)
- HDfprintf(file->logfp, "Total time in seek operations: %f s\n", file->total_seek_time);
+ fprintf(file->logfp, "Total time in seek operations: %f s\n", file->total_seek_time);
if (file->fa.flags & H5FD_LOG_TIME_TRUNCATE)
- HDfprintf(file->logfp, "Total time in truncate operations: %f s\n", file->total_truncate_time);
+ fprintf(file->logfp, "Total time in truncate operations: %f s\n", file->total_truncate_time);
/* Dump the write I/O information */
if (file->fa.flags & H5FD_LOG_FILE_WRITE) {
- HDfprintf(file->logfp, "Dumping write I/O information:\n");
+ fprintf(file->logfp, "Dumping write I/O information:\n");
last_val = file->nwrite[0];
last_addr = 0;
addr = 1;
while (addr < file->eoa) {
if (file->nwrite[addr] != last_val) {
- HDfprintf(file->logfp,
- "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n",
- last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ fprintf(file->logfp,
+ "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n",
+ last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
last_val = file->nwrite[addr];
last_addr = addr;
}
addr++;
}
- HDfprintf(file->logfp,
- "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n",
- last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ fprintf(file->logfp,
+ "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n",
+ last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
}
/* Dump the read I/O information */
if (file->fa.flags & H5FD_LOG_FILE_READ) {
- HDfprintf(file->logfp, "Dumping read I/O information:\n");
+ fprintf(file->logfp, "Dumping read I/O information:\n");
last_val = file->nread[0];
last_addr = 0;
addr = 1;
while (addr < file->eoa) {
if (file->nread[addr] != last_val) {
- HDfprintf(file->logfp,
- "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n",
- last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ fprintf(file->logfp,
+ "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n",
+ last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
last_val = file->nread[addr];
last_addr = addr;
}
addr++;
}
- HDfprintf(file->logfp,
- "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n",
- last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
+ fprintf(file->logfp,
+ "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n", last_addr,
+ (addr - 1), (unsigned long)(addr - last_addr), (int)last_val);
}
/* Dump the I/O flavor information */
if (file->fa.flags & H5FD_LOG_FLAVOR) {
- HDfprintf(file->logfp, "Dumping I/O flavor information:\n");
+ fprintf(file->logfp, "Dumping I/O flavor information:\n");
last_val = file->flavor[0];
last_addr = 0;
addr = 1;
while (addr < file->eoa) {
if (file->flavor[addr] != last_val) {
- HDfprintf(file->logfp,
- "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n",
- last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
+ fprintf(file->logfp,
+ "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n",
+ last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
last_val = file->flavor[addr];
last_addr = addr;
}
addr++;
}
- HDfprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n",
- last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
+ fprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n",
+ last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]);
}
/* Free the logging information */
@@ -860,9 +860,9 @@ H5FD__log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
HGOTO_DONE(-1)
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
@@ -950,15 +950,15 @@ H5FD__log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hs
/* Retain the (first) flavor of the information written to the file */
if (file->fa.flags != 0) {
if (file->fa.flags & H5FD_LOG_FLAVOR) {
- HDassert(addr < file->iosize);
+ assert(addr < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[addr], (int)type, (size_t)size);
+ memset(&file->flavor[addr], (int)type, (size_t)size);
}
if (file->fa.flags & H5FD_LOG_ALLOC)
- HDfprintf(file->logfp,
- "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n", addr,
- (haddr_t)((addr + size) - 1), size, flavors[type]);
+ fprintf(file->logfp,
+ "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n", addr,
+ (haddr_t)((addr + size) - 1), size, flavors[type]);
}
/* Set return value */
@@ -989,15 +989,15 @@ H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
if (file->fa.flags != 0) {
/* Reset the flavor of the information in the file */
if (file->fa.flags & H5FD_LOG_FLAVOR) {
- HDassert(addr < file->iosize);
+ assert(addr < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[addr], H5FD_MEM_DEFAULT, (size_t)size);
+ memset(&file->flavor[addr], H5FD_MEM_DEFAULT, (size_t)size);
}
/* Log the file memory freed */
if (file->fa.flags & H5FD_LOG_FREE)
- HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n",
- addr, (haddr_t)((addr + size) - 1), size, flavors[type]);
+ fprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n",
+ addr, (haddr_t)((addr + size) - 1), size, flavors[type]);
}
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1056,16 +1056,16 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
/* Retain the flavor of the space allocated by the extension */
if (file->fa.flags & H5FD_LOG_FLAVOR) {
- HDassert(addr < file->iosize);
+ assert(addr < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[file->eoa], (int)type, (size_t)size);
+ memset(&file->flavor[file->eoa], (int)type, (size_t)size);
}
/* Log the extension like an allocation */
if (file->fa.flags & H5FD_LOG_ALLOC)
- HDfprintf(file->logfp,
- "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n",
- file->eoa, addr, size, flavors[type]);
+ fprintf(file->logfp,
+ "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n",
+ file->eoa, addr, size, flavors[type]);
}
/* Check for decreasing file size */
@@ -1074,16 +1074,16 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
/* Reset the flavor of the space freed by the shrink */
if (file->fa.flags & H5FD_LOG_FLAVOR) {
- HDassert((addr + size) < file->iosize);
+ assert((addr + size) < file->iosize);
H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[addr], H5FD_MEM_DEFAULT, (size_t)size);
+ memset(&file->flavor[addr], H5FD_MEM_DEFAULT, (size_t)size);
}
/* Log the shrink like a free */
if (file->fa.flags & H5FD_LOG_FREE)
- HDfprintf(file->logfp,
- "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n",
- file->eoa, addr, size, flavors[type]);
+ fprintf(file->logfp,
+ "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n", file->eoa,
+ addr, size, flavors[type]);
}
}
@@ -1178,8 +1178,8 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Initialize timer */
H5_timer_init(&read_timer);
@@ -1197,7 +1197,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
/* Log information about the number of times these locations are read */
if (file->fa.flags & H5FD_LOG_FILE_READ) {
- HDassert((addr + size) < file->iosize);
+ assert((addr + size) < file->iosize);
while (tmp_size-- > 0)
file->nread[tmp_addr++]++;
}
@@ -1235,16 +1235,16 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
/* Emit log string if we're tracking individual seek events. */
if (file->fa.flags & H5FD_LOG_LOC_SEEK) {
- HDfprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr);
+ fprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr);
/* Add the seek time, if we're tracking that.
* Note that the seek time is NOT emitted for when just H5FD_LOG_TIME_SEEK
* is set.
*/
if (file->fa.flags & H5FD_LOG_TIME_SEEK)
- HDfprintf(file->logfp, " (%fs @ %f)\n", seek_times.elapsed, seek_timer.initial.elapsed);
+ fprintf(file->logfp, " (%fs @ %f)\n", seek_times.elapsed, seek_timer.initial.elapsed);
else
- HDfprintf(file->logfp, "\n");
+ fprintf(file->logfp, "\n");
}
}
#endif /* H5_HAVE_PREADWRITE */
@@ -1286,8 +1286,8 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
if (file->fa.flags & H5FD_LOG_LOC_READ)
- HDfprintf(file->logfp, "Error! Reading: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n",
- orig_addr, (orig_addr + orig_size) - 1, orig_size);
+ fprintf(file->logfp, "Error! Reading: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n",
+ orig_addr, (orig_addr + orig_size) - 1, orig_size);
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL,
"file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
@@ -1300,12 +1300,12 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
if (0 == bytes_read) {
/* End of file but not end of format address space */
- HDmemset(buf, 0, size);
+ memset(buf, 0, size);
break;
}
- HDassert(bytes_read >= 0);
- HDassert((size_t)bytes_read <= size);
+ assert(bytes_read >= 0);
+ assert((size_t)bytes_read <= size);
size -= (size_t)bytes_read;
addr += (haddr_t)bytes_read;
@@ -1328,16 +1328,16 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
/* Log information about the read */
if (file->fa.flags & H5FD_LOG_LOC_READ) {
- HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Read", orig_addr,
- (orig_addr + orig_size) - 1, orig_size, flavors[type]);
+ fprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Read", orig_addr,
+ (orig_addr + orig_size) - 1, orig_size, flavors[type]);
/* Verify that we are reading in the type of data we allocated in this location */
if (file->flavor) {
- HDassert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[orig_addr] ||
- (H5FD_mem_t)file->flavor[orig_addr] == H5FD_MEM_DEFAULT);
- HDassert(type == H5FD_MEM_DEFAULT ||
- type == (H5FD_mem_t)file->flavor[(orig_addr + orig_size) - 1] ||
- (H5FD_mem_t)file->flavor[(orig_addr + orig_size) - 1] == H5FD_MEM_DEFAULT);
+ assert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[orig_addr] ||
+ (H5FD_mem_t)file->flavor[orig_addr] == H5FD_MEM_DEFAULT);
+ assert(type == H5FD_MEM_DEFAULT ||
+ type == (H5FD_mem_t)file->flavor[(orig_addr + orig_size) - 1] ||
+ (H5FD_mem_t)file->flavor[(orig_addr + orig_size) - 1] == H5FD_MEM_DEFAULT);
}
/* Add the read time, if we're tracking that.
@@ -1345,9 +1345,9 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
* is set.
*/
if (file->fa.flags & H5FD_LOG_TIME_READ)
- HDfprintf(file->logfp, " (%fs @ %f)\n", read_times.elapsed, read_timer.initial.elapsed);
+ fprintf(file->logfp, " (%fs @ %f)\n", read_times.elapsed, read_timer.initial.elapsed);
else
- HDfprintf(file->logfp, "\n");
+ fprintf(file->logfp, "\n");
}
/* Update current position */
@@ -1392,19 +1392,19 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(size > 0);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(size > 0);
+ assert(buf);
/* Initialize timer */
H5_timer_init(&write_timer);
/* Verify that we are writing out the type of data we allocated in this location */
if (file->flavor) {
- HDassert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[addr] ||
- (H5FD_mem_t)file->flavor[addr] == H5FD_MEM_DEFAULT);
- HDassert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[(addr + size) - 1] ||
- (H5FD_mem_t)file->flavor[(addr + size) - 1] == H5FD_MEM_DEFAULT);
+ assert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[addr] ||
+ (H5FD_mem_t)file->flavor[addr] == H5FD_MEM_DEFAULT);
+ assert(type == H5FD_MEM_DEFAULT || type == (H5FD_mem_t)file->flavor[(addr + size) - 1] ||
+ (H5FD_mem_t)file->flavor[(addr + size) - 1] == H5FD_MEM_DEFAULT);
}
/* Check for overflow conditions */
@@ -1420,7 +1420,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
haddr_t tmp_addr = addr;
/* Log information about the number of times these locations are read */
- HDassert((addr + size) < file->iosize);
+ assert((addr + size) < file->iosize);
while (tmp_size-- > 0)
file->nwrite[tmp_addr++]++;
}
@@ -1457,16 +1457,16 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
/* Emit log string if we're tracking individual seek events. */
if (file->fa.flags & H5FD_LOG_LOC_SEEK) {
- HDfprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr);
+ fprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr);
/* Add the seek time, if we're tracking that.
* Note that the seek time is NOT emitted for when just H5FD_LOG_TIME_SEEK
* is set.
*/
if (file->fa.flags & H5FD_LOG_TIME_SEEK)
- HDfprintf(file->logfp, " (%fs @ %f)\n", seek_times.elapsed, seek_timer.initial.elapsed);
+ fprintf(file->logfp, " (%fs @ %f)\n", seek_times.elapsed, seek_timer.initial.elapsed);
else
- HDfprintf(file->logfp, "\n");
+ fprintf(file->logfp, "\n");
}
}
#endif /* H5_HAVE_PREADWRITE */
@@ -1508,8 +1508,8 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
if (file->fa.flags & H5FD_LOG_LOC_WRITE)
- HDfprintf(file->logfp, "Error! Writing: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n",
- orig_addr, (orig_addr + orig_size) - 1, orig_size);
+ fprintf(file->logfp, "Error! Writing: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n",
+ orig_addr, (orig_addr + orig_size) - 1, orig_size);
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL,
"file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, "
@@ -1520,8 +1520,8 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
(unsigned long long)bytes_wrote, (unsigned long long)offset);
} /* end if */
- HDassert(bytes_wrote > 0);
- HDassert((size_t)bytes_wrote <= size);
+ assert(bytes_wrote > 0);
+ assert((size_t)bytes_wrote <= size);
size -= (size_t)bytes_wrote;
addr += (haddr_t)bytes_wrote;
@@ -1544,15 +1544,15 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
/* Log information about the write */
if (file->fa.flags & H5FD_LOG_LOC_WRITE) {
- HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Written", orig_addr,
- (orig_addr + orig_size) - 1, orig_size, flavors[type]);
+ fprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Written", orig_addr,
+ (orig_addr + orig_size) - 1, orig_size, flavors[type]);
/* Check if this is the first write into a "default" section, grabbed by the metadata aggregation
* algorithm */
if (file->fa.flags & H5FD_LOG_FLAVOR) {
if ((H5FD_mem_t)file->flavor[orig_addr] == H5FD_MEM_DEFAULT) {
- HDmemset(&file->flavor[orig_addr], (int)type, orig_size);
- HDfprintf(file->logfp, " (fresh)");
+ memset(&file->flavor[orig_addr], (int)type, orig_size);
+ fprintf(file->logfp, " (fresh)");
}
}
@@ -1561,9 +1561,9 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha
* is set.
*/
if (file->fa.flags & H5FD_LOG_TIME_WRITE)
- HDfprintf(file->logfp, " (%fs @ %f)\n", write_times.elapsed, write_timer.initial.elapsed);
+ fprintf(file->logfp, " (%fs @ %f)\n", write_times.elapsed, write_timer.initial.elapsed);
else
- HDfprintf(file->logfp, "\n");
+ fprintf(file->logfp, "\n");
}
/* Update current position and eof */
@@ -1603,7 +1603,7 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Extend the file to make sure it's large enough */
if (!H5F_addr_eq(file->eoa, file->eof)) {
@@ -1666,16 +1666,16 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
/* Emit log string if we're tracking individual truncate events. */
if (file->fa.flags & H5FD_LOG_TRUNCATE) {
- HDfprintf(file->logfp, "Truncate: To %10" PRIuHADDR, file->eoa);
+ fprintf(file->logfp, "Truncate: To %10" PRIuHADDR, file->eoa);
/* Add the truncate time, if we're tracking that.
* Note that the truncate time is NOT emitted for when just H5FD_LOG_TIME_TRUNCATE
* is set.
*/
if (file->fa.flags & H5FD_LOG_TIME_TRUNCATE)
- HDfprintf(file->logfp, " (%fs @ %f)\n", trunc_times.elapsed, trunc_timer.initial.elapsed);
+ fprintf(file->logfp, " (%fs @ %f)\n", trunc_times.elapsed, trunc_timer.initial.elapsed);
else
- HDfprintf(file->logfp, "\n");
+ fprintf(file->logfp, "\n");
}
/* Update the eof value */
@@ -1712,7 +1712,7 @@ H5FD__log_lock(H5FD_t *_file, hbool_t rw)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file);
+ assert(file);
/* Set exclusive or shared lock based on rw status */
lock_flags = rw ? LOCK_EX : LOCK_SH;
@@ -1752,7 +1752,7 @@ H5FD__log_unlock(H5FD_t *_file)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
if (HDflock(file->fd, LOCK_UN) < 0) {
if (file->ignore_disabled_file_locks && ENOSYS == errno) {
@@ -1785,7 +1785,7 @@ H5FD__log_delete(const char *filename, hid_t H5_ATTR_UNUSED fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
if (HDremove(filename) < 0)
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file")
diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c
index 8c222d3..2467d92 100644
--- a/src/H5FDmirror.c
+++ b/src/H5FDmirror.c
@@ -81,48 +81,48 @@ typedef struct H5FD_mirror_t {
ssize_t bytes_written = 0; \
const unsigned char *b = NULL; \
\
- HDfprintf(stdout, "%s bytes:\n```\n", (label)); \
+ fprintf(stdout, "%s bytes:\n```\n", (label)); \
\
/* print whole lines */ \
while ((len - bytes_written) >= 32) { \
b = (const unsigned char *)(buf) + bytes_written; \
- HDfprintf(stdout, \
- "%04zX %02X%02X%02X%02X %02X%02X%02X%02X" \
- " %02X%02X%02X%02X %02X%02X%02X%02X" \
- " %02X%02X%02X%02X %02X%02X%02X%02X" \
- " %02X%02X%02X%02X %02X%02X%02X%02X\n", \
- bytes_written, b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], \
- b[11], b[12], b[13], b[14], b[15], b[16], b[17], b[18], b[19], b[20], b[21], b[22], \
- b[23], b[24], b[25], b[26], b[27], b[28], b[29], b[30], b[31]); \
+ fprintf(stdout, \
+ "%04zX %02X%02X%02X%02X %02X%02X%02X%02X" \
+ " %02X%02X%02X%02X %02X%02X%02X%02X" \
+ " %02X%02X%02X%02X %02X%02X%02X%02X" \
+ " %02X%02X%02X%02X %02X%02X%02X%02X\n", \
+ bytes_written, b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], b[11], \
+ b[12], b[13], b[14], b[15], b[16], b[17], b[18], b[19], b[20], b[21], b[22], b[23], \
+ b[24], b[25], b[26], b[27], b[28], b[29], b[30], b[31]); \
bytes_written += 32; \
} \
\
/* start partial line */ \
if (len > bytes_written) { \
- HDfprintf(stdout, "%04zX ", bytes_written); \
+ fprintf(stdout, "%04zX ", bytes_written); \
} \
\
/* partial line blocks */ \
while ((len - bytes_written) >= 4) { \
- HDfprintf(stdout, " %02X%02X%02X%02X", (buf)[bytes_written], (buf)[bytes_written + 1], \
- (buf)[bytes_written + 2], (buf)[bytes_written + 3]); \
+ fprintf(stdout, " %02X%02X%02X%02X", (buf)[bytes_written], (buf)[bytes_written + 1], \
+ (buf)[bytes_written + 2], (buf)[bytes_written + 3]); \
bytes_written += 4; \
} \
\
/* block separator before partial block */ \
if (len > bytes_written) { \
- HDfprintf(stdout, " "); \
+ fprintf(stdout, " "); \
} \
\
/* partial block individual bytes */ \
while (len > bytes_written) { \
- HDfprintf(stdout, "%02X", (buf)[bytes_written++]); \
+ fprintf(stdout, "%02X", (buf)[bytes_written++]); \
} \
\
/* end partial line */ \
- HDfprintf(stdout, "\n"); \
- HDfprintf(stdout, "```\n"); \
- HDfflush(stdout); \
+ fprintf(stdout, "\n"); \
+ fprintf(stdout, "```\n"); \
+ fflush(stdout); \
} while (0)
#else
#define LOG_XMIT_BYTES(label, buf, len) /* no-op */
@@ -131,8 +131,8 @@ typedef struct H5FD_mirror_t {
#if MIRROR_DEBUG_OP_CALLS
#define LOG_OP_CALL(name) \
do { \
- HDprintf("called %s()\n", (name)); \
- HDfflush(stdout); \
+ printf("called %s()\n", (name)); \
+ fflush(stdout); \
} while (0)
#else
#define LOG_OP_CALL(name) /* no-op */
@@ -282,7 +282,7 @@ H5FD__mirror_xmit_decode_uint16(uint16_t *out, const unsigned char *_buf)
LOG_OP_CALL(__func__);
- HDassert(_buf && out);
+ assert(_buf && out);
H5MM_memcpy(&n, _buf, sizeof(n));
*out = (uint16_t)HDntohs(n);
@@ -310,7 +310,7 @@ H5FD__mirror_xmit_decode_uint32(uint32_t *out, const unsigned char *_buf)
LOG_OP_CALL(__func__);
- HDassert(_buf && out);
+ assert(_buf && out);
H5MM_memcpy(&n, _buf, sizeof(n));
*out = (uint32_t)HDntohl(n);
@@ -369,7 +369,7 @@ H5FD__mirror_xmit_decode_uint64(uint64_t *out, const unsigned char *_buf)
LOG_OP_CALL(__func__);
- HDassert(_buf && out);
+ assert(_buf && out);
H5MM_memcpy(&n, _buf, sizeof(n));
if (TRUE == is_host_little_endian())
@@ -396,7 +396,7 @@ H5FD__mirror_xmit_decode_uint8(uint8_t *out, const unsigned char *_buf)
{
LOG_OP_CALL(__func__);
- HDassert(_buf && out);
+ assert(_buf && out);
H5MM_memcpy(out, _buf, sizeof(uint8_t));
@@ -422,7 +422,7 @@ H5FD__mirror_xmit_encode_uint16(unsigned char *_dest, uint16_t v)
LOG_OP_CALL(__func__);
- HDassert(_dest);
+ assert(_dest);
n = (uint16_t)HDhtons(v);
H5MM_memcpy(_dest, &n, sizeof(n));
@@ -449,7 +449,7 @@ H5FD__mirror_xmit_encode_uint32(unsigned char *_dest, uint32_t v)
LOG_OP_CALL(__func__);
- HDassert(_dest);
+ assert(_dest);
n = (uint32_t)HDhtonl(v);
H5MM_memcpy(_dest, &n, sizeof(n));
@@ -476,7 +476,7 @@ H5FD__mirror_xmit_encode_uint64(unsigned char *_dest, uint64_t v)
LOG_OP_CALL(__func__);
- HDassert(_dest);
+ assert(_dest);
if (TRUE == is_host_little_endian())
n = BSWAP_64(v);
@@ -503,7 +503,7 @@ H5FD__mirror_xmit_encode_uint8(unsigned char *dest, uint8_t v)
{
LOG_OP_CALL(__func__);
- HDassert(dest);
+ assert(dest);
H5MM_memcpy(dest, &v, sizeof(v));
@@ -536,14 +536,14 @@ H5FD_mirror_xmit_decode_header(H5FD_mirror_xmit_t *out, const unsigned char *buf
LOG_OP_CALL(__func__);
- HDassert(out && buf);
+ assert(out && buf);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->magic), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint8(&(out->version), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->session_token), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->xmit_count), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint8(&(out->op), &buf[n_eaten]);
- HDassert(n_eaten == H5FD_MIRROR_XMIT_HEADER_SIZE);
+ assert(n_eaten == H5FD_MIRROR_XMIT_HEADER_SIZE);
return n_eaten;
} /* end H5FD_mirror_xmit_decode_header() */
@@ -574,11 +574,11 @@ H5FD_mirror_xmit_decode_lock(H5FD_mirror_xmit_lock_t *out, const unsigned char *
LOG_OP_CALL(__func__);
- HDassert(out && buf);
+ assert(out && buf);
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->rw), &buf[n_eaten]);
- HDassert(n_eaten == H5FD_MIRROR_XMIT_LOCK_SIZE);
+ assert(n_eaten == H5FD_MIRROR_XMIT_LOCK_SIZE);
return n_eaten;
} /* end H5FD_mirror_xmit_decode_lock() */
@@ -610,13 +610,13 @@ H5FD_mirror_xmit_decode_open(H5FD_mirror_xmit_open_t *out, const unsigned char *
LOG_OP_CALL(__func__);
- HDassert(out && buf);
+ assert(out && buf);
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->flags), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->maxaddr), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->size_t_blob), &buf[n_eaten]);
- HDassert((H5FD_MIRROR_XMIT_OPEN_SIZE - H5FD_MIRROR_XMIT_FILEPATH_MAX) == n_eaten);
+ assert((H5FD_MIRROR_XMIT_OPEN_SIZE - H5FD_MIRROR_XMIT_FILEPATH_MAX) == n_eaten);
HDstrncpy(out->filename, (const char *)&buf[n_eaten], H5FD_MIRROR_XMIT_FILEPATH_MAX - 1);
out->filename[H5FD_MIRROR_XMIT_FILEPATH_MAX - 1] = 0; /* force final NULL */
@@ -650,11 +650,11 @@ H5FD_mirror_xmit_decode_reply(H5FD_mirror_xmit_reply_t *out, const unsigned char
LOG_OP_CALL(__func__);
- HDassert(out && buf);
+ assert(out && buf);
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->status), &buf[n_eaten]);
- HDassert((H5FD_MIRROR_XMIT_REPLY_SIZE - H5FD_MIRROR_STATUS_MESSAGE_MAX) == n_eaten);
+ assert((H5FD_MIRROR_XMIT_REPLY_SIZE - H5FD_MIRROR_STATUS_MESSAGE_MAX) == n_eaten);
HDstrncpy(out->message, (const char *)&buf[n_eaten], H5FD_MIRROR_STATUS_MESSAGE_MAX - 1);
out->message[H5FD_MIRROR_STATUS_MESSAGE_MAX - 1] = 0; /* force NULL term */
@@ -687,12 +687,12 @@ H5FD_mirror_xmit_decode_set_eoa(H5FD_mirror_xmit_eoa_t *out, const unsigned char
LOG_OP_CALL(__func__);
- HDassert(out && buf);
+ assert(out && buf);
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint8(&(out->type), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->eoa_addr), &buf[n_eaten]);
- HDassert(n_eaten == H5FD_MIRROR_XMIT_EOA_SIZE);
+ assert(n_eaten == H5FD_MIRROR_XMIT_EOA_SIZE);
return n_eaten;
} /* end H5FD_mirror_xmit_decode_set_eoa() */
@@ -723,13 +723,13 @@ H5FD_mirror_xmit_decode_write(H5FD_mirror_xmit_write_t *out, const unsigned char
LOG_OP_CALL(__func__);
- HDassert(out && buf);
+ assert(out && buf);
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint8(&(out->type), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->offset), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->size), &buf[n_eaten]);
- HDassert(n_eaten == H5FD_MIRROR_XMIT_WRITE_SIZE);
+ assert(n_eaten == H5FD_MIRROR_XMIT_WRITE_SIZE);
return n_eaten;
} /* end H5FD_mirror_xmit_decode_write() */
@@ -755,14 +755,14 @@ H5FD_mirror_xmit_encode_header(unsigned char *dest, const H5FD_mirror_xmit_t *x)
LOG_OP_CALL(__func__);
- HDassert(dest && x);
+ assert(dest && x);
n_writ += H5FD__mirror_xmit_encode_uint32((dest + n_writ), x->magic);
n_writ += H5FD__mirror_xmit_encode_uint8((dest + n_writ), x->version);
n_writ += H5FD__mirror_xmit_encode_uint32((dest + n_writ), x->session_token);
n_writ += H5FD__mirror_xmit_encode_uint32((dest + n_writ), x->xmit_count);
n_writ += H5FD__mirror_xmit_encode_uint8((dest + n_writ), x->op);
- HDassert(n_writ == H5FD_MIRROR_XMIT_HEADER_SIZE);
+ assert(n_writ == H5FD_MIRROR_XMIT_HEADER_SIZE);
return n_writ;
} /* end H5FD_mirror_xmit_encode_header() */
@@ -787,11 +787,11 @@ H5FD_mirror_xmit_encode_lock(unsigned char *dest, const H5FD_mirror_xmit_lock_t
LOG_OP_CALL(__func__);
- HDassert(dest && x);
+ assert(dest && x);
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->rw);
- HDassert(n_writ == H5FD_MIRROR_XMIT_LOCK_SIZE);
+ assert(n_writ == H5FD_MIRROR_XMIT_LOCK_SIZE);
return n_writ;
} /* end H5FD_mirror_xmit_encode_lock() */
@@ -817,16 +817,16 @@ H5FD_mirror_xmit_encode_open(unsigned char *dest, const H5FD_mirror_xmit_open_t
LOG_OP_CALL(__func__);
- HDassert(dest && x);
+ assert(dest && x);
/* clear entire structure, but especially its filepath string area */
- HDmemset(dest, 0, H5FD_MIRROR_XMIT_OPEN_SIZE);
+ memset(dest, 0, H5FD_MIRROR_XMIT_OPEN_SIZE);
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint32(&dest[n_writ], x->flags);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->maxaddr);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->size_t_blob);
- HDassert((H5FD_MIRROR_XMIT_OPEN_SIZE - H5FD_MIRROR_XMIT_FILEPATH_MAX) == n_writ);
+ assert((H5FD_MIRROR_XMIT_OPEN_SIZE - H5FD_MIRROR_XMIT_FILEPATH_MAX) == n_writ);
HDstrncpy((char *)&dest[n_writ], x->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
return H5FD_MIRROR_XMIT_OPEN_SIZE;
@@ -854,14 +854,14 @@ H5FD_mirror_xmit_encode_reply(unsigned char *dest, const H5FD_mirror_xmit_reply_
LOG_OP_CALL(__func__);
- HDassert(dest && x);
+ assert(dest && x);
/* clear entire structure, but especially its message string area */
- HDmemset(dest, 0, H5FD_MIRROR_XMIT_REPLY_SIZE);
+ memset(dest, 0, H5FD_MIRROR_XMIT_REPLY_SIZE);
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint32(&dest[n_writ], x->status);
- HDassert((H5FD_MIRROR_XMIT_REPLY_SIZE - H5FD_MIRROR_STATUS_MESSAGE_MAX) == n_writ);
+ assert((H5FD_MIRROR_XMIT_REPLY_SIZE - H5FD_MIRROR_STATUS_MESSAGE_MAX) == n_writ);
HDstrncpy((char *)&dest[n_writ], x->message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
return H5FD_MIRROR_XMIT_REPLY_SIZE;
@@ -888,12 +888,12 @@ H5FD_mirror_xmit_encode_set_eoa(unsigned char *dest, const H5FD_mirror_xmit_eoa_
LOG_OP_CALL(__func__);
- HDassert(dest && x);
+ assert(dest && x);
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint8(&dest[n_writ], x->type);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->eoa_addr);
- HDassert(n_writ == H5FD_MIRROR_XMIT_EOA_SIZE);
+ assert(n_writ == H5FD_MIRROR_XMIT_EOA_SIZE);
return n_writ;
} /* end H5FD_mirror_xmit_encode_set_eoa() */
@@ -919,13 +919,13 @@ H5FD_mirror_xmit_encode_write(unsigned char *dest, const H5FD_mirror_xmit_write_
LOG_OP_CALL(__func__);
- HDassert(dest && x);
+ assert(dest && x);
n_writ += H5FD_mirror_xmit_encode_header(dest, (const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint8(&dest[n_writ], x->type);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->offset);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->size);
- HDassert(n_writ == H5FD_MIRROR_XMIT_WRITE_SIZE);
+ assert(n_writ == H5FD_MIRROR_XMIT_WRITE_SIZE);
return n_writ;
} /* end H5FD_mirror_xmit_encode_write() */
@@ -945,7 +945,7 @@ H5FD_mirror_xmit_is_close(const H5FD_mirror_xmit_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((TRUE == H5FD_mirror_xmit_is_xmit(xmit)) && (H5FD_MIRROR_OP_CLOSE == xmit->op))
return TRUE;
@@ -968,7 +968,7 @@ H5FD_mirror_xmit_is_lock(const H5FD_mirror_xmit_lock_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_LOCK == xmit->pub.op))
return TRUE;
@@ -991,7 +991,7 @@ H5FD_mirror_xmit_is_open(const H5FD_mirror_xmit_open_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_OPEN == xmit->pub.op))
@@ -1015,7 +1015,7 @@ H5FD_mirror_xmit_is_set_eoa(const H5FD_mirror_xmit_eoa_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_SET_EOA == xmit->pub.op))
return TRUE;
@@ -1038,7 +1038,7 @@ H5FD_mirror_xmit_is_reply(const H5FD_mirror_xmit_reply_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_REPLY == xmit->pub.op))
return TRUE;
@@ -1061,7 +1061,7 @@ H5FD_mirror_xmit_is_write(const H5FD_mirror_xmit_write_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_WRITE == xmit->pub.op))
return TRUE;
@@ -1084,7 +1084,7 @@ H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit)
{
LOG_OP_CALL(__func__);
- HDassert(xmit);
+ assert(xmit);
if ((H5FD_MIRROR_XMIT_MAGIC != xmit->magic) || (H5FD_MIRROR_XMIT_CURR_VERSION != xmit->version))
return FALSE;
@@ -1115,7 +1115,7 @@ H5FD__mirror_verify_reply(H5FD_mirror_t *file)
LOG_OP_CALL(__func__);
- HDassert(file && file->sock_fd);
+ assert(file && file->sock_fd);
xmit_buf = H5FL_BLK_MALLOC(xmit, H5FD_MIRROR_XMIT_BUFFER_MAX);
if (NULL == xmit_buf)
@@ -1239,8 +1239,8 @@ H5FD__mirror_fapl_free(void *_fa)
LOG_OP_CALL(__func__);
/* sanity check */
- HDassert(fa != NULL);
- HDassert(fa->magic == H5FD_MIRROR_FAPL_MAGIC);
+ assert(fa != NULL);
+ assert(fa->magic == H5FD_MIRROR_FAPL_MAGIC);
fa->magic += 1; /* invalidate */
H5MM_xfree(fa);
@@ -1282,7 +1282,7 @@ H5Pget_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa_dst /*out*/)
if (NULL == fa_src)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info");
- HDassert(fa_src->magic == H5FD_MIRROR_FAPL_MAGIC); /* sanity check */
+ assert(fa_src->magic == H5FD_MIRROR_FAPL_MAGIC); /* sanity check */
H5MM_memcpy(fa_dst, fa_src, sizeof(H5FD_mirror_fapl_t));
@@ -1387,7 +1387,7 @@ H5FD__mirror_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
target_addr.sin_family = AF_INET;
target_addr.sin_port = HDhtons((uint16_t)fa.handshake_port);
target_addr.sin_addr.s_addr = HDinet_addr(fa.remote_ip);
- HDmemset(target_addr.sin_zero, '\0', sizeof target_addr.sin_zero);
+ memset(target_addr.sin_zero, '\0', sizeof target_addr.sin_zero);
addr_size = sizeof(target_addr);
if (HDconnect(live_socket, (struct sockaddr *)&target_addr, addr_size) < 0)
@@ -1482,8 +1482,8 @@ H5FD__mirror_close(H5FD_t *_file)
LOG_OP_CALL(__func__);
/* Sanity check */
- HDassert(file);
- HDassert(file->sock_fd >= 0);
+ assert(file);
+ assert(file->sock_fd >= 0);
file->xmit.xmit_count = (file->xmit_i)++;
file->xmit.op = H5FD_MIRROR_OP_CLOSE;
@@ -1590,7 +1590,7 @@ H5FD__mirror_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
LOG_OP_CALL(__func__);
- HDassert(file);
+ assert(file);
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD__mirror_get_eoa() */
@@ -1617,7 +1617,7 @@ H5FD__mirror_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
LOG_OP_CALL(__func__);
- HDassert(file);
+ assert(file);
file->eoa = addr; /* local copy */
@@ -1672,7 +1672,7 @@ H5FD__mirror_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
LOG_OP_CALL(__func__);
- HDassert(file);
+ assert(file);
FUNC_LEAVE_NOAPI(file->eof)
} /* end H5FD__mirror_get_eof() */
@@ -1726,8 +1726,8 @@ H5FD__mirror_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
LOG_OP_CALL(__func__);
- HDassert(file);
- HDassert(buf);
+ assert(file);
+ assert(buf);
file->xmit.xmit_count = (file->xmit_i)++;
file->xmit.op = H5FD_MIRROR_OP_WRITE;
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index b7b7489..af31907 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -53,16 +53,16 @@ H5FD_mpi_get_rank(H5FD_t *file)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file);
+ assert(file);
cls = (const H5FD_class_t *)(file->cls);
- HDassert(cls);
- HDassert(cls->ctl); /* All MPI drivers must implement this */
+ assert(cls);
+ assert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
if ((cls->ctl)(file, H5FD_CTL_GET_MPI_RANK_OPCODE, flags, NULL, &rank_ptr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_rank request failed")
- HDassert(rank >= 0);
+ assert(rank >= 0);
ret_value = rank;
@@ -95,10 +95,10 @@ H5FD_mpi_get_size(H5FD_t *file)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file);
+ assert(file);
cls = (const H5FD_class_t *)(file->cls);
- HDassert(cls);
- HDassert(cls->ctl); /* All MPI drivers must implement this */
+ assert(cls);
+ assert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
if ((cls->ctl)(file, H5FD_CTL_GET_MPI_SIZE_OPCODE, flags, NULL, &size_ptr) < 0)
@@ -138,10 +138,10 @@ H5FD_mpi_get_comm(H5FD_t *file)
FUNC_ENTER_NOAPI(MPI_COMM_NULL)
- HDassert(file);
+ assert(file);
cls = (const H5FD_class_t *)(file->cls);
- HDassert(cls);
- HDassert(cls->ctl); /* All MPI drivers must implement this */
+ assert(cls);
+ assert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
if ((cls->ctl)(file, H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE, flags, NULL, &comm_ptr) < 0)
@@ -208,7 +208,7 @@ H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off /*out*/)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(mpi_off);
+ assert(mpi_off);
/* Convert the HDF5 address into an MPI offset */
*mpi_off = (MPI_Offset)addr;
@@ -245,10 +245,10 @@ H5FD_mpi_get_file_sync_required(H5FD_t *file, hbool_t *file_sync_required)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file);
+ assert(file);
cls = (const H5FD_class_t *)(file->cls);
- HDassert(cls);
- HDassert(cls->ctl); /* All MPI drivers must implement this */
+ assert(cls);
+ assert(cls->ctl); /* All MPI drivers must implement this */
/* Dispatch to driver */
if ((cls->ctl)(file, H5FD_CTL_GET_MPI_FILE_SYNC_OPCODE, flags, NULL, file_sync_required_ptr) < 0)
@@ -294,11 +294,11 @@ H5FD_mpio_wait_for_left_neighbor(H5FD_t *_file)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
/* Portably initialize MPI status variable */
- HDmemset(&rcvstat, 0, sizeof(MPI_Status));
+ memset(&rcvstat, 0, sizeof(MPI_Status));
/* p0 has no left neighbor; all other procs wait for msg */
if (file->mpi_rank != 0) {
@@ -344,8 +344,8 @@ H5FD_mpio_signal_right_neighbor(H5FD_t *_file)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
if (file->mpi_rank != (file->mpi_size - 1))
if (MPI_SUCCESS !=
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 50d3cff..886520b 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -192,7 +192,7 @@ H5FD__mpio_parse_debug_str(const char *s)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(s);
+ assert(s);
/* Set debug mask */
while (*s) {
@@ -297,7 +297,7 @@ H5FD_mpio_init(void)
#ifdef H5FDmpio_DEBUG
/* Clear the flag buffer */
- HDmemset(H5FD_mpio_debug_flags_s, 0, sizeof(H5FD_mpio_debug_flags_s));
+ memset(H5FD_mpio_debug_flags_s, 0, sizeof(H5FD_mpio_debug_flags_s));
/* Retrieve MPI-IO debugging environment variable */
s = HDgetenv("H5FD_mpio_Debug");
@@ -752,7 +752,7 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* set atomicity value */
@@ -762,7 +762,7 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -795,7 +795,7 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Get atomicity value */
@@ -810,7 +810,7 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -881,8 +881,8 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR
H5FD_mpio_debug_t_flag = (H5FD_mpio_debug_flags_s[(int)'t'] &&
(H5FD_mpio_debug_rank_s < 0 || H5FD_mpio_debug_rank_s == mpi_rank));
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering - name = \"%s\", flags = 0x%x, fapl_id = %d, maxaddr = %lu\n",
- __func__, mpi_rank, name, flags, (int)fapl_id, (unsigned long)maxaddr);
+ fprintf(stderr, "%s: (%d) Entering - name = \"%s\", flags = 0x%x, fapl_id = %d, maxaddr = %lu\n",
+ __func__, mpi_rank, name, flags, (int)fapl_id, (unsigned long)maxaddr);
#endif
/* Convert HDF5 flags to MPI-IO flags */
@@ -1019,7 +1019,7 @@ done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -1052,12 +1052,12 @@ H5FD__mpio_close(H5FD_t *_file)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
/* MPI_File_close sets argument to MPI_FILE_NULL */
if (MPI_SUCCESS != (mpi_code = MPI_File_close(&(file->f))))
@@ -1071,7 +1071,7 @@ H5FD__mpio_close(H5FD_t *_file)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -1131,8 +1131,8 @@ H5FD__mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD__mpio_get_eoa() */
@@ -1159,8 +1159,8 @@ H5FD__mpio_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
file->eoa = addr;
@@ -1201,8 +1201,8 @@ H5FD__mpio_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
FUNC_LEAVE_NOAPI(file->eof)
} /* end H5FD__mpio_get_eof() */
@@ -1291,16 +1291,16 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
- HDassert(buf);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
+ assert(buf);
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(MPI_Status));
+ memset(&mpi_stat, 0, sizeof(MPI_Status));
/* some numeric conversions */
if (H5FD_mpi_haddr_to_MPIOff(addr, &mpi_off /*out*/) < 0)
@@ -1351,7 +1351,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank);
#endif
/* Get the collective_opt property to check whether the application wants to do IO individually. */
if (H5CX_get_mpio_coll_opt(&coll_opt_mode) < 0)
@@ -1360,13 +1360,13 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank);
#endif
/* Check whether we should read from rank 0 and broadcast to other ranks */
if (H5CX_get_mpio_rank0_bcast()) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) doing read-rank0-and-MPI_Bcast\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing read-rank0-and-MPI_Bcast\n", __func__, file->mpi_rank);
#endif
/* Indicate path we've taken */
rank0_bcast = TRUE;
@@ -1392,7 +1392,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
else {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
#endif
/* Perform independent read operation */
@@ -1426,7 +1426,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
#endif
/* Perform independent read operation */
@@ -1486,15 +1486,15 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stderr, "%s: (%d) mpi_off = %ld bytes_read = %lld type = %s\n", __func__, file->mpi_rank,
- (long)mpi_off, (long long)bytes_read, H5FD__mem_t_to_str(type));
+ fprintf(stderr, "%s: (%d) mpi_off = %ld bytes_read = %lld type = %s\n", __func__, file->mpi_rank,
+ (long)mpi_off, (long long)bytes_read, H5FD__mem_t_to_str(type));
#endif
/*
* This gives us zeroes beyond end of physical MPI file.
*/
if ((n = (io_size - bytes_read)) > 0)
- HDmemset((char *)buf + bytes_read, 0, (size_t)n);
+ memset((char *)buf + bytes_read, 0, (size_t)n);
done:
if (derived_type)
@@ -1502,7 +1502,7 @@ done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -1561,19 +1561,19 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
- HDassert(buf);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
+ assert(buf);
/* Verify that no data is written when between MPI_Barrier()s during file flush */
- HDassert(!H5CX_get_mpi_file_flushing());
+ assert(!H5CX_get_mpi_file_flushing());
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(MPI_Status));
+ memset(&mpi_stat, 0, sizeof(MPI_Status));
/* some numeric conversions */
if (H5FD_mpi_haddr_to_MPIOff(addr, &mpi_off) < 0)
@@ -1619,7 +1619,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) using MPIO collective mode\n", __func__, file->mpi_rank);
#endif
/* Get the collective_opt property to check whether the application wants to do IO individually. */
@@ -1629,7 +1629,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing MPI collective IO\n", __func__, file->mpi_rank);
#endif
/* Perform collective write operation */
if (MPI_SUCCESS !=
@@ -1649,7 +1649,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
#endif
/* Perform independent write operation */
if (MPI_SUCCESS !=
@@ -1680,7 +1680,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) doing MPI independent IO\n", __func__, file->mpi_rank);
#endif
/* Perform independent write operation */
@@ -1713,8 +1713,8 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stderr, "%s: (%d) mpi_off = %ld bytes_written = %lld type = %s\n", __func__,
- file->mpi_rank, (long)mpi_off, (long long)bytes_written, H5FD__mem_t_to_str(type));
+ fprintf(stderr, "%s: (%d) mpi_off = %ld bytes_written = %lld type = %s\n", __func__, file->mpi_rank,
+ (long)mpi_off, (long long)bytes_written, H5FD__mem_t_to_str(type));
#endif
/* Each process will keep track of its perceived EOF value locally, and
@@ -1734,7 +1734,7 @@ done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
+ fprintf(stderr, "%s: (%d) Leaving: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -1781,20 +1781,20 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(s_sizes);
- HDassert(s_bufs);
- HDassert(vector_was_sorted);
- HDassert(*vector_was_sorted);
- HDassert(mpi_off);
- HDassert(mpi_bufs_base);
- HDassert(size_i);
- HDassert(buf_type);
- HDassert(buf_type_created);
- HDassert(!*buf_type_created);
- HDassert(file_type);
- HDassert(file_type_created);
- HDassert(!*file_type_created);
- HDassert(unused);
+ assert(s_sizes);
+ assert(s_bufs);
+ assert(vector_was_sorted);
+ assert(*vector_was_sorted);
+ assert(mpi_off);
+ assert(mpi_bufs_base);
+ assert(size_i);
+ assert(buf_type);
+ assert(buf_type_created);
+ assert(!*buf_type_created);
+ assert(file_type);
+ assert(file_type_created);
+ assert(!*file_type_created);
+ assert(unused);
/* Get bio I/O transition point (may be lower than 2G for testing) */
bigio_count = H5_mpi_get_bigio_count();
@@ -1850,9 +1850,9 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
s_sizes, s_bufs) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't sort vector I/O request")
- if ((NULL == (mpi_block_lengths = (int *)HDmalloc((size_t)count * sizeof(int)))) ||
- (NULL == (mpi_displacements = (MPI_Aint *)HDmalloc((size_t)count * sizeof(MPI_Aint)))) ||
- (NULL == (mpi_bufs = (MPI_Aint *)HDmalloc((size_t)count * sizeof(MPI_Aint))))) {
+ if ((NULL == (mpi_block_lengths = (int *)malloc((size_t)count * sizeof(int)))) ||
+ (NULL == (mpi_displacements = (MPI_Aint *)malloc((size_t)count * sizeof(MPI_Aint)))) ||
+ (NULL == (mpi_bufs = (MPI_Aint *)malloc((size_t)count * sizeof(MPI_Aint))))) {
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc mpi block lengths / displacement")
}
@@ -1890,7 +1890,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
/* Determine size of this vector element */
if (!fixed_size) {
if ((*s_sizes)[i] == 0) {
- HDassert(vector_was_sorted);
+ assert(vector_was_sorted);
fixed_size = TRUE;
size = sizes[i - 1];
}
@@ -1924,11 +1924,11 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
/* Allocate arrays to keep track of types and whether they were created, if
* necessary */
if (!sub_types) {
- HDassert(!sub_types_created);
+ assert(!sub_types_created);
- if (NULL == (sub_types = HDmalloc((size_t)count * sizeof(MPI_Datatype))))
+ if (NULL == (sub_types = malloc((size_t)count * sizeof(MPI_Datatype))))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc sub types array")
- if (NULL == (sub_types_created = (uint8_t *)HDcalloc((size_t)count, 1))) {
+ if (NULL == (sub_types_created = (uint8_t *)calloc((size_t)count, 1))) {
H5MM_free(sub_types);
sub_types = NULL;
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc sub types created array")
@@ -1938,7 +1938,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
for (j = 0; j < (int)count; j++)
sub_types[j] = MPI_BYTE;
}
- HDassert(sub_types_created);
+ assert(sub_types_created);
/* Create type for large block */
if (H5_mpio_create_large_type(size, 0, MPI_BYTE, &sub_types[i]) < 0)
@@ -1949,7 +1949,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
mpi_block_lengths[i] = 1;
}
else
- HDassert(size == (size_t)mpi_block_lengths[i]);
+ assert(size == (size_t)mpi_block_lengths[i]);
}
/* create the memory MPI derived types */
@@ -1985,28 +1985,28 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit for file_type failed", mpi_code)
/* Free up memory used to build types */
- HDassert(mpi_block_lengths);
- HDfree(mpi_block_lengths);
+ assert(mpi_block_lengths);
+ free(mpi_block_lengths);
mpi_block_lengths = NULL;
- HDassert(mpi_displacements);
- HDfree(mpi_displacements);
+ assert(mpi_displacements);
+ free(mpi_displacements);
mpi_displacements = NULL;
- HDassert(mpi_bufs);
- HDfree(mpi_bufs);
+ assert(mpi_bufs);
+ free(mpi_bufs);
mpi_bufs = NULL;
if (sub_types) {
- HDassert(sub_types);
+ assert(sub_types);
for (i = 0; i < (int)count; i++)
if (sub_types_created[i])
MPI_Type_free(&sub_types[i]);
- HDfree(sub_types);
+ free(sub_types);
sub_types = NULL;
- HDfree(sub_types_created);
+ free(sub_types_created);
sub_types_created = NULL;
}
@@ -2034,47 +2034,47 @@ done:
/* free sorted vectors if they exist */
if (!vector_was_sorted)
if (s_types) {
- HDfree(s_types);
+ free(s_types);
s_types = NULL;
}
/* Clean up on error */
if (ret_value < 0) {
if (mpi_block_lengths) {
- HDfree(mpi_block_lengths);
+ free(mpi_block_lengths);
mpi_block_lengths = NULL;
}
if (mpi_displacements) {
- HDfree(mpi_displacements);
+ free(mpi_displacements);
mpi_displacements = NULL;
}
if (mpi_bufs) {
- HDfree(mpi_bufs);
+ free(mpi_bufs);
mpi_bufs = NULL;
}
if (sub_types) {
- HDassert(sub_types_created);
+ assert(sub_types_created);
for (i = 0; i < (int)count; i++)
if (sub_types_created[i])
MPI_Type_free(&sub_types[i]);
- HDfree(sub_types);
+ free(sub_types);
sub_types = NULL;
- HDfree(sub_types_created);
+ free(sub_types_created);
sub_types_created = NULL;
}
}
/* Make sure we cleaned up */
- HDassert(!mpi_block_lengths);
- HDassert(!mpi_displacements);
- HDassert(!mpi_bufs);
- HDassert(!sub_types);
- HDassert(!sub_types_created);
+ assert(!mpi_block_lengths);
+ assert(!mpi_displacements);
+ assert(!mpi_bufs);
+ assert(!sub_types);
+ assert(!sub_types_created);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__mpio_vector_build_types() */
@@ -2160,22 +2160,22 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
/* Get the transfer mode from the API context
*
@@ -2200,16 +2200,16 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
/* free sorted addrs vector if it exists */
if (!vector_was_sorted)
if (s_addrs) {
- HDfree(s_addrs);
+ free(s_addrs);
s_addrs = NULL;
}
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(mpi_stat));
+ memset(&mpi_stat, 0, sizeof(mpi_stat));
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", __func__, (long)mpi_off, size_i);
+ fprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", __func__, (long)mpi_off, size_i);
#endif
/* Setup the file view. */
@@ -2230,18 +2230,18 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
/* Read the data. */
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stdout, "%s: using MPIO collective mode\n", __func__);
+ fprintf(stdout, "%s: using MPIO collective mode\n", __func__);
#endif
if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stdout, "%s: doing MPI collective IO\n", __func__);
+ fprintf(stdout, "%s: doing MPI collective IO\n", __func__);
#endif
/* Check whether we should read from rank 0 and broadcast to other ranks */
if (H5CX_get_mpio_rank0_bcast()) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stdout, "%s: doing read-rank0-and-MPI_Bcast\n", __func__);
+ fprintf(stdout, "%s: doing read-rank0-and-MPI_Bcast\n", __func__);
#endif
/* Indicate path we've taken */
rank0_bcast = TRUE;
@@ -2261,7 +2261,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
else if (size_i > 0) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stdout, "%s: doing MPI independent IO\n", __func__);
+ fprintf(stdout, "%s: doing MPI independent IO\n", __func__);
#endif
if (MPI_SUCCESS !=
@@ -2326,7 +2326,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
/* Iterate over sorted array in reverse, filling in zeroes to
* sections of the buffers that were not read to */
do {
- HDassert(i >= 0);
+ assert(i >= 0);
#if MPI_VERSION >= 3
io_size = MIN(n, (MPI_Count)s_sizes[i]);
@@ -2335,9 +2335,9 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
io_size = MIN(n, (int)s_sizes[i]);
bytes_read = (int)s_sizes[i] - io_size;
#endif
- HDassert(bytes_read >= 0);
+ assert(bytes_read >= 0);
- HDmemset((char *)s_bufs[i] + bytes_read, 0, (size_t)io_size);
+ memset((char *)s_bufs[i] + bytes_read, 0, (size_t)io_size);
n -= io_size;
i--;
@@ -2365,7 +2365,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_r_flag)
- HDfprintf(stdout, "%s: doing MPI independent IO\n", __func__);
+ fprintf(stdout, "%s: doing MPI independent IO\n", __func__);
#endif
/* Loop over vector elements */
@@ -2404,7 +2404,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
/* Check if we actually need to do I/O */
if (addrs[i] < max_addr) {
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(mpi_stat));
+ memset(&mpi_stat, 0, sizeof(mpi_stat));
/* Issue read */
if (MPI_SUCCESS !=
@@ -2437,13 +2437,13 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou
* addresses.
*/
if ((n = (io_size - bytes_read)) > 0) {
- HDmemset((char *)bufs[i] + bytes_read, 0, (size_t)n);
+ memset((char *)bufs[i] + bytes_read, 0, (size_t)n);
max_addr = addrs[i] + (haddr_t)bytes_read;
}
}
else {
/* Read is past the max address, fill in zeroes */
- HDmemset((char *)bufs[i], 0, size);
+ memset((char *)bufs[i], 0, size);
}
}
}
@@ -2460,22 +2460,22 @@ done:
/* free sorted vectors if they exist */
if (!vector_was_sorted) {
if (s_addrs) {
- HDfree(s_addrs);
+ free(s_addrs);
s_addrs = NULL;
}
if (s_sizes) {
- HDfree(s_sizes);
+ free(s_sizes);
s_sizes = NULL;
}
if (s_bufs) {
- HDfree(s_bufs);
+ free(s_bufs);
s_bufs = NULL;
}
}
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
+ fprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -2552,26 +2552,26 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
/* Verify that no data is written when between MPI_Barrier()s during file flush */
- HDassert(!H5CX_get_mpi_file_flushing());
+ assert(!H5CX_get_mpi_file_flushing());
/* Get the transfer mode from the API context
*
@@ -2600,25 +2600,25 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
/* free sorted vectors if they exist */
if (!vector_was_sorted) {
if (s_addrs) {
- HDfree(s_addrs);
+ free(s_addrs);
s_addrs = NULL;
}
if (s_sizes) {
- HDfree(s_sizes);
+ free(s_sizes);
s_sizes = NULL;
}
if (s_bufs) {
- HDfree(s_bufs);
+ free(s_bufs);
s_bufs = NULL;
}
}
/* Portably initialize MPI status variable */
- HDmemset(&mpi_stat, 0, sizeof(MPI_Status));
+ memset(&mpi_stat, 0, sizeof(MPI_Status));
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", __func__, (long)mpi_off, size_i);
+ fprintf(stdout, "%s: mpi_off = %ld size_i = %d\n", __func__, (long)mpi_off, size_i);
#endif
/* Setup the file view. */
@@ -2638,13 +2638,13 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
/* Write the data. */
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stdout, "%s: using MPIO collective mode\n", __func__);
+ fprintf(stdout, "%s: using MPIO collective mode\n", __func__);
#endif
if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stdout, "%s: doing MPI collective IO\n", __func__);
+ fprintf(stdout, "%s: doing MPI collective IO\n", __func__);
#endif
if (MPI_SUCCESS != (mpi_code = MPI_File_write_at_all(file->f, mpi_off, mpi_bufs_base, size_i,
@@ -2660,7 +2660,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
else if (size_i > 0) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stdout, "%s: doing MPI independent IO\n", __func__);
+ fprintf(stdout, "%s: doing MPI independent IO\n", __func__);
#endif
if (MPI_SUCCESS !=
@@ -2693,7 +2693,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_w_flag)
- HDfprintf(stdout, "%s: doing MPI independent IO\n", __func__);
+ fprintf(stdout, "%s: doing MPI independent IO\n", __func__);
#endif
/* Loop over vector elements */
@@ -2764,27 +2764,27 @@ done:
/* Cleanup on error */
if (ret_value < 0 && !vector_was_sorted) {
if (s_addrs) {
- HDfree(s_addrs);
+ free(s_addrs);
s_addrs = NULL;
}
if (s_sizes) {
- HDfree(s_sizes);
+ free(s_sizes);
s_sizes = NULL;
}
if (s_bufs) {
- HDfree(s_bufs);
+ free(s_bufs);
s_bufs = NULL;
}
}
/* Make sure we cleaned up */
- HDassert(vector_was_sorted || !s_addrs);
- HDassert(vector_was_sorted || !s_sizes);
- HDassert(vector_was_sorted || !s_bufs);
+ assert(vector_was_sorted || !s_addrs);
+ assert(vector_was_sorted || !s_sizes);
+ assert(vector_was_sorted || !s_bufs);
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
+ fprintf(stdout, "%s: Leaving, proc %d: ret_value = %d\n", __func__, file->mpi_rank, ret_value);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -2816,12 +2816,12 @@ H5FD__mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
/* Only sync the file if we are not going to immediately close it */
if (!closing)
@@ -2831,7 +2831,7 @@ H5FD__mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -2873,12 +2873,12 @@ H5FD__mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Entering\n", __func__, file->mpi_rank);
#endif
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
if (!H5F_addr_eq(file->eoa, file->last_eoa)) {
int mpi_code; /* mpi return code */
@@ -2944,7 +2944,7 @@ H5FD__mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_debug_t_flag)
- HDfprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
+ fprintf(stderr, "%s: (%d) Leaving\n", __func__, file->mpi_rank);
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -2971,11 +2971,11 @@ H5FD__mpio_delete(const char *filename, hid_t fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- HDassert(H5FD_MPIO == H5P_peek_driver(plist));
+ assert(H5FD_MPIO == H5P_peek_driver(plist));
if (H5FD_mpi_self_initialized) {
comm = MPI_COMM_WORLD;
@@ -3059,32 +3059,32 @@ H5FD__mpio_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_AT
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_MPIO == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_MPIO == file->pub.driver_id);
switch (op_code) {
case H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
**((MPI_Comm **)output) = file->comm;
break;
case H5FD_CTL_GET_MPI_RANK_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
**((int **)output) = file->mpi_rank;
break;
case H5FD_CTL_GET_MPI_SIZE_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
**((int **)output) = file->mpi_size;
break;
case H5FD_CTL_GET_MPI_FILE_SYNC_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
**((hbool_t **)output) = file->mpi_file_sync_required;
break;
diff --git a/src/H5FDonion.c b/src/H5FDonion.c
index ad21e8f..ffee132 100644
--- a/src/H5FDonion.c
+++ b/src/H5FDonion.c
@@ -295,7 +295,7 @@ H5Pget_fapl_onion(hid_t fapl_id, H5FD_onion_fapl_info_t *fa_out)
if (NULL == (info_ptr = (const H5FD_onion_fapl_info_t *)H5P_peek_driver_info(plist)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad VFL driver info")
- HDmemcpy(fa_out, info_ptr, sizeof(H5FD_onion_fapl_info_t));
+ memcpy(fa_out, info_ptr, sizeof(H5FD_onion_fapl_info_t));
done:
FUNC_LEAVE_API(ret_value)
@@ -377,8 +377,8 @@ H5FD__onion_sb_size(H5FD_t *_file)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(file);
- HDassert(file->original_file);
+ assert(file);
+ assert(file->original_file);
if (file->original_file)
ret_value = H5FD_sb_size(file->original_file);
@@ -403,8 +403,8 @@ H5FD__onion_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*ou
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file);
- HDassert(file->original_file);
+ assert(file);
+ assert(file->original_file);
if (file->original_file && H5FD_sb_encode(file->original_file, name, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTENCODE, FAIL, "unable to encode the superblock in R/W file")
@@ -430,8 +430,8 @@ H5FD__onion_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file);
- HDassert(file->original_file);
+ assert(file);
+ assert(file->original_file);
if (H5FD_sb_load(file->original_file, name, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "unable to decode the superblock in R/W file")
@@ -494,7 +494,7 @@ H5FD__onion_commit_new_revision_record(H5FD_onion_t *file)
if (history->n_revisions == 0) {
unsigned char *ptr = buf; /* re-use buffer space to compute checksum */
- HDassert(history->record_locs == NULL);
+ assert(history->record_locs == NULL);
history->n_revisions = 1;
if (NULL == (history->record_locs = H5MM_calloc(sizeof(H5FD_onion_record_loc_t))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate temporary record pointer list")
@@ -510,11 +510,11 @@ H5FD__onion_commit_new_revision_record(H5FD_onion_t *file)
else {
unsigned char *ptr = buf; /* re-use buffer space to compute checksum */
- HDassert(history->record_locs != NULL);
+ assert(history->record_locs != NULL);
if (NULL == (new_list = H5MM_calloc((history->n_revisions + 1) * sizeof(H5FD_onion_record_loc_t))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to resize record pointer list")
- HDmemcpy(new_list, history->record_locs, sizeof(H5FD_onion_record_loc_t) * history->n_revisions);
+ memcpy(new_list, history->record_locs, sizeof(H5FD_onion_record_loc_t) * history->n_revisions);
H5MM_xfree(history->record_locs);
history->record_locs = new_list;
new_list = NULL;
@@ -554,15 +554,15 @@ H5FD__onion_close(H5FD_t *_file)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
if (H5FD_ONION_STORE_TARGET_ONION == file->fa.store_target) {
- HDassert(file->onion_file);
+ assert(file->onion_file);
if (file->is_open_rw) {
- HDassert(file->recovery_file);
+ assert(file->recovery_file);
if (H5FD__onion_commit_new_revision_record(file) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "Can't write revision record to backing store")
@@ -695,7 +695,7 @@ H5FD__onion_create_truncate_onion(H5FD_onion_t *file, const char *filename, cons
FUNC_ENTER_PACKAGE;
- HDassert(file != NULL);
+ assert(file != NULL);
hdr = &file->header;
history = &file->history;
@@ -926,7 +926,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
if (0 == maxaddr || HADDR_UNDEF == maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
- HDassert(H5P_DEFAULT != fapl_id);
+ assert(H5P_DEFAULT != fapl_id);
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
@@ -980,7 +980,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
/* Initialize file structure fields */
- HDmemcpy(&(file->fa), fa, sizeof(H5FD_onion_fapl_info_t));
+ memcpy(&(file->fa), fa, sizeof(H5FD_onion_fapl_info_t));
file->header.version = H5FD_ONION_HEADER_VERSION_CURR;
file->header.page_size = file->fa.page_size; /* guarded on FAPL-set */
@@ -1043,7 +1043,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
size_t size = 0;
size_t saved_size = 0;
- HDassert(file != NULL);
+ assert(file != NULL);
hdr = &file->header;
history = &file->history;
@@ -1348,8 +1348,8 @@ H5FD__onion_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
FUNC_ENTER_PACKAGE
- HDassert(file != NULL);
- HDassert(buf_out != NULL);
+ assert(file != NULL);
+ assert(buf_out != NULL);
if ((uint64_t)(offset + len) > file->logical_eoa)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Read extends beyond addressed space")
@@ -1422,7 +1422,7 @@ H5FD__onion_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
bytes_to_read -= page_readsize;
} /* end for each page in range */
- HDassert(0 == bytes_to_read);
+ assert(0 == bytes_to_read);
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -1472,10 +1472,10 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
FUNC_ENTER_PACKAGE
- HDassert(file != NULL);
- HDassert(buf != NULL);
- HDassert(file->rev_index != NULL);
- HDassert((uint64_t)(offset + len) <= file->logical_eoa);
+ assert(file != NULL);
+ assert(buf != NULL);
+ assert(file->rev_index != NULL);
+ assert((uint64_t)(offset + len) <= file->logical_eoa);
if (FALSE == file->is_open_rw)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Write not allowed if file not opened in write mode")
@@ -1523,7 +1523,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
if (H5FD_read(file->onion_file, H5FD_MEM_DRAW, entry_out->phys_addr, page_size, page_buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get working file data")
/* Overlay delta from input buffer onto page buffer. */
- HDmemcpy(page_buf + page_gap_head, buf, page_n_used);
+ memcpy(page_buf + page_gap_head, buf, page_n_used);
write_buf = page_buf;
} /* end if partial page */
@@ -1570,8 +1570,8 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
} /* end if page exists in neither index */
/* Copy input buffer to temporary page buffer */
- HDassert((page_size - page_gap_head) >= page_n_used);
- HDmemcpy(page_buf + page_gap_head, buf, page_n_used);
+ assert((page_size - page_gap_head) >= page_n_used);
+ memcpy(page_buf + page_gap_head, buf, page_n_used);
write_buf = page_buf;
} /* end if data range does not span entire page */
@@ -1594,7 +1594,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
} /* end for each page to write */
- HDassert(0 == bytes_to_write);
+ assert(0 == bytes_to_write);
file->logical_eof = MAX(file->logical_eof, (offset + len));
@@ -1631,7 +1631,7 @@ H5FD__onion_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_A
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(file);
+ assert(file);
switch (op_code) {
case H5FD_CTL_GET_NUM_REVISIONS:
@@ -1714,8 +1714,8 @@ H5FD__get_onion_revision_count(H5FD_t *file, uint64_t *revision_count)
FUNC_ENTER_PACKAGE
- HDassert(file);
- HDassert(revision_count);
+ assert(file);
+ assert(revision_count);
op_code = H5FD_CTL_GET_NUM_REVISIONS;
flags = H5FD_CTL_FAIL_IF_UNKNOWN_FLAG;
diff --git a/src/H5FDonion_header.c b/src/H5FDonion_header.c
index f71f168..e882af2 100644
--- a/src/H5FDonion_header.c
+++ b/src/H5FDonion_header.c
@@ -129,9 +129,9 @@ H5FD__onion_header_decode(unsigned char *buf, H5FD_onion_header_t *header)
FUNC_ENTER_PACKAGE;
- HDassert(buf != NULL);
- HDassert(header != NULL);
- HDassert(H5FD_ONION_HEADER_VERSION_CURR == header->version);
+ assert(buf != NULL);
+ assert(header != NULL);
+ assert(H5FD_ONION_HEADER_VERSION_CURR == header->version);
if (HDstrncmp((const char *)buf, H5FD_ONION_HEADER_SIGNATURE, 4))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid header signature")
@@ -141,34 +141,34 @@ H5FD__onion_header_decode(unsigned char *buf, H5FD_onion_header_t *header)
ptr = buf + 5;
ui32 = 0;
- HDmemcpy(&ui32, ptr, 3);
+ memcpy(&ui32, ptr, 3);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, header->flags);
ptr += 3;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, header->page_size);
ptr += 4;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT32DECODE(ui8p, header->origin_eof);
ptr += 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT32DECODE(ui8p, header->history_addr);
ptr += 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT32DECODE(ui8p, header->history_size);
ptr += 8;
sum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, header->checksum);
ptr += 4;
@@ -207,15 +207,15 @@ H5FD__onion_header_encode(H5FD_onion_header_t *header, unsigned char *buf, uint3
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(buf != NULL);
- HDassert(checksum != NULL);
- HDassert(header != NULL);
- HDassert(H5FD_ONION_HEADER_VERSION_CURR == header->version);
- HDassert(0 == (header->flags & 0xFF000000)); /* max three bits long */
+ assert(buf != NULL);
+ assert(checksum != NULL);
+ assert(header != NULL);
+ assert(H5FD_ONION_HEADER_VERSION_CURR == header->version);
+ assert(0 == (header->flags & 0xFF000000)); /* max three bits long */
- HDmemcpy(ptr, H5FD_ONION_HEADER_SIGNATURE, 4);
+ memcpy(ptr, H5FD_ONION_HEADER_SIGNATURE, 4);
ptr += 4;
- HDmemcpy(ptr, (unsigned char *)&header->version, 1);
+ memcpy(ptr, (unsigned char *)&header->version, 1);
ptr += 1;
UINT32ENCODE(ptr, header->flags);
ptr -= 1; /* truncate to three bytes */
diff --git a/src/H5FDonion_history.c b/src/H5FDonion_history.c
index b44021b..b4c9fd2 100644
--- a/src/H5FDonion_history.c
+++ b/src/H5FDonion_history.c
@@ -44,8 +44,8 @@ H5FD__onion_ingest_history(H5FD_onion_history_t *history_out, H5FD_t *raw_file,
FUNC_ENTER_PACKAGE;
- HDassert(history_out);
- HDassert(raw_file);
+ assert(history_out);
+ assert(raw_file);
/* Set early so we can clean up properly on errors */
history_out->record_locs = NULL;
@@ -167,9 +167,9 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
FUNC_ENTER_PACKAGE;
- HDassert(buf != NULL);
- HDassert(history != NULL);
- HDassert(H5FD_ONION_HISTORY_VERSION_CURR == history->version);
+ assert(buf != NULL);
+ assert(history != NULL);
+ assert(H5FD_ONION_HISTORY_VERSION_CURR == history->version);
if (HDstrncmp((const char *)buf, H5FD_ONION_HISTORY_SIGNATURE, 4))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid signature")
@@ -179,7 +179,7 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
ptr = buf + 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, n_revisions);
ptr += 8;
@@ -206,19 +206,19 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
uint64_t record_size;
uint64_t phys_addr;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, phys_addr);
H5_CHECKED_ASSIGN(rloc->phys_addr, haddr_t, phys_addr, uint64_t);
ptr += 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record_size);
H5_CHECKED_ASSIGN(rloc->record_size, hsize_t, record_size, uint64_t);
ptr += 8;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, rloc->checksum);
ptr += 4;
@@ -227,7 +227,7 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
sum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, history->checksum);
ptr += 4;
@@ -269,17 +269,17 @@ H5FD__onion_history_encode(H5FD_onion_history_t *history, unsigned char *buf, ui
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(history != NULL);
- HDassert(H5FD_ONION_HISTORY_VERSION_CURR == history->version);
- HDassert(buf != NULL);
- HDassert(checksum != NULL);
+ assert(history != NULL);
+ assert(H5FD_ONION_HISTORY_VERSION_CURR == history->version);
+ assert(buf != NULL);
+ assert(checksum != NULL);
- HDmemcpy(ptr, H5FD_ONION_HISTORY_SIGNATURE, 4);
+ memcpy(ptr, H5FD_ONION_HISTORY_SIGNATURE, 4);
ptr += 4;
UINT32ENCODE(ptr, vers_u32);
UINT64ENCODE(ptr, history->n_revisions);
if (history->n_revisions > 0) {
- HDassert(history->record_locs != NULL);
+ assert(history->record_locs != NULL);
for (uint64_t i = 0; i < history->n_revisions; i++) {
H5FD_onion_record_loc_t *rloc = &history->record_locs[i];
diff --git a/src/H5FDonion_index.c b/src/H5FDonion_index.c
index c9e9a15..a164e91 100644
--- a/src/H5FDonion_index.c
+++ b/src/H5FDonion_index.c
@@ -53,11 +53,11 @@ H5FD__onion_ingest_revision_record(H5FD_onion_revision_record_t *r_out, H5FD_t *
FUNC_ENTER_PACKAGE;
- HDassert(r_out);
- HDassert(raw_file);
- HDassert(history);
- HDassert(history->record_locs);
- HDassert(history->n_revisions > 0);
+ assert(r_out);
+ assert(raw_file);
+ assert(history);
+ assert(history->record_locs);
+ assert(history->n_revisions > 0);
high = history->n_revisions - 1;
range = high;
@@ -185,7 +185,7 @@ H5FD__onion_archival_index_is_valid(const H5FD_onion_archival_index_t *aix)
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(aix);
+ assert(aix);
if (H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR != aix->version)
HGOTO_DONE(FALSE)
@@ -229,11 +229,11 @@ H5FD__onion_archival_index_find(const H5FD_onion_archival_index_t *aix, uint64_t
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(aix);
- HDassert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == aix->version);
- HDassert(entry_out);
+ assert(aix);
+ assert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == aix->version);
+ assert(entry_out);
if (aix->n_entries != 0)
- HDassert(aix->list);
+ assert(aix->list);
high = aix->n_entries - 1;
range = high;
@@ -249,7 +249,7 @@ H5FD__onion_archival_index_find(const H5FD_onion_archival_index_t *aix, uint64_t
/* Winnow down to first of found or one element */
while (range > 0) {
- HDassert(high < aix->n_entries);
+ assert(high < aix->n_entries);
n = low + (range / 2);
x = &(aix->list[n]);
if (x->logical_page == logical_page) {
@@ -266,7 +266,7 @@ H5FD__onion_archival_index_find(const H5FD_onion_archival_index_t *aix, uint64_t
range = high - low;
}
- HDassert(high == low); /* one element */
+ assert(high == low); /* one element */
/* n == low/high check because we may have tested it already above */
if ((n != low || n != high) && (aix->list[low].logical_page == logical_page)) {
@@ -293,8 +293,8 @@ H5FD__onion_revision_index_destroy(H5FD_onion_revision_index_t *rix)
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(rix);
- HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
+ assert(rix);
+ assert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
for (size_t i = 0; 0 < rix->_hash_table_n_keys_populated && i < rix->_hash_table_size; i++) {
H5FD_onion_revision_index_hash_chain_node_t *next = NULL;
@@ -304,7 +304,7 @@ H5FD__onion_revision_index_destroy(H5FD_onion_revision_index_t *rix)
rix->_hash_table_n_keys_populated -= 1;
while (node != NULL) {
- HDassert(H5FD_ONION_REVISION_INDEX_HASH_CHAIN_NODE_VERSION_CURR == node->version);
+ assert(H5FD_ONION_REVISION_INDEX_HASH_CHAIN_NODE_VERSION_CURR == node->version);
next = node->next;
H5MM_xfree(node);
@@ -337,8 +337,8 @@ H5FD__onion_revision_index_init(uint32_t page_size)
FUNC_ENTER_PACKAGE;
- HDassert(0 != page_size);
- HDassert(POWER_OF_TWO(page_size));
+ assert(0 != page_size);
+ assert(POWER_OF_TWO(page_size));
if (NULL == (rix = H5MM_calloc(sizeof(H5FD_onion_revision_index_t))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "cannot allocate index")
@@ -391,9 +391,9 @@ H5FD__onion_revision_index_resize(H5FD_onion_revision_index_t *rix)
FUNC_ENTER_PACKAGE;
- HDassert(rix);
- HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
- HDassert(rix->_hash_table);
+ assert(rix);
+ assert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
+ assert(rix->_hash_table);
if (NULL == (new_table = H5MM_calloc(new_size * sizeof(H5FD_onion_revision_index_hash_chain_node_t *))))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "cannot allocate new hash table")
@@ -453,9 +453,9 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
FUNC_ENTER_PACKAGE;
- HDassert(rix);
- HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
- HDassert(entry);
+ assert(rix);
+ assert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
+ assert(entry);
/* Resize and re-hash table if necessary */
if (rix->n_entries >= (rix->_hash_table_size * 2) ||
@@ -465,7 +465,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
}
key = entry->logical_page & (rix->_hash_table_size - 1);
- HDassert(key < rix->_hash_table_size);
+ assert(key < rix->_hash_table_size);
if (NULL == rix->_hash_table[key]) {
/* Key maps to empty bucket */
@@ -482,7 +482,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
if (entry->phys_addr != node->entry_data.phys_addr) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "physical address mismatch");
}
- HDmemcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
+ memcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
append_dest = NULL; /* Node updated, do not append */
break;
}
@@ -495,7 +495,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "cannot allocate new ash chain node")
node->version = H5FD_ONION_REVISION_INDEX_HASH_CHAIN_NODE_VERSION_CURR;
node->next = NULL;
- HDmemcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
+ memcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t));
*append_dest = node;
rix->n_entries++;
}
@@ -526,13 +526,13 @@ H5FD__onion_revision_index_find(const H5FD_onion_revision_index_t *rix, uint64_t
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(rix);
- HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
- HDassert(rix->_hash_table);
- HDassert(entry_out);
+ assert(rix);
+ assert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
+ assert(rix->_hash_table);
+ assert(entry_out);
key = logical_page & (rix->_hash_table_size - 1);
- HDassert(key < rix->_hash_table_size);
+ assert(key < rix->_hash_table_size);
if (rix->_hash_table[key] != NULL) {
H5FD_onion_revision_index_hash_chain_node_t *node = NULL;
@@ -598,10 +598,10 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
FUNC_ENTER_PACKAGE;
- HDassert(buf != NULL);
- HDassert(record != NULL);
- HDassert(H5FD_ONION_REVISION_RECORD_VERSION_CURR == record->version);
- HDassert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == record->archival_index.version);
+ assert(buf != NULL);
+ assert(record != NULL);
+ assert(H5FD_ONION_REVISION_RECORD_VERSION_CURR == record->version);
+ assert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == record->archival_index.version);
if (HDstrncmp((const char *)buf, H5FD_ONION_REVISION_RECORD_SIGNATURE, 4))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid signature")
@@ -611,25 +611,25 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
ptr = buf + 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record->revision_num);
ptr += 8;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record->parent_revision_num);
ptr += 8;
- HDmemcpy(record->time_of_creation, ptr, 16);
+ memcpy(record->time_of_creation, ptr, 16);
ptr += 16;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, record->logical_eof);
ptr += 8;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, page_size);
ptr += 4;
@@ -644,12 +644,12 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
record->archival_index.page_size_log2++)
;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, n_entries);
ptr += 8;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, comment_size);
ptr += 4;
@@ -670,7 +670,7 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
for (size_t i = 0; i < n_entries; i++) {
entry = &record->archival_index.list[i];
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, entry->logical_page);
ptr += 8;
@@ -681,12 +681,12 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
entry->logical_page = entry->logical_page >> record->archival_index.page_size_log2;
- HDmemcpy(&ui64, ptr, 8);
+ memcpy(&ui64, ptr, 8);
ui8p = (uint8_t *)&ui64;
UINT64DECODE(ui8p, entry->phys_addr);
ptr += 8;
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, sum);
ptr += 4;
@@ -705,13 +705,13 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
else {
if (record->comment == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "no comment pointer")
- HDmemcpy(record->comment, ptr, comment_size);
+ memcpy(record->comment, ptr, comment_size);
}
ptr += comment_size;
sum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
- HDmemcpy(&ui32, ptr, 4);
+ memcpy(&ui32, ptr, 4);
ui8p = (uint8_t *)&ui32;
UINT32DECODE(ui8p, record->checksum);
ptr += 4;
@@ -755,21 +755,21 @@ H5FD__onion_revision_record_encode(H5FD_onion_revision_record_t *record, unsigne
FUNC_ENTER_PACKAGE_NOERR;
- HDassert(checksum != NULL);
- HDassert(buf != NULL);
- HDassert(record != NULL);
- HDassert(vers_u32 < 0x100);
- HDassert(H5FD_ONION_REVISION_RECORD_VERSION_CURR == record->version);
- HDassert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == record->archival_index.version);
+ assert(checksum != NULL);
+ assert(buf != NULL);
+ assert(record != NULL);
+ assert(vers_u32 < 0x100);
+ assert(H5FD_ONION_REVISION_RECORD_VERSION_CURR == record->version);
+ assert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == record->archival_index.version);
page_size = (uint32_t)(1 << record->archival_index.page_size_log2);
- HDmemcpy(ptr, H5FD_ONION_REVISION_RECORD_SIGNATURE, 4);
+ memcpy(ptr, H5FD_ONION_REVISION_RECORD_SIGNATURE, 4);
ptr += 4;
UINT32ENCODE(ptr, vers_u32);
UINT64ENCODE(ptr, record->revision_num);
UINT64ENCODE(ptr, record->parent_revision_num);
- HDmemcpy(ptr, record->time_of_creation, 16);
+ memcpy(ptr, record->time_of_creation, 16);
ptr += 16;
UINT64ENCODE(ptr, record->logical_eof);
UINT32ENCODE(ptr, page_size);
@@ -779,7 +779,7 @@ H5FD__onion_revision_record_encode(H5FD_onion_revision_record_t *record, unsigne
if (record->archival_index.n_entries > 0) {
uint64_t page_size_log2 = record->archival_index.page_size_log2;
- HDassert(record->archival_index.list != NULL);
+ assert(record->archival_index.list != NULL);
for (uint64_t i = 0; i < record->archival_index.n_entries; i++) {
uint32_t sum = 0;
H5FD_onion_index_entry_t *entry = NULL;
@@ -796,8 +796,8 @@ H5FD__onion_revision_record_encode(H5FD_onion_revision_record_t *record, unsigne
}
if (record->comment_size > 0) {
- HDassert(record->comment != NULL && *record->comment != '\0');
- HDmemcpy(ptr, record->comment, record->comment_size);
+ assert(record->comment != NULL && *record->comment != '\0');
+ memcpy(ptr, record->comment, record->comment_size);
ptr += record->comment_size;
}
@@ -855,11 +855,11 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
FUNC_ENTER_PACKAGE;
- HDassert(rix);
- HDassert(aix);
- HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
- HDassert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == aix->version);
- HDassert(aix->page_size_log2 == rix->page_size_log2);
+ assert(rix);
+ assert(aix);
+ assert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
+ assert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == aix->version);
+ assert(aix->page_size_log2 == rix->page_size_log2);
/* If the revision index is empty there is nothing to archive */
if (rix->n_entries == 0)
@@ -875,7 +875,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
const H5FD_onion_revision_index_hash_chain_node_t *node = NULL;
for (node = rix->_hash_table[i]; node != NULL; node = node->next) {
- HDmemcpy(&new_aix.list[new_aix.n_entries], &node->entry_data, sizeof(H5FD_onion_index_entry_t));
+ memcpy(&new_aix.list[new_aix.n_entries], &node->entry_data, sizeof(H5FD_onion_index_entry_t));
new_aix.n_entries++;
}
}
@@ -900,7 +900,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
/* Add only if page not already added from revision index */
if (H5FD__onion_archival_index_find(&new_aix, aix->list[i].logical_page, &entry) == 0) {
- HDmemcpy(&kept_list[n_kept], &aix->list[i], sizeof(H5FD_onion_index_entry_t));
+ memcpy(&kept_list[n_kept], &aix->list[i], sizeof(H5FD_onion_index_entry_t));
n_kept++;
}
}
@@ -913,12 +913,12 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate exact-size archival index list")
/* Copy (new) revision list entries to replacement list */
- HDmemcpy(aix->list, new_aix.list, sizeof(H5FD_onion_index_entry_t) * new_aix.n_entries);
+ memcpy(aix->list, new_aix.list, sizeof(H5FD_onion_index_entry_t) * new_aix.n_entries);
aix->n_entries = new_aix.n_entries;
/* Copy (old) kept archival list entries to replacement list */
if (n_kept > 0) {
- HDmemcpy(&aix->list[aix->n_entries], kept_list, sizeof(H5FD_onion_index_entry_t) * n_kept);
+ memcpy(&aix->list[aix->n_entries], kept_list, sizeof(H5FD_onion_index_entry_t) * n_kept);
aix->n_entries += n_kept;
}
diff --git a/src/H5FDros3.c b/src/H5FDros3.c
index 9a529d6..05ba257 100644
--- a/src/H5FDros3.c
+++ b/src/H5FDros3.c
@@ -306,7 +306,7 @@ H5FD_ros3_init(void)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_init() called.\n");
+ fprintf(stdout, "H5FD_ros3_init() called.\n");
#endif
if (H5I_VFL != H5I_get_type(H5FD_ROS3_g)) {
@@ -350,7 +350,7 @@ H5FD__ros3_term(void)
FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_term() called.\n");
+ fprintf(stdout, "H5FD__ros3_term() called.\n");
#endif
/* Reset VFL ID */
@@ -383,10 +383,10 @@ H5Pset_fapl_ros3(hid_t fapl_id, const H5FD_ros3_fapl_t *fa)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*#", fapl_id, fa);
- HDassert(fa != NULL);
+ assert(fa != NULL);
#if ROS3_DEBUG
- HDfprintf(stdout, "H5Pset_fapl_ros3() called.\n");
+ fprintf(stdout, "H5Pset_fapl_ros3() called.\n");
#endif
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
@@ -429,7 +429,7 @@ H5FD__ros3_validate_config(const H5FD_ros3_fapl_t *fa)
FUNC_ENTER_PACKAGE
- HDassert(fa != NULL);
+ assert(fa != NULL);
if (fa->version != H5FD_CURR_ROS3_FAPL_T_VERSION)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown H5FD_ros3_fapl_t version");
@@ -469,7 +469,7 @@ H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_dst /*out*/)
H5TRACE2("e", "ix", fapl_id, fa_dst);
#if ROS3_DEBUG
- HDfprintf(stdout, "H5Pget_fapl_ros3() called.\n");
+ fprintf(stdout, "H5Pget_fapl_ros3() called.\n");
#endif
if (fa_dst == NULL)
@@ -592,7 +592,7 @@ H5FD__ros3_fapl_free(void *_fa)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(fa != NULL); /* sanity check */
+ assert(fa != NULL); /* sanity check */
H5MM_xfree(fa);
@@ -630,7 +630,7 @@ ros3_reset_stats(H5FD_ros3_t *file)
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDprintf("ros3_reset_stats() called\n");
+ printf("ros3_reset_stats() called\n");
#endif
if (file == NULL)
@@ -698,7 +698,7 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_open() called.\n");
+ fprintf(stdout, "H5FD__ros3_open() called.\n");
#endif
/* Sanity check on file offsets */
@@ -729,7 +729,7 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
* find way to re-use/share
*/
now = gmnow();
- HDassert(now != NULL);
+ assert(now != NULL);
if (ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem while writing iso8601 timestamp")
if (FAIL == H5FD_s3comms_signing_key(signing_key, (const char *)fa.secret_key,
@@ -868,20 +868,20 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file)
* PRINT FILENAME *
******************/
- HDfprintf(stream, "stats for %s://%s", purl->scheme, purl->host);
+ fprintf(stream, "stats for %s://%s", purl->scheme, purl->host);
if (purl->port != NULL && purl->port[0] != '\0')
- HDfprintf(stream, ":%s", purl->port);
+ fprintf(stream, ":%s", purl->port);
if (purl->query != NULL && purl->query[0] != '\0') {
if (purl->path != NULL && purl->path[0] != '\0')
- HDfprintf(stream, "/%s", purl->path);
+ fprintf(stream, "/%s", purl->path);
else
- HDfprintf(stream, "/");
- HDfprintf(stream, "?%s", purl->query);
+ fprintf(stream, "/");
+ fprintf(stream, "?%s", purl->query);
}
else if (purl->path != NULL && purl->path[0] != '\0') {
- HDfprintf(stream, "/%s", purl->path);
+ fprintf(stream, "/%s", purl->path);
}
- HDfprintf(stream, "\n");
+ fprintf(stream, "\n");
/*******************
* AGGREGATE STATS *
@@ -914,10 +914,10 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file)
* PRINT OVERVIEW *
******************/
- HDfprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta,
- count_raw);
- HDfprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta,
- bytes_raw);
+ fprintf(stream, "TOTAL READS: %llu (%llu meta, %llu raw)\n", count_raw + count_meta, count_meta,
+ count_raw);
+ fprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n", bytes_raw + bytes_meta, bytes_meta,
+ bytes_raw);
if (count_raw + count_meta == 0)
goto done;
@@ -926,60 +926,60 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file)
* PRINT AGGREGATE STATS *
*************************/
- HDfprintf(stream, "SIZES meta raw\n");
- HDfprintf(stream, " min ");
+ fprintf(stream, "SIZES meta raw\n");
+ fprintf(stream, " min ");
if (count_meta == 0)
- HDfprintf(stream, " 0.000 ");
+ fprintf(stream, " 0.000 ");
else {
re_dub = (double)min_meta;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
}
if (count_raw == 0)
- HDfprintf(stream, " 0.000 \n");
+ fprintf(stream, " 0.000 \n");
else {
re_dub = (double)min_raw;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
}
- HDfprintf(stream, " avg ");
+ fprintf(stream, " avg ");
re_dub = (double)average_meta;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
re_dub = (double)average_raw;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
- HDfprintf(stream, " max ");
+ fprintf(stream, " max ");
re_dub = (double)max_meta;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
re_dub = (double)max_raw;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
- HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
+ assert(suffix_i < sizeof(suffixes));
+ fprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
/******************************
* PRINT INDIVIDUAL BIN STATS *
******************************/
- HDfprintf(stream, "BINS # of reads total bytes average size\n");
- HDfprintf(stream, " up-to meta raw meta raw meta raw\n");
+ fprintf(stream, "BINS # of reads total bytes average size\n");
+ fprintf(stream, " up-to meta raw meta raw meta raw\n");
for (i = 0; i <= ROS3_STATS_BIN_COUNT; i++) {
const ros3_statsbin *m;
@@ -1003,52 +1003,52 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file)
if (i == ROS3_STATS_BIN_COUNT) {
range_end = ros3_stats_boundaries[i - 1];
- HDfprintf(stream, ">");
+ fprintf(stream, ">");
}
else
- HDfprintf(stream, " ");
+ fprintf(stream, " ");
bm_val = (double)m->bytes;
for (suffix_i = 0; bm_val >= 1024.0; suffix_i++)
bm_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
bm_suffix = suffixes[suffix_i];
br_val = (double)r->bytes;
for (suffix_i = 0; br_val >= 1024.0; suffix_i++)
br_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
br_suffix = suffixes[suffix_i];
if (m->count > 0)
am_val = (double)(m->bytes) / (double)(m->count);
for (suffix_i = 0; am_val >= 1024.0; suffix_i++)
am_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
am_suffix = suffixes[suffix_i];
if (r->count > 0)
ar_val = (double)(r->bytes) / (double)(r->count);
for (suffix_i = 0; ar_val >= 1024.0; suffix_i++)
ar_val /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
+ assert(suffix_i < sizeof(suffixes));
ar_suffix = suffixes[suffix_i];
re_dub = (double)range_end;
for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- HDassert(suffix_i < sizeof(suffixes));
-
- HDfprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub,
- suffixes[suffix_i], /* bin ceiling */
- m->count, /* metadata reads */
- r->count, /* raw data reads */
- bm_val, bm_suffix, /* metadata bytes */
- br_val, br_suffix, /* raw data bytes */
- am_val, am_suffix, /* metadata average */
- ar_val, ar_suffix); /* raw data average */
-
- HDfflush(stream);
+ assert(suffix_i < sizeof(suffixes));
+
+ fprintf(stream, " %8.3f%c %7d %7d %8.3f%c %8.3f%c %8.3f%c %8.3f%c\n", re_dub,
+ suffixes[suffix_i], /* bin ceiling */
+ m->count, /* metadata reads */
+ r->count, /* raw data reads */
+ bm_val, bm_suffix, /* metadata bytes */
+ br_val, br_suffix, /* raw data bytes */
+ am_val, am_suffix, /* metadata average */
+ ar_val, ar_suffix); /* raw data average */
+
+ fflush(stream);
}
done:
@@ -1083,12 +1083,12 @@ H5FD__ros3_close(H5FD_t H5_ATTR_UNUSED *_file)
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_close() called.\n");
+ fprintf(stdout, "H5FD__ros3_close() called.\n");
#endif
/* Sanity checks */
- HDassert(file != NULL);
- HDassert(file->s3r_handle != NULL);
+ assert(file != NULL);
+ assert(file->s3r_handle != NULL);
/* Close the underlying request handle
*/
@@ -1152,20 +1152,20 @@ H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_cmp() called.\n");
+ fprintf(stdout, "H5FD__ros3_cmp() called.\n");
#endif
- HDassert(f1->s3r_handle != NULL);
- HDassert(f2->s3r_handle != NULL);
+ assert(f1->s3r_handle != NULL);
+ assert(f2->s3r_handle != NULL);
purl1 = (const parsed_url_t *)f1->s3r_handle->purl;
purl2 = (const parsed_url_t *)f2->s3r_handle->purl;
- HDassert(purl1 != NULL);
- HDassert(purl2 != NULL);
- HDassert(purl1->scheme != NULL);
- HDassert(purl2->scheme != NULL);
- HDassert(purl1->host != NULL);
- HDassert(purl2->host != NULL);
+ assert(purl1 != NULL);
+ assert(purl2 != NULL);
+ assert(purl1->scheme != NULL);
+ assert(purl2->scheme != NULL);
+ assert(purl1->host != NULL);
+ assert(purl2->host != NULL);
/* URL: SCHEME */
if (HDstrcmp(purl1->scheme, purl2->scheme))
@@ -1264,7 +1264,7 @@ H5FD__ros3_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_query() called.\n");
+ fprintf(stdout, "H5FD__ros3_query() called.\n");
#endif
/* Set the VFL feature flags that this driver supports */
@@ -1304,7 +1304,7 @@ H5FD__ros3_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_get_eoa() called.\n");
+ fprintf(stdout, "H5FD__ros3_get_eoa() called.\n");
#endif
FUNC_LEAVE_NOAPI(file->eoa)
@@ -1335,7 +1335,7 @@ H5FD__ros3_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_set_eoa() called.\n");
+ fprintf(stdout, "H5FD__ros3_set_eoa() called.\n");
#endif
file->eoa = addr;
@@ -1369,7 +1369,7 @@ H5FD__ros3_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_ENTER_PACKAGE_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_get_eof() called.\n");
+ fprintf(stdout, "H5FD__ros3_get_eof() called.\n");
#endif
FUNC_LEAVE_NOAPI(H5FD_s3comms_s3r_get_filesize(file->s3r_handle))
@@ -1401,7 +1401,7 @@ H5FD__ros3_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_get_handle() called.\n");
+ fprintf(stdout, "H5FD__ros3_get_handle() called.\n");
#endif
if (!file_handle)
@@ -1451,12 +1451,12 @@ H5FD__ros3_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_read() called.\n");
+ fprintf(stdout, "H5FD__ros3_read() called.\n");
#endif
- HDassert(file != NULL);
- HDassert(file->s3r_handle != NULL);
- HDassert(buf != NULL);
+ assert(file != NULL);
+ assert(file->s3r_handle != NULL);
+ assert(buf != NULL);
filesize = H5FD_s3comms_s3r_get_filesize(file->s3r_handle);
@@ -1521,7 +1521,7 @@ H5FD__ros3_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_write() called.\n");
+ fprintf(stdout, "H5FD__ros3_write() called.\n");
#endif
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file.")
@@ -1559,7 +1559,7 @@ H5FD__ros3_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id,
FUNC_ENTER_PACKAGE
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD__ros3_truncate() called.\n");
+ fprintf(stdout, "H5FD__ros3_truncate() called.\n");
#endif
HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file.")
diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c
index 628c55a..d1cae0e 100644
--- a/src/H5FDs3comms.c
+++ b/src/H5FDs3comms.c
@@ -222,14 +222,14 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_hrb_node_set.");
- HDprintf("NAME: %s\n", name);
- HDprintf("VALUE: %s\n", value);
- HDprintf("LIST:\n->");
+ fprintf(stdout, "called H5FD_s3comms_hrb_node_set.");
+ printf("NAME: %s\n", name);
+ printf("VALUE: %s\n", value);
+ printf("LIST:\n->");
for (node_ptr = (*L); node_ptr != NULL; node_ptr = node_ptr->next)
- HDfprintf(stdout, "{%s}\n->", node_ptr->cat);
- HDprintf("(null)\n");
- HDfflush(stdout);
+ fprintf(stdout, "{%s}\n->", node_ptr->cat);
+ printf("(null)\n");
+ fflush(stdout);
node_ptr = NULL;
#endif
@@ -276,7 +276,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
ret = HDsnprintf(nvcat, catwrite, "%s: %s", name, value);
if (ret < 0 || (size_t)ret > catlen)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot concatenate `%s: %s", name, value);
- HDassert(catlen == HDstrlen(nvcat));
+ assert(catlen == HDstrlen(nvcat));
/* create new_node, should we need it
*/
@@ -301,8 +301,8 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove node from empty list")
else {
#if S3COMMS_DEBUG
- HDprintf("CREATE NEW\n");
- HDfflush(stdout);
+ printf("CREATE NEW\n");
+ fflush(stdout);
#endif
/*******************
* CREATE NEW LIST *
@@ -320,8 +320,8 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
/* sanity-check pointer passed in
*/
- HDassert((*L) != NULL);
- HDassert((*L)->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert((*L) != NULL);
+ assert((*L)->magic == S3COMMS_HRB_NODE_MAGIC);
node_ptr = (*L);
/* Check whether to modify/remove first node in list
@@ -332,8 +332,8 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
if (value == NULL) {
#if S3COMMS_DEBUG
- HDprintf("REMOVE HEAD\n");
- HDfflush(stdout);
+ printf("REMOVE HEAD\n");
+ fflush(stdout);
#endif
/***************
* REMOVE HEAD *
@@ -342,48 +342,48 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
*L = node_ptr->next;
#if S3COMMS_DEBUG
- HDprintf("FREEING CAT (node)\n");
- HDfflush(stdout);
+ printf("FREEING CAT (node)\n");
+ fflush(stdout);
#endif
H5MM_xfree(node_ptr->cat);
#if S3COMMS_DEBUG
- HDprintf("FREEING LOWERNAME (node)\n");
- HDfflush(stdout);
+ printf("FREEING LOWERNAME (node)\n");
+ fflush(stdout);
#endif
H5MM_xfree(node_ptr->lowername);
#if S3COMMS_DEBUG
- HDprintf("FREEING NAME (node)\n");
- HDfflush(stdout);
+ printf("FREEING NAME (node)\n");
+ fflush(stdout);
#endif
H5MM_xfree(node_ptr->name);
#if S3COMMS_DEBUG
- HDprintf("FREEING VALUE (node)\n");
- HDfflush(stdout);
+ printf("FREEING VALUE (node)\n");
+ fflush(stdout);
#endif
H5MM_xfree(node_ptr->value);
#if S3COMMS_DEBUG
- HDprintf("MAGIC OK? %s\n", (node_ptr->magic == S3COMMS_HRB_NODE_MAGIC) ? "YES" : "NO");
- HDfflush(stdout);
+ printf("MAGIC OK? %s\n", (node_ptr->magic == S3COMMS_HRB_NODE_MAGIC) ? "YES" : "NO");
+ fflush(stdout);
#endif
- HDassert(node_ptr->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(node_ptr->magic == S3COMMS_HRB_NODE_MAGIC);
node_ptr->magic += 1ul;
#if S3COMMS_DEBUG
- HDprintf("FREEING POINTER\n");
- HDfflush(stdout);
+ printf("FREEING POINTER\n");
+ fflush(stdout);
#endif
H5MM_xfree(node_ptr);
#if S3COMMS_DEBUG
- HDprintf("FREEING WORKING LOWERNAME\n");
- HDfflush(stdout);
+ printf("FREEING WORKING LOWERNAME\n");
+ fflush(stdout);
#endif
H5MM_xfree(lowername);
lowername = NULL;
}
else {
#if S3COMMS_DEBUG
- HDprintf("MODIFY HEAD\n");
- HDfflush(stdout);
+ printf("MODIFY HEAD\n");
+ fflush(stdout);
#endif
/***************
* MODIFY HEAD *
@@ -412,8 +412,8 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove a node 'before' head")
else {
#if S3COMMS_DEBUG
- HDprintf("PREPEND NEW HEAD\n");
- HDfflush(stdout);
+ printf("PREPEND NEW HEAD\n");
+ fflush(stdout);
#endif
/*******************
* INSERT NEW HEAD *
@@ -441,14 +441,14 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node")
else {
#if S3COMMS_DEBUG
- HDprintf("APPEND A NODE\n");
- HDfflush(stdout);
+ printf("APPEND A NODE\n");
+ fflush(stdout);
#endif
/*******************
* APPEND NEW NODE *
*******************/
- HDassert(HDstrcmp(lowername, node_ptr->lowername) > 0);
+ assert(HDstrcmp(lowername, node_ptr->lowername) > 0);
new_node->name = namecpy;
new_node->value = valuecpy;
new_node->lowername = lowername;
@@ -464,14 +464,14 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node")
else {
#if S3COMMS_DEBUG
- HDprintf("INSERT A NODE\n");
- HDfflush(stdout);
+ printf("INSERT A NODE\n");
+ fflush(stdout);
#endif
/*******************
* INSERT NEW NODE *
*******************/
- HDassert(HDstrcmp(lowername, node_ptr->lowername) > 0);
+ assert(HDstrcmp(lowername, node_ptr->lowername) > 0);
new_node->name = namecpy;
new_node->value = valuecpy;
new_node->lowername = lowername;
@@ -493,15 +493,15 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
node_ptr->next = tmp->next;
#if S3COMMS_DEBUG
- HDprintf("REMOVE A NODE\n");
- HDfflush(stdout);
+ printf("REMOVE A NODE\n");
+ fflush(stdout);
#endif
H5MM_xfree(tmp->cat);
H5MM_xfree(tmp->lowername);
H5MM_xfree(tmp->name);
H5MM_xfree(tmp->value);
- HDassert(tmp->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(tmp->magic == S3COMMS_HRB_NODE_MAGIC);
tmp->magic += 1ul;
H5MM_xfree(tmp);
@@ -510,8 +510,8 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
}
else {
#if S3COMMS_DEBUG
- HDprintf("MODIFY A NODE\n");
- HDfflush(stdout);
+ printf("MODIFY A NODE\n");
+ fflush(stdout);
#endif
/*****************
* MODIFY A NODE *
@@ -522,7 +522,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value)
H5MM_xfree(node_ptr->value);
H5MM_xfree(node_ptr->cat);
- HDassert(new_node->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(new_node->magic == S3COMMS_HRB_NODE_MAGIC);
new_node->magic += 1ul;
H5MM_xfree(new_node);
H5MM_xfree(lowername);
@@ -555,7 +555,7 @@ done:
if (valuecpy != NULL)
H5MM_xfree(valuecpy);
if (new_node != NULL) {
- HDassert(new_node->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(new_node->magic == S3COMMS_HRB_NODE_MAGIC);
new_node->magic += 1ul;
H5MM_xfree(new_node);
}
@@ -609,7 +609,7 @@ H5FD_s3comms_hrb_destroy(hrb_t **_buf)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_hrb_destroy.\n");
+ fprintf(stdout, "called H5FD_s3comms_hrb_destroy.\n");
#endif
if (_buf != NULL && *_buf != NULL) {
@@ -673,7 +673,7 @@ H5FD_s3comms_hrb_init_request(const char *_verb, const char *_resource, const ch
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_hrb_init_request.\n");
+ fprintf(stdout, "called H5FD_s3comms_hrb_init_request.\n");
#endif
if (_resource == NULL)
@@ -709,7 +709,7 @@ H5FD_s3comms_hrb_init_request(const char *_verb, const char *_resource, const ch
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "no space for resource string");
*res = '/';
H5MM_memcpy((&res[1]), _resource, (reslen + 1));
- HDassert((reslen + 1) == HDstrlen(res));
+ assert((reslen + 1) == HDstrlen(res));
} /* end if (else resource string not starting with '/') */
verblen = HDstrlen(_verb) + 1;
@@ -780,7 +780,7 @@ H5FD_s3comms_s3r_close(s3r_t *handle)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_s3r_close.\n");
+ fprintf(stdout, "called H5FD_s3comms_s3r_close.\n");
#endif
if (handle == NULL)
@@ -794,7 +794,7 @@ H5FD_s3comms_s3r_close(s3r_t *handle)
H5MM_xfree(handle->region);
H5MM_xfree(handle->signing_key);
- HDassert(handle->httpverb != NULL);
+ assert(handle->httpverb != NULL);
H5MM_xfree(handle->httpverb);
if (FAIL == H5FD_s3comms_free_purl(handle->purl))
@@ -885,7 +885,7 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_s3r_getsize.\n");
+ fprintf(stdout, "called H5FD_s3comms_s3r_getsize.\n");
#endif
if (handle == NULL)
@@ -906,7 +906,7 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle)
if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HEADERDATA, &sds))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_HEADERDATA).");
- HDassert(handle->httpverb == NULL);
+ assert(handle->httpverb == NULL);
handle->httpverb = (char *)H5MM_malloc(sizeof(char) * 16);
if (handle->httpverb == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "unable to allocate space for S3 request HTTP verb");
@@ -934,7 +934,7 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "No HTTP metadata")
#if S3COMMS_DEBUG
else
- HDfprintf(stderr, "GETSIZE: OK\n");
+ fprintf(stderr, "GETSIZE: OK\n");
#endif
/******************
@@ -1034,7 +1034,7 @@ H5FD_s3comms_s3r_open(const char *url, const char *region, const char *id, const
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_s3r_open.\n");
+ fprintf(stdout, "called H5FD_s3comms_s3r_open.\n");
#endif
if (url == NULL || url[0] == '\0')
@@ -1044,8 +1044,8 @@ H5FD_s3comms_s3r_open(const char *url, const char *region, const char *id, const
/* probably a malformed url, but could be internal error */
HGOTO_ERROR(H5E_ARGS, H5E_CANTCREATE, NULL, "unable to create parsed url structure");
- HDassert(purl != NULL); /* if above passes, this must be true */
- HDassert(purl->magic == S3COMMS_PARSED_URL_MAGIC);
+ assert(purl != NULL); /* if above passes, this must be true */
+ assert(purl->magic == S3COMMS_PARSED_URL_MAGIC);
handle = (s3r_t *)H5MM_malloc(sizeof(s3r_t));
if (handle == NULL)
@@ -1137,7 +1137,7 @@ H5FD_s3comms_s3r_open(const char *url, const char *region, const char *id, const
* FINAL PREPARATION *
*********************/
- HDassert(handle->httpverb != NULL);
+ assert(handle->httpverb != NULL);
H5MM_memcpy(handle->httpverb, "GET", 4);
ret_value = handle;
@@ -1221,7 +1221,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_s3r_read.\n");
+ fprintf(stdout, "called H5FD_s3comms_s3r_read.\n");
#endif
/**************************************
@@ -1236,7 +1236,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) curlhandle.")
if (handle->purl == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) url.")
- HDassert(handle->purl->magic == S3COMMS_PARSED_URL_MAGIC);
+ assert(handle->purl->magic == S3COMMS_PARSED_URL_MAGIC);
if (offset > handle->filesize || (len + offset) > handle->filesize)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to read past EoF")
@@ -1292,9 +1292,9 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
char *bytesrange_ptr = NULL; /* pointer past "bytes=" portion */
bytesrange_ptr = HDstrchr(rangebytesstr, '=');
- HDassert(bytesrange_ptr != NULL);
+ assert(bytesrange_ptr != NULL);
bytesrange_ptr++; /* move to first char past '=' */
- HDassert(*bytesrange_ptr != '\0');
+ assert(*bytesrange_ptr != '\0');
if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_RANGE, bytesrange_ptr))
HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL,
@@ -1351,7 +1351,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
(const char *)handle->purl->path, "HTTP/1.1");
if (request == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not allocate hrb_t request.");
- HDassert(request->magic == S3COMMS_HRB_MAGIC);
+ assert(request->magic == S3COMMS_HRB_MAGIC);
now = gmnow();
if (ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1))
@@ -1361,27 +1361,27 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-date header")
if (headers == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
- HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "x-amz-content-sha256", (const char *)EMPTY_SHA256))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-content-sha256 header")
if (headers == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
- HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
if (rangebytesstr != NULL) {
if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "Range", rangebytesstr))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set range header")
if (headers == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
- HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
}
if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "Host", handle->purl->host))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set host header")
if (headers == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
- HDassert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(headers->magic == S3COMMS_HRB_NODE_MAGIC);
request->first_header = headers;
@@ -1421,7 +1421,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
node = request->first_header;
while (node != NULL) {
- HDassert(node->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(node->magic == S3COMMS_HRB_NODE_MAGIC);
curlheaders = curl_slist_append(curlheaders, (const char *)node->cat);
if (curlheaders == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not append header to curl slist.");
@@ -1460,8 +1460,8 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
if (p_status != CURLE_OK) {
if (CURLE_OK != curl_easy_getinfo(curlh, CURLINFO_RESPONSE_CODE, &httpcode))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem getting response code")
- HDfprintf(stderr, "CURL ERROR CODE: %d\nHTTP CODE: %d\n", p_status, httpcode);
- HDfprintf(stderr, "%s\n", curl_easy_strerror(p_status));
+ fprintf(stderr, "CURL ERROR CODE: %d\nHTTP CODE: %d\n", p_status, httpcode);
+ fprintf(stderr, "%s\n", curl_easy_strerror(p_status));
HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "problem while performing request.");
}
if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, NULL))
@@ -1476,19 +1476,19 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest)
#if S3COMMS_DEBUG
if (dest != NULL) {
- HDfprintf(stderr, "len: %d\n", (int)len);
- HDfprintf(stderr, "CHECKING FOR BUFFER OVERFLOW\n");
+ fprintf(stderr, "len: %d\n", (int)len);
+ fprintf(stderr, "CHECKING FOR BUFFER OVERFLOW\n");
if (sds == NULL)
- HDfprintf(stderr, "sds is NULL!\n");
+ fprintf(stderr, "sds is NULL!\n");
else {
- HDfprintf(stderr, "sds: 0x%lx\n", (long long)sds);
- HDfprintf(stderr, "sds->size: %d\n", (int)sds->size);
+ fprintf(stderr, "sds: 0x%lx\n", (long long)sds);
+ fprintf(stderr, "sds->size: %d\n", (int)sds->size);
if (len > sds->size)
- HDfprintf(stderr, "buffer overwrite\n");
+ fprintf(stderr, "buffer overwrite\n");
}
}
else
- HDfprintf(stderr, "performed on entire file\n");
+ fprintf(stderr, "performed on entire file\n");
#endif
done:
@@ -1510,10 +1510,10 @@ done:
while (headers != NULL)
if (FAIL == H5FD_s3comms_hrb_node_set(&headers, headers->name, NULL))
HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot release header node")
- HDassert(NULL == headers);
+ assert(NULL == headers);
if (FAIL == H5FD_s3comms_hrb_destroy(&request))
HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot release header request structure")
- HDassert(NULL == request);
+ assert(NULL == request);
}
if (curlh != NULL) {
@@ -1562,7 +1562,7 @@ gmnow(void)
if ((time_t)(-1) != HDtime(now_ptr))
ret_value = HDgmtime(now_ptr);
- HDassert(ret_value != NULL);
+ assert(ret_value != NULL);
return ret_value;
} /* end gmnow() */
@@ -1634,12 +1634,12 @@ H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int _cr_size, c
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_aws_canonical_request.\n");
+ fprintf(stdout, "called H5FD_s3comms_aws_canonical_request.\n");
#endif
if (http_request == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hrb object cannot be null.");
- HDassert(http_request->magic == S3COMMS_HRB_MAGIC);
+ assert(http_request->magic == S3COMMS_HRB_MAGIC);
if (canonical_request_dest == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "canonical request destination cannot be null.");
@@ -1662,7 +1662,7 @@ H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int _cr_size, c
node = http_request->first_header; /* assumed sorted */
while (node != NULL) {
- HDassert(node->magic == S3COMMS_HRB_NODE_MAGIC);
+ assert(node->magic == S3COMMS_HRB_NODE_MAGIC);
ret = HDsnprintf(tmpstr, 256, "%s:%s\n", node->lowername, node->value);
if (ret < 0 || ret >= 256)
@@ -1741,7 +1741,7 @@ H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len,
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_bytes_to_hex.\n");
+ fprintf(stdout, "called H5FD_s3comms_bytes_to_hex.\n");
#endif
if (dest == NULL)
@@ -1785,11 +1785,11 @@ H5FD_s3comms_free_purl(parsed_url_t *purl)
FUNC_ENTER_NOAPI_NOINIT_NOERR
#if S3COMMS_DEBUG
- HDprintf("called H5FD_s3comms_free_purl.\n");
+ printf("called H5FD_s3comms_free_purl.\n");
#endif
if (purl != NULL) {
- HDassert(purl->magic == S3COMMS_PARSED_URL_MAGIC);
+ assert(purl->magic == S3COMMS_PARSED_URL_MAGIC);
if (purl->scheme != NULL)
H5MM_xfree(purl->scheme);
if (purl->host != NULL)
@@ -1848,7 +1848,7 @@ H5FD_s3comms_HMAC_SHA256(const unsigned char *key, size_t key_len, const char *m
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_HMAC_SHA256.\n");
+ fprintf(stdout, "called H5FD_s3comms_HMAC_SHA256.\n");
#endif
if (dest == NULL)
@@ -1938,7 +1938,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha
FUNC_ENTER_PACKAGE
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called load_aws_creds_from_file.\n");
+ fprintf(stdout, "called load_aws_creds_from_file.\n");
#endif
/* format target line for start of profile */
@@ -2058,7 +2058,7 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char *
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_load_aws_profile.\n");
+ fprintf(stdout, "called H5FD_s3comms_load_aws_profile.\n");
#endif
#ifdef H5_HAVE_WIN32_API
@@ -2072,7 +2072,7 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char *
if (ret < 0 || (size_t)ret >= 128)
HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format credentials path")
- credfile = HDfopen(filepath, "r");
+ credfile = fopen(filepath, "r");
if (credfile != NULL) {
if (H5FD__s3comms_load_aws_creds_from_file(credfile, profile_name, key_id_out, secret_access_key_out,
aws_region_out) == FAIL)
@@ -2085,7 +2085,7 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char *
ret = HDsnprintf(filepath, 128, "%s%s", awspath, "config");
if (ret < 0 || (size_t)ret >= 128)
HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format config path")
- credfile = HDfopen(filepath, "r");
+ credfile = fopen(filepath, "r");
if (credfile != NULL) {
if (H5FD__s3comms_load_aws_creds_from_file(
credfile, profile_name, (*key_id_out == 0) ? key_id_out : NULL,
@@ -2143,7 +2143,7 @@ H5FD_s3comms_nlowercase(char *dest, const char *s, size_t len)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_nlowercase.\n");
+ fprintf(stdout, "called H5FD_s3comms_nlowercase.\n");
#endif
if (dest == NULL)
@@ -2206,7 +2206,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
FUNC_ENTER_NOAPI_NOINIT;
#if S3COMMS_DEBUG
- HDprintf("called H5FD_s3comms_parse_url.\n");
+ printf("called H5FD_s3comms_parse_url.\n");
#endif
if (str == NULL || *str == '\0')
@@ -2232,7 +2232,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
if (tmpstr == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid SCHEME construction: probably not URL");
len = tmpstr - curstr;
- HDassert((0 <= len) && (len < urllen));
+ assert((0 <= len) && (len < urllen));
/* check for restrictions */
for (i = 0; i < len; i++) {
@@ -2422,7 +2422,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_percent_encode_char.\n");
+ fprintf(stdout, "called H5FD_s3comms_percent_encode_char.\n");
#endif
if (repr == NULL)
@@ -2430,8 +2430,8 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
#if S3COMMS_DEBUG
H5FD_s3comms_bytes_to_hex((char *)hex, s, 1, FALSE);
- HDfprintf(stdout, " CHAR: \'%s\'\n", s);
- HDfprintf(stdout, " CHAR-HEX: \"%s\"\n", hex);
+ fprintf(stdout, " CHAR: \'%s\'\n", s);
+ fprintf(stdout, " CHAR-HEX: \"%s\"\n", hex);
#endif
if (c <= (unsigned char)0x7f) {
@@ -2439,7 +2439,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
* and single percent-code
*/
#if S3COMMS_DEBUG
- HDfprintf(stdout, " SINGLE-BYTE\n");
+ fprintf(stdout, " SINGLE-BYTE\n");
#endif
*repr_len = 3;
chars_written = HDsnprintf(repr, 4, "%%%02X", c);
@@ -2454,7 +2454,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
unsigned int stack_size = 0;
unsigned char stack[4] = {0, 0, 0, 0};
#if S3COMMS_DEBUG
- HDfprintf(stdout, " MULTI-BYTE\n");
+ fprintf(stdout, " MULTI-BYTE\n");
#endif
stack_size = 0;
k = (unsigned int)c;
@@ -2474,13 +2474,13 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
*/
#if S3COMMS_DEBUG
- HDfprintf(stdout, " STACK:\n {\n");
+ fprintf(stdout, " STACK:\n {\n");
for (i = 0; i < stack_size; i++) {
H5FD_s3comms_bytes_to_hex((char *)hex, (&stack[i]), 1, FALSE);
hex[2] = 0;
- HDfprintf(stdout, " %s,\n", hex);
+ fprintf(stdout, " %s,\n", hex);
}
- HDfprintf(stdout, " }\n");
+ fprintf(stdout, " }\n");
#endif
/****************
@@ -2570,7 +2570,7 @@ H5FD_s3comms_signing_key(unsigned char *md, const char *secret, const char *regi
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_signing_key.\n");
+ fprintf(stdout, "called H5FD_s3comms_signing_key.\n");
#endif
if (md == NULL)
@@ -2662,7 +2662,7 @@ H5FD_s3comms_tostringtosign(char *dest, const char *req, const char *now, const
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_tostringtosign.\n");
+ fprintf(stdout, "called H5FD_s3comms_tostringtosign.\n");
#endif
if (dest == NULL)
@@ -2749,7 +2749,7 @@ H5FD_s3comms_trim(char *dest, char *s, size_t s_len, size_t *n_written)
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_trim.\n");
+ fprintf(stdout, "called H5FD_s3comms_trim.\n");
#endif
if (dest == NULL)
@@ -2839,7 +2839,7 @@ H5FD_s3comms_uriencode(char *dest, const char *s, size_t s_len, hbool_t encode_s
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "H5FD_s3comms_uriencode called.\n");
+ fprintf(stdout, "H5FD_s3comms_uriencode called.\n");
#endif
if (s == NULL)
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 7c05677..a7c0ff0 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -435,7 +435,7 @@ H5FD__sec2_close(H5FD_t *_file)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file);
+ assert(file);
/* Close the underlying file */
if (HDclose(file->fd) < 0)
@@ -498,9 +498,9 @@ H5FD__sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* determine if the values are the same or not. The actual return value
* shouldn't really matter...
*/
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) < 0)
HGOTO_DONE(-1)
- if (HDmemcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
+ if (memcmp(&(f1->device), &(f2->device), sizeof(dev_t)) > 0)
HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
if (f1->inode < f2->inode)
@@ -691,8 +691,8 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (!H5F_addr_defined(addr))
@@ -749,12 +749,12 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
if (0 == bytes_read) {
/* end of file but not end of format address space */
- HDmemset(buf, 0, size);
+ memset(buf, 0, size);
break;
} /* end if */
- HDassert(bytes_read >= 0);
- HDassert((size_t)bytes_read <= size);
+ assert(bytes_read >= 0);
+ assert((size_t)bytes_read <= size);
size -= (size_t)bytes_read;
addr += (haddr_t)bytes_read;
@@ -799,8 +799,8 @@ H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
FUNC_ENTER_PACKAGE
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (!H5F_addr_defined(addr))
@@ -856,8 +856,8 @@ H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
(unsigned long long)bytes_wrote, (unsigned long long)offset);
} /* end if */
- HDassert(bytes_wrote > 0);
- HDassert((size_t)bytes_wrote <= size);
+ assert(bytes_wrote > 0);
+ assert((size_t)bytes_wrote <= size);
size -= (size_t)bytes_wrote;
addr += (haddr_t)bytes_wrote;
@@ -901,7 +901,7 @@ H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Extend the file to make sure it's large enough */
if (!H5F_addr_eq(file->eoa, file->eof)) {
@@ -971,7 +971,7 @@ H5FD__sec2_lock(H5FD_t *_file, hbool_t rw)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
/* Set exclusive or shared lock based on rw status */
lock_flags = rw ? LOCK_EX : LOCK_SH;
@@ -1011,7 +1011,7 @@ H5FD__sec2_unlock(H5FD_t *_file)
FUNC_ENTER_PACKAGE
- HDassert(file);
+ assert(file);
if (HDflock(file->fd, LOCK_UN) < 0) {
if (file->ignore_disabled_file_locks && ENOSYS == errno) {
@@ -1044,7 +1044,7 @@ H5FD__sec2_delete(const char *filename, hid_t H5_ATTR_UNUSED fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
if (HDremove(filename) < 0)
HSYS_GOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file")
diff --git a/src/H5FDspace.c b/src/H5FDspace.c
index fe0606c..a3bff2b 100644
--- a/src/H5FDspace.c
+++ b/src/H5FDspace.c
@@ -96,10 +96,10 @@ H5FD__extend(H5FD_t *file, H5FD_mem_t type, hsize_t size)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(file);
+ assert(file->cls);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Get current end-of-allocated space address */
eoa = file->cls->get_eoa(file, type);
@@ -147,14 +147,14 @@ H5FD__alloc_real(H5FD_t *file, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr
FUNC_ENTER_PACKAGE
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size);
+ fprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size);
#endif /* H5FD_ALLOC_DEBUG */
/* check args */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(file);
+ assert(file->cls);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Check for query driver and call it */
if (file->cls->query)
@@ -203,14 +203,14 @@ H5FD__alloc_real(H5FD_t *file, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr
/* Post-condition sanity check */
if (!file->paged_aggr && file->alignment > 1 && orig_size >= file->threshold)
- HDassert(!(ret_value % file->alignment));
+ assert(!(ret_value % file->alignment));
/* Convert absolute file offset to relative address */
ret_value -= file->base_addr;
done:
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", __func__, ret_value);
+ fprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", __func__, ret_value);
#endif /* H5FD_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__alloc_real() */
@@ -241,10 +241,10 @@ H5FD_alloc(H5FD_t *file, H5FD_mem_t type, H5F_t *f, hsize_t size, haddr_t *frag_
FUNC_ENTER_NOAPI(HADDR_UNDEF)
/* check args */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(file);
+ assert(file->cls);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Call the real 'alloc' routine */
ret_value = H5FD__alloc_real(file, type, size, frag_addr, frag_size);
@@ -280,14 +280,14 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(file);
+ assert(file->cls);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__,
- (unsigned)type, addr, size);
+ fprintf(stderr, "%s: type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, (unsigned)type,
+ addr, size);
#endif /* H5FD_ALLOC_DEBUG */
/* Sanity checking */
@@ -304,7 +304,7 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
/* Check for file driver 'free' callback and call it if available */
if (file->cls->free) {
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Letting VFD free space\n", __func__);
+ fprintf(stderr, "%s: Letting VFD free space\n", __func__);
#endif /* H5FD_ALLOC_DEBUG */
if ((file->cls->free)(file, type, H5CX_get_dxpl(), addr, size) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "driver free request failed")
@@ -317,11 +317,11 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
eoa = file->cls->get_eoa(file, type);
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: eoa = %" PRIuHADDR "\n", __func__, eoa);
+ fprintf(stderr, "%s: eoa = %" PRIuHADDR "\n", __func__, eoa);
#endif /* H5FD_ALLOC_DEBUG */
if (eoa == (addr + size)) {
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Reducing file size to = %" PRIuHADDR "\n", __func__, addr);
+ fprintf(stderr, "%s: Reducing file size to = %" PRIuHADDR "\n", __func__, addr);
#endif /* H5FD_ALLOC_DEBUG */
if (file->cls->set_eoa(file, type, addr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "set end of space allocation request failed")
@@ -330,8 +330,8 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
else {
/* leak memory */
#ifdef H5FD_ALLOC_DEBUG
- HDfprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
- __func__, (unsigned)type, addr, size);
+ fprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
+ __func__, (unsigned)type, addr, size);
#endif /* H5FD_ALLOC_DEBUG */
} /* end else */
@@ -365,10 +365,10 @@ H5FD_free(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t addr, hsize_t size)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(file);
+ assert(file->cls);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Call the real 'free' routine */
if (H5FD__free_real(file, type, addr, size) < 0)
@@ -409,11 +409,11 @@ H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t blk_end, hsize_
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(file);
- HDassert(file->cls);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(extra_requested > 0);
- HDassert(f);
+ assert(file);
+ assert(file->cls);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(extra_requested > 0);
+ assert(f);
/* Retrieve the end of the address space */
if (HADDR_UNDEF == (eoa = file->cls->get_eoa(file, type)))
diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c
index faf5d29..edf9898 100644
--- a/src/H5FDsplitter.c
+++ b/src/H5FDsplitter.c
@@ -89,8 +89,8 @@ typedef struct H5FD_splitter_t {
#if H5FD_SPLITTER_DEBUG_OP_CALLS
#define H5FD_SPLITTER_LOG_CALL(name) \
do { \
- HDprintf("called %s()\n", (name)); \
- HDfflush(stdout); \
+ printf("called %s()\n", (name)); \
+ fflush(stdout); \
} while (0)
#else
#define H5FD_SPLITTER_LOG_CALL(name) /* no-op */
@@ -253,7 +253,7 @@ H5FD__copy_plist(hid_t fapl_id, hid_t *id_out_ptr)
H5FD_SPLITTER_LOG_CALL(__func__);
- HDassert(id_out_ptr != NULL);
+ assert(id_out_ptr != NULL);
if (FALSE == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "not a file access property list");
@@ -404,9 +404,9 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli
FUNC_ENTER_PACKAGE
- HDassert(fapl_out);
+ assert(fapl_out);
- HDmemset(fapl_out, 0, sizeof(H5FD_splitter_fapl_t));
+ memset(fapl_out, 0, sizeof(H5FD_splitter_fapl_t));
if (!vfd_config) {
vfd_config = H5MM_calloc(sizeof(H5FD_splitter_vfd_config_t));
@@ -523,8 +523,8 @@ H5FD__splitter_get_default_wo_path(char *new_path, size_t new_path_len, const ch
FUNC_ENTER_PACKAGE
- HDassert(new_path);
- HDassert(base_filename);
+ assert(new_path);
+ assert(base_filename);
/* Check that output buffer can hold base filename + `_wo` suffix */
old_filename_len = HDstrlen(base_filename);
@@ -612,8 +612,8 @@ H5FD__splitter_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR
H5FD_SPLITTER_LOG_CALL(__func__);
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (!H5F_addr_defined(addr))
@@ -713,7 +713,7 @@ H5FD__splitter_fapl_copy(const void *_old_fa)
H5FD_SPLITTER_LOG_CALL(__func__);
- HDassert(old_fa_ptr);
+ assert(old_fa_ptr);
new_fa_ptr = H5FL_CALLOC(H5FD_splitter_fapl_t);
if (NULL == new_fa_ptr)
@@ -758,7 +758,7 @@ H5FD__splitter_fapl_free(void *_fapl)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(fapl);
+ assert(fapl);
if (H5I_dec_ref(fapl->rw_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close R/W FAPL ID")
@@ -849,7 +849,7 @@ H5FD__splitter_open(const char *name, unsigned flags, hid_t splitter_fapl_id, ha
*/
if (!file_ptr->logfp) {
if (file_ptr->fa.log_file_path[0] != '\0') {
- file_ptr->logfp = HDfopen(file_ptr->fa.log_file_path, "w");
+ file_ptr->logfp = fopen(file_ptr->fa.log_file_path, "w");
if (file_ptr->logfp == NULL)
HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open log file")
} /* end if logfile path given */
@@ -908,7 +908,7 @@ H5FD__splitter_close(H5FD_t *_file)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
+ assert(file);
if (H5I_dec_ref(file->fa.rw_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_ARGS, FAIL, "can't close R/W FAPL")
@@ -959,8 +959,8 @@ H5FD__splitter_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if ((ret_value = H5FD_get_eoa(file->rw_file, type)) == HADDR_UNDEF)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, HADDR_UNDEF, "unable to get eoa")
@@ -990,9 +990,9 @@ H5FD__splitter_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t ad
H5FD_SPLITTER_LOG_CALL(__func__)
/* Sanity check */
- HDassert(file);
- HDassert(file->rw_file);
- HDassert(file->wo_file);
+ assert(file);
+ assert(file->rw_file);
+ assert(file->wo_file);
if (H5FD_set_eoa(file->rw_file, type, addr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "H5FDset_eoa failed for R/W file")
@@ -1027,8 +1027,8 @@ H5FD__splitter_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if (HADDR_UNDEF == (ret_value = H5FD_get_eof(file->rw_file, type)))
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, HADDR_UNDEF, "unable to get eof")
@@ -1055,9 +1055,9 @@ H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
H5FD_SPLITTER_LOG_CALL(__func__);
- HDassert(file);
- HDassert(file->rw_file);
- HDassert(file->wo_file);
+ assert(file);
+ assert(file->rw_file);
+ assert(file->wo_file);
if (H5FDtruncate(file->rw_file, dxpl_id, closing) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "unable to truncate R/W file")
@@ -1094,8 +1094,8 @@ H5FD__splitter_sb_size(H5FD_t *_file)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if (file->rw_file)
ret_value = H5FD_sb_size(file->rw_file);
@@ -1122,8 +1122,8 @@ H5FD__splitter_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /
H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if (file->rw_file && H5FD_sb_encode(file->rw_file, name, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTENCODE, FAIL, "unable to encode the superblock in R/W file")
@@ -1153,8 +1153,8 @@ H5FD__splitter_sb_decode(H5FD_t *_file, const char *name, const unsigned char *b
H5FD_SPLITTER_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if (H5FD_sb_load(file->rw_file, name, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "unable to decode the superblock in R/W file")
@@ -1183,8 +1183,8 @@ H5FD__splitter_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
H5FD_SPLITTER_LOG_CALL(__func__);
- HDassert(f1);
- HDassert(f2);
+ assert(f1);
+ assert(f2);
ret_value = H5FD_cmp(f1->rw_file, f2->rw_file);
@@ -1211,9 +1211,9 @@ H5FD__splitter_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(file);
- HDassert(file->rw_file);
- HDassert(file_handle);
+ assert(file);
+ assert(file->rw_file);
+ assert(file_handle);
/* Only do for R/W channel */
if (H5FD_get_vfd_handle(file->rw_file, file->fa.rw_fapl_id, file_handle) < 0)
@@ -1241,8 +1241,8 @@ H5FD__splitter_lock(H5FD_t *_file, hbool_t rw)
H5FD_SPLITTER_LOG_CALL(__func__);
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
/* Place the lock on each file */
if (H5FD_lock(file->rw_file, rw) < 0)
@@ -1275,8 +1275,8 @@ H5FD__splitter_unlock(H5FD_t *_file)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
/* Remove the lock on each file */
if (H5FD_unlock(file->rw_file) < 0)
@@ -1320,7 +1320,7 @@ H5FD__splitter_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void *
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(file);
+ assert(file);
switch (op_code) {
/* Unknown op code */
@@ -1366,8 +1366,8 @@ H5FD__splitter_query(const H5FD_t *_file, unsigned long *flags /* out */)
H5FD_SPLITTER_LOG_CALL(__func__);
if (file) {
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if (H5FDquery(file->rw_file, flags) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTLOCK, FAIL, "unable to query R/W file");
@@ -1403,8 +1403,8 @@ H5FD__splitter_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
/* Allocate memory for each file, only return the return value for R/W file. */
if ((ret_value = H5FDalloc(file->rw_file, type, dxpl_id, size)) == HADDR_UNDEF)
@@ -1437,8 +1437,8 @@ H5FD__splitter_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
/* Retrieve memory type mapping for R/W channel only */
if (H5FD_get_fs_type_map(file->rw_file, type_map) < 0)
@@ -1467,8 +1467,8 @@ H5FD__splitter_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(file);
- HDassert(file->rw_file);
+ assert(file);
+ assert(file->rw_file);
if (H5FDfree(file->rw_file, type, dxpl_id, addr, size) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free for R/W file")
@@ -1499,7 +1499,7 @@ H5FD__splitter_delete(const char *filename, hid_t fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
/* Get the driver info */
if (H5P_FILE_ACCESS_DEFAULT == fapl_id) {
@@ -1566,9 +1566,9 @@ H5FD__splitter_log_error(const H5FD_splitter_t *file, const char *atfunc, const
H5FD_SPLITTER_LOG_CALL(__func__);
/* Check arguments */
- HDassert(file);
- HDassert(atfunc && *atfunc);
- HDassert(msg && *msg);
+ assert(file);
+ assert(atfunc && *atfunc);
+ assert(msg && *msg);
if (file->logfp != NULL) {
size_t size;
diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c
index dff2d07..2e7e8a8 100644
--- a/src/H5FDsubfiling/H5FDioc.c
+++ b/src/H5FDsubfiling/H5FDioc.c
@@ -91,8 +91,8 @@ typedef struct H5FD_ioc_t {
#ifdef H5FD_IOC_DEBUG
#define H5FD_IOC_LOG_CALL(name) \
do { \
- HDprintf("called %s()\n", (name)); \
- HDfflush(stdout); \
+ printf("called %s()\n", (name)); \
+ fflush(stdout); \
} while (0)
#else
#define H5FD_IOC_LOG_CALL(name) /* no-op */
@@ -399,7 +399,7 @@ H5Pget_fapl_ioc(hid_t fapl_id, H5FD_ioc_config_t *config_out)
}
else {
/* Copy the IOC fapl data out */
- HDmemcpy(config_out, config_ptr, sizeof(H5FD_ioc_config_t));
+ memcpy(config_out, config_ptr, sizeof(H5FD_ioc_config_t));
}
done:
@@ -422,9 +422,9 @@ H5FD__ioc_get_default_config(H5FD_ioc_config_t *config_out)
{
herr_t ret_value = SUCCEED;
- HDassert(config_out);
+ assert(config_out);
- HDmemset(config_out, 0, sizeof(*config_out));
+ memset(config_out, 0, sizeof(*config_out));
config_out->magic = H5FD_IOC_FAPL_MAGIC;
config_out->version = H5FD_IOC_CURR_FAPL_VERSION;
@@ -455,7 +455,7 @@ H5FD__ioc_validate_config(const H5FD_ioc_config_t *fa)
{
herr_t ret_value = SUCCEED;
- HDassert(fa != NULL);
+ assert(fa != NULL);
if (fa->version != H5FD_IOC_CURR_FAPL_VERSION)
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown H5FD_ioc_config_t version");
@@ -660,13 +660,13 @@ H5FD__ioc_fapl_copy(const void *_old_fa)
H5FD_IOC_LOG_CALL(__func__);
- HDassert(old_fa_ptr);
+ assert(old_fa_ptr);
new_fa_ptr = H5FL_CALLOC(H5FD_ioc_config_t);
if (NULL == new_fa_ptr)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate log file FAPL");
- HDmemcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_ioc_config_t));
+ memcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_ioc_config_t));
ret_value = (void *)new_fa_ptr;
@@ -695,7 +695,7 @@ H5FD__ioc_fapl_free(void *_fapl)
H5FD_IOC_LOG_CALL(__func__);
/* Check arguments */
- HDassert(fapl);
+ assert(fapl);
/* Free the property list */
fapl = H5FL_FREE(H5FD_ioc_config_t, fapl);
@@ -790,7 +790,7 @@ H5FD__ioc_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
}
/* Fill in the file config values */
- HDmemcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_ioc_config_t));
+ memcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_ioc_config_t));
/* Fully resolve the given filepath and get its dirname */
if (H5_resolve_pathname(name, file_ptr->comm, &file_ptr->file_path) < 0)
@@ -904,7 +904,7 @@ H5FD__ioc_close_int(H5FD_ioc_t *file_ptr)
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(file_ptr);
+ assert(file_ptr);
if (MPI_SUCCESS != (mpi_code = MPI_Finalized(&mpi_finalized)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Finalized failed", mpi_code);
@@ -936,7 +936,7 @@ H5FD__ioc_close_int(H5FD_ioc_t *file_ptr)
}
done:
- HDfree(file_ptr->file_path);
+ free(file_ptr->file_path);
file_ptr->file_path = NULL;
H5MM_free(file_ptr->file_dir);
@@ -990,8 +990,8 @@ H5FD__ioc_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
H5FD_IOC_LOG_CALL(__func__);
- HDassert(f1);
- HDassert(f2);
+ assert(f1);
+ assert(f2);
ret_value = (f1->file_id > f2->file_id) - (f1->file_id < f2->file_id);
@@ -1108,7 +1108,7 @@ H5FD__ioc_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD_IOC_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
+ assert(file);
ret_value = file->eoa;
@@ -1134,7 +1134,7 @@ H5FD__ioc_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
H5FD_IOC_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
+ assert(file);
file->eoa = addr;
@@ -1163,7 +1163,7 @@ H5FD__ioc_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD_IOC_LOG_CALL(__func__);
/* Sanity check */
- HDassert(file);
+ assert(file);
sf_context = H5_get_subfiling_object(file->context_id);
if (sf_context) {
@@ -1222,8 +1222,8 @@ H5FD__ioc_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUS
H5FD_IOC_LOG_CALL(__func__);
- HDassert(file && file->pub.cls);
- HDassert(buf);
+ assert(file && file->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (!H5F_addr_defined(addr))
@@ -1382,7 +1382,7 @@ H5FD__ioc_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
H5FD_IOC_LOG_CALL(__func__);
- HDassert(file);
+ assert(file);
/* TODO: placeholder for now since Subfiling does the truncation */
if (!H5F_addr_eq(file->eoa, file->last_eoa)) {
@@ -1454,7 +1454,7 @@ H5FD__ioc_del(const char *name, hid_t fapl)
if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
- HDassert(H5FD_IOC == H5P_peek_driver(plist));
+ assert(H5FD_IOC == H5P_peek_driver(plist));
if (H5FD_mpi_self_initialized) {
comm = MPI_COMM_WORLD;
@@ -1486,7 +1486,7 @@ H5FD__ioc_del(const char *name, hid_t fapl)
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't get file dirname");
/* Try to open the subfiling configuration file and get the number of IOCs */
- if (NULL == (tmp_filename = HDmalloc(PATH_MAX)))
+ if (NULL == (tmp_filename = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate config file name buffer");
@@ -1498,10 +1498,10 @@ H5FD__ioc_del(const char *name, hid_t fapl)
HDsnprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE,
prefix_env ? prefix_env : file_dirname, base_filename, (uint64_t)st.st_ino);
- if (NULL == (config_file = HDfopen(tmp_filename, "r"))) {
+ if (NULL == (config_file = fopen(tmp_filename, "r"))) {
if (ENOENT == errno) {
#ifdef H5FD_IOC_DEBUG
- HDprintf("** WARNING: couldn't delete Subfiling configuration file '%s'\n", tmp_filename);
+ printf("** WARNING: couldn't delete Subfiling configuration file '%s'\n", tmp_filename);
#endif
H5_SUBFILING_GOTO_DONE(SUCCEED);
@@ -1540,7 +1540,7 @@ H5FD__ioc_del(const char *name, hid_t fapl)
if (HDremove(tmp_filename) < 0) {
#ifdef H5FD_IOC_DEBUG
- HDprintf("** WARNING: couldn't delete subfile '%s'\n", tmp_filename);
+ printf("** WARNING: couldn't delete subfile '%s'\n", tmp_filename);
#endif
if (ENOENT != errno)
@@ -1576,7 +1576,7 @@ done:
if (H5_mpi_info_free(&info) < 0)
H5_SUBFILING_DONE_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free MPI info object");
- HDfree(tmp_filename);
+ free(tmp_filename);
H5MM_free(file_dirname);
H5MM_free(base_filename);
@@ -1610,10 +1610,10 @@ H5FD__ioc_write_vector_internal(H5FD_t *_file, uint32_t count, H5FD_mem_t H5_ATT
int64_t sf_context_id = -1;
herr_t ret_value = SUCCEED;
- HDassert(_file);
- HDassert(addrs);
- HDassert(sizes);
- HDassert(bufs);
+ assert(_file);
+ assert(addrs);
+ assert(sizes);
+ assert(bufs);
if (count == 0)
H5_SUBFILING_GOTO_DONE(SUCCEED);
@@ -1622,7 +1622,7 @@ H5FD__ioc_write_vector_internal(H5FD_t *_file, uint32_t count, H5FD_mem_t H5_ATT
if (NULL == (sf_context = H5_get_subfiling_object(sf_context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "can't get subfiling context from ID");
- HDassert(sf_context->topology);
+ assert(sf_context->topology);
/*
* Allocate an array of I/O requests and an array twice that size for
@@ -1633,9 +1633,9 @@ H5FD__ioc_write_vector_internal(H5FD_t *_file, uint32_t count, H5FD_mem_t H5_ATT
* that blocking write calls do not return early before the data is
* actually written.
*/
- if (NULL == (sf_io_reqs = HDcalloc((size_t)count, sizeof(*sf_io_reqs))))
+ if (NULL == (sf_io_reqs = calloc((size_t)count, sizeof(*sf_io_reqs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate I/O request array");
- if (NULL == (mpi_reqs = HDmalloc(2 * (size_t)count * sizeof(*mpi_reqs))))
+ if (NULL == (mpi_reqs = malloc(2 * (size_t)count * sizeof(*mpi_reqs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate MPI request array");
/* Each pass thru the following should queue an MPI write
@@ -1669,12 +1669,12 @@ H5FD__ioc_write_vector_internal(H5FD_t *_file, uint32_t count, H5FD_mem_t H5_ATT
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "can't complete I/O requests");
done:
- HDfree(mpi_reqs);
+ free(mpi_reqs);
if (sf_io_reqs) {
for (size_t i = 0; i < count; i++)
- HDfree(sf_io_reqs[i]);
- HDfree(sf_io_reqs);
+ free(sf_io_reqs[i]);
+ free(sf_io_reqs);
}
H5_SUBFILING_FUNC_LEAVE;
@@ -1691,10 +1691,10 @@ H5FD__ioc_read_vector_internal(H5FD_t *_file, uint32_t count, haddr_t addrs[], s
int64_t sf_context_id = -1;
herr_t ret_value = SUCCEED;
- HDassert(_file);
- HDassert(addrs);
- HDassert(sizes);
- HDassert(bufs);
+ assert(_file);
+ assert(addrs);
+ assert(sizes);
+ assert(bufs);
if (count == 0)
H5_SUBFILING_GOTO_DONE(SUCCEED);
@@ -1703,7 +1703,7 @@ H5FD__ioc_read_vector_internal(H5FD_t *_file, uint32_t count, haddr_t addrs[], s
if (NULL == (sf_context = H5_get_subfiling_object(sf_context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "can't get subfiling context from ID");
- HDassert(sf_context->topology);
+ assert(sf_context->topology);
/*
* Allocate an array of I/O requests and an array for MPI_Request
@@ -1712,9 +1712,9 @@ H5FD__ioc_read_vector_internal(H5FD_t *_file, uint32_t count, haddr_t addrs[], s
* that the actual I/O call (currently, HDpread) has completed and
* the data read from the file has been transferred to the caller.
*/
- if (NULL == (sf_io_reqs = HDcalloc((size_t)count, sizeof(*sf_io_reqs))))
+ if (NULL == (sf_io_reqs = calloc((size_t)count, sizeof(*sf_io_reqs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate I/O request array");
- if (NULL == (mpi_reqs = HDmalloc((size_t)count * sizeof(*mpi_reqs))))
+ if (NULL == (mpi_reqs = malloc((size_t)count * sizeof(*mpi_reqs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate MPI request array");
for (size_t i = 0; i < (size_t)count; i++) {
@@ -1741,12 +1741,12 @@ H5FD__ioc_read_vector_internal(H5FD_t *_file, uint32_t count, haddr_t addrs[], s
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "can't complete I/O requests");
done:
- HDfree(mpi_reqs);
+ free(mpi_reqs);
if (sf_io_reqs) {
for (size_t i = 0; i < count; i++)
- HDfree(sf_io_reqs[i]);
- HDfree(sf_io_reqs);
+ free(sf_io_reqs[i]);
+ free(sf_io_reqs);
}
H5_SUBFILING_FUNC_LEAVE;
diff --git a/src/H5FDsubfiling/H5FDioc_int.c b/src/H5FDsubfiling/H5FDioc_int.c
index ce5a000..fdde752 100644
--- a/src/H5FDsubfiling/H5FDioc_int.c
+++ b/src/H5FDsubfiling/H5FDioc_int.c
@@ -32,12 +32,12 @@ calculate_target_ioc(int64_t file_offset, int64_t stripe_size, int num_io_concen
int64_t subfile_row;
int64_t subfile_idx;
- HDassert(stripe_size > 0);
- HDassert(num_io_concentrators > 0);
- HDassert(num_subfiles > 0);
- HDassert(target_ioc);
- HDassert(ioc_file_offset);
- HDassert(ioc_subfile_idx);
+ assert(stripe_size > 0);
+ assert(num_io_concentrators > 0);
+ assert(num_subfiles > 0);
+ assert(target_ioc);
+ assert(ioc_file_offset);
+ assert(ioc_subfile_idx);
stripe_idx = file_offset / stripe_size;
subfile_row = stripe_idx / num_subfiles;
@@ -111,12 +111,12 @@ ioc__write_independent_async(int64_t context_id, int64_t offset, int64_t element
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(io_req);
+ assert(io_req);
if (NULL == (sf_context = H5_get_subfiling_object(context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "can't get subfiling context from ID");
- HDassert(sf_context->topology);
- HDassert(sf_context->topology->io_concentrators);
+ assert(sf_context->topology);
+ assert(sf_context->topology->io_concentrators);
io_concentrators = sf_context->topology->io_concentrators;
num_io_concentrators = sf_context->topology->n_io_concentrators;
@@ -167,7 +167,7 @@ ioc__write_independent_async(int64_t context_id, int64_t offset, int64_t element
* Allocate the I/O request object that will
* be returned to the caller
*/
- if (NULL == (sf_io_request = HDmalloc(sizeof(io_req_t))))
+ if (NULL == (sf_io_request = malloc(sizeof(io_req_t))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL, "couldn't allocate I/O request");
H5_CHECK_OVERFLOW(ioc_start, int64_t, int);
@@ -228,7 +228,7 @@ done:
}
}
- HDfree(sf_io_request);
+ free(sf_io_request);
*io_req = NULL;
}
@@ -283,14 +283,14 @@ ioc__read_independent_async(int64_t context_id, int64_t offset, int64_t elements
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(io_req);
+ assert(io_req);
H5_CHECK_OVERFLOW(elements, int64_t, int);
if (NULL == (sf_context = H5_get_subfiling_object(context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "can't get subfiling context from ID");
- HDassert(sf_context->topology);
- HDassert(sf_context->topology->io_concentrators);
+ assert(sf_context->topology);
+ assert(sf_context->topology->io_concentrators);
io_concentrators = sf_context->topology->io_concentrators;
num_io_concentrators = sf_context->topology->n_io_concentrators;
@@ -320,7 +320,7 @@ ioc__read_independent_async(int64_t context_id, int64_t offset, int64_t elements
* Allocate the I/O request object that will
* be returned to the caller
*/
- if (NULL == (sf_io_request = HDmalloc(sizeof(io_req_t))))
+ if (NULL == (sf_io_request = malloc(sizeof(io_req_t))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_READERROR, FAIL, "couldn't allocate I/O request");
H5_CHECK_OVERFLOW(ioc_start, int64_t, int);
@@ -402,7 +402,7 @@ done:
}
}
- HDfree(sf_io_request);
+ free(sf_io_request);
*io_req = NULL;
}
@@ -426,7 +426,7 @@ ioc__async_completion(MPI_Request *mpi_reqs, size_t num_reqs)
herr_t ret_value = SUCCEED;
int mpi_code;
- HDassert(mpi_reqs);
+ assert(mpi_reqs);
H5_CHECK_OVERFLOW(num_reqs, size_t, int);
if (MPI_SUCCESS != (mpi_code = MPI_Waitall((int)num_reqs, mpi_reqs, MPI_STATUSES_IGNORE)))
diff --git a/src/H5FDsubfiling/H5FDioc_priv.h b/src/H5FDsubfiling/H5FDioc_priv.h
index 8dec1a8..cac2806 100644
--- a/src/H5FDsubfiling/H5FDioc_priv.h
+++ b/src/H5FDsubfiling/H5FDioc_priv.h
@@ -79,15 +79,15 @@
#define H5FD_IOC__Q_APPEND(q_ptr, entry_ptr) \
do { \
- HDassert(q_ptr); \
- HDassert((q_ptr)->magic == H5FD_IOC__IO_Q_MAGIC); \
- HDassert((((q_ptr)->q_len == 0) && ((q_ptr)->q_head == NULL) && ((q_ptr)->q_tail == NULL)) || \
+ assert(q_ptr); \
+ assert((q_ptr)->magic == H5FD_IOC__IO_Q_MAGIC); \
+ assert((((q_ptr)->q_len == 0) && ((q_ptr)->q_head == NULL) && ((q_ptr)->q_tail == NULL)) || \
(((q_ptr)->q_len > 0) && ((q_ptr)->q_head != NULL) && ((q_ptr)->q_tail != NULL))); \
- HDassert(entry_ptr); \
- HDassert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \
- HDassert((entry_ptr)->next == NULL); \
- HDassert((entry_ptr)->prev == NULL); \
- HDassert((entry_ptr)->in_progress == FALSE); \
+ assert(entry_ptr); \
+ assert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \
+ assert((entry_ptr)->next == NULL); \
+ assert((entry_ptr)->prev == NULL); \
+ assert((entry_ptr)->in_progress == FALSE); \
\
if ( ((q_ptr)->q_head) == NULL ) \
{ \
@@ -105,15 +105,15 @@ do {
#define H5FD_IOC__Q_REMOVE(q_ptr, entry_ptr) \
do { \
- HDassert(q_ptr); \
- HDassert((q_ptr)->magic == H5FD_IOC__IO_Q_MAGIC); \
- HDassert((((q_ptr)->q_len == 1) && ((q_ptr)->q_head ==((q_ptr)->q_tail)) && ((q_ptr)->q_head == (entry_ptr))) || \
+ assert(q_ptr); \
+ assert((q_ptr)->magic == H5FD_IOC__IO_Q_MAGIC); \
+ assert((((q_ptr)->q_len == 1) && ((q_ptr)->q_head ==((q_ptr)->q_tail)) && ((q_ptr)->q_head == (entry_ptr))) || \
(((q_ptr)->q_len > 0) && ((q_ptr)->q_head != NULL) && ((q_ptr)->q_tail != NULL))); \
- HDassert(entry_ptr); \
- HDassert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \
- HDassert((((q_ptr)->q_len == 1) && ((entry_ptr)->next == NULL) && ((entry_ptr)->prev == NULL)) || \
+ assert(entry_ptr); \
+ assert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \
+ assert((((q_ptr)->q_len == 1) && ((entry_ptr)->next == NULL) && ((entry_ptr)->prev == NULL)) || \
(((q_ptr)->q_len > 1) && (((entry_ptr)->next != NULL) || ((entry_ptr)->prev != NULL)))); \
- HDassert((entry_ptr)->in_progress == TRUE); \
+ assert((entry_ptr)->in_progress == TRUE); \
\
{ \
if ( (((q_ptr)->q_head)) == (entry_ptr) ) \
diff --git a/src/H5FDsubfiling/H5FDioc_threads.c b/src/H5FDsubfiling/H5FDioc_threads.c
index abf816d..4e72d39 100644
--- a/src/H5FDsubfiling/H5FDioc_threads.c
+++ b/src/H5FDsubfiling/H5FDioc_threads.c
@@ -119,13 +119,13 @@ initialize_ioc_threads(void *_sf_context)
double t_start = 0.0, t_end = 0.0;
#endif
- HDassert(sf_context);
+ assert(sf_context);
/*
* Allocate and initialize IOC data that will be passed
* to the IOC main thread
*/
- if (NULL == (ioc_data = HDmalloc(sizeof(*ioc_data))))
+ if (NULL == (ioc_data = malloc(sizeof(*ioc_data))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, (-1),
"can't allocate IOC data for IOC main thread");
ioc_data->sf_context_id = sf_context->sf_context_id;
@@ -171,7 +171,7 @@ initialize_ioc_threads(void *_sf_context)
/* Allow experimentation with the number of helper threads */
if ((env_value = HDgetenv(H5FD_IOC_THREAD_POOL_SIZE)) != NULL) {
- int value_check = HDatoi(env_value);
+ int value_check = atoi(env_value);
if (value_check > 0) {
thread_pool_size = (unsigned int)value_check;
}
@@ -195,8 +195,8 @@ initialize_ioc_threads(void *_sf_context)
#ifdef H5FD_IOC_DEBUG
if (sf_context->topology->ioc_idx == 0) {
- HDprintf("%s: time = %lf seconds\n", __func__, (t_end - t_start));
- HDfflush(stdout);
+ printf("%s: time = %lf seconds\n", __func__, (t_end - t_start));
+ fflush(stdout);
}
#endif
@@ -213,12 +213,12 @@ finalize_ioc_threads(void *_sf_context)
ioc_data_t *ioc_data = NULL;
int ret_value = 0;
- HDassert(sf_context);
- HDassert(sf_context->topology->rank_is_ioc);
+ assert(sf_context);
+ assert(sf_context->topology->rank_is_ioc);
ioc_data = sf_context->ioc_data;
if (ioc_data) {
- HDassert(0 == atomic_load(&ioc_data->sf_shutdown_flag));
+ assert(0 == atomic_load(&ioc_data->sf_shutdown_flag));
/* Shutdown the main IOC thread */
atomic_store(&ioc_data->sf_shutdown_flag, 1);
@@ -229,7 +229,7 @@ finalize_ioc_threads(void *_sf_context)
} while (0 != atomic_load(&ioc_data->sf_shutdown_flag));
/* Tear down IOC worker thread pool */
- HDassert(0 == atomic_load(&ioc_data->sf_io_ops_pending));
+ assert(0 == atomic_load(&ioc_data->sf_io_ops_pending));
hg_thread_pool_destroy(ioc_data->io_thread_pool);
hg_thread_mutex_destroy(&ioc_data->io_queue.q_mutex);
@@ -242,7 +242,7 @@ finalize_ioc_threads(void *_sf_context)
H5_SUBFILING_DONE_ERROR(H5E_IO, H5E_CLOSEERROR, -1, "%" PRId32 " I/O requests failed",
ioc_data->io_queue.num_failed);
- HDfree(ioc_data);
+ free(ioc_data);
sf_context->ioc_data = NULL;
H5_SUBFILING_FUNC_LEAVE;
@@ -345,10 +345,10 @@ ioc_main(ioc_data_t *ioc_data)
int shutdown_requested;
int ret_value = 0;
- HDassert(ioc_data);
+ assert(ioc_data);
context = H5_get_subfiling_object(ioc_data->sf_context_id);
- HDassert(context);
+ assert(context);
/* We can't have opened any files at this point..
* The file open approach has changed so that the normal
@@ -398,7 +398,7 @@ ioc_main(ioc_data_t *ioc_data)
* Zero out work request, since the received message should
* be smaller than sizeof(sf_work_request_t)
*/
- HDmemset(&wk_req, 0, sizeof(sf_work_request_t));
+ memset(&wk_req, 0, sizeof(sf_work_request_t));
if (MPI_SUCCESS != (mpi_code = MPI_Recv(&wk_req, count, MPI_BYTE, source, tag,
context->sf_msg_comm, MPI_STATUS_IGNORE)))
@@ -416,7 +416,7 @@ ioc_main(ioc_data_t *ioc_data)
ioc_io_queue_add_entry(ioc_data, &wk_req);
- HDassert(atomic_load(&ioc_data->sf_io_ops_pending) >= 0);
+ assert(atomic_load(&ioc_data->sf_io_ops_pending) >= 0);
}
else {
struct timespec sleep_spec = {0, IOC_MAIN_SLEEP_DELAY};
@@ -501,15 +501,15 @@ handle_work_request(void *arg)
int op_ret;
hg_thread_ret_t ret_value = 0;
- HDassert(q_entry_ptr);
- HDassert(q_entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
- HDassert(q_entry_ptr->in_progress);
+ assert(q_entry_ptr);
+ assert(q_entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
+ assert(q_entry_ptr->in_progress);
sf_context = H5_get_subfiling_object(file_context_id);
- HDassert(sf_context);
+ assert(sf_context);
ioc_data = sf_context->ioc_data;
- HDassert(ioc_data);
+ assert(ioc_data);
atomic_fetch_add(&ioc_data->sf_work_pending, 1);
@@ -559,14 +559,14 @@ handle_work_request(void *arg)
#ifdef H5FD_IOC_DEBUG
{
int curr_io_ops_pending = atomic_load(&ioc_data->sf_io_ops_pending);
- HDassert(curr_io_ops_pending > 0);
+ assert(curr_io_ops_pending > 0);
}
#endif
/* complete the I/O request */
ioc_io_queue_complete_entry(ioc_data, q_entry_ptr);
- HDassert(atomic_load(&ioc_data->sf_io_ops_pending) >= 0);
+ assert(atomic_load(&ioc_data->sf_io_ops_pending) >= 0);
/* Check the I/O Queue to see if there are any dispatchable entries */
ioc_io_queue_dispatch_eligible_entries(ioc_data, 1);
@@ -617,7 +617,7 @@ send_ack_to_client(int ack_val, int dest_rank, int source_rank, int msg_tag, MPI
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(ack_val > 0);
+ assert(ack_val > 0);
(void)source_rank;
@@ -697,7 +697,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
int mpi_code;
int ret_value = 0;
- HDassert(msg);
+ assert(msg);
file_context_id = msg->context_id;
@@ -712,7 +712,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
}
sf_context = H5_get_subfiling_object(file_context_id);
- HDassert(sf_context);
+ assert(sf_context);
stripe_id = file_offset + data_size;
sf_eof = (haddr_t)(stripe_id % sf_context->sf_stripe_size);
@@ -739,7 +739,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
#endif
/* Allocate space to receive data sent from the client */
- if (NULL == (recv_buf = HDmalloc((size_t)data_size))) {
+ if (NULL == (recv_buf = malloc((size_t)data_size))) {
send_nack = TRUE;
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, -1, "couldn't allocate receive buffer for data");
}
@@ -751,7 +751,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
* allows us to distinguish between multiple concurrent
* writes from a single rank.
*/
- HDassert(H5FD_IOC_tag_ub_val_ptr && (*H5FD_IOC_tag_ub_val_ptr >= IO_TAG_BASE));
+ assert(H5FD_IOC_tag_ub_val_ptr && (*H5FD_IOC_tag_ub_val_ptr >= IO_TAG_BASE));
rcv_tag = (int)(counter % (INT_MAX - IO_TAG_BASE));
rcv_tag %= (*H5FD_IOC_tag_ub_val_ptr - IO_TAG_BASE);
rcv_tag += IO_TAG_BASE;
@@ -787,7 +787,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_
#endif
- HDassert(subfile_idx < sf_context->sf_num_fids);
+ assert(subfile_idx < sf_context->sf_num_fids);
sf_fid = sf_context->sf_fids[subfile_idx];
#ifdef H5_SUBFILING_DEBUG
@@ -836,7 +836,7 @@ done:
H5_SUBFILING_DONE_ERROR(H5E_IO, H5E_WRITEERROR, -1, "couldn't send NACK to client");
}
- HDfree(recv_buf);
+ free(recv_buf);
H5_SUBFILING_FUNC_LEAVE;
} /* ioc_file_queue_write_indep() */
@@ -883,12 +883,12 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C
int mpi_code;
int ret_value = 0;
- HDassert(msg);
+ assert(msg);
file_context_id = msg->context_id;
sf_context = H5_get_subfiling_object(file_context_id);
- HDassert(sf_context);
+ assert(sf_context);
/*
* If we are using 1 subfile per IOC, we can optimize reads
@@ -935,7 +935,7 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C
#endif
/* Allocate space to send data read from file to client */
- if (NULL == (send_buf = HDmalloc((size_t)data_size))) {
+ if (NULL == (send_buf = malloc((size_t)data_size))) {
if (need_data_tag) {
send_nack = TRUE;
send_empty_buf = FALSE;
@@ -952,7 +952,7 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C
* reads from a single rank, which can happen when a rank
* owns multiple subfiles.
*/
- HDassert(H5FD_IOC_tag_ub_val_ptr && (*H5FD_IOC_tag_ub_val_ptr >= IO_TAG_BASE));
+ assert(H5FD_IOC_tag_ub_val_ptr && (*H5FD_IOC_tag_ub_val_ptr >= IO_TAG_BASE));
send_tag = (int)(counter % (INT_MAX - IO_TAG_BASE));
send_tag %= (*H5FD_IOC_tag_ub_val_ptr - IO_TAG_BASE);
send_tag += IO_TAG_BASE;
@@ -964,7 +964,7 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C
}
/* Read data from the subfile */
- HDassert(subfile_idx < sf_context->sf_num_fids);
+ assert(subfile_idx < sf_context->sf_num_fids);
sf_fid = sf_context->sf_fids[subfile_idx];
if (sf_fid < 0)
H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_BADVALUE, -1, "subfile file descriptor %d is invalid", sf_fid);
@@ -1010,7 +1010,7 @@ done:
H5_SUBFILING_MPI_DONE_ERROR(-1, "MPI_Send failed", mpi_code);
}
- HDfree(send_buf);
+ free(send_buf);
return ret_value;
} /* end ioc_file_queue_read_indep() */
@@ -1047,8 +1047,8 @@ ioc_file_write_data(int fd, int64_t file_offset, void *data_buffer, int64_t data
bytes_remaining -= bytes_written;
#ifdef H5FD_IOC_DEBUG
- HDprintf("[ioc(%d) %s]: wrote %ld bytes, remaining=%ld, file_offset=%" PRId64 "\n", ioc_idx,
- __func__, bytes_written, bytes_remaining, file_offset);
+ printf("[ioc(%d) %s]: wrote %ld bytes, remaining=%ld, file_offset=%" PRId64 "\n", ioc_idx,
+ __func__, bytes_written, bytes_remaining, file_offset);
#endif
this_data += bytes_written;
@@ -1099,25 +1099,25 @@ ioc_file_read_data(int fd, int64_t file_offset, void *data_buffer, int64_t data_
bytes_remaining -= bytes_read;
#ifdef H5FD_IOC_DEBUG
- HDprintf("[ioc(%d) %s]: read %ld bytes, remaining=%ld, file_offset=%" PRId64 "\n", ioc_idx,
- __func__, bytes_read, bytes_remaining, file_offset);
+ printf("[ioc(%d) %s]: read %ld bytes, remaining=%ld, file_offset=%" PRId64 "\n", ioc_idx,
+ __func__, bytes_read, bytes_remaining, file_offset);
#endif
this_buffer += bytes_read;
file_offset += bytes_read;
}
else if (bytes_read == 0) {
- HDassert(bytes_remaining > 0);
+ assert(bytes_remaining > 0);
/* end of file but not end of format address space */
- HDmemset(this_buffer, 0, (size_t)bytes_remaining);
+ memset(this_buffer, 0, (size_t)bytes_remaining);
break;
}
else {
if (retries == 0) {
#ifdef H5FD_IOC_DEBUG
- HDprintf("[ioc(%d) %s]: TIMEOUT: file_offset=%" PRId64 ", data_size=%ld\n", ioc_idx, __func__,
- file_offset, data_size);
+ printf("[ioc(%d) %s]: TIMEOUT: file_offset=%" PRId64 ", data_size=%ld\n", ioc_idx, __func__,
+ file_offset, data_size);
#endif
H5_SUBFILING_SYS_GOTO_ERROR(H5E_IO, H5E_READERROR, -1, "HDpread failed");
@@ -1145,7 +1145,7 @@ ioc_file_truncate(sf_work_request_t *msg)
int mpi_code;
int ret_value = 0;
- HDassert(msg);
+ assert(msg);
file_context_id = msg->context_id;
ioc_idx = msg->ioc_idx;
@@ -1160,7 +1160,7 @@ ioc_file_truncate(sf_work_request_t *msg)
if (NULL == (sf_context = H5_get_subfiling_object(file_context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_FILE, H5E_CANTGET, -1, "couldn't retrieve subfiling context");
- HDassert(subfile_idx < sf_context->sf_num_fids);
+ assert(subfile_idx < sf_context->sf_num_fids);
fd = sf_context->sf_fids[subfile_idx];
@@ -1176,9 +1176,9 @@ ioc_file_truncate(sf_work_request_t *msg)
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Send failed", mpi_code);
#ifdef H5FD_IOC_DEBUG
- HDprintf("[ioc(%d) %s]: truncated subfile to %lld bytes. ret = %d\n", ioc_idx, __func__,
- (long long)length, errno);
- HDfflush(stdout);
+ printf("[ioc(%d) %s]: truncated subfile to %lld bytes. ret = %d\n", ioc_idx, __func__, (long long)length,
+ errno);
+ fflush(stdout);
#endif
done:
@@ -1219,7 +1219,7 @@ ioc_file_report_eof(sf_work_request_t *msg, MPI_Comm comm)
int mpi_code;
int ret_value = 0;
- HDassert(msg);
+ assert(msg);
file_context_id = msg->context_id;
source = msg->source;
@@ -1230,7 +1230,7 @@ ioc_file_report_eof(sf_work_request_t *msg, MPI_Comm comm)
if (NULL == (sf_context = H5_get_subfiling_object(file_context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_FILE, H5E_CANTGET, -1, "couldn't retrieve subfiling context");
- HDassert(subfile_idx < sf_context->sf_num_fids);
+ assert(subfile_idx < sf_context->sf_num_fids);
fd = sf_context->sf_fids[subfile_idx];
@@ -1273,7 +1273,7 @@ ioc_io_queue_alloc_entry(void)
{
ioc_io_queue_entry_t *q_entry_ptr = NULL;
- q_entry_ptr = (ioc_io_queue_entry_t *)HDmalloc(sizeof(ioc_io_queue_entry_t));
+ q_entry_ptr = (ioc_io_queue_entry_t *)malloc(sizeof(ioc_io_queue_entry_t));
if (q_entry_ptr) {
@@ -1326,21 +1326,21 @@ ioc_io_queue_add_entry(ioc_data_t *ioc_data, sf_work_request_t *wk_req_ptr)
{
ioc_io_queue_entry_t *entry_ptr = NULL;
- HDassert(ioc_data);
- HDassert(ioc_data->io_queue.magic == H5FD_IOC__IO_Q_MAGIC);
- HDassert(wk_req_ptr);
+ assert(ioc_data);
+ assert(ioc_data->io_queue.magic == H5FD_IOC__IO_Q_MAGIC);
+ assert(wk_req_ptr);
entry_ptr = ioc_io_queue_alloc_entry();
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
- HDmemcpy((void *)(&(entry_ptr->wk_req)), (const void *)wk_req_ptr, sizeof(sf_work_request_t));
+ memcpy((void *)(&(entry_ptr->wk_req)), (const void *)wk_req_ptr, sizeof(sf_work_request_t));
/* must obtain io_queue mutex before appending */
hg_thread_mutex_lock(&ioc_data->io_queue.q_mutex);
- HDassert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
+ assert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
entry_ptr->counter = ioc_data->io_queue.req_counter++;
@@ -1360,7 +1360,7 @@ ioc_io_queue_add_entry(ioc_data_t *ioc_data, sf_work_request_t *wk_req_ptr)
atomic_load(&ioc_data->sf_io_ops_pending));
#endif
- HDassert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress == ioc_data->io_queue.q_len);
+ assert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress == ioc_data->io_queue.q_len);
#ifdef H5FD_IOC_COLLECT_STATS
entry_ptr->q_time = H5_now_usec();
@@ -1398,7 +1398,7 @@ ioc_io_queue_add_entry(ioc_data_t *ioc_data, sf_work_request_t *wk_req_ptr)
}
#endif
- HDassert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
+ assert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
hg_thread_mutex_unlock(&ioc_data->io_queue.q_mutex);
@@ -1457,8 +1457,8 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
ioc_io_queue_entry_t *entry_ptr = NULL;
ioc_io_queue_entry_t *scan_ptr = NULL;
- HDassert(ioc_data);
- HDassert(ioc_data->io_queue.magic == H5FD_IOC__IO_Q_MAGIC);
+ assert(ioc_data);
+ assert(ioc_data->io_queue.magic == H5FD_IOC__IO_Q_MAGIC);
if (try_lock) {
if (hg_thread_mutex_try_lock(&ioc_data->io_queue.q_mutex) < 0)
@@ -1470,11 +1470,11 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
entry_ptr = ioc_data->io_queue.q_head;
/* sanity check on first element in the I/O queue */
- HDassert((entry_ptr == NULL) || (entry_ptr->prev == NULL));
+ assert((entry_ptr == NULL) || (entry_ptr->prev == NULL));
while ((entry_ptr) && (ioc_data->io_queue.num_pending > 0)) {
- HDassert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
+ assert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
/* Check for a get EOF or truncate operation at head of queue */
if (ioc_data->io_queue.q_head->in_progress) {
@@ -1499,7 +1499,7 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
scan_ptr = entry_ptr->prev;
- HDassert((scan_ptr == NULL) || (scan_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC));
+ assert((scan_ptr == NULL) || (scan_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC));
if ((entry_ptr->wk_req.tag == TRUNC_OP) || (entry_ptr->wk_req.tag == GET_EOF_OP)) {
@@ -1539,18 +1539,18 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
if (!conflict_detected) { /* dispatch I/O request */
- HDassert(scan_ptr == NULL);
- HDassert(!entry_ptr->in_progress);
+ assert(scan_ptr == NULL);
+ assert(!entry_ptr->in_progress);
entry_ptr->in_progress = TRUE;
- HDassert(ioc_data->io_queue.num_pending > 0);
+ assert(ioc_data->io_queue.num_pending > 0);
ioc_data->io_queue.num_pending--;
ioc_data->io_queue.num_in_progress++;
- HDassert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress ==
- ioc_data->io_queue.q_len);
+ assert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress ==
+ ioc_data->io_queue.q_len);
entry_ptr->thread_wk.func = handle_work_request;
entry_ptr->thread_wk.args = entry_ptr;
@@ -1583,7 +1583,7 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock)
entry_ptr = entry_ptr->next;
}
- HDassert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
+ assert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
hg_thread_mutex_unlock(&ioc_data->io_queue.q_mutex);
} /* ioc_io_queue_dispatch_eligible_entries() */
@@ -1616,16 +1616,16 @@ ioc_io_queue_complete_entry(ioc_data_t *ioc_data, ioc_io_queue_entry_t *entry_pt
uint64_t execution_time;
#endif
- HDassert(ioc_data);
- HDassert(ioc_data->io_queue.magic == H5FD_IOC__IO_Q_MAGIC);
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
+ assert(ioc_data);
+ assert(ioc_data->io_queue.magic == H5FD_IOC__IO_Q_MAGIC);
+ assert(entry_ptr);
+ assert(entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
/* must obtain io_queue mutex before deleting and updating stats */
hg_thread_mutex_lock(&ioc_data->io_queue.q_mutex);
- HDassert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress == ioc_data->io_queue.q_len);
- HDassert(ioc_data->io_queue.num_in_progress > 0);
+ assert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress == ioc_data->io_queue.q_len);
+ assert(ioc_data->io_queue.num_in_progress > 0);
if (entry_ptr->wk_ret < 0)
ioc_data->io_queue.num_failed++;
@@ -1634,7 +1634,7 @@ ioc_io_queue_complete_entry(ioc_data_t *ioc_data, ioc_io_queue_entry_t *entry_pt
ioc_data->io_queue.num_in_progress--;
- HDassert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress == ioc_data->io_queue.q_len);
+ assert(ioc_data->io_queue.num_pending + ioc_data->io_queue.num_in_progress == ioc_data->io_queue.q_len);
atomic_fetch_sub(&ioc_data->sf_io_ops_pending, 1);
@@ -1652,10 +1652,10 @@ ioc_io_queue_complete_entry(ioc_data_t *ioc_data, ioc_io_queue_entry_t *entry_pt
* there aren't other operations in progress
*/
if ((entry_ptr->wk_req.tag == GET_EOF_OP) || (entry_ptr->wk_req.tag == TRUNC_OP))
- HDassert(ioc_data->io_queue.num_in_progress == 0);
+ assert(ioc_data->io_queue.num_in_progress == 0);
#endif
- HDassert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
+ assert(ioc_data->io_queue.q_len == atomic_load(&ioc_data->sf_io_ops_pending));
#ifdef H5FD_IOC_COLLECT_STATS
/* Compute the queued and execution time */
@@ -1696,14 +1696,14 @@ static void
ioc_io_queue_free_entry(ioc_io_queue_entry_t *q_entry_ptr)
{
/* use assertions for error checking, since the following should never fail. */
- HDassert(q_entry_ptr);
- HDassert(q_entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
- HDassert(q_entry_ptr->next == NULL);
- HDassert(q_entry_ptr->prev == NULL);
+ assert(q_entry_ptr);
+ assert(q_entry_ptr->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC);
+ assert(q_entry_ptr->next == NULL);
+ assert(q_entry_ptr->prev == NULL);
q_entry_ptr->magic = 0;
- HDfree(q_entry_ptr);
+ free(q_entry_ptr);
q_entry_ptr = NULL;
diff --git a/src/H5FDsubfiling/H5FDsubfile_int.c b/src/H5FDsubfiling/H5FDsubfile_int.c
index 4c583e8..b8b2725 100644
--- a/src/H5FDsubfiling/H5FDsubfile_int.c
+++ b/src/H5FDsubfiling/H5FDsubfile_int.c
@@ -101,10 +101,10 @@ H5FD__subfiling__truncate_sub_files(hid_t context_id, int64_t logical_file_eof,
num_subfiles_owned = sf_context->sf_num_fids;
- if (NULL == (recv_reqs = HDmalloc((size_t)num_subfiles_owned * sizeof(*recv_reqs))))
+ if (NULL == (recv_reqs = malloc((size_t)num_subfiles_owned * sizeof(*recv_reqs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate receive requests array");
- if (NULL == (recv_msgs = HDmalloc((size_t)num_subfiles_owned * 3 * sizeof(*recv_msgs))))
+ if (NULL == (recv_msgs = malloc((size_t)num_subfiles_owned * 3 * sizeof(*recv_msgs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate message array");
/*
@@ -175,7 +175,7 @@ H5FD__subfiling__truncate_sub_files(hid_t context_id, int64_t logical_file_eof,
}
}
- HDassert(test_file_eof == logical_file_eof);
+ assert(test_file_eof == logical_file_eof);
}
#endif /* NDEBUG */
}
@@ -186,8 +186,8 @@ H5FD__subfiling__truncate_sub_files(hid_t context_id, int64_t logical_file_eof,
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_code);
done:
- HDfree(recv_msgs);
- HDfree(recv_reqs);
+ free(recv_msgs);
+ free(recv_reqs);
H5_SUBFILING_FUNC_LEAVE;
} /* H5FD__subfiling__truncate_sub_files() */
@@ -295,24 +295,24 @@ H5FD__subfiling__get_real_eof(hid_t context_id, int64_t *logical_eof_ptr)
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(logical_eof_ptr);
+ assert(logical_eof_ptr);
if (NULL == (sf_context = (subfiling_context_t *)H5_get_subfiling_object(context_id)))
H5_SUBFILING_GOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "can't get subfile context");
- HDassert(sf_context->topology);
+ assert(sf_context->topology);
n_io_concentrators = sf_context->topology->n_io_concentrators;
num_subfiles = sf_context->sf_num_subfiles;
- HDassert(n_io_concentrators > 0);
- HDassert(num_subfiles >= n_io_concentrators);
+ assert(n_io_concentrators > 0);
+ assert(num_subfiles >= n_io_concentrators);
- if (NULL == (sf_eofs = HDmalloc((size_t)num_subfiles * sizeof(int64_t))))
+ if (NULL == (sf_eofs = malloc((size_t)num_subfiles * sizeof(int64_t))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate subfile EOFs array");
- if (NULL == (recv_reqs = HDmalloc((size_t)num_subfiles * sizeof(*recv_reqs))))
+ if (NULL == (recv_reqs = malloc((size_t)num_subfiles * sizeof(*recv_reqs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate receive requests array");
- if (NULL == (recv_msg = HDmalloc((size_t)num_subfiles * sizeof(msg))))
+ if (NULL == (recv_msg = malloc((size_t)num_subfiles * sizeof(msg))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate message array");
for (int i = 0; i < num_subfiles; i++) {
@@ -352,9 +352,9 @@ H5FD__subfiling__get_real_eof(hid_t context_id, int64_t *logical_eof_ptr)
for (int i = 0; i < num_subfiles; i++) {
int ioc_rank = (int)recv_msg[3 * i];
- HDassert(ioc_rank >= 0);
- HDassert(ioc_rank < n_io_concentrators);
- HDassert(sf_eofs[i] == -1);
+ assert(ioc_rank >= 0);
+ assert(ioc_rank < n_io_concentrators);
+ assert(sf_eofs[i] == -1);
sf_eofs[i] = recv_msg[(3 * i) + 1];
}
@@ -405,9 +405,9 @@ done:
}
}
- HDfree(recv_msg);
- HDfree(recv_reqs);
- HDfree(sf_eofs);
+ free(recv_msg);
+ free(recv_reqs);
+ free(sf_eofs);
H5_SUBFILING_FUNC_LEAVE;
} /* H5FD__subfiling__get_real_eof() */
diff --git a/src/H5FDsubfiling/H5FDsubfiling.c b/src/H5FDsubfiling/H5FDsubfiling.c
index 64c92ed..2371895 100644
--- a/src/H5FDsubfiling/H5FDsubfiling.c
+++ b/src/H5FDsubfiling/H5FDsubfiling.c
@@ -393,8 +393,8 @@ H5FD__subfiling_term(void)
}
#ifdef H5FD_SUBFILING_DEBUG
else
- HDprintf("** WARNING **: HDF5 is terminating the Subfiling VFD after MPI_Finalize() was "
- "called - an HDF5 ID was probably left unclosed\n");
+ printf("** WARNING **: HDF5 is terminating the Subfiling VFD after MPI_Finalize() was "
+ "called - an HDF5 ID was probably left unclosed\n");
#endif
}
@@ -468,7 +468,7 @@ H5Pset_fapl_subfiling(hid_t fapl_id, const H5FD_subfiling_config_t *vfd_config)
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (vfd_config == NULL) {
- if (NULL == (subfiling_conf = HDcalloc(1, sizeof(*subfiling_conf))))
+ if (NULL == (subfiling_conf = calloc(1, sizeof(*subfiling_conf))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfiling VFD configuration");
subfiling_conf->ioc_fapl_id = H5I_INVALID_HID;
@@ -516,7 +516,7 @@ done:
if (subfiling_conf) {
if (subfiling_conf->ioc_fapl_id >= 0 && H5I_dec_ref(subfiling_conf->ioc_fapl_id) < 0)
H5_SUBFILING_DONE_ERROR(H5E_PLIST, H5E_CANTDEC, FAIL, "can't close IOC FAPL");
- HDfree(subfiling_conf);
+ free(subfiling_conf);
}
H5_SUBFILING_FUNC_LEAVE_API;
@@ -566,7 +566,7 @@ H5Pget_fapl_subfiling(hid_t fapl_id, H5FD_subfiling_config_t *config_out)
}
else {
/* Copy the subfiling fapl data out */
- HDmemcpy(config_out, config_ptr, sizeof(H5FD_subfiling_config_t));
+ memcpy(config_out, config_ptr, sizeof(H5FD_subfiling_config_t));
/* Copy the driver info value */
if (H5FD__copy_plist(config_ptr->ioc_fapl_id, &(config_out->ioc_fapl_id)) < 0)
@@ -585,9 +585,9 @@ H5FD__subfiling_get_default_config(hid_t fapl_id, H5FD_subfiling_config_t *confi
char *h5_require_ioc;
herr_t ret_value = SUCCEED;
- HDassert(config_out);
+ assert(config_out);
- HDmemset(config_out, 0, sizeof(*config_out));
+ memset(config_out, 0, sizeof(*config_out));
config_out->magic = H5FD_SUBFILING_FAPL_MAGIC;
config_out->version = H5FD_SUBFILING_CURR_FAPL_VERSION;
@@ -599,7 +599,7 @@ H5FD__subfiling_get_default_config(hid_t fapl_id, H5FD_subfiling_config_t *confi
config_out->shared_cfg.stripe_count = H5FD_SUBFILING_DEFAULT_STRIPE_COUNT;
if ((h5_require_ioc = HDgetenv("H5_REQUIRE_IOC")) != NULL) {
- int value_check = HDatoi(h5_require_ioc);
+ int value_check = atoi(h5_require_ioc);
if (value_check == 0)
config_out->require_ioc = FALSE;
}
@@ -668,7 +668,7 @@ H5FD__subfiling_validate_config(const H5FD_subfiling_config_t *fa)
{
herr_t ret_value = SUCCEED;
- HDassert(fa != NULL);
+ assert(fa != NULL);
if (fa->version != H5FD_SUBFILING_CURR_FAPL_VERSION)
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown H5FD_subfiling_config_t version");
@@ -706,7 +706,7 @@ H5FD__subfiling_sb_size(H5FD_t *_file)
H5FD_subfiling_t *file = (H5FD_subfiling_t *)_file;
hsize_t ret_value = 0;
- HDassert(file);
+ assert(file);
/* Configuration structure magic number */
ret_value += sizeof(uint32_t);
@@ -824,7 +824,7 @@ H5FD__subfiling_sb_encode(H5FD_t *_file, char *name, unsigned char *buf)
/* Encode config file prefix string */
if (sf_context->config_file_prefix) {
- HDmemcpy(p, sf_context->config_file_prefix, prefix_len);
+ memcpy(p, sf_context->config_file_prefix, prefix_len);
p += prefix_len;
}
@@ -832,14 +832,14 @@ H5FD__subfiling_sb_encode(H5FD_t *_file, char *name, unsigned char *buf)
if (file->sf_file) {
char ioc_name[9];
- HDmemset(ioc_name, 0, sizeof(ioc_name));
+ memset(ioc_name, 0, sizeof(ioc_name));
if (H5FD_sb_encode(file->sf_file, ioc_name, p + 9) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTENCODE, FAIL,
"unable to encode IOC VFD's superblock information");
/* Copy the IOC VFD's name into our buffer */
- HDmemcpy(p, ioc_name, 9);
+ memcpy(p, ioc_name, 9);
}
done:
@@ -902,11 +902,11 @@ H5FD__subfiling_sb_decode(H5FD_t *_file, const char *name, const unsigned char *
/* Decode config file prefix string */
if (tmpu64 > 0) {
if (!sf_context->config_file_prefix) {
- if (NULL == (sf_context->config_file_prefix = HDmalloc(tmpu64)))
+ if (NULL == (sf_context->config_file_prefix = malloc(tmpu64)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate space for config file prefix string");
- HDmemcpy(sf_context->config_file_prefix, p, tmpu64);
+ memcpy(sf_context->config_file_prefix, p, tmpu64);
/* Just in case.. */
sf_context->config_file_prefix[tmpu64 - 1] = '\0';
@@ -918,7 +918,7 @@ H5FD__subfiling_sb_decode(H5FD_t *_file, const char *name, const unsigned char *
if (file->sf_file) {
char ioc_name[9];
- HDmemcpy(ioc_name, p, 9);
+ memcpy(ioc_name, p, 9);
p += 9;
if (H5FD_sb_load(file->sf_file, ioc_name, p) < 0)
@@ -976,7 +976,7 @@ H5FD__subfiling_fapl_get(H5FD_t *_file)
}
/* Copy the fields of the structure */
- HDmemcpy(fa, &(file->fa), sizeof(H5FD_subfiling_config_t));
+ memcpy(fa, &(file->fa), sizeof(H5FD_subfiling_config_t));
/* Copy the driver info value */
if (H5FD__copy_plist(file->fa.ioc_fapl_id, &(fa->ioc_fapl_id)) < 0)
@@ -1012,7 +1012,7 @@ H5FD__copy_plist(hid_t fapl_id, hid_t *id_out_ptr)
int ret_value = 0;
H5P_genplist_t *plist_ptr = NULL;
- HDassert(id_out_ptr != NULL);
+ assert(id_out_ptr != NULL);
if (FALSE == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
H5_SUBFILING_GOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "not a file access property list");
@@ -1055,7 +1055,7 @@ H5FD__subfiling_fapl_copy(const void *_old_fa)
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
}
- HDmemcpy(new_fa, old_fa, sizeof(H5FD_subfiling_config_t));
+ memcpy(new_fa, old_fa, sizeof(H5FD_subfiling_config_t));
if (H5FD__copy_plist(old_fa->ioc_fapl_id, &(new_fa->ioc_fapl_id)) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't copy the IOC FAPL");
@@ -1091,7 +1091,7 @@ H5FD__subfiling_fapl_free(void *_fa)
H5FD_subfiling_config_t *fa = (H5FD_subfiling_config_t *)_fa;
herr_t ret_value = SUCCEED;
- HDassert(fa != NULL); /* sanity check */
+ assert(fa != NULL); /* sanity check */
if (fa->ioc_fapl_id >= 0 && H5I_dec_ref(fa->ioc_fapl_id) < 0)
H5_SUBFILING_DONE_ERROR(H5E_PLIST, H5E_CANTDEC, FAIL, "can't close IOC FAPL");
@@ -1193,7 +1193,7 @@ H5FD__subfiling_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t ma
config_ptr = &default_config;
}
- HDmemcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_subfiling_config_t));
+ memcpy(&file_ptr->fa, config_ptr, sizeof(H5FD_subfiling_config_t));
if (H5FD__copy_plist(config_ptr->ioc_fapl_id, &(file_ptr->fa.ioc_fapl_id)) < 0) {
file_ptr->fa.ioc_fapl_id = H5I_INVALID_HID;
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't copy FAPL");
@@ -1318,7 +1318,7 @@ H5FD__subfiling_close_int(H5FD_subfiling_t *file_ptr)
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(file_ptr);
+ assert(file_ptr);
if (MPI_SUCCESS != (mpi_code = MPI_Finalized(&mpi_finalized)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Finalized failed", mpi_code);
@@ -1346,7 +1346,7 @@ H5FD__subfiling_close_int(H5FD_subfiling_t *file_ptr)
file_ptr->fail_to_encode = FALSE;
done:
- HDfree(file_ptr->file_path);
+ free(file_ptr->file_path);
file_ptr->file_path = NULL;
H5MM_free(file_ptr->file_dir);
@@ -1404,8 +1404,8 @@ H5FD__subfiling_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_subfiling_t *f2 = (const H5FD_subfiling_t *)_f2;
int ret_value = 0;
- HDassert(f1);
- HDassert(f2);
+ assert(f1);
+ assert(f2);
ret_value = H5FD_cmp(f1->sf_file, f2->sf_file);
@@ -1585,8 +1585,8 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_i
int num_subfiles;
herr_t ret_value = SUCCEED;
- HDassert(file_ptr && file_ptr->pub.cls);
- HDassert(buf);
+ assert(file_ptr && file_ptr->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (!H5F_addr_defined(addr))
@@ -1636,8 +1636,8 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_i
* underlying I/O operations.
*/
sf_context = (subfiling_context_t *)H5_get_subfiling_object(file_ptr->context_id);
- HDassert(sf_context);
- HDassert(sf_context->topology);
+ assert(sf_context);
+ assert(sf_context->topology);
num_subfiles = sf_context->sf_num_subfiles;
@@ -1675,14 +1675,14 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_i
* to contain the translation of the I/O request into a collection of
* I/O requests.
*/
- if (NULL == (source_data_offset =
- HDcalloc(1, (size_t)num_subfiles * max_depth * sizeof(*source_data_offset))))
+ if (NULL ==
+ (source_data_offset = calloc(1, (size_t)num_subfiles * max_depth * sizeof(*source_data_offset))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate source data offset I/O vector");
- if (NULL == (sf_data_size = HDcalloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_data_size))))
+ if (NULL == (sf_data_size = calloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_data_size))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile data size I/O vector");
- if (NULL == (sf_offset = HDcalloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_offset))))
+ if (NULL == (sf_offset = calloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_offset))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile offset I/O vector");
@@ -1713,16 +1713,16 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_i
H5_CHECKED_ASSIGN(vector_len, uint32_t, num_subfiles_used, int);
/* Allocate I/O vectors */
- if (NULL == (io_types = HDmalloc(vector_len * sizeof(*io_types))))
+ if (NULL == (io_types = malloc(vector_len * sizeof(*io_types))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O types vector");
- if (NULL == (io_addrs = HDmalloc(vector_len * sizeof(*io_addrs))))
+ if (NULL == (io_addrs = malloc(vector_len * sizeof(*io_addrs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O addresses vector");
- if (NULL == (io_sizes = HDmalloc(vector_len * sizeof(*io_sizes))))
+ if (NULL == (io_sizes = malloc(vector_len * sizeof(*io_sizes))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O sizes vector");
- if (NULL == (io_bufs = HDmalloc(vector_len * sizeof(*io_bufs))))
+ if (NULL == (io_bufs = malloc(vector_len * sizeof(*io_bufs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O buffers vector");
@@ -1774,13 +1774,13 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_i
file_ptr->op = OP_READ;
done:
- HDfree(io_bufs);
- HDfree(io_sizes);
- HDfree(io_addrs);
- HDfree(io_types);
- HDfree(sf_offset);
- HDfree(sf_data_size);
- HDfree(source_data_offset);
+ free(io_bufs);
+ free(io_sizes);
+ free(io_addrs);
+ free(io_types);
+ free(sf_offset);
+ free(sf_data_size);
+ free(source_data_offset);
if (ret_value < 0) {
/* Reset last file I/O information */
@@ -1820,8 +1820,8 @@ H5FD__subfiling_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_
int num_subfiles;
herr_t ret_value = SUCCEED;
- HDassert(file_ptr && file_ptr->pub.cls);
- HDassert(buf);
+ assert(file_ptr && file_ptr->pub.cls);
+ assert(buf);
/* Check for overflow conditions */
if (!H5F_addr_defined(addr))
@@ -1868,8 +1868,8 @@ H5FD__subfiling_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_
* underlying I/O operations.
*/
sf_context = (subfiling_context_t *)H5_get_subfiling_object(file_ptr->context_id);
- HDassert(sf_context);
- HDassert(sf_context->topology);
+ assert(sf_context);
+ assert(sf_context->topology);
num_subfiles = sf_context->sf_num_subfiles;
@@ -1918,14 +1918,14 @@ H5FD__subfiling_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_
* to contain the translation of the I/O request into a collection of
* I/O requests.
*/
- if (NULL == (source_data_offset =
- HDcalloc(1, (size_t)num_subfiles * max_depth * sizeof(*source_data_offset))))
+ if (NULL ==
+ (source_data_offset = calloc(1, (size_t)num_subfiles * max_depth * sizeof(*source_data_offset))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate source data offset I/O vector");
- if (NULL == (sf_data_size = HDcalloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_data_size))))
+ if (NULL == (sf_data_size = calloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_data_size))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile data size I/O vector");
- if (NULL == (sf_offset = HDcalloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_offset))))
+ if (NULL == (sf_offset = calloc(1, (size_t)num_subfiles * max_depth * sizeof(*sf_offset))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile offset I/O vector");
@@ -1956,16 +1956,16 @@ H5FD__subfiling_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_
H5_CHECKED_ASSIGN(vector_len, uint32_t, num_subfiles_used, int);
/* Allocate I/O vectors */
- if (NULL == (io_types = HDmalloc(vector_len * sizeof(*io_types))))
+ if (NULL == (io_types = malloc(vector_len * sizeof(*io_types))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O types vector");
- if (NULL == (io_addrs = HDmalloc(vector_len * sizeof(*io_addrs))))
+ if (NULL == (io_addrs = malloc(vector_len * sizeof(*io_addrs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O addresses vector");
- if (NULL == (io_sizes = HDmalloc(vector_len * sizeof(*io_sizes))))
+ if (NULL == (io_sizes = malloc(vector_len * sizeof(*io_sizes))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O sizes vector");
- if (NULL == (io_bufs = HDmalloc(vector_len * sizeof(*io_bufs))))
+ if (NULL == (io_bufs = malloc(vector_len * sizeof(*io_bufs))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate subfile I/O buffers vector");
@@ -2031,13 +2031,13 @@ H5FD__subfiling_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_
file_ptr->local_eof = file_ptr->pos;
done:
- HDfree(io_bufs);
- HDfree(io_sizes);
- HDfree(io_addrs);
- HDfree(io_types);
- HDfree(sf_offset);
- HDfree(sf_data_size);
- HDfree(source_data_offset);
+ free(io_bufs);
+ free(io_sizes);
+ free(io_addrs);
+ free(io_types);
+ free(sf_offset);
+ free(sf_data_size);
+ free(source_data_offset);
if (ret_value < 0) {
/* Reset last file I/O information */
@@ -2137,8 +2137,8 @@ H5FD__subfiling_read_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_m
H5FD_mem_t type;
haddr_t eoa;
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
if (H5CX_get_io_xfer_mode(&xfer_mode) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL,
@@ -2254,7 +2254,7 @@ H5FD__subfiling_write_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_
H5FD_mpio_xfer_t xfer_mode = H5FD_MPIO_INDEPENDENT;
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(file_ptr != NULL); /* sanity check */
+ assert(file_ptr != NULL); /* sanity check */
/* Check arguments
* RAW - Do we really need to check arguments once again?
@@ -2297,8 +2297,8 @@ H5FD__subfiling_write_vector(H5FD_t *_file, hid_t dxpl_id, uint32_t count, H5FD_
H5FD_mem_t type;
haddr_t eoa;
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
if (H5CX_get_io_xfer_mode(&xfer_mode) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL,
@@ -2390,7 +2390,7 @@ H5FD__subfiling_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5
H5FD_subfiling_t *file = (H5FD_subfiling_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(file);
+ assert(file);
/* Extend the file to make sure it's large enough */
if (!H5F_addr_eq(file->eoa, file->last_eoa)) {
@@ -2469,7 +2469,7 @@ H5FD__subfiling_lock(H5FD_t *_file, hbool_t rw)
H5FD_subfiling_t *file = (H5FD_subfiling_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(file);
+ assert(file);
if (file->fa.require_ioc) {
#ifdef VERBOSE
@@ -2502,7 +2502,7 @@ H5FD__subfiling_unlock(H5FD_t *_file)
H5FD_subfiling_t *file = (H5FD_subfiling_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- HDassert(file);
+ assert(file);
if (H5FD_unlock(file->sf_file) < 0)
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to lock file");
@@ -2581,14 +2581,14 @@ H5FD__subfiling_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void
herr_t ret_value = SUCCEED; /* Return value */
/* Sanity checks */
- HDassert(file);
- HDassert(H5FD_SUBFILING == file->pub.driver_id);
+ assert(file);
+ assert(H5FD_SUBFILING == file->pub.driver_id);
switch (op_code) {
case H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
/*
* Return a separate MPI communicator to the caller so
@@ -2603,14 +2603,14 @@ H5FD__subfiling_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void
break;
case H5FD_CTL_GET_MPI_RANK_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
**((int **)output) = file->mpi_rank;
break;
case H5FD_CTL_GET_MPI_SIZE_OPCODE:
- HDassert(output);
- HDassert(*output);
+ assert(output);
+ assert(*output);
**((int **)output) = file->mpi_size;
break;
@@ -2740,17 +2740,17 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
int num_subfiles = 0;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(sf_context->sf_stripe_size > 0);
- HDassert(sf_context->sf_blocksize_per_stripe > 0);
- HDassert(sf_context->sf_num_subfiles > 0);
- HDassert(sf_context->topology);
- HDassert(mem_buf_offset);
- HDassert(target_file_offset);
- HDassert(io_block_len);
- HDassert(first_subfile_index);
- HDassert(n_subfiles_used);
- HDassert(max_io_req_per_subfile);
+ assert(sf_context);
+ assert(sf_context->sf_stripe_size > 0);
+ assert(sf_context->sf_blocksize_per_stripe > 0);
+ assert(sf_context->sf_num_subfiles > 0);
+ assert(sf_context->topology);
+ assert(mem_buf_offset);
+ assert(target_file_offset);
+ assert(io_block_len);
+ assert(first_subfile_index);
+ assert(n_subfiles_used);
+ assert(max_io_req_per_subfile);
*first_subfile_index = 0;
*n_subfiles_used = 0;
@@ -2808,8 +2808,8 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
/* Determine the size of data written to the first and last stripes */
start_length = MIN(data_size, (stripe_size - offset_in_stripe));
final_length = (start_length == data_size ? 0 : final_offset % stripe_size);
- HDassert(start_length <= stripe_size);
- HDassert(final_length <= stripe_size);
+ assert(start_length <= stripe_size);
+ assert(final_length <= stripe_size);
/*
* Determine which subfile the I/O request begins in and which
@@ -2895,9 +2895,9 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
_target_file_offset = target_file_offset + output_offset;
_io_block_len = io_block_len + output_offset;
- HDmemset(_mem_buf_offset, 0, (max_iovec_len * sizeof(*_mem_buf_offset)));
- HDmemset(_target_file_offset, 0, (max_iovec_len * sizeof(*_target_file_offset)));
- HDmemset(_io_block_len, 0, (max_iovec_len * sizeof(*_io_block_len)));
+ memset(_mem_buf_offset, 0, (max_iovec_len * sizeof(*_mem_buf_offset)));
+ memset(_target_file_offset, 0, (max_iovec_len * sizeof(*_target_file_offset)));
+ memset(_io_block_len, 0, (max_iovec_len * sizeof(*_io_block_len)));
if (total_bytes == data_size) {
*n_subfiles_used = i;
@@ -2960,8 +2960,8 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
}
if (thin_uniform_section) {
- HDassert(iovec_depth > 1);
- HDassert(num_full_stripes > 1);
+ assert(iovec_depth > 1);
+ assert(num_full_stripes > 1);
iovec_depth--;
num_full_stripes--;
@@ -3033,7 +3033,7 @@ init_indep_io(subfiling_context_t *sf_context, int64_t file_offset, size_t io_ne
row_offset += block_size;
}
- HDassert(offset_in_block <= block_size);
+ assert(offset_in_block <= block_size);
}
if (total_bytes != data_size)
@@ -3077,11 +3077,11 @@ iovec_fill_first(subfiling_context_t *sf_context, int64_t iovec_depth, int64_t t
int64_t total_bytes = 0;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(mem_offset_out);
- HDassert(target_file_offset_out);
- HDassert(io_block_len_out);
- HDassert(iovec_depth > 0);
+ assert(sf_context);
+ assert(mem_offset_out);
+ assert(target_file_offset_out);
+ assert(io_block_len_out);
+ assert(iovec_depth > 0);
stripe_size = sf_context->sf_stripe_size;
block_size = sf_context->sf_blocksize_per_stripe;
@@ -3176,11 +3176,11 @@ iovec_fill_last(subfiling_context_t *sf_context, int64_t iovec_depth, int64_t ta
int64_t total_bytes = 0;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(mem_offset_out);
- HDassert(target_file_offset_out);
- HDassert(io_block_len_out);
- HDassert(iovec_depth > 0);
+ assert(sf_context);
+ assert(mem_offset_out);
+ assert(target_file_offset_out);
+ assert(io_block_len_out);
+ assert(iovec_depth > 0);
stripe_size = sf_context->sf_stripe_size;
block_size = sf_context->sf_blocksize_per_stripe;
@@ -3308,11 +3308,11 @@ iovec_fill_first_last(subfiling_context_t *sf_context, int64_t iovec_depth, int6
int64_t total_bytes = 0;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(mem_offset_out);
- HDassert(target_file_offset_out);
- HDassert(io_block_len_out);
- HDassert(iovec_depth > 0);
+ assert(sf_context);
+ assert(mem_offset_out);
+ assert(target_file_offset_out);
+ assert(io_block_len_out);
+ assert(iovec_depth > 0);
stripe_size = sf_context->sf_stripe_size;
block_size = sf_context->sf_blocksize_per_stripe;
@@ -3418,11 +3418,11 @@ iovec_fill_uniform(subfiling_context_t *sf_context, int64_t iovec_depth, int64_t
int64_t total_bytes = 0;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(mem_offset_out);
- HDassert(target_file_offset_out);
- HDassert(io_block_len_out);
- HDassert((iovec_depth > 0) || (target_datasize == 0));
+ assert(sf_context);
+ assert(mem_offset_out);
+ assert(target_file_offset_out);
+ assert(io_block_len_out);
+ assert((iovec_depth > 0) || (target_datasize == 0));
stripe_size = sf_context->sf_stripe_size;
block_size = sf_context->sf_blocksize_per_stripe;
diff --git a/src/H5FDsubfiling/H5subfiling_common.c b/src/H5FDsubfiling/H5subfiling_common.c
index 131f3ce..ea9bafb 100644
--- a/src/H5FDsubfiling/H5subfiling_common.c
+++ b/src/H5FDsubfiling/H5subfiling_common.c
@@ -154,7 +154,7 @@ H5_get_subfiling_object(int64_t object_id)
/* Create subfiling context cache if it doesn't exist */
if (!sf_context_cache) {
- if (NULL == (sf_context_cache = HDcalloc(DEFAULT_CONTEXT_CACHE_SIZE, sizeof(*sf_context_cache))))
+ if (NULL == (sf_context_cache = calloc(DEFAULT_CONTEXT_CACHE_SIZE, sizeof(*sf_context_cache))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"couldn't allocate space for subfiling context cache");
sf_context_cache_size = DEFAULT_CONTEXT_CACHE_SIZE;
@@ -171,7 +171,7 @@ H5_get_subfiling_object(int64_t object_id)
new_size = (sf_context_cache_size * 3) / 2;
- if (NULL == (tmp_realloc = HDrealloc(sf_context_cache, new_size * sizeof(*sf_context_cache))))
+ if (NULL == (tmp_realloc = realloc(sf_context_cache, new_size * sizeof(*sf_context_cache))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"couldn't allocate space for subfiling context cache");
@@ -179,14 +179,14 @@ H5_get_subfiling_object(int64_t object_id)
sf_context_cache_size = new_size;
/* Clear newly-allocated entries */
- HDmemset(&sf_context_cache[old_num_entries], 0,
- (sf_context_cache_size - old_num_entries) * sizeof(*sf_context_cache));
+ memset(&sf_context_cache[old_num_entries], 0,
+ (sf_context_cache_size - old_num_entries) * sizeof(*sf_context_cache));
/*
* If we had to make more space, the given object index
* should always fall within range after a single re-allocation
*/
- HDassert((size_t)obj_index < sf_context_cache_size);
+ assert((size_t)obj_index < sf_context_cache_size);
}
/*
@@ -194,14 +194,14 @@ H5_get_subfiling_object(int64_t object_id)
* application exit, context entry indices should just be
* consecutive
*/
- HDassert((size_t)obj_index <= sf_context_cache_num_entries);
+ assert((size_t)obj_index <= sf_context_cache_num_entries);
if ((size_t)obj_index < sf_context_cache_num_entries)
ret_value = sf_context_cache[obj_index];
else {
- HDassert(!sf_context_cache[sf_context_cache_num_entries]);
+ assert(!sf_context_cache[sf_context_cache_num_entries]);
/* Allocate a new subfiling context object */
- if (NULL == (ret_value = HDcalloc(1, sizeof(subfiling_context_t))))
+ if (NULL == (ret_value = calloc(1, sizeof(subfiling_context_t))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"couldn't allocate subfiling context object");
@@ -211,8 +211,7 @@ H5_get_subfiling_object(int64_t object_id)
else if (obj_type == SF_TOPOLOGY) {
/* Create subfiling topology cache if it doesn't exist */
if (!sf_topology_cache) {
- if (NULL ==
- (sf_topology_cache = HDcalloc(DEFAULT_TOPOLOGY_CACHE_SIZE, sizeof(*sf_topology_cache))))
+ if (NULL == (sf_topology_cache = calloc(DEFAULT_TOPOLOGY_CACHE_SIZE, sizeof(*sf_topology_cache))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"couldn't allocate space for subfiling topology cache");
sf_topology_cache_size = DEFAULT_TOPOLOGY_CACHE_SIZE;
@@ -229,7 +228,7 @@ H5_get_subfiling_object(int64_t object_id)
new_size = (sf_topology_cache_size * 3) / 2;
- if (NULL == (tmp_realloc = HDrealloc(sf_topology_cache, new_size * sizeof(*sf_topology_cache))))
+ if (NULL == (tmp_realloc = realloc(sf_topology_cache, new_size * sizeof(*sf_topology_cache))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"couldn't allocate space for subfiling topology cache");
@@ -237,14 +236,14 @@ H5_get_subfiling_object(int64_t object_id)
sf_topology_cache_size = new_size;
/* Clear newly-allocated entries */
- HDmemset(&sf_topology_cache[old_num_entries], 0,
- (sf_topology_cache_size - old_num_entries) * sizeof(*sf_topology_cache));
+ memset(&sf_topology_cache[old_num_entries], 0,
+ (sf_topology_cache_size - old_num_entries) * sizeof(*sf_topology_cache));
/*
* If we had to make more space, the given object index
* should always fall within range after a single re-allocation
*/
- HDassert((size_t)obj_index < sf_topology_cache_size);
+ assert((size_t)obj_index < sf_topology_cache_size);
}
/*
@@ -252,14 +251,14 @@ H5_get_subfiling_object(int64_t object_id)
* application exit, topology entry indices should just be
* consecutive
*/
- HDassert((size_t)obj_index <= sf_topology_cache_num_entries);
+ assert((size_t)obj_index <= sf_topology_cache_num_entries);
if ((size_t)obj_index < sf_topology_cache_num_entries)
ret_value = sf_topology_cache[obj_index];
else {
- HDassert(!sf_topology_cache[sf_topology_cache_num_entries]);
+ assert(!sf_topology_cache[sf_topology_cache_num_entries]);
/* Allocate a new subfiling topology object */
- if (NULL == (ret_value = HDmalloc(sizeof(sf_topology_t))))
+ if (NULL == (ret_value = malloc(sizeof(sf_topology_t))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL,
"couldn't allocate subfiling topology object");
@@ -268,7 +267,7 @@ H5_get_subfiling_object(int64_t object_id)
}
#ifdef H5_SUBFILING_DEBUG
else
- HDprintf("%s: Unknown subfiling object type for ID %" PRId64 "\n", __func__, object_id);
+ printf("%s: Unknown subfiling object type for ID %" PRId64 "\n", __func__, object_id);
#endif
done:
@@ -308,15 +307,15 @@ H5_free_subfiling_object(int64_t object_id)
if (H5_free_subfiling_object_int(sf_context) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "couldn't free subfiling object");
- HDassert(sf_context_cache_num_entries > 0);
- HDassert(sf_context == sf_context_cache[sf_context_cache_num_entries - 1]);
+ assert(sf_context_cache_num_entries > 0);
+ assert(sf_context == sf_context_cache[sf_context_cache_num_entries - 1]);
sf_context_cache[sf_context_cache_num_entries - 1] = NULL;
sf_context_cache_num_entries--;
}
else {
sf_topology_t *sf_topology;
- HDassert(obj_type == SF_TOPOLOGY);
+ assert(obj_type == SF_TOPOLOGY);
if (NULL == (sf_topology = H5_get_subfiling_object(object_id)))
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL,
@@ -325,8 +324,8 @@ H5_free_subfiling_object(int64_t object_id)
if (H5_free_subfiling_topology(sf_topology) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "couldn't free subfiling topology");
- HDassert(sf_topology_cache_num_entries > 0);
- HDassert(sf_topology == sf_topology_cache[sf_topology_cache_num_entries - 1]);
+ assert(sf_topology_cache_num_entries > 0);
+ assert(sf_topology == sf_topology_cache[sf_topology_cache_num_entries - 1]);
sf_topology_cache[sf_topology_cache_num_entries - 1] = NULL;
sf_topology_cache_num_entries--;
}
@@ -342,7 +341,7 @@ H5_free_subfiling_object_int(subfiling_context_t *sf_context)
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
+ assert(sf_context);
if (MPI_SUCCESS != (mpi_code = MPI_Finalized(&mpi_finalized))) {
/* Assume MPI is finalized or worse, and try to clean up what we can */
@@ -400,16 +399,16 @@ H5_free_subfiling_object_int(subfiling_context_t *sf_context)
sf_context->sf_group_size = -1;
sf_context->sf_group_rank = -1;
- HDfree(sf_context->subfile_prefix);
+ free(sf_context->subfile_prefix);
sf_context->subfile_prefix = NULL;
- HDfree(sf_context->config_file_prefix);
+ free(sf_context->config_file_prefix);
sf_context->config_file_prefix = NULL;
- HDfree(sf_context->h5_filename);
+ free(sf_context->h5_filename);
sf_context->h5_filename = NULL;
- HDfree(sf_context->sf_fids);
+ free(sf_context->sf_fids);
sf_context->sf_fids = NULL;
/*
@@ -420,7 +419,7 @@ H5_free_subfiling_object_int(subfiling_context_t *sf_context)
*/
sf_context->topology = NULL;
- HDfree(sf_context);
+ free(sf_context);
H5_SUBFILING_FUNC_LEAVE;
}
@@ -432,7 +431,7 @@ H5_free_subfiling_topology(sf_topology_t *topology)
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(topology);
+ assert(topology);
if (MPI_SUCCESS != (mpi_code = MPI_Finalized(&mpi_finalized))) {
/* Assume MPI is finalized or worse, but clean up what we can */
@@ -448,7 +447,7 @@ H5_free_subfiling_topology(sf_topology_t *topology)
for (size_t i = 0; i < sf_topology_cache_num_entries; i++)
if (topology == sf_topology_cache[i])
topology_cached = TRUE;
- HDassert(topology_cached);
+ assert(topology_cached);
}
#endif
@@ -456,25 +455,25 @@ H5_free_subfiling_topology(sf_topology_t *topology)
topology->n_io_concentrators = 0;
if (topology->app_layout) {
- HDfree(topology->app_layout->layout);
+ free(topology->app_layout->layout);
topology->app_layout->layout = NULL;
- HDfree(topology->app_layout->node_ranks);
+ free(topology->app_layout->node_ranks);
topology->app_layout->node_ranks = NULL;
- HDfree(topology->app_layout);
+ free(topology->app_layout);
}
topology->app_layout = NULL;
- HDfree(topology->io_concentrators);
+ free(topology->io_concentrators);
topology->io_concentrators = NULL;
if (!mpi_finalized)
if (H5_mpi_comm_free(&topology->app_comm) < 0)
H5_SUBFILING_DONE_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "can't free MPI communicator");
- HDfree(topology);
+ free(topology);
H5_SUBFILING_FUNC_LEAVE;
}
@@ -674,7 +673,7 @@ H5_open_subfiles(const char *base_filename, uint64_t file_id, H5FD_subfiling_par
HDsnprintf(sf_context->sf_logfile_name, PATH_MAX, "%s.log.%d", sf_context->h5_filename, mpi_rank);
- if (NULL == (sf_context->sf_logfile = HDfopen(sf_context->sf_logfile_name, "a")))
+ if (NULL == (sf_context->sf_logfile = fopen(sf_context->sf_logfile_name, "a")))
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL,
"couldn't open subfiling debug logfile");
@@ -758,7 +757,7 @@ init_subfiling(const char *base_filename, uint64_t file_id, H5FD_subfiling_param
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(context_id_out);
+ assert(context_id_out);
if (MPI_SUCCESS != (mpi_code = MPI_Comm_rank(comm, &mpi_rank)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Comm_rank failed", mpi_code);
@@ -960,11 +959,11 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(subfiling_config);
- HDassert(MPI_COMM_NULL != comm);
- HDassert(MPI_COMM_NULL != node_comm);
- HDassert(app_topology_out);
- HDassert(!*app_topology_out);
+ assert(subfiling_config);
+ assert(MPI_COMM_NULL != comm);
+ assert(MPI_COMM_NULL != node_comm);
+ assert(app_topology_out);
+ assert(!*app_topology_out);
if (MPI_SUCCESS != (mpi_code = MPI_Comm_rank(comm, &comm_rank)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Comm_rank failed", mpi_code);
@@ -990,7 +989,7 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_
errno = 0;
ioc_select_val = HDstrtol(env_value, NULL, 0);
if ((ERANGE == errno)) {
- HDprintf("invalid value '%s' for " H5FD_SUBFILING_IOC_PER_NODE "\n", env_value);
+ printf("invalid value '%s' for " H5FD_SUBFILING_IOC_PER_NODE "\n", env_value);
ioc_select_val = 1;
}
@@ -1017,9 +1016,9 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_
errno = 0;
ioc_select_val = HDstrtol(ioc_sel_str, NULL, 0);
if ((ERANGE == errno) || (ioc_select_val <= 0)) {
- HDprintf("invalid IOC selection strategy string '%s' for strategy "
- "SELECT_IOC_EVERY_NTH_RANK; defaulting to SELECT_IOC_ONE_PER_NODE\n",
- ioc_sel_str);
+ printf("invalid IOC selection strategy string '%s' for strategy "
+ "SELECT_IOC_EVERY_NTH_RANK; defaulting to SELECT_IOC_ONE_PER_NODE\n",
+ ioc_sel_str);
ioc_select_val = 1;
ioc_selection_type = SELECT_IOC_ONE_PER_NODE;
@@ -1053,9 +1052,9 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_
errno = 0;
ioc_select_val = HDstrtol(ioc_sel_str, NULL, 0);
if ((ERANGE == errno) || (ioc_select_val <= 0)) {
- HDprintf("invalid IOC selection strategy string '%s' for strategy SELECT_IOC_TOTAL; "
- "defaulting to SELECT_IOC_ONE_PER_NODE\n",
- ioc_sel_str);
+ printf("invalid IOC selection strategy string '%s' for strategy SELECT_IOC_TOTAL; "
+ "defaulting to SELECT_IOC_ONE_PER_NODE\n",
+ ioc_sel_str);
ioc_select_val = 1;
ioc_selection_type = SELECT_IOC_ONE_PER_NODE;
@@ -1099,7 +1098,7 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_
if (find_cached_topology_info(comm, subfiling_config, iocs_per_node, &app_topology) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL,
"can't check for cached subfiling topology object");
- HDassert(!app_topology || (app_topology->selection_type == ioc_selection_type));
+ assert(!app_topology || (app_topology->selection_type == ioc_selection_type));
if (!app_topology) {
/* Generate an ID for the application topology object */
@@ -1122,10 +1121,10 @@ init_app_topology(H5FD_subfiling_params_t *subfiling_config, MPI_Comm comm, MPI_
if (init_app_layout(app_topology, comm, node_comm) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "couldn't initialize application layout");
- HDassert(app_topology->app_layout);
- HDassert(app_topology->app_layout->layout);
- HDassert(app_topology->app_layout->node_ranks);
- HDassert(app_topology->app_layout->node_count > 0);
+ assert(app_topology->app_layout);
+ assert(app_topology->app_layout->layout);
+ assert(app_topology->app_layout->node_ranks);
+ assert(app_topology->app_layout->node_count > 0);
/*
* Now that the application node count has been determined, adjust the
@@ -1187,8 +1186,8 @@ get_ioc_selection_criteria_from_env(H5FD_subfiling_ioc_select_t *ioc_selection_t
char *env_value = HDgetenv(H5FD_SUBFILING_IOC_SELECTION_CRITERIA);
herr_t ret_value = SUCCEED;
- HDassert(ioc_selection_type);
- HDassert(ioc_sel_info_str);
+ assert(ioc_selection_type);
+ assert(ioc_sel_info_str);
*ioc_sel_info_str = NULL;
@@ -1260,7 +1259,7 @@ find_cached_topology_info(MPI_Comm comm, H5FD_subfiling_params_t *subf_config, l
int32_t stripe_count;
herr_t ret_value = SUCCEED;
- HDassert(subf_config);
+ assert(subf_config);
ioc_selection_type = subf_config->ioc_selection;
stripe_count = subf_config->stripe_count;
@@ -1270,7 +1269,7 @@ find_cached_topology_info(MPI_Comm comm, H5FD_subfiling_params_t *subf_config, l
int result;
int mpi_code;
- HDassert(cached_topology);
+ assert(cached_topology);
/*
* If the selection types differ, just reject the cached topology
@@ -1290,8 +1289,8 @@ find_cached_topology_info(MPI_Comm comm, H5FD_subfiling_params_t *subf_config, l
}
if (cached_topology->selection_type == SELECT_IOC_ONE_PER_NODE) {
- HDassert(iocs_per_node >= 1);
- HDassert(cached_topology->app_layout->node_count > 0);
+ assert(iocs_per_node >= 1);
+ assert(cached_topology->app_layout->node_count > 0);
/*
* If a IOCs-per-node setting was set in the environment and would
@@ -1333,12 +1332,12 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm)
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(app_topology);
- HDassert(!app_topology->app_layout);
- HDassert(MPI_COMM_NULL != comm);
- HDassert(MPI_COMM_NULL != node_comm);
+ assert(app_topology);
+ assert(!app_topology->app_layout);
+ assert(MPI_COMM_NULL != comm);
+ assert(MPI_COMM_NULL != node_comm);
- if (NULL == (app_layout = HDcalloc(1, sizeof(*app_layout))))
+ if (NULL == (app_layout = calloc(1, sizeof(*app_layout))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate application layout structure");
@@ -1351,7 +1350,7 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm)
if (MPI_SUCCESS != (mpi_code = MPI_Comm_size(node_comm, &app_layout->node_local_size)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Comm_size failed", mpi_code);
- if (NULL == (app_layout->layout = HDmalloc((size_t)app_layout->world_size * sizeof(*app_layout->layout))))
+ if (NULL == (app_layout->layout = malloc((size_t)app_layout->world_size * sizeof(*app_layout->layout))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate application layout array");
@@ -1371,10 +1370,10 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm)
if (app_layout->layout[i].node_local_rank == 0)
app_layout->node_count++;
- HDassert(app_layout->node_count > 0);
+ assert(app_layout->node_count > 0);
if (NULL ==
- (app_layout->node_ranks = HDmalloc((size_t)app_layout->node_count * sizeof(*app_layout->node_ranks))))
+ (app_layout->node_ranks = malloc((size_t)app_layout->node_count * sizeof(*app_layout->node_ranks))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate application layout node rank array");
@@ -1384,7 +1383,7 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm)
*/
for (size_t i = 0, node_rank_index = 0; i < (size_t)app_layout->world_size; i++) {
if (app_layout->layout[i].node_local_rank == 0) {
- HDassert(node_rank_index < (size_t)app_layout->node_count);
+ assert(node_rank_index < (size_t)app_layout->node_count);
app_layout->node_ranks[node_rank_index++] = app_layout->layout[i].rank;
}
}
@@ -1394,9 +1393,9 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm)
done:
if (ret_value < 0) {
if (app_layout) {
- HDfree(app_layout->layout);
- HDfree(app_layout->node_ranks);
- HDfree(app_layout);
+ free(app_layout->layout);
+ free(app_layout->node_ranks);
+ free(app_layout);
}
}
@@ -1429,9 +1428,9 @@ gather_topology_info(app_layout_t *app_layout, MPI_Comm comm, MPI_Comm intra_com
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(app_layout);
- HDassert(app_layout->layout);
- HDassert(MPI_COMM_NULL != comm);
+ assert(app_layout);
+ assert(app_layout->layout);
+ assert(MPI_COMM_NULL != comm);
sf_world_rank = app_layout->world_rank;
sf_world_size = app_layout->world_size;
@@ -1482,7 +1481,7 @@ gather_topology_info(app_layout_t *app_layout, MPI_Comm comm, MPI_Comm intra_com
#else
int aggr_comm_size = 0;
- HDassert(MPI_COMM_NULL != intra_comm);
+ assert(MPI_COMM_NULL != intra_comm);
/* Split the file communicator into a sub-group of one rank per node */
if (MPI_SUCCESS != (mpi_code = MPI_Comm_split(comm, node_local_rank, sf_world_rank, &aggr_comm)))
@@ -1494,7 +1493,7 @@ gather_topology_info(app_layout_t *app_layout, MPI_Comm comm, MPI_Comm intra_com
/* Allocate a partial layout info array to aggregate into from node-local ranks */
if (node_local_rank == 0) {
if (NULL ==
- (layout_info_partial = HDmalloc((size_t)node_local_size * sizeof(*layout_info_partial))))
+ (layout_info_partial = malloc((size_t)node_local_size * sizeof(*layout_info_partial))))
/* Push error, but participate in gather operation */
H5_SUBFILING_DONE_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate layout info array");
@@ -1509,10 +1508,10 @@ gather_topology_info(app_layout_t *app_layout, MPI_Comm comm, MPI_Comm intra_com
if (node_local_rank == 0) {
int send_size = 4 * node_local_size;
- if (NULL == (recv_counts = HDmalloc((size_t)aggr_comm_size * sizeof(*recv_counts))))
+ if (NULL == (recv_counts = malloc((size_t)aggr_comm_size * sizeof(*recv_counts))))
H5_SUBFILING_DONE_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate receive counts array");
- if (NULL == (recv_displs = HDmalloc((size_t)aggr_comm_size * sizeof(*recv_displs))))
+ if (NULL == (recv_displs = malloc((size_t)aggr_comm_size * sizeof(*recv_displs))))
H5_SUBFILING_DONE_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate receive displacements array");
@@ -1529,8 +1528,8 @@ gather_topology_info(app_layout_t *app_layout, MPI_Comm comm, MPI_Comm intra_com
recv_counts, recv_displs, MPI_INT, aggr_comm)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Allgatherv failed", mpi_code);
- HDfree(recv_displs);
- HDfree(recv_counts);
+ free(recv_displs);
+ free(recv_counts);
recv_displs = NULL;
recv_counts = NULL;
}
@@ -1546,9 +1545,9 @@ gather_topology_info(app_layout_t *app_layout, MPI_Comm comm, MPI_Comm intra_com
}
done:
- HDfree(recv_displs);
- HDfree(recv_counts);
- HDfree(layout_info_partial);
+ free(recv_displs);
+ free(recv_counts);
+ free(layout_info_partial);
if (H5_mpi_comm_free(&aggr_comm) < 0)
H5_SUBFILING_DONE_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "can't free MPI communicator");
@@ -1613,19 +1612,19 @@ identify_ioc_ranks(sf_topology_t *app_topology, int rank_stride)
int max_iocs = 0;
herr_t ret_value = SUCCEED;
- HDassert(app_topology);
- HDassert(!app_topology->io_concentrators);
- HDassert(app_topology->n_io_concentrators > 0);
- HDassert(app_topology->app_layout);
- HDassert(app_topology->app_layout->layout);
- HDassert(app_topology->app_layout->node_count > 0);
+ assert(app_topology);
+ assert(!app_topology->io_concentrators);
+ assert(app_topology->n_io_concentrators > 0);
+ assert(app_topology->app_layout);
+ assert(app_topology->app_layout->layout);
+ assert(app_topology->app_layout->node_count > 0);
app_layout = app_topology->app_layout;
max_iocs = app_topology->n_io_concentrators;
- if (NULL == (app_topology->io_concentrators =
- HDmalloc((size_t)max_iocs * sizeof(*app_topology->io_concentrators))))
+ if (NULL ==
+ (app_topology->io_concentrators = malloc((size_t)max_iocs * sizeof(*app_topology->io_concentrators))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate array of I/O concentrator ranks");
@@ -1639,13 +1638,13 @@ identify_ioc_ranks(sf_topology_t *app_topology, int rank_stride)
if (app_topology->n_io_concentrators > app_layout->node_count)
iocs_per_node = app_topology->n_io_concentrators / app_layout->node_count;
- HDassert(app_layout->node_ranks);
+ assert(app_layout->node_ranks);
for (size_t i = 0; i < (size_t)app_layout->node_count; i++) {
int node_index = app_layout->node_ranks[i];
int local_size = app_layout->layout[node_index].node_local_size;
- HDassert(total_ioc_count < app_topology->n_io_concentrators);
+ assert(total_ioc_count < app_topology->n_io_concentrators);
io_concentrators[total_ioc_count] = app_layout->layout[node_index++].rank;
if (app_layout->world_rank == io_concentrators[total_ioc_count]) {
@@ -1661,7 +1660,7 @@ identify_ioc_ranks(sf_topology_t *app_topology, int rank_stride)
if (j >= (size_t)local_size)
break;
- HDassert(total_ioc_count < app_topology->n_io_concentrators);
+ assert(total_ioc_count < app_topology->n_io_concentrators);
io_concentrators[total_ioc_count] = app_layout->layout[node_index++].rank;
if (app_layout->world_rank == io_concentrators[total_ioc_count]) {
@@ -1687,7 +1686,7 @@ identify_ioc_ranks(sf_topology_t *app_topology, int rank_stride)
int num_iocs_assigned = 0;
int world_size = app_layout->world_size;
- HDassert(rank_stride > 0);
+ assert(rank_stride > 0);
for (int i = 0; num_iocs_assigned < max_iocs; num_iocs_assigned++) {
int ioc_index = rank_stride * i++;
@@ -1721,7 +1720,7 @@ identify_ioc_ranks(sf_topology_t *app_topology, int rank_stride)
done:
if (ret_value < 0) {
if (app_topology)
- HDfree(app_topology->io_concentrators);
+ free(app_topology->io_concentrators);
}
H5_SUBFILING_FUNC_LEAVE;
@@ -1751,15 +1750,15 @@ init_subfiling_context(subfiling_context_t *sf_context, const char *base_filenam
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(sf_context->topology == NULL);
- HDassert(sf_context->sf_context_id >= 0);
- HDassert(base_filename);
- HDassert(file_id != UINT64_MAX);
- HDassert(subfiling_config);
- HDassert(app_topology);
- HDassert(app_topology->n_io_concentrators > 0);
- HDassert(MPI_COMM_NULL != file_comm);
+ assert(sf_context);
+ assert(sf_context->topology == NULL);
+ assert(sf_context->sf_context_id >= 0);
+ assert(base_filename);
+ assert(file_id != UINT64_MAX);
+ assert(subfiling_config);
+ assert(app_topology);
+ assert(app_topology->n_io_concentrators > 0);
+ assert(MPI_COMM_NULL != file_comm);
sf_context->h5_file_id = file_id;
sf_context->sf_fids = NULL;
@@ -1835,7 +1834,7 @@ init_subfiling_context(subfiling_context_t *sf_context, const char *base_filenam
sf_context->sf_num_fids++;
if (NULL ==
- (sf_context->sf_fids = HDmalloc((size_t)sf_context->sf_num_fids * sizeof(*sf_context->sf_fids))))
+ (sf_context->sf_fids = malloc((size_t)sf_context->sf_num_fids * sizeof(*sf_context->sf_fids))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't allocate subfile IDs array");
for (int i = 0; i < sf_context->sf_num_fids; i++)
@@ -1890,7 +1889,7 @@ init_subfiling_context(subfiling_context_t *sf_context, const char *base_filenam
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid subfiling stripe count (%d)",
sf_context->sf_num_subfiles);
- HDassert(sf_context->sf_num_subfiles >= app_topology->n_io_concentrators);
+ assert(sf_context->sf_num_subfiles >= app_topology->n_io_concentrators);
done:
H5_SUBFILING_FUNC_LEAVE;
@@ -1934,8 +1933,8 @@ open_subfile_with_context(subfiling_context_t *sf_context, int file_acc_flags)
{
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(sf_context->h5_file_id != UINT64_MAX);
+ assert(sf_context);
+ assert(sf_context->h5_file_id != UINT64_MAX);
/*
* Save the HDF5 file ID (e.g., inode) to subfile context mapping.
@@ -1998,8 +1997,7 @@ record_fid_to_subfile(uint64_t file_id, int64_t subfile_context_id, int *next_in
herr_t ret_value = SUCCEED;
if (!sf_open_file_map) {
- if (NULL ==
- (sf_open_file_map = HDmalloc((size_t)DEFAULT_FILE_MAP_ENTRIES * sizeof(*sf_open_file_map))))
+ if (NULL == (sf_open_file_map = malloc((size_t)DEFAULT_FILE_MAP_ENTRIES * sizeof(*sf_open_file_map))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't allocate open file mapping");
sf_file_map_size = DEFAULT_FILE_MAP_ENTRIES;
@@ -2028,8 +2026,8 @@ record_fid_to_subfile(uint64_t file_id, int64_t subfile_context_id, int *next_in
if (index == sf_file_map_size) {
void *tmp_realloc;
- if (NULL == (tmp_realloc = HDrealloc(sf_open_file_map,
- ((size_t)(sf_file_map_size * 2) * sizeof(*sf_open_file_map)))))
+ if (NULL == (tmp_realloc = realloc(sf_open_file_map,
+ ((size_t)(sf_file_map_size * 2) * sizeof(*sf_open_file_map)))))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't reallocate open file mapping");
@@ -2133,13 +2131,13 @@ ioc_open_files(int64_t file_context_id, int file_acc_flags)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL,
"couldn't get subfiling object from context ID");
- HDassert(sf_context->h5_file_id != UINT64_MAX);
- HDassert(sf_context->h5_filename);
- HDassert(sf_context->sf_fids);
- HDassert(sf_context->sf_num_subfiles > 0);
- HDassert(sf_context->sf_num_fids > 0);
- HDassert(sf_context->topology);
- HDassert(sf_context->topology->ioc_idx >= 0); /* Only IOC ranks should be here */
+ assert(sf_context->h5_file_id != UINT64_MAX);
+ assert(sf_context->h5_filename);
+ assert(sf_context->sf_fids);
+ assert(sf_context->sf_num_subfiles > 0);
+ assert(sf_context->sf_num_fids > 0);
+ assert(sf_context->topology);
+ assert(sf_context->topology->ioc_idx >= 0); /* Only IOC ranks should be here */
/* Get the basename of the full HDF5 filename */
if (H5_basename(sf_context->h5_filename, &base) < 0)
@@ -2160,7 +2158,7 @@ ioc_open_files(int64_t file_context_id, int file_acc_flags)
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't get HDF5 file dirname");
}
- if (NULL == (filepath = HDmalloc(PATH_MAX)))
+ if (NULL == (filepath = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate space for subfile filename");
@@ -2233,7 +2231,7 @@ done:
H5MM_free(base);
H5MM_free(subfile_dir);
- HDfree(filepath);
+ free(filepath);
H5_SUBFILING_FUNC_LEAVE;
}
@@ -2266,10 +2264,10 @@ create_config_file(subfiling_context_t *sf_context, const char *base_filename, c
int ret = 0;
herr_t ret_value = SUCCEED;
- HDassert(sf_context);
- HDassert(base_filename);
- HDassert(config_dir);
- HDassert(subfile_dir);
+ assert(sf_context);
+ assert(base_filename);
+ assert(config_dir);
+ assert(subfile_dir);
if (sf_context->h5_file_id == UINT64_MAX)
H5_SUBFILING_GOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "invalid HDF5 file ID %" PRIu64,
@@ -2282,7 +2280,7 @@ create_config_file(subfiling_context_t *sf_context, const char *base_filename, c
if (*subfile_dir == '\0')
subfile_dir = ".";
- if (NULL == (config_filename = HDmalloc(PATH_MAX)))
+ if (NULL == (config_filename = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate space for subfiling configuration filename");
@@ -2309,11 +2307,11 @@ create_config_file(subfiling_context_t *sf_context, const char *base_filename, c
int n_subfiles = sf_context->sf_num_subfiles;
int num_digits;
- if (NULL == (config_file = HDfopen(config_filename, "w+")))
+ if (NULL == (config_file = fopen(config_filename, "w+")))
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL,
"couldn't create/truncate subfiling configuration file");
- if (NULL == (line_buf = HDmalloc(PATH_MAX)))
+ if (NULL == (line_buf = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate buffer for writing to subfiling configuration file");
@@ -2366,8 +2364,8 @@ done:
"couldn't close subfiling configuration file");
}
- HDfree(line_buf);
- HDfree(config_filename);
+ free(line_buf);
+ free(config_filename);
H5_SUBFILING_FUNC_LEAVE;
}
@@ -2396,11 +2394,11 @@ open_config_file(const char *base_filename, const char *config_dir, uint64_t fil
int ret = 0;
herr_t ret_value = SUCCEED;
- HDassert(base_filename);
- HDassert(config_dir);
- HDassert(file_id != UINT64_MAX);
- HDassert(mode);
- HDassert(config_file_out);
+ assert(base_filename);
+ assert(config_dir);
+ assert(file_id != UINT64_MAX);
+ assert(mode);
+ assert(config_file_out);
*config_file_out = NULL;
@@ -2410,7 +2408,7 @@ open_config_file(const char *base_filename, const char *config_dir, uint64_t fil
if (*config_dir == '\0')
config_dir = ".";
- if (NULL == (config_filename = HDmalloc(PATH_MAX)))
+ if (NULL == (config_filename = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate space for subfiling configuration filename");
@@ -2430,7 +2428,7 @@ open_config_file(const char *base_filename, const char *config_dir, uint64_t fil
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL,
"couldn't check existence of subfiling configuration file");
- if (NULL == (config_file = HDfopen(config_filename, mode)))
+ if (NULL == (config_file = fopen(config_filename, mode)))
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL,
"couldn't open subfiling configuration file");
@@ -2443,7 +2441,7 @@ done:
"couldn't close subfiling configuration file");
}
- HDfree(config_filename);
+ free(config_filename);
H5_SUBFILING_FUNC_LEAVE;
}
@@ -2468,7 +2466,7 @@ H5_get_subfiling_config_from_file(FILE *config_file, int64_t *stripe_size, int64
long config_file_len = 0;
herr_t ret_value = SUCCEED;
- HDassert(config_file);
+ assert(config_file);
if (HDfseek(config_file, 0, SEEK_END) < 0)
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_SEEKERROR, FAIL,
@@ -2482,7 +2480,7 @@ H5_get_subfiling_config_from_file(FILE *config_file, int64_t *stripe_size, int64
H5_SUBFILING_SYS_GOTO_ERROR(H5E_FILE, H5E_SEEKERROR, FAIL,
"couldn't seek to beginning of subfiling configuration file");
- if (NULL == (config_buf = HDmalloc((size_t)config_file_len + 1)))
+ if (NULL == (config_buf = malloc((size_t)config_file_len + 1)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"couldn't allocate space for reading from subfiling configuration file");
@@ -2528,7 +2526,7 @@ H5_get_subfiling_config_from_file(FILE *config_file, int64_t *stripe_size, int64
}
done:
- HDfree(config_buf);
+ free(config_buf);
H5_SUBFILING_FUNC_LEAVE;
}
@@ -2542,7 +2540,7 @@ done:
* between MPI ranks.
*
* The resolved filepath returned through `resolved_filepath`
- * must be freed by the caller with HDfree.
+ * must be freed by the caller with free.
*
* Return Non-negative on success/Negative on failure
*
@@ -2563,8 +2561,8 @@ H5_resolve_pathname(const char *filepath, MPI_Comm comm, char **resolved_filepat
int mpi_code;
herr_t ret_value = SUCCEED;
- HDassert(filepath);
- HDassert(resolved_filepath);
+ assert(filepath);
+ assert(resolved_filepath);
if (MPI_SUCCESS != (mpi_code = MPI_Comm_rank(comm, &mpi_rank)))
H5_SUBFILING_MPI_GOTO_ERROR(FAIL, "MPI_Comm_rank failed", mpi_code);
@@ -2579,12 +2577,12 @@ H5_resolve_pathname(const char *filepath, MPI_Comm comm, char **resolved_filepat
/* If filepath is just the filename, set up path using CWD */
if (!HDstrcmp(file_dirname, ".")) {
- if (NULL == (resolved_path = HDmalloc(PATH_MAX)))
+ if (NULL == (resolved_path = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate buffer for filepath");
if (H5_basename(filepath, &file_basename) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't get file basename");
- if (NULL == (cwd = HDmalloc(PATH_MAX)))
+ if (NULL == (cwd = malloc(PATH_MAX)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate buffer for CWD");
@@ -2626,7 +2624,7 @@ H5_resolve_pathname(const char *filepath, MPI_Comm comm, char **resolved_filepat
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "couldn't resolve filepath");
if (mpi_rank != 0) {
- if (NULL == (resolved_path = HDmalloc(path_len)))
+ if (NULL == (resolved_path = malloc(path_len)))
H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate file name buffer");
}
@@ -2641,7 +2639,7 @@ H5_resolve_pathname(const char *filepath, MPI_Comm comm, char **resolved_filepat
*resolved_filepath = resolved_path;
done:
- HDfree(cwd);
+ free(cwd);
H5MM_free(file_basename);
H5MM_free(file_dirname);
@@ -2656,7 +2654,7 @@ done:
H5_SUBFILING_MPI_DONE_ERROR(FAIL, "MPI_Bcast failed", mpi_code);
}
- HDfree(resolved_path);
+ free(resolved_path);
}
H5_SUBFILING_FUNC_LEAVE;
@@ -3086,7 +3084,7 @@ H5_subfiling_terminate(void)
sf_context_cache_size = 0;
sf_context_cache_num_entries = 0;
- HDfree(sf_context_cache);
+ free(sf_context_cache);
sf_context_cache = NULL;
}
if (sf_topology_cache) {
@@ -3100,13 +3098,13 @@ H5_subfiling_terminate(void)
sf_topology_cache_size = 0;
sf_topology_cache_num_entries = 0;
- HDfree(sf_topology_cache);
+ free(sf_topology_cache);
sf_topology_cache = NULL;
}
/* Clean up the file ID to context object mapping */
sf_file_map_size = 0;
- HDfree(sf_open_file_map);
+ free(sf_open_file_map);
sf_open_file_map = NULL;
done:
@@ -3124,7 +3122,7 @@ H5_subfiling_log(int64_t sf_context_id, const char *fmt, ...)
/* Retrieve the subfiling object for the newly-created context ID */
if (NULL == (sf_context = H5_get_subfiling_object(sf_context_id))) {
- HDprintf("%s: couldn't get subfiling object from context ID\n", __func__);
+ printf("%s: couldn't get subfiling object from context ID\n", __func__);
goto done;
}
@@ -3133,12 +3131,12 @@ H5_subfiling_log(int64_t sf_context_id, const char *fmt, ...)
if (sf_context->sf_logfile) {
HDvfprintf(sf_context->sf_logfile, fmt, log_args);
HDfputs("\n", sf_context->sf_logfile);
- HDfflush(sf_context->sf_logfile);
+ fflush(sf_context->sf_logfile);
}
else {
HDvprintf(fmt, log_args);
HDputs("");
- HDfflush(stdout);
+ fflush(stdout);
}
H5FD_ioc_end_thread_exclusive();
diff --git a/src/H5FL.c b/src/H5FL.c
index 9cc8dd2..1e4bdd5 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -198,9 +198,9 @@ H5FL_term_package(void)
/* Dump information about all the outstanding allocations */
while (trk != NULL) {
/* Print information about the outstanding block */
- HDfprintf(stderr, "%s: Outstanding allocation:\n", __func__);
- HDfprintf(stderr, "\tPtr: %p, File: %s, Function: %s, Line: %d\n",
- (((unsigned char *)trk) + sizeof(H5FL_track_t)), trk->file, trk->func, trk->line);
+ fprintf(stderr, "%s: Outstanding allocation:\n", __func__);
+ fprintf(stderr, "\tPtr: %p, File: %s, Function: %s, Line: %d\n",
+ (((unsigned char *)trk) + sizeof(H5FL_track_t)), trk->file, trk->func, trk->line);
H5CS_print_stack(trk->stack, stderr);
/* Advance to next node */
@@ -319,8 +319,8 @@ H5FL_reg_free(H5FL_reg_head_t *head, void *obj)
FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
- HDassert(head);
- HDassert(obj);
+ assert(head);
+ assert(obj);
#ifdef H5FL_TRACK
{
@@ -349,11 +349,11 @@ H5FL_reg_free(H5FL_reg_head_t *head, void *obj)
#endif /* H5FL_TRACK */
#ifdef H5FL_DEBUG
- HDmemset(obj, 255, head->size);
+ memset(obj, 255, head->size);
#endif /* H5FL_DEBUG */
/* Make certain that the free list is initialized */
- HDassert(head->init);
+ assert(head->init);
/* Link into the free list */
((H5FL_reg_node_t *)obj)->next = head->list;
@@ -403,7 +403,7 @@ H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
+ assert(head);
/* Make certain the list is initialized first */
if (!head->init)
@@ -436,7 +436,7 @@ H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
#ifdef H5FL_TRACK
/* Copy allocation location information */
((H5FL_track_t *)ret_value)->stack = H5CS_copy_stack();
- HDassert(((H5FL_track_t *)ret_value)->stack);
+ assert(((H5FL_track_t *)ret_value)->stack);
/* The 'call_func' & 'call_file' strings are statically allocated (by the compiler)
* there's no need to duplicate them.
*/
@@ -480,7 +480,7 @@ H5FL_reg_calloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
+ assert(head);
/* Allocate the block */
if (NULL == (ret_value = H5FL_reg_malloc(head H5FL_TRACK_INFO_INT)))
@@ -488,7 +488,7 @@ H5FL_reg_calloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
/* Clear to zeros */
/* (Accommodate tracking information, if present) */
- HDmemset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
+ memset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -575,7 +575,7 @@ H5FL__reg_gc(void)
} /* end while */
/* Double check that all the memory on the free lists is recycled */
- HDassert(H5FL_reg_gc_head.mem_freed == 0);
+ assert(H5FL_reg_gc_head.mem_freed == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -622,8 +622,8 @@ H5FL__reg_term(void)
tmp = H5FL_reg_gc_head.first->next;
#ifdef H5FL_DEBUG
- HDprintf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_reg_gc_head.first->list->name,
- (int)H5FL_reg_gc_head.first->list->allocated);
+ printf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_reg_gc_head.first->list->name,
+ (int)H5FL_reg_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
/* Check if the list has allocations outstanding */
if (H5FL_reg_gc_head.first->list->allocated > 0) {
@@ -814,7 +814,7 @@ H5FL_blk_free_block_avail(H5FL_blk_head_t *head, size_t size)
FUNC_ENTER_NOAPI_NOERR
/* Double check parameters */
- HDassert(head);
+ assert(head);
/* check if there is a free list for blocks of this size */
/* and if there are any blocks available on the list */
@@ -852,8 +852,8 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
- HDassert(size);
+ assert(head);
+ assert(size);
/* Make certain the list is initialized first */
if (!head->init)
@@ -881,7 +881,7 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
if (NULL == free_list)
/* Create a new list node and insert it to the queue */
free_list = H5FL__blk_create_list(&(head->head), size);
- HDassert(free_list);
+ assert(free_list);
/* Allocate new node, with room for the page info header and the actual page data */
if (NULL ==
@@ -904,7 +904,7 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
#ifdef H5FL_TRACK
/* Copy allocation location information */
((H5FL_track_t *)ret_value)->stack = H5CS_copy_stack();
- HDassert(((H5FL_track_t *)ret_value)->stack);
+ assert(((H5FL_track_t *)ret_value)->stack);
/* The 'call_func' & 'call_file' strings are statically allocated (by the compiler)
* there's no need to duplicate them.
*/
@@ -952,15 +952,15 @@ H5FL_blk_calloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
- HDassert(size);
+ assert(head);
+ assert(size);
/* Allocate the block */
if (NULL == (ret_value = H5FL_blk_malloc(head, size H5FL_TRACK_INFO_INT)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear the block to zeros */
- HDmemset(ret_value, 0, size);
+ memset(ret_value, 0, size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -995,15 +995,15 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
- HDassert(head);
- HDassert(block);
+ assert(head);
+ assert(block);
#ifdef H5FL_TRACK
{
unsigned char *block_ptr = ((unsigned char *)block) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- HDmemcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Free tracking information about the allocation location */
H5CS_close_stack(trk.stack);
@@ -1025,7 +1025,7 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
trk.next->prev = trk.prev;
} /* end else */
- HDmemcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
}
#endif /* H5FL_TRACK */
@@ -1039,7 +1039,7 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
free_size = temp->size;
#ifdef H5FL_DEBUG
- HDmemset(temp, 255, free_size + sizeof(H5FL_blk_list_t) + H5FL_TRACK_SIZE);
+ memset(temp, 255, free_size + sizeof(H5FL_blk_list_t) + H5FL_TRACK_SIZE);
#endif /* H5FL_DEBUG */
/* Check if there is a free list for native blocks of this size */
@@ -1099,8 +1099,8 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
- HDassert(new_size);
+ assert(head);
+ assert(new_size);
/* Check if we are actually re-allocating a block */
if (block != NULL) {
@@ -1128,7 +1128,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
unsigned char *block_ptr = ((unsigned char *)block) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- HDmemcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Release previous tracking information */
H5CS_close_stack(trk.stack);
@@ -1140,7 +1140,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
/* Store new tracking information */
trk.stack = H5CS_copy_stack();
- HDassert(trk.stack);
+ assert(trk.stack);
/* The 'call_func' & 'call_file' strings are statically allocated (by the compiler)
* there's no need to duplicate them.
*/
@@ -1148,7 +1148,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
trk.func = call_func;
trk.line = call_line;
- HDmemcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
}
#endif /* H5FL_TRACK */
ret_value = block;
@@ -1189,7 +1189,7 @@ H5FL__blk_gc_list(H5FL_blk_head_t *head)
H5FL_blk_list_t *list; /* The free list of native nodes of a particular size */
/* Sanity check */
- HDassert((blk_head->onlist && blk_head->list) || (0 == blk_head->onlist && NULL == blk_head->list));
+ assert((blk_head->onlist && blk_head->list) || (0 == blk_head->onlist && NULL == blk_head->list));
/* Loop through all the blocks in the free list, freeing them */
list = blk_head->list;
@@ -1245,7 +1245,7 @@ H5FL__blk_gc_list(H5FL_blk_head_t *head)
head->onlist = 0;
/* Double check that all the memory on this list is recycled */
- HDassert(0 == head->list_mem);
+ assert(0 == head->list_mem);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FL__blk_gc_list() */
@@ -1283,7 +1283,7 @@ H5FL__blk_gc(void)
} /* end while */
/* Double check that all the memory on the free lists are recycled */
- HDassert(H5FL_blk_gc_head.mem_freed == 0);
+ assert(H5FL_blk_gc_head.mem_freed == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1323,8 +1323,8 @@ H5FL__blk_term(void)
tmp = H5FL_blk_gc_head.first->next;
#ifdef H5FL_DEBUG
- HDprintf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_blk_gc_head.first->pq->name,
- (int)H5FL_blk_gc_head.first->pq->allocated);
+ printf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_blk_gc_head.first->pq->name,
+ (int)H5FL_blk_gc_head.first->pq->allocated);
#endif /* H5FL_DEBUG */
/* Check if the list has allocations outstanding */
@@ -1431,17 +1431,17 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
HGOTO_DONE(NULL)
/* Double check parameters */
- HDassert(head);
+ assert(head);
/* Make certain that the free list is initialized */
- HDassert(head->init);
+ assert(head->init);
#ifdef H5FL_TRACK
{
unsigned char *block_ptr = ((unsigned char *)obj) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- HDmemcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Free tracking information about the allocation location */
H5CS_close_stack(trk.stack);
@@ -1463,7 +1463,7 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
trk.next->prev = trk.prev;
} /* end else */
- HDmemcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
}
#endif
@@ -1477,7 +1477,7 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
free_nelem = temp->nelem;
/* Double-check that there is enough room for arrays of this size */
- HDassert((int)free_nelem <= head->maxelem);
+ assert((int)free_nelem <= head->maxelem);
/* Link into the free list */
temp->next = head->list_arr[free_nelem].list;
@@ -1533,8 +1533,8 @@ H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
- HDassert(elem);
+ assert(head);
+ assert(elem);
/* Make certain the list is initialized first */
if (!head->init)
@@ -1542,7 +1542,7 @@ H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem H5FL_TRACK_PARAMS)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't initialize 'array' blocks")
/* Sanity check that the number of elements is supported */
- HDassert(elem <= (unsigned)head->maxelem);
+ assert(elem <= (unsigned)head->maxelem);
/* Get the set of the memory block */
mem_size = head->list_arr[elem].size;
@@ -1585,7 +1585,7 @@ H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem H5FL_TRACK_PARAMS)
#ifdef H5FL_TRACK
/* Copy allocation location information */
((H5FL_track_t *)ret_value)->stack = H5CS_copy_stack();
- HDassert(((H5FL_track_t *)ret_value)->stack);
+ assert(((H5FL_track_t *)ret_value)->stack);
/* The 'call_func' & 'call_file' strings are statically allocated (by the compiler)
* there's no need to duplicate them.
*/
@@ -1629,15 +1629,15 @@ H5FL_arr_calloc(H5FL_arr_head_t *head, size_t elem H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
- HDassert(head);
- HDassert(elem);
+ assert(head);
+ assert(elem);
/* Allocate the array */
if (NULL == (ret_value = H5FL_arr_malloc(head, elem H5FL_TRACK_INFO_INT)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear to zeros */
- HDmemset(ret_value, 0, head->list_arr[elem].size);
+ memset(ret_value, 0, head->list_arr[elem].size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1664,8 +1664,8 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
FUNC_ENTER_NOAPI_NOERR
/* Double check parameters */
- HDassert(head);
- HDassert(new_elem);
+ assert(head);
+ assert(new_elem);
/* Check if we are really allocating the object */
if (obj == NULL)
@@ -1674,7 +1674,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
H5FL_arr_list_t *temp; /* Temp. ptr to the new free list node allocated */
/* Sanity check that the number of elements is supported */
- HDassert((int)new_elem <= head->maxelem);
+ assert((int)new_elem <= head->maxelem);
/* Get the pointer to the info header in front of the block to free */
temp = (H5FL_arr_list_t *)((
@@ -1701,7 +1701,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
unsigned char *block_ptr = ((unsigned char *)obj) - sizeof(H5FL_track_t);
H5FL_track_t trk;
- HDmemcpy(&trk, block_ptr, sizeof(H5FL_track_t));
+ memcpy(&trk, block_ptr, sizeof(H5FL_track_t));
/* Release previous tracking information */
H5CS_close_stack(trk.stack);
@@ -1713,7 +1713,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
/* Store new tracking information */
trk.stack = H5CS_copy_stack();
- HDassert(trk.stack);
+ assert(trk.stack);
/* The 'call_func' & 'call_file' strings are statically allocated (by the compiler)
* there's no need to duplicate them.
*/
@@ -1721,7 +1721,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
trk.func = call_func;
trk.line = call_line;
- HDmemcpy(block_ptr, &trk, sizeof(H5FL_track_t));
+ memcpy(block_ptr, &trk, sizeof(H5FL_track_t));
#endif
ret_value = obj;
}
@@ -1787,7 +1787,7 @@ H5FL__arr_gc_list(H5FL_arr_head_t *head)
} /* end for */
/* Double check that all the memory on this list is recycled */
- HDassert(head->list_mem == 0);
+ assert(head->list_mem == 0);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FL__arr_gc_list() */
@@ -1825,7 +1825,7 @@ H5FL__arr_gc(void)
} /* end while */
/* Double check that all the memory on the free lists are recycled */
- HDassert(H5FL_arr_gc_head.mem_freed == 0);
+ assert(H5FL_arr_gc_head.mem_freed == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1866,8 +1866,8 @@ H5FL__arr_term(void)
/* Check if the list has allocations outstanding */
#ifdef H5FL_DEBUG
- HDprintf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_arr_gc_head.first->list->name,
- (int)H5FL_arr_gc_head.first->list->allocated);
+ printf("%s: head->name = %s, head->allocated = %d\n", __func__, H5FL_arr_gc_head.first->list->name,
+ (int)H5FL_arr_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
if (H5FL_arr_gc_head.first->list->allocated > 0) {
/* Add free list to the list of nodes with allocations open still */
@@ -1916,11 +1916,11 @@ H5FL_seq_free(H5FL_seq_head_t *head, void *obj)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Double check parameters */
- HDassert(head);
- HDassert(obj);
+ assert(head);
+ assert(obj);
/* Make certain that the free list is initialized */
- HDassert(head->queue.init);
+ assert(head->queue.init);
/* Use block routine */
H5FL_blk_free(&(head->queue), obj);
@@ -1949,8 +1949,8 @@ H5FL_seq_malloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI_NOERR
/* Double check parameters */
- HDassert(head);
- HDassert(elem);
+ assert(head);
+ assert(elem);
/* Use block routine */
ret_value = H5FL_blk_malloc(&(head->queue), head->size * elem H5FL_TRACK_INFO_INT);
@@ -1979,8 +1979,8 @@ H5FL_seq_calloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI_NOERR
/* Double check parameters */
- HDassert(head);
- HDassert(elem);
+ assert(head);
+ assert(elem);
/* Use block routine */
ret_value = H5FL_blk_calloc(&(head->queue), head->size * elem H5FL_TRACK_INFO_INT);
@@ -2009,8 +2009,8 @@ H5FL_seq_realloc(H5FL_seq_head_t *head, void *obj, size_t new_elem H5FL_TRACK_PA
FUNC_ENTER_NOAPI_NOERR
/* Double check parameters */
- HDassert(head);
- HDassert(new_elem);
+ assert(head);
+ assert(new_elem);
/* Use block routine */
ret_value = H5FL_blk_realloc(&(head->queue), obj, head->size * new_elem H5FL_TRACK_INFO_INT);
@@ -2041,7 +2041,7 @@ H5FL_fac_init(size_t size)
FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
- HDassert(size > 0);
+ assert(size > 0);
/* Allocate room for the new factory */
if (NULL == (factory = (H5FL_fac_head_t *)H5FL_CALLOC(H5FL_fac_head_t)))
@@ -2111,8 +2111,8 @@ H5FL_fac_free(H5FL_fac_head_t *head, void *obj)
FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
- HDassert(head);
- HDassert(obj);
+ assert(head);
+ assert(obj);
#ifdef H5FL_TRACK
{
@@ -2141,11 +2141,11 @@ H5FL_fac_free(H5FL_fac_head_t *head, void *obj)
#endif /* H5FL_TRACK */
#ifdef H5FL_DEBUG
- HDmemset(obj, 255, head->size);
+ memset(obj, 255, head->size);
#endif /* H5FL_DEBUG */
/* Make certain that the free list is initialized */
- HDassert(head->init);
+ assert(head->init);
/* Link into the free list */
((H5FL_fac_node_t *)obj)->next = head->list;
@@ -2196,8 +2196,8 @@ H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
- HDassert(head);
- HDassert(head->init);
+ assert(head);
+ assert(head->init);
/* Check for nodes available on the free list first */
if (head->list != NULL) {
@@ -2225,7 +2225,7 @@ H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
#ifdef H5FL_TRACK
/* Copy allocation location information */
((H5FL_track_t *)ret_value)->stack = H5CS_copy_stack();
- HDassert(((H5FL_track_t *)ret_value)->stack);
+ assert(((H5FL_track_t *)ret_value)->stack);
/* The 'call_func' & 'call_file' strings are statically allocated (by the compiler)
* there's no need to duplicate them.
*/
@@ -2270,7 +2270,7 @@ H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
- HDassert(head);
+ assert(head);
/* Allocate the block */
if (NULL == (ret_value = H5FL_fac_malloc(head H5FL_TRACK_INFO_INT)))
@@ -2278,7 +2278,7 @@ H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
/* Clear to zeros */
/* (Accommodate tracking information, if present) */
- HDmemset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
+ memset(ret_value, 0, head->size - H5FL_TRACK_SIZE);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2365,7 +2365,7 @@ H5FL__fac_gc(void)
} /* end while */
/* Double check that all the memory on the free lists is recycled */
- HDassert(H5FL_fac_gc_head.mem_freed == 0);
+ assert(H5FL_fac_gc_head.mem_freed == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2394,7 +2394,7 @@ H5FL_fac_term(H5FL_fac_head_t *factory)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(factory);
+ assert(factory);
/* Garbage collect all the blocks in the factory's free list */
if (H5FL__fac_gc_list(factory) < 0)
@@ -2409,7 +2409,7 @@ H5FL_fac_term(H5FL_fac_head_t *factory)
H5FL_fac_gc_node_t *last =
factory->prev_gc; /* Garbage collection node before the one being removed */
- HDassert(last->next->list == factory);
+ assert(last->next->list == factory);
tmp = last->next->next;
last->next = H5FL_FREE(H5FL_fac_gc_node_t, last->next);
last->next = tmp;
@@ -2417,7 +2417,7 @@ H5FL_fac_term(H5FL_fac_head_t *factory)
tmp->list->prev_gc = last;
}
else {
- HDassert(H5FL_fac_gc_head.first->list == factory);
+ assert(H5FL_fac_gc_head.first->list == factory);
tmp = H5FL_fac_gc_head.first->next;
H5FL_fac_gc_head.first = H5FL_FREE(H5FL_fac_gc_node_t, H5FL_fac_gc_head.first);
H5FL_fac_gc_head.first = tmp;
@@ -2457,12 +2457,12 @@ H5FL__fac_term_all(void)
tmp = H5FL_fac_gc_head.first->next;
#ifdef H5FL_DEBUG
- HDprintf("%s: head->size = %d, head->allocated = %d\n", __func__,
- (int)H5FL_fac_gc_head.first->list->size, (int)H5FL_fac_gc_head.first->list->allocated);
+ printf("%s: head->size = %d, head->allocated = %d\n", __func__,
+ (int)H5FL_fac_gc_head.first->list->size, (int)H5FL_fac_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
/* The list cannot have any allocations outstanding */
- HDassert(H5FL_fac_gc_head.first->list->allocated == 0);
+ assert(H5FL_fac_gc_head.first->list->allocated == 0);
/* Reset the "initialized" flag, in case we restart this list somehow (I don't know how..) */
H5FL_fac_gc_head.first->list->init = FALSE;
@@ -2610,7 +2610,7 @@ H5FL_get_free_list_sizes(size_t *reg_size, size_t *arr_size, size_t *blk_size, s
H5FL_reg_head_t *reg_list = gc_node->list; /* Head of list */
/* Sanity check */
- HDassert(reg_list->init);
+ assert(reg_list->init);
/* Add the amount of memory for this list */
*reg_size += (reg_list->size * reg_list->allocated);
@@ -2631,7 +2631,7 @@ H5FL_get_free_list_sizes(size_t *reg_size, size_t *arr_size, size_t *blk_size, s
H5FL_arr_head_t *head = gc_arr_node->list; /* Head of array list elements */
/* Sanity check */
- HDassert(head->init);
+ assert(head->init);
/* Check for any allocated elements in this list */
if (head->allocated > 0) {
diff --git a/src/H5FO.c b/src/H5FO.c
index 72903c1..323797c 100644
--- a/src/H5FO.c
+++ b/src/H5FO.c
@@ -73,8 +73,8 @@ H5FO_create(const H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Create container used to store open object info */
if ((f->shared->open_objs = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL)
@@ -113,15 +113,15 @@ H5FO_opened(const H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->open_objs);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->open_objs);
+ assert(H5F_addr_defined(addr));
/* Get the object node from the container */
if (NULL != (open_obj = (H5FO_open_obj_t *)H5SL_search(f->shared->open_objs, &addr))) {
ret_value = open_obj->obj;
- HDassert(ret_value != NULL);
+ assert(ret_value != NULL);
} /* end if */
else
ret_value = NULL;
@@ -159,11 +159,11 @@ H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, hbool_t delete_flag)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->open_objs);
- HDassert(H5F_addr_defined(addr));
- HDassert(obj);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->open_objs);
+ assert(H5F_addr_defined(addr));
+ assert(obj);
/* Allocate new opened object information structure */
if ((open_obj = H5FL_MALLOC(H5FO_open_obj_t)) == NULL)
@@ -210,10 +210,10 @@ H5FO_delete(H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->open_objs);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->open_objs);
+ assert(H5F_addr_defined(addr));
/* Remove from container */
if (NULL == (open_obj = (H5FO_open_obj_t *)H5SL_remove(f->shared->open_objs, &addr)))
@@ -260,10 +260,10 @@ H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->open_objs);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->open_objs);
+ assert(H5F_addr_defined(addr));
/* Get the object node from the container */
if (NULL != (open_obj = (H5FO_open_obj_t *)H5SL_search(f->shared->open_objs, &addr)))
@@ -303,10 +303,10 @@ H5FO_marked(const H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->open_objs);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->open_objs);
+ assert(H5F_addr_defined(addr));
/* Get the object node from the container */
if (NULL != (open_obj = (H5FO_open_obj_t *)H5SL_search(f->shared->open_objs, &addr)))
@@ -341,9 +341,9 @@ H5FO_dest(const H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->open_objs);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->open_objs);
/* Check if the object info set is empty */
if (H5SL_count(f->shared->open_objs) != 0)
@@ -385,7 +385,7 @@ H5FO_top_create(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Create container used to store open object info */
if ((f->obj_count = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL)
@@ -423,9 +423,9 @@ H5FO_top_incr(const H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->obj_count);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->obj_count);
+ assert(H5F_addr_defined(addr));
/* Get the object node from the container */
if (NULL != (obj_count = (H5FO_obj_count_t *)H5SL_search(f->obj_count, &addr))) {
@@ -477,9 +477,9 @@ H5FO_top_decr(const H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->obj_count);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->obj_count);
+ assert(H5F_addr_defined(addr));
/* Get the object node from the container */
if (NULL != (obj_count = (H5FO_obj_count_t *)H5SL_search(f->obj_count, &addr))) {
@@ -530,9 +530,9 @@ H5FO_top_count(const H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->obj_count);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->obj_count);
+ assert(H5F_addr_defined(addr));
/* Get the object node from the container */
if (NULL != (obj_count = (H5FO_obj_count_t *)H5SL_search(f->obj_count, &addr)))
@@ -569,8 +569,8 @@ H5FO_top_dest(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->obj_count);
+ assert(f);
+ assert(f->obj_count);
/* Check if the object count set is empty */
if (H5SL_count(f->obj_count) != 0)
diff --git a/src/H5FS.c b/src/H5FS.c
index 161532b..349ce64 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -96,14 +96,14 @@ H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t
FUNC_ENTER_NOAPI(NULL)
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", __func__, nclasses);
+ fprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", __func__, nclasses);
#endif /* H5FS_DEBUG */
/* Check arguments. */
- HDassert(fs_create->shrink_percent);
- HDassert(fs_create->shrink_percent < fs_create->expand_percent);
- HDassert(fs_create->max_sect_size);
- HDassert(nclasses == 0 || classes);
+ assert(fs_create->shrink_percent);
+ assert(fs_create->shrink_percent < fs_create->expand_percent);
+ assert(fs_create->max_sect_size);
+ assert(nclasses == 0 || classes);
/*
* Allocate free space structure
@@ -142,8 +142,8 @@ H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t
/* Set the return value */
ret_value = fspace;
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: fspace = %p, fspace->addr = %" PRIuHADDR "\n", __func__, (void *)fspace,
- fspace->addr);
+ fprintf(stderr, "%s: fspace = %p, fspace->addr = %" PRIuHADDR "\n", __func__, (void *)fspace,
+ fspace->addr);
#endif /* H5FS_DEBUG */
done:
@@ -152,7 +152,7 @@ done:
HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space header")
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %p\n", __func__, (void *)ret_value);
+ fprintf(stderr, "%s: Leaving, ret_value = %p\n", __func__, (void *)ret_value);
#endif /* H5FS_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_create() */
@@ -180,14 +180,14 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class
FUNC_ENTER_NOAPI(NULL)
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %" PRIuHADDR ", nclasses = %Zu\n", __func__,
- fs_addr, nclasses);
+ fprintf(stderr, "%s: Opening free space manager, fs_addr = %" PRIuHADDR ", nclasses = %Zu\n", __func__,
+ fs_addr, nclasses);
#endif /* H5FS_DEBUG */
/* Check arguments. */
- HDassert(H5F_addr_defined(fs_addr));
- HDassert(nclasses);
- HDassert(classes);
+ assert(H5F_addr_defined(fs_addr));
+ assert(nclasses);
+ assert(classes);
/* Initialize user data for protecting the free space manager */
cache_udata.f = f;
@@ -201,15 +201,15 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class
(fspace = (H5FS_t *)H5AC_protect(f, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, NULL, "unable to load free space header")
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr);
- HDfprintf(stderr, "%s: fspace->sect_size = %" PRIuHSIZE "\n", __func__, fspace->sect_size);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE "\n", __func__, fspace->alloc_sect_size);
- HDfprintf(stderr, "%s: fspace->sinfo = %p\n", __func__, (void *)fspace->sinfo);
- HDfprintf(stderr, "%s: fspace->rc = %u\n", __func__, fspace->rc);
+ fprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr);
+ fprintf(stderr, "%s: fspace->sect_size = %" PRIuHSIZE "\n", __func__, fspace->sect_size);
+ fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE "\n", __func__, fspace->alloc_sect_size);
+ fprintf(stderr, "%s: fspace->sinfo = %p\n", __func__, (void *)fspace->sinfo);
+ fprintf(stderr, "%s: fspace->rc = %u\n", __func__, fspace->rc);
#endif /* H5FS_DEBUG */
/* Increment the reference count on the free space manager header */
- HDassert(fspace->rc <= 1);
+ assert(fspace->rc <= 1);
if (H5FS__incr(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINC, NULL, "unable to increment ref. count on free space header")
@@ -248,12 +248,12 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %" PRIuHADDR "\n", __func__, fs_addr);
+ fprintf(stderr, "%s: Deleting free space manager, fs_addr = %" PRIuHADDR "\n", __func__, fs_addr);
#endif /* H5FS_DEBUG */
/* Check arguments. */
- HDassert(f);
- HDassert(H5F_addr_defined(fs_addr));
+ assert(f);
+ assert(H5F_addr_defined(fs_addr));
/* Initialize user data for protecting the free space manager */
/* (no class information necessary for delete) */
@@ -268,43 +268,43 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
unsigned fspace_status = 0; /* Free space section info's status in the metadata cache */
/* Sanity check */
- HDassert(H5F_addr_defined(fs_addr));
+ assert(H5F_addr_defined(fs_addr));
/* Check the free space section info's status in the metadata cache */
if (H5AC_get_entry_status(f, fs_addr, &fspace_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
"unable to check metadata cache status for free space section info")
- HDfprintf(stderr, "%s: fspace_status = %0x: ", __func__, fspace_status);
+ fprintf(stderr, "%s: fspace_status = %0x: ", __func__, fspace_status);
if (fspace_status) {
hbool_t printed = FALSE;
if (fspace_status & H5AC_ES__IN_CACHE) {
- HDfprintf(stderr, "H5AC_ES__IN_CACHE");
+ fprintf(stderr, "H5AC_ES__IN_CACHE");
printed = TRUE;
} /* end if */
if (fspace_status & H5AC_ES__IS_DIRTY) {
- HDfprintf(stderr, "%sH5AC_ES__IS_DIRTY", (printed ? " | " : ""));
+ fprintf(stderr, "%sH5AC_ES__IS_DIRTY", (printed ? " | " : ""));
printed = TRUE;
} /* end if */
if (fspace_status & H5AC_ES__IS_PROTECTED) {
- HDfprintf(stderr, "%sH5AC_ES__IS_PROTECTED", (printed ? " | " : ""));
+ fprintf(stderr, "%sH5AC_ES__IS_PROTECTED", (printed ? " | " : ""));
printed = TRUE;
} /* end if */
if (fspace_status & H5AC_ES__IS_PINNED) {
- HDfprintf(stderr, "%sH5AC_ES__IS_PINNED", (printed ? " | " : ""));
+ fprintf(stderr, "%sH5AC_ES__IS_PINNED", (printed ? " | " : ""));
printed = TRUE;
} /* end if */
if (fspace_status & H5AC_ES__IS_FLUSH_DEP_PARENT) {
- HDfprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_PARENT", (printed ? " | " : ""));
+ fprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_PARENT", (printed ? " | " : ""));
printed = TRUE;
} /* end if */
if (fspace_status & H5AC_ES__IS_FLUSH_DEP_CHILD) {
- HDfprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_CHILD", (printed ? " | " : ""));
+ fprintf(stderr, "%sH5AC_ES__IS_FLUSH_DEP_CHILD", (printed ? " | " : ""));
printed = TRUE;
} /* end if */
} /* end if */
- HDfprintf(stderr, "\n");
+ fprintf(stderr, "\n");
}
#endif /* H5FS_DEBUG */
@@ -314,18 +314,18 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space header")
/* Sanity check */
- HDassert(fspace->sinfo == NULL);
+ assert(fspace->sinfo == NULL);
/* Delete serialized section storage, if there are any */
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr);
+ fprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr);
#endif /* H5FS_DEBUG */
if (fspace->serial_sect_count > 0) {
unsigned sinfo_status = 0; /* Free space section info's status in the metadata cache */
/* Sanity check */
- HDassert(H5F_addr_defined(fspace->sect_addr));
- HDassert(fspace->alloc_sect_size > 0);
+ assert(H5F_addr_defined(fspace->sect_addr));
+ assert(fspace->alloc_sect_size > 0);
/* Check the free space section info's status in the metadata cache */
if (H5AC_get_entry_status(f, fspace->sect_addr, &sinfo_status) < 0)
@@ -335,11 +335,11 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
/* If the free space section info is in the cache, expunge it now */
if (sinfo_status & H5AC_ES__IN_CACHE) {
/* Sanity checks on direct block */
- HDassert(!(sinfo_status & H5AC_ES__IS_PINNED));
- HDassert(!(sinfo_status & H5AC_ES__IS_PROTECTED));
+ assert(!(sinfo_status & H5AC_ES__IS_PINNED));
+ assert(!(sinfo_status & H5AC_ES__IS_PROTECTED));
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Expunging free space section info from cache\n", __func__);
+ fprintf(stderr, "%s: Expunging free space section info from cache\n", __func__);
#endif /* H5FS_DEBUG */
/* Evict the free space section info from the metadata cache */
/* (Free file space) */
@@ -358,12 +358,12 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)
} /* end block */
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Done expunging free space section info from cache\n", __func__);
+ fprintf(stderr, "%s: Done expunging free space section info from cache\n", __func__);
#endif /* H5FS_DEBUG */
} /* end if */
else {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Deleting free space section info from file\n", __func__);
+ fprintf(stderr, "%s: Deleting free space section info from file\n", __func__);
#endif /* H5FS_DEBUG */
/* Release the space in the file */
if (!H5F_IS_TMP_ADDR(f, fspace->sect_addr))
@@ -401,36 +401,35 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p\n",
- __func__, (void *)fspace, fspace->addr, (void *)fspace->sinfo);
+ fprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p\n",
+ __func__, (void *)fspace, fspace->addr, (void *)fspace->sinfo);
#endif /* H5FS_DEBUG */
/* Check if section info is valid */
/* (i.e. the header "owns" the section info and it's not in the cache) */
if (fspace->sinfo) {
#ifdef H5FS_DEBUG
- HDfprintf(stderr,
- "%s: fspace->tot_sect_count = %" PRIuHSIZE ", fspace->serial_sect_count = %" PRIuHSIZE
- ", fspace->sect_addr = %" PRIuHADDR ", fspace->rc = %u\n",
- __func__, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc);
- HDfprintf(stderr,
- "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
- __func__, fspace->alloc_sect_size, fspace->sect_size);
+ fprintf(stderr,
+ "%s: fspace->tot_sect_count = %" PRIuHSIZE ", fspace->serial_sect_count = %" PRIuHSIZE
+ ", fspace->sect_addr = %" PRIuHADDR ", fspace->rc = %u\n",
+ __func__, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc);
+ fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
+ __func__, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_DEBUG */
/* If there are sections to serialize, update them */
/* (if the free space manager is persistent) */
if (fspace->serial_sect_count > 0 && H5F_addr_defined(fspace->addr)) {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Real sections to store in file\n", __func__);
+ fprintf(stderr, "%s: Real sections to store in file\n", __func__);
#endif /* H5FS_DEBUG */
if (fspace->sinfo->dirty) {
/* Check if the section info is "floating" */
if (!H5F_addr_defined(fspace->sect_addr)) {
/* Sanity check */
- HDassert(fspace->sect_size > 0);
+ assert(fspace->sect_size > 0);
/* Allocate space for the section info in file */
if (H5F_USE_TMP_SPACE(f)) {
@@ -454,7 +453,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
} /* end if */
else
/* Sanity check that section info has address */
- HDassert(H5F_addr_defined(fspace->sect_addr));
+ assert(H5F_addr_defined(fspace->sect_addr));
/* Cache the free space section info */
if (H5AC_insert_entry(f, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo,
@@ -463,16 +462,16 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
} /* end if */
else {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: NOT storing section info in file\n", __func__);
+ fprintf(stderr, "%s: NOT storing section info in file\n", __func__);
#endif /* H5FS_DEBUG */
/* Check if space for the section info is allocated */
if (H5F_addr_defined(fspace->sect_addr)) {
/* Sanity check */
/* (section info should only be in the file if the header is */
- HDassert(H5F_addr_defined(fspace->addr));
+ assert(H5F_addr_defined(fspace->addr));
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info allocated though\n", __func__);
+ fprintf(stderr, "%s: Section info allocated though\n", __func__);
#endif /* H5FS_DEBUG */
/* Check if the section info is for the free space in the file */
/* (NOTE: This is the "bootstrapping" special case for the
@@ -484,13 +483,12 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
htri_t status; /* "can absorb" status for section into */
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info is for file free space\n", __func__);
+ fprintf(stderr, "%s: Section info is for file free space\n", __func__);
#endif /* H5FS_DEBUG */
/* Try to shrink the file or absorb the section info into a block aggregator */
if (H5F_IS_TMP_ADDR(f, fspace->sect_addr)) {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info in temp. address space went 'go away'\n",
- __func__);
+ fprintf(stderr, "%s: Section info in temp. address space went 'go away'\n", __func__);
#endif /* H5FS_DEBUG */
/* Reset section info in header */
fspace->sect_addr = HADDR_UNDEF;
@@ -511,13 +509,13 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
* header to record it
*/
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info can't 'go away', header will own it\n",
- __func__);
+ fprintf(stderr, "%s: Section info can't 'go away', header will own it\n",
+ __func__);
#endif /* H5FS_DEBUG */
} /* end if */
else {
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info went 'go away'\n", __func__);
+ fprintf(stderr, "%s: Section info went 'go away'\n", __func__);
#endif /* H5FS_DEBUG */
/* Reset section info in header */
fspace->sect_addr = HADDR_UNDEF;
@@ -536,7 +534,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
fspace->alloc_sect_size; /* Previous size of section info in file */
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Section info is NOT for file free space\n", __func__);
+ fprintf(stderr, "%s: Section info is NOT for file free space\n", __func__);
#endif /* H5FS_DEBUG */
/* Reset section info in header */
fspace->sect_addr = HADDR_UNDEF;
@@ -567,7 +565,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
/* Just sanity checks... */
if (fspace->serial_sect_count > 0)
/* Sanity check that section info has address */
- HDassert(H5F_addr_defined(fspace->sect_addr));
+ assert(H5F_addr_defined(fspace->sect_addr));
} /* end else */
/* Decrement the reference count on the free space manager header */
@@ -576,7 +574,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
done:
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", __func__, ret_value, fspace->rc);
+ fprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", __func__, ret_value, fspace->rc);
#endif /* H5FS_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_close() */
@@ -604,7 +602,7 @@ H5FS__new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(nclasses == 0 || (nclasses > 0 && classes));
+ assert(nclasses == 0 || (nclasses > 0 && classes));
/*
* Allocate free space structure
@@ -622,7 +620,7 @@ H5FS__new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes
/* Initialize the section classes for this free space list */
for (u = 0; u < nclasses; u++) {
/* Make certain that section class type can be used as an array index into this array */
- HDassert(u == classes[u]->type);
+ assert(u == classes[u]->type);
/* Copy the class information into the free space manager */
H5MM_memcpy(&fspace->sect_cls[u], classes[u], sizeof(H5FS_section_class_t));
@@ -681,8 +679,8 @@ H5FS_size(const H5FS_t *fspace, hsize_t *meta_size)
/*
* Check arguments.
*/
- HDassert(fspace);
- HDassert(meta_size);
+ assert(fspace);
+ assert(meta_size);
/* Get the free space size info */
*meta_size += fspace->hdr_size + (fspace->sinfo ? fspace->sect_size : fspace->alloc_sect_size);
@@ -709,14 +707,14 @@ H5FS__incr(H5FS_t *fspace)
FUNC_ENTER_PACKAGE
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr,
- fspace->rc);
+ fprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr,
+ fspace->rc);
#endif /* H5FS_DEBUG */
/*
* Check arguments.
*/
- HDassert(fspace);
+ assert(fspace);
/* Check if we should pin the header in the cache */
if (fspace->rc == 0 && H5F_addr_defined(fspace->addr))
@@ -749,14 +747,14 @@ H5FS__decr(H5FS_t *fspace)
FUNC_ENTER_PACKAGE
#ifdef H5FS_DEBUG
- HDfprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr,
- fspace->rc);
+ fprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr,
+ fspace->rc);
#endif /* H5FS_DEBUG */
/*
* Check arguments.
*/
- HDassert(fspace);
+ assert(fspace);
/* Decrement reference count on header */
fspace->rc--;
@@ -797,7 +795,7 @@ H5FS__dirty(H5FS_t *fspace)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(fspace);
+ assert(fspace);
/* Check if the free space manager is persistent */
if (H5F_addr_defined(fspace->addr))
@@ -829,8 +827,8 @@ H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
if (!H5F_addr_defined(fspace->addr)) {
/* Allocate space for the free space header */
@@ -869,8 +867,8 @@ H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
if (!H5F_addr_defined(fspace->sect_addr) && fspace->sinfo && fspace->serial_sect_count > 0) {
if (HADDR_UNDEF == (fspace->sect_addr = H5MF_alloc(f, H5FD_MEM_FSPACE_SINFO, fspace->sect_size)))
@@ -918,8 +916,8 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hbool_t free_file_space)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
cache_flags = H5AC__DELETED_FLAG | H5AC__TAKE_OWNERSHIP_FLAG;
;
@@ -1034,7 +1032,7 @@ H5FS__hdr_dest(H5FS_t *fspace)
/*
* Check arguments.
*/
- HDassert(fspace);
+ assert(fspace);
/* Terminate the section classes for this free space list */
for (u = 0; u < fspace->nclasses; u++) {
@@ -1075,8 +1073,8 @@ H5FS__sinfo_free_sect_cb(void *_sect, void H5_ATTR_UNUSED *key, void *op_data)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(sect);
- HDassert(sinfo);
+ assert(sect);
+ assert(sinfo);
/* Call the section's class 'free' method on the section */
(*sinfo->fspace->sect_cls[sect->type].free)(sect);
@@ -1103,8 +1101,8 @@ H5FS__sinfo_free_node_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(fspace_node);
- HDassert(op_data);
+ assert(fspace_node);
+ assert(op_data);
/* Release the skip list for sections of this size */
H5SL_destroy(fspace_node->sect_list, H5FS__sinfo_free_sect_cb, op_data);
@@ -1138,9 +1136,9 @@ H5FS__sinfo_dest(H5FS_sinfo_t *sinfo)
/*
* Check arguments.
*/
- HDassert(sinfo);
- HDassert(sinfo->fspace);
- HDassert(sinfo->bins);
+ assert(sinfo);
+ assert(sinfo->fspace);
+ assert(sinfo->bins);
/* Clear out lists of nodes */
for (u = 0; u < sinfo->nbins; u++)
@@ -1181,8 +1179,8 @@ H5FS_get_sect_count(const H5FS_t *frsp, hsize_t *tot_sect_count)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(frsp);
- HDassert(tot_sect_count);
+ assert(frsp);
+ assert(tot_sect_count);
/* Report statistics for free space */
*tot_sect_count = frsp->serial_sect_count;
@@ -1215,14 +1213,14 @@ H5FS__assert(const H5FS_t *fspace)
H5FS__sect_assert(fspace);
/* General assumptions about the section size counts */
- HDassert(fspace->sinfo->tot_size_count >= fspace->sinfo->serial_size_count);
- HDassert(fspace->sinfo->tot_size_count >= fspace->sinfo->ghost_size_count);
+ assert(fspace->sinfo->tot_size_count >= fspace->sinfo->serial_size_count);
+ assert(fspace->sinfo->tot_size_count >= fspace->sinfo->ghost_size_count);
} /* end if */
/* General assumptions about the section counts */
- HDassert(fspace->tot_sect_count >= fspace->serial_sect_count);
- HDassert(fspace->tot_sect_count >= fspace->ghost_sect_count);
- HDassert(fspace->tot_sect_count == (fspace->serial_sect_count + fspace->ghost_sect_count));
+ assert(fspace->tot_sect_count >= fspace->serial_sect_count);
+ assert(fspace->tot_sect_count >= fspace->ghost_sect_count);
+ assert(fspace->tot_sect_count == (fspace->serial_sect_count + fspace->ghost_sect_count));
FUNC_LEAVE_NOAPI_VOID
} /* end H5FS__assert() */
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 313439e..4cca3ce 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -160,9 +160,9 @@ H5FS__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->f);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5FS_HEADER_SIZE(udata->f);
@@ -194,7 +194,7 @@ H5FS__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -235,9 +235,9 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
+ assert(image);
+ assert(udata);
+ assert(udata->f);
/* Allocate a new free space manager */
if (NULL == (fspace = H5FS__new(udata->f, udata->nclasses, udata->classes, udata->cls_init_udata)))
@@ -247,7 +247,7 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
fspace->addr = udata->addr;
/* Magic number */
- if (HDmemcmp(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header signature")
image += H5_SIZEOF_MAGIC;
@@ -307,7 +307,7 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= len);
+ assert((size_t)(image - (const uint8_t *)_image) <= len);
/* Set return value */
ret_value = fspace;
@@ -342,10 +342,10 @@ H5FS__cache_hdr_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(fspace);
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(image_len);
+ assert(fspace);
+ assert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(image_len);
/* Set the image length size */
*image_len = fspace->hdr_size;
@@ -392,14 +392,14 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(fspace);
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(H5F_addr_defined(addr));
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(f);
+ assert(fspace);
+ assert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(H5F_addr_defined(addr));
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
if (fspace->sinfo) {
H5AC_ring_t ring;
@@ -491,7 +491,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
*/
if (fspace->serial_sect_count > 0 && H5F_addr_defined(fspace->addr)) {
/* Sanity check */
- HDassert(fspace->sect_size > 0);
+ assert(fspace->sect_size > 0);
if (!H5F_addr_defined(fspace->sect_addr)) { /* case 1 */
haddr_t tag = HADDR_UNDEF;
@@ -540,7 +540,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
HGOTO_ERROR_TAG(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache")
H5_END_TAG
- HDassert(fspace->sinfo->cache_info.size == fspace->alloc_sect_size);
+ assert(fspace->sinfo->cache_info.size == fspace->alloc_sect_size);
/* the metadata cache is now managing the section info,
* so set fspace->sinfo to NULL.
@@ -558,8 +558,8 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
* be the case. If not, we will have to add code to resize
* file space allocation for section info as well as moving it.
*/
- HDassert(fspace->sect_size > 0);
- HDassert(fspace->alloc_sect_size == (size_t)fspace->sect_size);
+ assert(fspace->sect_size > 0);
+ assert(fspace->alloc_sect_size == (size_t)fspace->sect_size);
/* Allocate space for the section info in file */
if (HADDR_UNDEF ==
@@ -568,7 +568,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
"file allocation failed for free space sections")
fspace->alloc_sect_size = (size_t)fspace->sect_size;
- HDassert(fspace->sinfo->cache_info.size == fspace->alloc_sect_size);
+ assert(fspace->sinfo->cache_info.size == fspace->alloc_sect_size);
/* Let the metadata cache know the section info moved */
if (H5AC_move_entry((H5F_t *)f, H5AC_FSPACE_SINFO, fspace->sect_addr, new_sect_addr) < 0)
@@ -581,15 +581,15 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
* be the case. If not, we will have to add code to resize
* file space allocation for section info.
*/
- HDassert(fspace->sect_size > 0);
- HDassert(fspace->alloc_sect_size == (size_t)fspace->sect_size);
+ assert(fspace->sect_size > 0);
+ assert(fspace->alloc_sect_size == (size_t)fspace->sect_size);
} /* end else */
} /* end else */
else {
/* for one reason or another (see comment above) there should
* not be any file space allocated for the section info.
*/
- HDassert(!H5F_addr_defined(fspace->sect_addr));
+ assert(!H5F_addr_defined(fspace->sect_addr));
} /* end else */
} /* end if */
else if (H5F_addr_defined(fspace->sect_addr)) {
@@ -601,8 +601,8 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
* a nonsense section info address.
*/
if (!H5F_POINT_OF_NO_RETURN(f)) {
- HDassert(fspace->sect_size > 0);
- HDassert(fspace->alloc_sect_size == (size_t)fspace->sect_size);
+ assert(fspace->sect_size > 0);
+ assert(fspace->alloc_sect_size == (size_t)fspace->sect_size);
} /* end if */
if (H5F_IS_TMP_ADDR(f, fspace->sect_addr)) {
@@ -620,9 +620,9 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
if (H5AC_get_entry_status(f, fspace->sect_addr, &sect_status) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info status")
- HDassert(sect_status & H5AC_ES__IN_CACHE);
- HDassert((sect_status & H5AC_ES__IS_PROTECTED) == 0);
- HDassert((sect_status & H5AC_ES__IS_PINNED) == 0);
+ assert(sect_status & H5AC_ES__IN_CACHE);
+ assert((sect_status & H5AC_ES__IS_PROTECTED) == 0);
+ assert((sect_status & H5AC_ES__IS_PINNED) == 0);
/* Allocate space for the section info in file */
if (HADDR_UNDEF ==
@@ -632,7 +632,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
fspace->alloc_sect_size = (size_t)fspace->sect_size;
/* Sanity check */
- HDassert(!H5F_addr_eq(fspace->sect_addr, new_sect_addr));
+ assert(!H5F_addr_eq(fspace->sect_addr, new_sect_addr));
/* Let the metadata cache know the section info moved */
if (H5AC_move_entry((H5F_t *)f, H5AC_FSPACE_SINFO, fspace->sect_addr, new_sect_addr) < 0)
@@ -648,8 +648,8 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT
} /* end else-if */
else { /* there is no section info at present */
/* do some sanity checks */
- HDassert(fspace->serial_sect_count == 0);
- HDassert(fspace->tot_sect_count == fspace->ghost_sect_count);
+ assert(fspace->serial_sect_count == 0);
+ assert(fspace->tot_sect_count == fspace->ghost_sect_count);
} /* end else */
/* what ever happened above, set *flags to 0 */
@@ -690,12 +690,12 @@ H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(fspace);
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(fspace->hdr_size == len);
+ assert(f);
+ assert(image);
+ assert(fspace);
+ assert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(fspace->hdr_size == len);
/* The section information does not always exits, and if it does,
* it is not always in the cache. To make matters more interesting,
@@ -705,11 +705,11 @@ H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
* into real file space if necessary before this function was called.
* The following asserts are a cursory check on this.
*/
- HDassert((!H5F_addr_defined(fspace->sect_addr)) || (!H5F_IS_TMP_ADDR(f, fspace->sect_addr)));
+ assert((!H5F_addr_defined(fspace->sect_addr)) || (!H5F_IS_TMP_ADDR(f, fspace->sect_addr)));
if (!H5F_POINT_OF_NO_RETURN(f))
- HDassert((!H5F_addr_defined(fspace->sect_addr)) ||
- ((fspace->sect_size > 0) && (fspace->alloc_sect_size == (size_t)fspace->sect_size)));
+ assert((!H5F_addr_defined(fspace->sect_addr)) ||
+ ((fspace->sect_size > 0) && (fspace->alloc_sect_size == (size_t)fspace->sect_size)));
/* Magic number */
H5MM_memcpy(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -766,7 +766,7 @@ H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
UINT32ENCODE(image, metadata_chksum);
/* sanity checks */
- HDassert((size_t)(image - (uint8_t *)_image) == fspace->hdr_size);
+ assert((size_t)(image - (uint8_t *)_image) == fspace->hdr_size);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS__cache_hdr_serialize() */
@@ -792,7 +792,7 @@ H5FS__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(fspace);
+ assert(fspace);
/* Determine which action to take */
switch (action) {
@@ -820,7 +820,7 @@ H5FS__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
@@ -854,12 +854,12 @@ H5FS__cache_hdr_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(fspace);
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(fspace);
+ assert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(fspace->cache_info.type == H5AC_FSPACE_HDR);
/* We should not still be holding on to the free space section info */
- HDassert(!fspace->sinfo);
+ assert(!fspace->sinfo);
/* Destroy free space header */
if (H5FS__hdr_dest(fspace) < 0)
@@ -892,11 +892,11 @@ H5FS__cache_sinfo_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(udata);
+ assert(udata);
fspace = udata->fspace;
- HDassert(fspace);
- HDassert(fspace->sect_size > 0);
- HDassert(image_len);
+ assert(fspace);
+ assert(fspace->sect_size > 0);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)(fspace->sect_size);
@@ -928,7 +928,7 @@ H5FS__cache_sinfo_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -972,12 +972,12 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
fspace = udata->fspace;
- HDassert(fspace);
- HDassert(fspace->sect_size == len);
- HDassert(dirty);
+ assert(fspace);
+ assert(fspace->sect_size == len);
+ assert(dirty);
/* Allocate a new free space section info */
if (NULL == (sinfo = H5FS__sinfo_new(udata->f, fspace)))
@@ -987,7 +987,7 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
H5_CHECKED_ASSIGN(old_sect_size, size_t, fspace->sect_size, hsize_t);
/* Magic number */
- if (HDmemcmp(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections signature")
image += H5_SIZEOF_MAGIC;
@@ -1030,11 +1030,11 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
/* The number of sections of this node's size */
UINT64DECODE_VAR(image, node_count, sect_cnt_size);
- HDassert(node_count);
+ assert(node_count);
/* The size of the sections for this node */
UINT64DECODE_VAR(image, sect_size, sinfo->sect_len_size);
- HDassert(sect_size);
+ assert(sect_size);
/* Loop over nodes of this size */
for (u = 0; u < node_count; u++) {
@@ -1051,7 +1051,7 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
/* Call 'deserialize' callback for this section */
des_flags = 0;
- HDassert(fspace->sect_cls[sect_type].deserialize);
+ assert(fspace->sect_cls[sect_type].deserialize);
if (NULL == (new_sect = (*fspace->sect_cls[sect_type].deserialize)(
&fspace->sect_cls[sect_type], image, sect_addr, sect_size, &des_flags)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTDECODE, NULL, "can't deserialize section")
@@ -1072,12 +1072,12 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
} while (image < (((const uint8_t *)_image + old_sect_size) - H5FS_SIZEOF_CHKSUM));
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= (old_sect_size - H5FS_SIZEOF_CHKSUM));
- HDassert(old_sect_size == fspace->sect_size);
- HDassert(old_tot_sect_count == fspace->tot_sect_count);
- HDassert(old_serial_sect_count == fspace->serial_sect_count);
- HDassert(old_ghost_sect_count == fspace->ghost_sect_count);
- HDassert(old_tot_space == fspace->tot_space);
+ assert((size_t)(image - (const uint8_t *)_image) <= (old_sect_size - H5FS_SIZEOF_CHKSUM));
+ assert(old_sect_size == fspace->sect_size);
+ assert(old_tot_sect_count == fspace->tot_sect_count);
+ assert(old_serial_sect_count == fspace->serial_sect_count);
+ assert(old_ghost_sect_count == fspace->ghost_sect_count);
+ assert(old_tot_space == fspace->tot_space);
} /* end if */
/* checksum verification already done in verify_chksum cb */
@@ -1088,8 +1088,8 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
UINT32DECODE(chksum_image, stored_chksum);
/* Sanity check */
- HDassert((image == chksum_image) ||
- ((size_t)((image - (const uint8_t *)_image) + (chksum_image - image)) == old_sect_size));
+ assert((image == chksum_image) ||
+ ((size_t)((image - (const uint8_t *)_image) + (chksum_image - image)) == old_sect_size));
/* Set return value */
ret_value = sinfo;
@@ -1123,13 +1123,13 @@ H5FS__cache_sinfo_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(sinfo);
- HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
- HDassert(sinfo->fspace);
- HDassert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(image_len);
+ assert(sinfo);
+ assert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
+ assert(sinfo->fspace);
+ assert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(image_len);
/* Set the image length size */
H5_CHECKED_ASSIGN(*image_len, size_t, sinfo->fspace->alloc_sect_size, hsize_t);
@@ -1165,28 +1165,28 @@ H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(sinfo);
- HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
+ assert(f);
+ assert(sinfo);
+ assert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
fspace = sinfo->fspace;
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(fspace->cache_info.is_pinned);
- HDassert(H5F_addr_defined(addr));
- HDassert(H5F_addr_eq(fspace->sect_addr, addr));
- HDassert(fspace->sect_size == len);
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(fspace->cache_info.is_pinned);
+ assert(H5F_addr_defined(addr));
+ assert(H5F_addr_eq(fspace->sect_addr, addr));
+ assert(fspace->sect_size == len);
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
sinfo_addr = addr; /* this will change if we relocate the section data */
/* Check for section info at temporary address */
if (H5F_IS_TMP_ADDR(f, fspace->sect_addr)) {
/* Sanity check */
- HDassert(fspace->sect_size > 0);
- HDassert(H5F_addr_eq(fspace->sect_addr, addr));
+ assert(fspace->sect_size > 0);
+ assert(H5F_addr_eq(fspace->sect_addr, addr));
/* Allocate space for the section info in file */
if (HADDR_UNDEF == (sinfo_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FSPACE_SINFO, fspace->sect_size)))
@@ -1195,7 +1195,7 @@ H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_
fspace->alloc_sect_size = (size_t)fspace->sect_size;
/* Sanity check */
- HDassert(!H5F_addr_eq(sinfo->fspace->sect_addr, sinfo_addr));
+ assert(!H5F_addr_eq(sinfo->fspace->sect_addr, sinfo_addr));
/* Let the metadata cache know the section info moved */
if (H5AC_move_entry((H5F_t *)f, H5AC_FSPACE_SINFO, sinfo->fspace->sect_addr, sinfo_addr) < 0)
@@ -1250,16 +1250,16 @@ H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len, void *_thi
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(image);
- HDassert(sinfo);
- HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
- HDassert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(sinfo->fspace->cache_info.is_pinned);
- HDassert(sinfo->fspace->sect_size == len);
- HDassert(sinfo->fspace->sect_cls);
+ assert(f);
+ assert(image);
+ assert(sinfo);
+ assert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
+ assert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(sinfo->fspace->cache_info.is_pinned);
+ assert(sinfo->fspace->sect_size == len);
+ assert(sinfo->fspace->sect_cls);
/* Magic number */
H5MM_memcpy(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -1293,9 +1293,9 @@ H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len, void *_thi
UINT32ENCODE(chksum_image, metadata_chksum);
/* Sanity check */
- HDassert((chksum_image == image) ||
- ((size_t)((image - (uint8_t *)_image) + (chksum_image - image)) == sinfo->fspace->sect_size));
- HDassert(sinfo->fspace->sect_size <= sinfo->fspace->alloc_sect_size);
+ assert((chksum_image == image) ||
+ ((size_t)((image - (uint8_t *)_image) + (chksum_image - image)) == sinfo->fspace->sect_size));
+ assert(sinfo->fspace->sect_size <= sinfo->fspace->alloc_sect_size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1322,7 +1322,7 @@ H5FS__cache_sinfo_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(sinfo);
+ assert(sinfo);
/* Check if the file was opened with SWMR-write access */
if (sinfo->fspace->swmr_write) {
@@ -1358,7 +1358,7 @@ H5FS__cache_sinfo_notify(H5AC_notify_action_t action, void *_thing)
#ifdef NDEBUG
HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
#else /* NDEBUG */
- HDassert(0 && "Unknown action?!?");
+ assert(0 && "Unknown action?!?");
#endif /* NDEBUG */
} /* end switch */
} /* end if */
@@ -1394,12 +1394,12 @@ H5FS__cache_sinfo_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(sinfo);
- HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
- HDassert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(sinfo->fspace->cache_info.is_pinned);
+ assert(sinfo);
+ assert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
+ assert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
+ assert(sinfo->fspace->cache_info.is_pinned);
/* Destroy free space info */
if (H5FS__sinfo_dest(sinfo) < 0)
@@ -1433,9 +1433,9 @@ H5FS__sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(udata->sinfo);
- HDassert(udata->image);
+ assert(sect);
+ assert(udata->sinfo);
+ assert(udata->image);
/* Get section's class */
sect_cls = &udata->sinfo->fspace->sect_cls[sect->type];
@@ -1457,7 +1457,7 @@ H5FS__sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat
(*udata->image) += sect_cls->serial_size;
} /* end if */
else
- HDassert(sect_cls->serial_size == 0);
+ assert(sect_cls->serial_size == 0);
} /* end if */
done:
@@ -1487,9 +1487,9 @@ H5FS__sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace_node);
- HDassert(udata->sinfo);
- HDassert(udata->image);
+ assert(fspace_node);
+ assert(udata->sinfo);
+ assert(udata->image);
/* Check if this node has any serializable sections */
if (fspace_node->serial_count > 0) {
@@ -1500,7 +1500,7 @@ H5FS__sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat
UINT64ENCODE_VAR(*udata->image, fspace_node->sect_size, udata->sinfo->sect_len_size);
/* Iterate through all the sections of this size */
- HDassert(fspace_node->sect_list);
+ assert(fspace_node->sect_list);
if (H5SL_iterate(fspace_node->sect_list, H5FS__sinfo_serialize_sect_cb, udata) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section nodes")
} /* end if */
diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c
index 769357e..e10a3a0 100644
--- a/src/H5FSdbg.c
+++ b/src/H5FSdbg.c
@@ -90,11 +90,11 @@ H5FS_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Initialize user data for protecting the free space manager */
cache_udata.f = f;
@@ -111,37 +111,37 @@ H5FS_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header")
/* Print opening message */
- HDfprintf(stream, "%*sFree Space Header...\n", indent, "");
+ fprintf(stream, "%*sFree Space Header...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Free space client:",
- (fspace->client == H5FS_CLIENT_FHEAP_ID
- ? "Fractal heap"
- : (fspace->client == H5FS_CLIENT_FILE_ID ? "File" : "Unknown")));
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Total free space tracked:", fspace->tot_space);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Total number of free space sections tracked:", fspace->tot_sect_count);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of serializable free space sections tracked:", fspace->serial_sect_count);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of ghost free space sections tracked:", fspace->ghost_sect_count);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of free space section classes:", (unsigned)fspace->nclasses);
- HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Shrink percent:", fspace->shrink_percent);
- HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Expand percent:", fspace->expand_percent);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of bits for section address space:", fspace->max_sect_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Maximum section size:", fspace->max_sect_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Serialized sections address:", fspace->sect_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Serialized sections size used:", fspace->sect_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Serialized sections size allocated:", fspace->alloc_sect_size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Free space client:",
+ (fspace->client == H5FS_CLIENT_FHEAP_ID
+ ? "Fractal heap"
+ : (fspace->client == H5FS_CLIENT_FILE_ID ? "File" : "Unknown")));
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Total free space tracked:", fspace->tot_space);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Total number of free space sections tracked:", fspace->tot_sect_count);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of serializable free space sections tracked:", fspace->serial_sect_count);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Number of ghost free space sections tracked:", fspace->ghost_sect_count);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Number of free space section classes:", (unsigned)fspace->nclasses);
+ fprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Shrink percent:", fspace->shrink_percent);
+ fprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Expand percent:", fspace->expand_percent);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "# of bits for section address space:", fspace->max_sect_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Maximum section size:", fspace->max_sect_size);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Serialized sections address:", fspace->sect_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Serialized sections size used:", fspace->sect_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Serialized sections size allocated:", fspace->alloc_sect_size);
done:
if (fspace && H5AC_unprotect(f, H5AC_FSPACE_HDR, addr, fspace, H5AC__NO_FLAGS_SET) < 0)
@@ -172,11 +172,11 @@ H5FS_sect_debug(const H5FS_t *fspace, const H5FS_section_info_t *sect, FILE *str
/*
* Check arguments.
*/
- HDassert(fspace);
- HDassert(sect);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(fspace);
+ assert(sect);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Call the section's debugging routine */
if (fspace->sect_cls[sect->type].debug)
@@ -213,13 +213,13 @@ H5FS_sects_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int indent
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(H5F_addr_defined(fs_addr));
- HDassert(H5F_addr_defined(client_addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(H5F_addr_defined(fs_addr));
+ assert(H5F_addr_defined(client_addr));
/* Initialize user data for protecting the free space manager */
cache_udata.f = f;
@@ -247,7 +247,7 @@ H5FS_sects_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int indent
fspace = NULL;
/* Print opening message */
- HDfprintf(stream, "%*sFree Space Sections...\n", indent, "");
+ fprintf(stream, "%*sFree Space Sections...\n", indent, "");
/*
* Print the values.
@@ -265,7 +265,7 @@ H5FS_sects_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int indent
case H5FS_NUM_CLIENT_ID:
default:
- HDfprintf(stream, "Unknown client!\n");
+ fprintf(stream, "Unknown client!\n");
break;
} /* end switch */
diff --git a/src/H5FSint.c b/src/H5FSint.c
index 9910a41..06c4f72 100644
--- a/src/H5FSint.c
+++ b/src/H5FSint.c
@@ -86,8 +86,8 @@ H5FS__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Create a flush dependency between parent and child entry */
if (H5AC_create_flush_dependency(parent_entry, child_entry) < 0)
@@ -117,8 +117,8 @@ H5FS__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(parent_entry);
- HDassert(child_entry);
+ assert(parent_entry);
+ assert(child_entry);
/* Destroy a flush dependency between parent and child entry */
if (H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0)
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index 4896a3b..eabe354 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -119,10 +119,10 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: fspace->addr = %" PRIuHADDR "\n", __func__, fspace->addr);
+ fprintf(stderr, "%s: fspace->addr = %" PRIuHADDR "\n", __func__, fspace->addr);
#endif /* H5FS_SINFO_DEBUG */
/* Allocate the free space header */
@@ -135,11 +135,11 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace)
sinfo->sect_off_size = (fspace->max_sect_addr + 7) / 8;
sinfo->sect_len_size = H5VM_limit_enc_size((uint64_t)fspace->max_sect_size);
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: fspace->max_sect_size = %" PRIuHSIZE "\n", __func__, fspace->max_sect_size);
- HDfprintf(stderr, "%s: fspace->max_sect_addr = %u\n", __func__, fspace->max_sect_addr);
- HDfprintf(stderr, "%s: sinfo->nbins = %u\n", __func__, sinfo->nbins);
- HDfprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n", __func__,
- sinfo->sect_off_size, sinfo->sect_len_size);
+ fprintf(stderr, "%s: fspace->max_sect_size = %" PRIuHSIZE "\n", __func__, fspace->max_sect_size);
+ fprintf(stderr, "%s: fspace->max_sect_addr = %u\n", __func__, fspace->max_sect_addr);
+ fprintf(stderr, "%s: sinfo->nbins = %u\n", __func__, sinfo->nbins);
+ fprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n", __func__,
+ sinfo->sect_off_size, sinfo->sect_len_size);
#endif /* H5FS_SINFO_DEBUG */
/* Allocate space for the section size bins */
@@ -154,7 +154,7 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace)
/* Link free space manager to section info */
/* (for deserializing sections) */
- HDassert(fspace->sinfo == NULL);
+ assert(fspace->sinfo == NULL);
fspace->sinfo = sinfo;
/* Set return value */
@@ -199,20 +199,20 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
FUNC_ENTER_PACKAGE
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr,
- "%s: Called, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR
- "\n",
- __func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
- __func__, fspace->alloc_sect_size, fspace->sect_size);
+ fprintf(stderr,
+ "%s: Called, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR
+ "\n",
+ __func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr);
+ fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
+ __func__, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
/* only H5AC__READ_ONLY_FLAG may appear in accmode */
- HDassert((accmode & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((accmode & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* If the free space header doesn't already "own" the section info, load
* section info or create it
@@ -221,7 +221,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
/* Check if the section info was protected & we want a different access mode */
/* only H5AC__READ_ONLY_FLAG may appear in fspace->sinfo_accmode */
- HDassert(((fspace->sinfo_accmode) & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert(((fspace->sinfo_accmode) & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
if (fspace->sinfo_protected && accmode != fspace->sinfo_accmode) {
/* Check if we need to switch from read-only access to read-write */
@@ -248,12 +248,12 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
/* If the section address is defined, load it from the file */
if (H5F_addr_defined(fspace->sect_addr)) {
/* Sanity check */
- HDassert(fspace->sinfo_protected == FALSE);
- HDassert(H5F_addr_defined(fspace->addr));
+ assert(fspace->sinfo_protected == FALSE);
+ assert(H5F_addr_defined(fspace->addr));
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %" PRIuHADDR "\n",
- __func__, fspace->sect_addr);
+ fprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %" PRIuHADDR "\n",
+ __func__, fspace->sect_addr);
#endif /* H5FS_SINFO_DEBUG */
/* Protect the free space sections */
cache_udata.f = f;
@@ -268,12 +268,12 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
} /* end if */
else {
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Creating new section info\n", __func__);
+ fprintf(stderr, "%s: Creating new section info\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Sanity check */
- HDassert(fspace->tot_sect_count == 0);
- HDassert(fspace->serial_sect_count == 0);
- HDassert(fspace->ghost_sect_count == 0);
+ assert(fspace->tot_sect_count == 0);
+ assert(fspace->serial_sect_count == 0);
+ assert(fspace->ghost_sect_count == 0);
/* Allocate and initialize free space section info */
if (NULL == (fspace->sinfo = H5FS__sinfo_new(f, fspace)))
@@ -283,19 +283,19 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
fspace->sect_size = fspace->alloc_sect_size = 0;
} /* end if */
} /* end if */
- HDassert(fspace->rc == 2);
+ assert(fspace->rc == 2);
/* Increment the section info lock count */
fspace->sinfo_lock_count++;
done:
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr,
- "%s: Leaving, fspace->addr = %" PRIuHADDR
- ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR "\n",
- __func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
- __func__, fspace->alloc_sect_size, fspace->sect_size);
+ fprintf(stderr,
+ "%s: Leaving, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR
+ "\n",
+ __func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr);
+ fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
+ __func__, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS__sinfo_lock() */
@@ -334,23 +334,21 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
FUNC_ENTER_PACKAGE
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr,
- "%s: Called, modified = %d, fspace->addr = %" PRIuHADDR ", fspace->sect_addr = %" PRIuHADDR
- "\n",
- __func__, modified, fspace->addr, fspace->sect_addr);
- HDfprintf(
- stderr,
- "%s: fspace->sinfo_lock_count = %u, fspace->sinfo_modified = %d, fspace->sinfo_protected = %d\n",
- __func__, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected);
- HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
- __func__, fspace->alloc_sect_size, fspace->sect_size);
+ fprintf(stderr,
+ "%s: Called, modified = %d, fspace->addr = %" PRIuHADDR ", fspace->sect_addr = %" PRIuHADDR "\n",
+ __func__, modified, fspace->addr, fspace->sect_addr);
+ fprintf(stderr,
+ "%s: fspace->sinfo_lock_count = %u, fspace->sinfo_modified = %d, fspace->sinfo_protected = %d\n",
+ __func__, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected);
+ fprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
+ __func__, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
- HDassert(fspace->rc == 2);
- HDassert(fspace->sinfo);
+ assert(f);
+ assert(fspace);
+ assert(fspace->rc == 2);
+ assert(fspace->sinfo);
/* Check if we modified any section */
if (modified) {
@@ -390,7 +388,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting heap */
/* Sanity check */
- HDassert(H5F_addr_defined(fspace->addr));
+ assert(H5F_addr_defined(fspace->addr));
/* Check if we've made new changes to the section info while locked */
if (fspace->sinfo_modified) {
@@ -412,13 +410,13 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
} /* end if */
/* Sanity check */
- HDassert(H5F_addr_defined(fspace->sect_addr));
+ assert(H5F_addr_defined(fspace->sect_addr));
/* Unprotect section info in cache */
/* (Possibly dirty) */
/* (Possibly taking ownership from the cache) */
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Unprotecting section info, cache_flags = %u\n", __func__, cache_flags);
+ fprintf(stderr, "%s: Unprotecting section info, cache_flags = %u\n", __func__, cache_flags);
#endif /* H5FS_SINFO_DEBUG */
if (H5AC_unprotect(f, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, cache_flags) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info")
@@ -429,14 +427,14 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
/* Check if header is taking ownership of section info */
if ((cache_flags & H5AC__TAKE_OWNERSHIP_FLAG)) {
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Taking ownership of section info\n", __func__);
+ fprintf(stderr, "%s: Taking ownership of section info\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Set flag to release section info space in file */
release_sinfo_space = TRUE;
} /* end if */
else {
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Relinquishing section info ownership\n", __func__);
+ fprintf(stderr, "%s: Relinquishing section info ownership\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Free space header relinquished ownership of section info */
fspace->sinfo = NULL;
@@ -460,15 +458,15 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
release_sinfo_space = TRUE;
}
else
- HDassert(fspace->alloc_sect_size == 0);
+ assert(fspace->alloc_sect_size == 0);
} /* end if */
else {
/* Sanity checks... */
if (H5F_addr_defined(fspace->sect_addr))
- HDassert(fspace->alloc_sect_size == fspace->sect_size);
+ assert(fspace->alloc_sect_size == fspace->sect_size);
else
- HDassert(fspace->alloc_sect_size == 0);
+ assert(fspace->alloc_sect_size == 0);
} /* end else */
} /* end else */
@@ -481,7 +479,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
hsize_t old_alloc_sect_size = fspace->alloc_sect_size; /* Previous size of section info in file */
/* Sanity check */
- HDassert(H5F_addr_defined(fspace->addr));
+ assert(H5F_addr_defined(fspace->addr));
/* Reset section info in header */
fspace->sect_addr = HADDR_UNDEF;
@@ -494,10 +492,10 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
"unable to mark free space header as dirty")
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr,
- "%s: Freeing section info on disk, old_sect_addr = %" PRIuHADDR
- ", old_alloc_sect_size = %" PRIuHSIZE "\n",
- __func__, old_sect_addr, old_alloc_sect_size);
+ fprintf(stderr,
+ "%s: Freeing section info on disk, old_sect_addr = %" PRIuHADDR
+ ", old_alloc_sect_size = %" PRIuHSIZE "\n",
+ __func__, old_sect_addr, old_alloc_sect_size);
#endif /* H5FS_SINFO_DEBUG */
/* Release space for section info in file */
if (!H5F_IS_TMP_ADDR(f, old_sect_addr))
@@ -508,7 +506,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
done:
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS__sinfo_unlock() */
@@ -531,7 +529,7 @@ H5FS__sect_serialize_size(H5FS_t *fspace)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(fspace);
+ assert(fspace);
/* Compute the size of the buffer required to serialize all the sections */
if (fspace->serial_sect_count > 0) {
@@ -587,9 +585,9 @@ H5FS__sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls, unsigned fl
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(cls);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(cls);
/* Increment total # of sections on free space list */
fspace->tot_sect_count++;
@@ -597,7 +595,7 @@ H5FS__sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls, unsigned fl
/* Check for serializable or 'ghost' section */
if (cls->flags & H5FS_CLS_GHOST_OBJ) {
/* Sanity check */
- HDassert(cls->serial_size == 0);
+ assert(cls->serial_size == 0);
/* Increment # of ghost sections */
fspace->ghost_sect_count++;
@@ -642,9 +640,9 @@ H5FS__sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(cls);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(cls);
/* Decrement total # of sections in free space manager */
fspace->tot_sect_count--;
@@ -652,7 +650,7 @@ H5FS__sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls)
/* Check for serializable or 'ghost' section */
if (cls->flags & H5FS_CLS_GHOST_OBJ) {
/* Sanity check */
- HDassert(cls->serial_size == 0);
+ assert(cls->serial_size == 0);
/* Decrement # of ghost sections */
fspace->ghost_sect_count--;
@@ -694,9 +692,9 @@ H5FS__size_node_decr(H5FS_sinfo_t *sinfo, unsigned bin, H5FS_node_t *fspace_node
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sinfo);
- HDassert(fspace_node);
- HDassert(cls);
+ assert(sinfo);
+ assert(fspace_node);
+ assert(cls);
/* Decrement the # of sections in this bin */
/* (Different from the # of items in the bin's skiplist, since each node on
@@ -734,8 +732,8 @@ H5FS__size_node_decr(H5FS_sinfo_t *sinfo, unsigned bin, H5FS_node_t *fspace_node
H5FS_node_t *tmp_fspace_node; /* Free space list size node */
/* Sanity checks */
- HDassert(fspace_node->ghost_count == 0);
- HDassert(fspace_node->serial_count == 0);
+ assert(fspace_node->ghost_count == 0);
+ assert(fspace_node->serial_count == 0);
/* Remove size tracking list from bin */
tmp_fspace_node = (H5FS_node_t *)H5SL_remove(sinfo->bins[bin].bin_list, &fspace_node->sect_size);
@@ -781,14 +779,14 @@ H5FS__sect_unlink_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5F
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sinfo);
- HDassert(sinfo->bins);
- HDassert(sect);
- HDassert(cls);
+ assert(sinfo);
+ assert(sinfo->bins);
+ assert(sect);
+ assert(cls);
/* Determine correct bin which holds items of at least the section's size */
bin = H5VM_log2_gen(sect->size);
- HDassert(bin < sinfo->nbins);
+ assert(bin < sinfo->nbins);
if (sinfo->bins[bin].bin_list == NULL)
HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "node's bin is empty?")
@@ -831,10 +829,10 @@ H5FS__sect_unlink_rest(H5FS_t *fspace, const H5FS_section_class_t *cls, H5FS_sec
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(cls);
- HDassert(sect);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(cls);
+ assert(sect);
/* Remove node from merge list, if it was entered there */
if (!(cls->flags & H5FS_CLS_SEPAR_OBJ)) {
@@ -877,9 +875,9 @@ H5FS__sect_remove_real(H5FS_t *fspace, H5FS_section_info_t *sect)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(sect);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(sect);
/* Get section's class */
cls = &fspace->sect_cls[sect->type];
@@ -918,9 +916,9 @@ H5FS_sect_remove(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
- HDassert(sect);
+ assert(f);
+ assert(fspace);
+ assert(sect);
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
@@ -962,14 +960,14 @@ H5FS__sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5FS_
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sinfo);
- HDassert(sect);
- HDassert(H5F_addr_defined(sect->addr));
- HDassert(sect->size);
+ assert(sinfo);
+ assert(sect);
+ assert(H5F_addr_defined(sect->addr));
+ assert(sect->size);
/* Determine correct bin which holds items of the section's size */
bin = H5VM_log2_gen(sect->size);
- HDassert(bin < sinfo->nbins);
+ assert(bin < sinfo->nbins);
if (sinfo->bins[bin].bin_list == NULL) {
if (NULL == (sinfo->bins[bin].bin_list = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes")
@@ -1060,9 +1058,9 @@ H5FS__sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls, H5FS_secti
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(sect);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(sect);
/* Add section to the address-ordered list of sections, if allowed */
if (!(cls->flags & H5FS_CLS_SEPAR_OBJ)) {
@@ -1107,9 +1105,9 @@ H5FS__sect_link(H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(sect);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(sect);
/* Get section's class */
cls = &fspace->sect_cls[sect->type];
@@ -1152,10 +1150,10 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(*sect);
- HDassert(H5F_addr_defined((*sect)->addr));
- HDassert((*sect)->size);
+ assert(fspace);
+ assert(*sect);
+ assert(H5F_addr_defined((*sect)->addr));
+ assert((*sect)->size);
/* Loop until no more merging */
if (fspace->sinfo->merge_list) {
@@ -1196,7 +1194,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't check for merging sections")
if (status > 0) {
/* Sanity check */
- HDassert(tmp_sect_cls->merge);
+ assert(tmp_sect_cls->merge);
/* Remove 'less than' node from data structures */
if (H5FS__sect_remove_real(fspace, tmp_sect) < 0)
@@ -1243,7 +1241,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't check for merging sections")
if (status > 0) {
/* Sanity check */
- HDassert(sect_cls->merge);
+ assert(sect_cls->merge);
/* Remove 'greater than' node from data structures */
if (H5FS__sect_remove_real(fspace, tmp_sect) < 0)
@@ -1266,7 +1264,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
} /* end if */
} while (modified);
} /* end if */
- HDassert(*sect);
+ assert(*sect);
/* Loop until no more shrinking */
do {
@@ -1290,7 +1288,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
/* Shrink the container */
/* (callback can indicate that it has discarded the section by setting *sect to NULL) */
- HDassert(sect_cls->shrink);
+ assert(sect_cls->shrink);
if ((*sect_cls->shrink)(sect, op_data) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't shrink free space container")
@@ -1304,7 +1302,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
if (NULL != (last_node = H5SL_last(fspace->sinfo->merge_list))) {
/* Get the pointer to the last section, from the last node */
*sect = (H5FS_section_info_t *)H5SL_item(last_node);
- HDassert(*sect);
+ assert(*sect);
/* Indicate that this section needs to be removed if it causes a shrink */
remove_sect = TRUE;
@@ -1349,16 +1347,16 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: *sect = {%" PRIuHADDR ", %" PRIuHSIZE ", %u, %s}\n", __func__, sect->addr,
- sect->size, sect->type,
- (sect->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
+ fprintf(stderr, "%s: *sect = {%" PRIuHADDR ", %" PRIuHSIZE ", %u, %s}\n", __func__, sect->addr,
+ sect->size, sect->type,
+ (sect->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
#endif /* H5FS_SINFO_DEBUG */
/* Check arguments. */
- HDassert(fspace);
- HDassert(sect);
- HDassert(H5F_addr_defined(sect->addr));
- HDassert(sect->size);
+ assert(fspace);
+ assert(sect);
+ assert(H5F_addr_defined(sect->addr));
+ assert(sect->size);
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
@@ -1374,7 +1372,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag
/* Check for merging returned space with existing section node */
if (flags & H5FS_ADD_RETURNED_SPACE) {
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Returning space\n", __func__);
+ fprintf(stderr, "%s: Returning space\n", __func__);
#endif /* H5FS_SINFO_DEBUG */
/* Attempt to merge returned section with existing sections */
@@ -1391,7 +1389,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space section into skip list")
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: fspace->tot_space = %" PRIuHSIZE "\n", __func__, fspace->tot_space);
+ fprintf(stderr, "%s: fspace->tot_space = %" PRIuHSIZE "\n", __func__, fspace->tot_space);
#endif /* H5FS_SINFO_DEBUG */
/* Mark free space sections as changed */
/* (if adding sections while deserializing sections, don't set the flag) */
@@ -1408,7 +1406,7 @@ done:
H5FS__assert(fspace);
#endif /* H5FS_DEBUG_ASSERT */
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sect_add() */
@@ -1436,23 +1434,22 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", extra_requested = %" PRIuHSIZE "\n",
- __func__, addr, size, extra_requested);
+ fprintf(stderr, "%s: addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", extra_requested = %" PRIuHSIZE "\n",
+ __func__, addr, size, extra_requested);
#endif /* H5FS_SINFO_DEBUG */
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
- HDassert(H5F_addr_defined(addr));
- HDassert(size > 0);
- HDassert(extra_requested > 0);
+ assert(f);
+ assert(fspace);
+ assert(H5F_addr_defined(addr));
+ assert(size > 0);
+ assert(extra_requested > 0);
/* Check for any sections on free space list */
#ifdef H5FS_SINFO_DEBUG
- HDfprintf(stderr, "%s: fspace->tot_sect_count = %" PRIuHSIZE "\n", __func__, fspace->tot_sect_count);
- HDfprintf(stderr, "%s: fspace->serial_sect_count = %" PRIuHSIZE "\n", __func__,
- fspace->serial_sect_count);
- HDfprintf(stderr, "%s: fspace->ghost_sect_count = %" PRIuHSIZE "\n", __func__, fspace->ghost_sect_count);
+ fprintf(stderr, "%s: fspace->tot_sect_count = %" PRIuHSIZE "\n", __func__, fspace->tot_sect_count);
+ fprintf(stderr, "%s: fspace->serial_sect_count = %" PRIuHSIZE "\n", __func__, fspace->serial_sect_count);
+ fprintf(stderr, "%s: fspace->ghost_sect_count = %" PRIuHSIZE "\n", __func__, fspace->ghost_sect_count);
#endif /* H5FS_SINFO_DEBUG */
if (fspace->tot_sect_count > 0) {
H5FS_section_info_t *sect; /* Temporary free space section */
@@ -1508,7 +1505,7 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
*/
if (sect->size > extra_requested) {
/* Sanity check (for now) */
- HDassert(cls->flags & H5FS_CLS_ADJUST_OK);
+ assert(cls->flags & H5FS_CLS_ADJUST_OK);
/* Adjust section by amount requested */
sect->addr += extra_requested;
@@ -1528,7 +1525,7 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
} /* end if */
else {
/* Sanity check */
- HDassert(sect->size == extra_requested);
+ assert(sect->size == extra_requested);
/* Exact match, so just free section */
if ((*cls->free)(sect) < 0)
@@ -1577,11 +1574,11 @@ H5FS_sect_try_merge(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigne
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(f);
- HDassert(fspace);
- HDassert(sect);
- HDassert(H5F_addr_defined(sect->addr));
- HDassert(sect->size);
+ assert(f);
+ assert(fspace);
+ assert(sect);
+ assert(H5F_addr_defined(sect->addr));
+ assert(sect->size);
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
@@ -1644,15 +1641,15 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->sinfo);
- HDassert(fspace->sinfo->bins);
- HDassert(request > 0);
- HDassert(node);
+ assert(fspace);
+ assert(fspace->sinfo);
+ assert(fspace->sinfo->bins);
+ assert(request > 0);
+ assert(node);
/* Determine correct bin which holds items of at least the section's size */
bin = H5VM_log2_gen(request);
- HDassert(bin < fspace->sinfo->nbins);
+ assert(bin < fspace->sinfo->nbins);
alignment = fspace->alignment;
if (!((alignment > 1) && (request >= fspace->align_thres)))
alignment = 0; /* no alignment */
@@ -1708,13 +1705,13 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node
/* Get section node */
curr_sect = (H5FS_section_info_t *)H5SL_item(curr_sect_node);
- HDassert(H5F_addr_defined(curr_sect->addr));
- HDassert(curr_fspace_node->sect_size == curr_sect->size);
+ assert(H5F_addr_defined(curr_sect->addr));
+ assert(curr_fspace_node->sect_size == curr_sect->size);
cls = &fspace->sect_cls[curr_sect->type];
- HDassert(alignment);
- HDassert(cls);
+ assert(alignment);
+ assert(cls);
if ((mis_align = curr_sect->addr % alignment))
frag_size = alignment - mis_align;
@@ -1746,8 +1743,8 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL,
"can't insert free space section into skip list")
/* sanity check */
- HDassert(split_sect->addr < (*node)->addr);
- HDassert(request <= (*node)->size);
+ assert(split_sect->addr < (*node)->addr);
+ assert(request <= (*node)->size);
} /* end if */
/* Indicate that we found a node for the request */
HGOTO_DONE(TRUE)
@@ -1793,10 +1790,10 @@ H5FS_sect_find(H5F_t *f, H5FS_t *fspace, hsize_t request, H5FS_section_info_t **
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(fspace);
- HDassert(fspace->nclasses);
- HDassert(request);
- HDassert(node);
+ assert(fspace);
+ assert(fspace->nclasses);
+ assert(request);
+ assert(node);
/* Check for any sections on free space list */
if (fspace->tot_sect_count > 0) {
@@ -1850,9 +1847,9 @@ H5FS__iterate_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect_info);
- HDassert(udata->fspace);
- HDassert(udata->op);
+ assert(sect_info);
+ assert(udata->fspace);
+ assert(udata->op);
/* Make callback for this section */
if ((*udata->op)(sect_info, udata->op_data) < 0)
@@ -1885,12 +1882,12 @@ H5FS__iterate_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(fspace_node);
- HDassert(udata->fspace);
- HDassert(udata->op);
+ assert(fspace_node);
+ assert(udata->fspace);
+ assert(udata->op);
/* Iterate through all the sections of this size */
- HDassert(fspace_node->sect_list);
+ assert(fspace_node->sect_list);
if (H5SL_iterate(fspace_node->sect_list, H5FS__iterate_sect_cb, udata) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section nodes")
@@ -1920,8 +1917,8 @@ H5FS_sect_iterate(H5F_t *f, H5FS_t *fspace, H5FS_operator_t op, void *op_data)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(fspace);
- HDassert(op);
+ assert(fspace);
+ assert(op);
/* Set up user data for iterator */
udata.fspace = fspace;
@@ -1974,7 +1971,7 @@ H5FS_sect_stats(const H5FS_t *fspace, hsize_t *tot_space, hsize_t *nsects)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fspace);
+ assert(fspace);
/* Get the stats desired */
if (tot_space)
@@ -2010,10 +2007,10 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, uint
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(fspace);
- HDassert(sect);
- HDassert(sect->type < fspace->nclasses);
- HDassert(new_class < fspace->nclasses);
+ assert(fspace);
+ assert(sect);
+ assert(sect->type < fspace->nclasses);
+ assert(new_class < fspace->nclasses);
/* Get a pointer to the section info */
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
@@ -2038,16 +2035,16 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, uint
to_ghost = TRUE;
/* Sanity check */
- HDassert(fspace->sinfo->bins);
+ assert(fspace->sinfo->bins);
/* Determine correct bin which holds items of at least the section's size */
bin = H5VM_log2_gen(sect->size);
- HDassert(bin < fspace->sinfo->nbins);
- HDassert(fspace->sinfo->bins[bin].bin_list);
+ assert(bin < fspace->sinfo->nbins);
+ assert(fspace->sinfo->bins[bin].bin_list);
/* Get space node for section's size */
fspace_node = (H5FS_node_t *)H5SL_search(fspace->sinfo->bins[bin].bin_list, &sect->size);
- HDassert(fspace_node);
+ assert(fspace_node);
/* Adjust serializable/ghost counts */
if (to_ghost) {
@@ -2216,8 +2213,8 @@ H5FS__sect_assert(const H5FS_t *fspace)
cls = &fspace->sect_cls[sect->type];
/* Sanity check section */
- HDassert(H5F_addr_defined(sect->addr));
- HDassert(fspace_node->sect_size == sect->size);
+ assert(H5F_addr_defined(sect->addr));
+ assert(fspace_node->sect_size == sect->size);
if (cls->valid)
(*cls->valid)(cls, sect);
@@ -2236,8 +2233,8 @@ H5FS__sect_assert(const H5FS_t *fspace)
} /* end while */
/* Check the number of serializable & ghost sections of this size */
- HDassert(fspace_node->serial_count == size_serial_count);
- HDassert(fspace_node->ghost_count == size_ghost_count);
+ assert(fspace_node->serial_count == size_serial_count);
+ assert(fspace_node->ghost_count == size_ghost_count);
/* Add to global count of serializable & ghost section sizes */
if (fspace_node->serial_count > 0)
@@ -2254,30 +2251,30 @@ H5FS__sect_assert(const H5FS_t *fspace)
} /* end while */
/* Check the number of serializable & ghost sections in this bin */
- HDassert(fspace->sinfo->bins[u].tot_sect_count == (bin_serial_count + bin_ghost_count));
- HDassert(fspace->sinfo->bins[u].serial_sect_count == bin_serial_count);
- HDassert(fspace->sinfo->bins[u].ghost_sect_count == bin_ghost_count);
+ assert(fspace->sinfo->bins[u].tot_sect_count == (bin_serial_count + bin_ghost_count));
+ assert(fspace->sinfo->bins[u].serial_sect_count == bin_serial_count);
+ assert(fspace->sinfo->bins[u].ghost_sect_count == bin_ghost_count);
} /* end if */
} /* end for */
/* Check counts from bins vs. global counts */
- HDassert(fspace->sinfo->tot_size_count == acc_tot_size_count);
- HDassert(fspace->sinfo->serial_size_count == acc_serial_size_count);
- HDassert(fspace->sinfo->ghost_size_count == acc_ghost_size_count);
- HDassert(fspace->tot_sect_count == acc_tot_sect_count);
- HDassert(fspace->serial_sect_count == acc_serial_sect_count);
- HDassert(fspace->ghost_sect_count == acc_ghost_sect_count);
+ assert(fspace->sinfo->tot_size_count == acc_tot_size_count);
+ assert(fspace->sinfo->serial_size_count == acc_serial_size_count);
+ assert(fspace->sinfo->ghost_size_count == acc_ghost_size_count);
+ assert(fspace->tot_sect_count == acc_tot_sect_count);
+ assert(fspace->serial_sect_count == acc_serial_sect_count);
+ assert(fspace->ghost_sect_count == acc_ghost_sect_count);
} /* end if */
else {
/* Check counts are zero */
- HDassert(fspace->tot_sect_count == 0);
- HDassert(fspace->serial_sect_count == 0);
- HDassert(fspace->ghost_sect_count == 0);
+ assert(fspace->tot_sect_count == 0);
+ assert(fspace->serial_sect_count == 0);
+ assert(fspace->ghost_sect_count == 0);
} /* end else */
/* Make certain that the number of sections on the address list is correct */
if (fspace->sinfo->merge_list)
- HDassert(fspace->tot_sect_count == (separate_obj + H5SL_count(fspace->sinfo->merge_list)));
+ assert(fspace->tot_sect_count == (separate_obj + H5SL_count(fspace->sinfo->merge_list)));
FUNC_LEAVE_NOAPI_VOID
} /* end H5FS__sect_assert() */
@@ -2305,7 +2302,7 @@ H5FS_sect_try_shrink_eoa(H5F_t *f, H5FS_t *fspace, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
- HDassert(fspace);
+ assert(fspace);
if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info")
@@ -2321,14 +2318,14 @@ H5FS_sect_try_shrink_eoa(H5F_t *f, H5FS_t *fspace, void *op_data)
/* Get the pointer to the last section, from the last node */
tmp_sect = (H5FS_section_info_t *)H5SL_item(last_node);
- HDassert(tmp_sect);
+ assert(tmp_sect);
tmp_sect_cls = &fspace->sect_cls[tmp_sect->type];
if (tmp_sect_cls->can_shrink) {
/* Check if the section can be shrunk away */
if ((ret_value = (*tmp_sect_cls->can_shrink)(tmp_sect, op_data)) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTSHRINK, FAIL, "can't check for shrinking container")
if (ret_value > 0) {
- HDassert(tmp_sect_cls->shrink);
+ assert(tmp_sect_cls->shrink);
/* Remove section from free space manager */
if (H5FS__sect_remove_real(fspace, tmp_sect) < 0)
@@ -2401,25 +2398,25 @@ H5FS_vfd_alloc_hdr_and_section_info_if_needed(H5F_t *f, H5FS_t *fspace, haddr_t
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(fspace);
- HDassert(fs_addr_ptr);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(fspace);
+ assert(fs_addr_ptr);
/* the section info should be unlocked */
- HDassert(fspace->sinfo_lock_count == 0);
+ assert(fspace->sinfo_lock_count == 0);
/* persistent free space managers must be enabled */
- HDassert(f->shared->fs_persist);
+ assert(f->shared->fs_persist);
/* At present, all free space strategies enable the free space managers.
* This will probably change -- at which point this assertion should
* be revisited.
*/
/* Updated: Only the following two strategies enable the free-space managers */
- HDassert((f->shared->fs_strategy == H5F_FSPACE_STRATEGY_FSM_AGGR) ||
- (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE));
+ assert((f->shared->fs_strategy == H5F_FSPACE_STRATEGY_FSM_AGGR) ||
+ (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE));
if (fspace->serial_sect_count > 0 && fspace->sinfo) {
/* the section info is floating, so space->sinfo should be defined */
@@ -2440,7 +2437,7 @@ H5FS_vfd_alloc_hdr_and_section_info_if_needed(H5F_t *f, H5FS_t *fspace, haddr_t
hdr_alloc_size = H5FS_HEADER_SIZE(f);
if (H5F_PAGED_AGGR(f))
- HDassert(0 == (eoa % f->shared->fs_page_size));
+ assert(0 == (eoa % f->shared->fs_page_size));
/* Allocate space for the free space header */
if (HADDR_UNDEF == (fspace->addr = H5MF_alloc(f, H5FD_MEM_FSPACE_HDR, hdr_alloc_size)))
@@ -2469,7 +2466,7 @@ H5FS_vfd_alloc_hdr_and_section_info_if_needed(H5F_t *f, H5FS_t *fspace, haddr_t
sinfo_alloc_size = fspace->sect_size;
if (H5F_PAGED_AGGR(f))
- HDassert(0 == (eoa % f->shared->fs_page_size));
+ assert(0 == (eoa % f->shared->fs_page_size));
/* allocate space for the section info */
if (HADDR_UNDEF == (sect_addr = H5MF_alloc(f, H5FD_MEM_FSPACE_SINFO, sinfo_alloc_size)))
diff --git a/src/H5FSstat.c b/src/H5FSstat.c
index 91c9c13..b968580 100644
--- a/src/H5FSstat.c
+++ b/src/H5FSstat.c
@@ -74,8 +74,8 @@ H5FS_stat_info(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *stats)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(frsp);
- HDassert(stats);
+ assert(frsp);
+ assert(stats);
/* Report statistics for free space */
stats->tot_space = frsp->tot_space;
diff --git a/src/H5FStest.c b/src/H5FStest.c
index d913480..1fa4e95 100644
--- a/src/H5FStest.c
+++ b/src/H5FStest.c
@@ -76,8 +76,8 @@ H5FS__get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(frsp);
- HDassert(cparam);
+ assert(frsp);
+ assert(cparam);
cparam->client = frsp->client;
cparam->shrink_percent = frsp->shrink_percent;
@@ -109,8 +109,8 @@ H5FS__cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(cparam1);
- HDassert(cparam2);
+ assert(cparam1);
+ assert(cparam2);
if (cparam1->client < cparam2->client)
HGOTO_DONE(-1)
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index 5e39215..ceb019c 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -107,8 +107,8 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f_sh);
- HDassert(buf);
+ assert(f_sh);
+ assert(buf);
/* Translate to file driver I/O info object */
file = f_sh->lf;
@@ -122,7 +122,7 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si
if (size < H5F_ACCUM_MAX_SIZE) {
/* Sanity check */
- HDassert(!accum->buf || (accum->alloc_size >= accum->size));
+ assert(!accum->buf || (accum->alloc_size >= accum->size));
/* Current read adjoins or overlaps with metadata accumulator */
if (H5F_addr_defined(accum->loc) &&
@@ -152,7 +152,7 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si
accum->alloc_size = new_alloc_size;
/* Clear the memory */
- HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size));
+ memset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size));
} /* end if */
/* Read the part before the metadata accumulator */
@@ -275,11 +275,11 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju
FUNC_ENTER_PACKAGE
- HDassert(accum);
- HDassert(file);
- HDassert(H5F_ACCUM_APPEND == adjust || H5F_ACCUM_PREPEND == adjust);
- HDassert(size > 0);
- HDassert(size <= H5F_ACCUM_MAX_SIZE);
+ assert(accum);
+ assert(file);
+ assert(H5F_ACCUM_APPEND == adjust || H5F_ACCUM_PREPEND == adjust);
+ assert(size > 0);
+ assert(size <= H5F_ACCUM_MAX_SIZE);
/* Check if we need more buffer space */
if ((size + accum->size) > accum->alloc_size) {
@@ -388,7 +388,7 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju
accum->alloc_size = new_size;
/* Clear the memory */
- HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size)));
+ memset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size)));
} /* end if */
} /* end if */
@@ -418,9 +418,9 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert(H5F_SHARED_INTENT(f_sh) & H5F_ACC_RDWR);
- HDassert(buf);
+ assert(f_sh);
+ assert(H5F_SHARED_INTENT(f_sh) & H5F_ACC_RDWR);
+ assert(buf);
/* Translate to file driver pointer */
file = f_sh->lf;
@@ -434,7 +434,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
if (size < H5F_ACCUM_MAX_SIZE) {
/* Sanity check */
- HDassert(!accum->buf || (accum->alloc_size >= accum->size));
+ assert(!accum->buf || (accum->alloc_size >= accum->size));
/* Check if there is already metadata in the accumulator */
if (accum->size > 0) {
@@ -618,7 +618,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
accum->alloc_size = new_alloc_size;
/* Clear the memory */
- HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
+ memset(accum->buf + size, 0, (accum->alloc_size - size));
} /* end if */
/* Copy the new metadata to the buffer */
@@ -665,7 +665,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
/* Clear the memory */
clear_size = MAX(accum->size, size);
- HDmemset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
+ memset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
} /* end if */
else {
/* Check if we should shrink the accumulator buffer */
@@ -715,7 +715,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
accum->alloc_size = new_size;
/* Clear the memory */
- HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
+ memset(accum->buf + size, 0, (accum->alloc_size - size));
} /* end if */
/* Update the metadata accumulator information */
@@ -794,7 +794,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
size_t overlap_size; /* Size of overlapping region */
/* Sanity check */
- HDassert(H5F_addr_gt(addr + size, accum->loc + accum->size));
+ assert(H5F_addr_gt(addr + size, accum->loc + accum->size));
/* Compute overlap size */
overlap_size = (size_t)((accum->loc + accum->size) - addr);
@@ -859,7 +859,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f_sh);
+ assert(f_sh);
/* Set up alias for file's metadata accumulator info */
accum = &f_sh->accum;
@@ -874,8 +874,8 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
/* Sanity check */
/* (The metadata accumulator should not intersect w/raw data */
- HDassert(H5FD_MEM_DRAW != type);
- HDassert(H5FD_MEM_GHEAP != type); /* (global heap data is being treated as raw data currently) */
+ assert(H5FD_MEM_DRAW != type);
+ assert(H5FD_MEM_GHEAP != type); /* (global heap data is being treated as raw data currently) */
/* Check for overlapping the beginning of the accumulator */
if (H5F_addr_le(addr, accum->loc)) {
@@ -952,7 +952,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
write_size = (size_t)(dirty_end - tail_addr);
dirty_delta = accum->dirty_len - write_size;
- HDassert(write_size > 0);
+ assert(write_size > 0);
/* Write out the unfreed dirty region of the accumulator */
if (H5FD_write(file, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size,
@@ -973,7 +973,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
write_size = (size_t)(dirty_end - tail_addr);
dirty_delta = accum->dirty_len - write_size;
- HDassert(write_size > 0);
+ assert(write_size > 0);
/* Write out the unfreed end of the dirty region of the accumulator */
if (H5FD_write(file, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size,
@@ -1023,7 +1023,7 @@ H5F__accum_flush(H5F_shared_t *f_sh)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
/* Check if we need to flush out the metadata accumulator */
if ((f_sh->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && f_sh->accum.dirty) {
@@ -1065,7 +1065,7 @@ H5F__accum_reset(H5F_shared_t *f_sh, hbool_t flush)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
/* Flush any dirty data in accumulator, if requested */
if (flush)
diff --git a/src/H5Fcwfs.c b/src/H5Fcwfs.c
index 1eb8b2a..7d64a12 100644
--- a/src/H5Fcwfs.c
+++ b/src/H5Fcwfs.c
@@ -99,9 +99,9 @@ H5F_cwfs_add(H5F_t *f, H5HG_heap_t *heap)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(heap);
+ assert(f);
+ assert(f->shared);
+ assert(heap);
/*
* Add the new heap to the CWFS list, removing some other entry if
@@ -158,9 +158,9 @@ H5F_cwfs_find_free_heap(H5F_t *f, size_t need, haddr_t *addr)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(addr);
+ assert(f);
+ assert(f->shared);
+ assert(addr);
/* Note that we don't have metadata cache locks on the entries in
* f->shared->cwfs.
@@ -254,9 +254,9 @@ H5F_cwfs_advance_heap(H5F_t *f, H5HG_heap_t *heap, hbool_t add_heap)
FUNC_ENTER_NOAPI_NOERR
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(heap);
+ assert(f);
+ assert(f->shared);
+ assert(heap);
for (u = 0; u < f->shared->ncwfs; u++)
if (f->shared->cwfs[u] == heap) {
@@ -296,8 +296,8 @@ H5F_cwfs_remove_heap(H5F_shared_t *shared, H5HG_heap_t *heap)
FUNC_ENTER_NOAPI_NOERR
/* Check args */
- HDassert(shared);
- HDassert(heap);
+ assert(shared);
+ assert(heap);
/* Remove the heap from the CWFS list */
for (u = 0; u < shared->ncwfs; u++) {
diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c
index 99dfca3..2d22efa 100644
--- a/src/H5Fdbg.c
+++ b/src/H5Fdbg.c
@@ -50,10 +50,10 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Get property list */
if (NULL == (plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id)))
@@ -64,55 +64,55 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get userblock size")
/* debug */
- HDfprintf(stream, "%*sFile Super Block...\n", indent, "");
+ fprintf(stream, "%*sFile Super Block...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "File name (as opened):", H5F_OPEN_NAME(f));
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "File name (after resolving symlinks):", H5F_ACTUAL_NAME(f));
- HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "File access flags", f->shared->flags);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "File open reference count:", f->shared->nrefs);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (abs)\n", indent, "", fwidth,
- "Address of super block:", f->shared->sblock->base_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " bytes\n", indent, "", fwidth,
- "Size of userblock:", userblock_size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "File name (as opened):", H5F_OPEN_NAME(f));
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "File name (after resolving symlinks):", H5F_ACTUAL_NAME(f));
+ fprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "File access flags", f->shared->flags);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "File open reference count:", f->shared->nrefs);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR " (abs)\n", indent, "", fwidth,
+ "Address of super block:", f->shared->sblock->base_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " bytes\n", indent, "", fwidth,
+ "Size of userblock:", userblock_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Superblock version number:", f->shared->sblock->super_vers);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Superblock version number:", f->shared->sblock->super_vers);
/* Hard-wired versions */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Free list version number:", (unsigned)HDF5_FREESPACE_VERSION);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Root group symbol table entry version number:", (unsigned)HDF5_OBJECTDIR_VERSION);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Shared header version number:", (unsigned)HDF5_SHAREDHEADER_VERSION);
-
- HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
- "Size of file offsets (haddr_t type):", (unsigned)f->shared->sizeof_addr);
- HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
- "Size of file lengths (hsize_t type):", (unsigned)f->shared->sizeof_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table leaf node 1/2 rank:", f->shared->sblock->sym_leaf_k);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_SNODE_ID]);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Indexed storage internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_CHUNK_ID]);
- HDfprintf(stream, "%*s%-*s 0x%02x\n", indent, "", fwidth,
- "File status flags:", (unsigned)(f->shared->sblock->status_flags));
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
- "Superblock extension address:", f->shared->sblock->ext_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
- "Shared object header message table address:", f->shared->sohm_addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Shared object header message version number:", (unsigned)f->shared->sohm_vers);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of shared object header message indexes:", (unsigned)f->shared->sohm_nindexes);
-
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
- "Address of driver information block:", f->shared->sblock->driver_addr);
-
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Root group symbol table entry:", f->shared->root_grp ? "" : "(none)");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Free list version number:", (unsigned)HDF5_FREESPACE_VERSION);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Root group symbol table entry version number:", (unsigned)HDF5_OBJECTDIR_VERSION);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Shared header version number:", (unsigned)HDF5_SHAREDHEADER_VERSION);
+
+ fprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
+ "Size of file offsets (haddr_t type):", (unsigned)f->shared->sizeof_addr);
+ fprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
+ "Size of file lengths (hsize_t type):", (unsigned)f->shared->sizeof_size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Symbol table leaf node 1/2 rank:", f->shared->sblock->sym_leaf_k);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Symbol table internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_SNODE_ID]);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Indexed storage internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_CHUNK_ID]);
+ fprintf(stream, "%*s%-*s 0x%02x\n", indent, "", fwidth,
+ "File status flags:", (unsigned)(f->shared->sblock->status_flags));
+ fprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
+ "Superblock extension address:", f->shared->sblock->ext_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
+ "Shared object header message table address:", f->shared->sohm_addr);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Shared object header message version number:", (unsigned)f->shared->sohm_vers);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Number of shared object header message indexes:", (unsigned)f->shared->sohm_nindexes);
+
+ fprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
+ "Address of driver information block:", f->shared->sblock->driver_addr);
+
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Root group symbol table entry:", f->shared->root_grp ? "" : "(none)");
if (f->shared->root_grp) {
if (f->shared->sblock->root_ent) /* Use real root group symbol table entry */
H5G__ent_debug(f->shared->sblock->root_ent, stream, indent + 3, MAX(0, fwidth - 3), NULL);
@@ -125,7 +125,7 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
/* Build up a simulated root group symbol table entry */
root_oloc = H5G_oloc(f->shared->root_grp);
- HDassert(root_oloc);
+ assert(root_oloc);
root_ent.type = H5G_NOTHING_CACHED;
root_ent.header = root_oloc->addr;
diff --git a/src/H5Fefc.c b/src/H5Fefc.c
index e7de395..6f8a2cb 100644
--- a/src/H5Fefc.c
+++ b/src/H5Fefc.c
@@ -95,7 +95,7 @@ H5F__efc_create(unsigned max_nfiles)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(max_nfiles > 0);
+ assert(max_nfiles > 0);
/* Allocate EFC struct */
if (NULL == (efc = H5FL_CALLOC(H5F_efc_t)))
@@ -148,7 +148,7 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(name);
+ assert(name);
/* Get the VOL info from the fapl */
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -189,7 +189,7 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
ent = (H5F_efc_ent_t *)H5SL_search(efc->slist, name);
} /* end if */
else {
- HDassert(efc->nfiles == 0);
+ assert(efc->nfiles == 0);
if (NULL == (efc->slist = H5SL_create(H5SL_TYPE_STR, NULL)))
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, NULL, "can't create skip list")
} /* end else */
@@ -197,12 +197,12 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
/* If we found the file update the LRU list and return the cached file,
* otherwise open the file and cache it */
if (ent) {
- HDassert(efc->LRU_head);
- HDassert(efc->LRU_tail);
+ assert(efc->LRU_head);
+ assert(efc->LRU_tail);
/* Move ent to the head of the LRU list, if it is not already there */
if (ent->LRU_prev) {
- HDassert(efc->LRU_head != ent);
+ assert(efc->LRU_head != ent);
/* Remove from current position. Note that once we touch the LRU
* list we cannot revert to the previous state. Make sure there can
@@ -211,7 +211,7 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
if (ent->LRU_next)
ent->LRU_next->LRU_prev = ent->LRU_prev;
else {
- HDassert(efc->LRU_tail == ent);
+ assert(efc->LRU_tail == ent);
efc->LRU_tail = ent->LRU_prev;
} /* end else */
ent->LRU_prev->LRU_next = ent->LRU_next;
@@ -292,7 +292,7 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
ent->LRU_prev = NULL;
efc->LRU_head = ent;
if (!efc->LRU_tail) {
- HDassert(!ent->LRU_next);
+ assert(!ent->LRU_next);
efc->LRU_tail = ent;
} /* end if */
@@ -305,10 +305,10 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h
ent->file->shared->efc->nrefs++;
} /* end else */
- HDassert(ent);
- HDassert(ent->file);
- HDassert(ent->name);
- HDassert(ent->nopen);
+ assert(ent);
+ assert(ent->file);
+ assert(ent->name);
+ assert(ent->nopen);
/* Set the return value */
ret_value = ent->file;
@@ -353,10 +353,10 @@ H5F_efc_close(H5F_t *parent, H5F_t *file)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
- HDassert(parent);
- HDassert(parent->shared);
- HDassert(file);
- HDassert(file->shared);
+ assert(parent);
+ assert(parent->shared);
+ assert(file);
+ assert(file->shared);
/* Get external file cache */
efc = parent->shared->efc;
@@ -410,8 +410,8 @@ H5F__efc_max_nfiles(H5F_efc_t *efc)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(efc);
- HDassert(efc->max_nfiles > 0);
+ assert(efc);
+ assert(efc->max_nfiles > 0);
FUNC_LEAVE_NOAPI(efc->max_nfiles)
} /* end H5F__efc_max_nfiles */
@@ -441,14 +441,14 @@ H5F__efc_release_real(H5F_efc_t *efc)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(efc);
+ assert(efc);
/* Lock the EFC to prevent manipulation of the EFC while we are releasing it.
* The EFC should never be locked when we enter this function because that
* would require a cycle, a cycle would necessarily invoke
* H5F__efc_try_close(), and that function checks the status of the lock
* before calling this one. */
- HDassert((efc->tag == H5F_EFC_TAG_DEFAULT) || (efc->tag == H5F_EFC_TAG_CLOSE));
+ assert((efc->tag == H5F_EFC_TAG_DEFAULT) || (efc->tag == H5F_EFC_TAG_CLOSE));
efc->tag = H5F_EFC_TAG_LOCK;
/* Walk down the LRU list, releasing any files that are not opened by an EFC
@@ -499,7 +499,7 @@ H5F__efc_release(H5F_efc_t *efc)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(efc);
+ assert(efc);
/* Call 'real' routine */
if (H5F__efc_release_real(efc) < 0)
@@ -532,7 +532,7 @@ H5F__efc_destroy(H5F_efc_t *efc)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(efc);
+ assert(efc);
if (efc->nfiles > 0) {
/* Release (clear) the efc */
@@ -544,9 +544,9 @@ H5F__efc_destroy(H5F_efc_t *efc)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't destroy EFC after incomplete release")
} /* end if */
- HDassert(efc->nfiles == 0);
- HDassert(efc->LRU_head == NULL);
- HDassert(efc->LRU_tail == NULL);
+ assert(efc->nfiles == 0);
+ assert(efc->LRU_head == NULL);
+ assert(efc->LRU_tail == NULL);
/* Close skip list */
if (efc->slist)
@@ -582,9 +582,9 @@ H5F__efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(efc);
- HDassert(efc->slist);
- HDassert(ent);
+ assert(efc);
+ assert(efc->slist);
+ assert(ent);
/* Remove from skip list */
if (ent != H5SL_remove(efc->slist, ent->name))
@@ -594,13 +594,13 @@ H5F__efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent)
if (ent->LRU_next)
ent->LRU_next->LRU_prev = ent->LRU_prev;
else {
- HDassert(efc->LRU_tail == ent);
+ assert(efc->LRU_tail == ent);
efc->LRU_tail = ent->LRU_prev;
} /* end else */
if (ent->LRU_prev)
ent->LRU_prev->LRU_next = ent->LRU_next;
else {
- HDassert(efc->LRU_head == ent);
+ assert(efc->LRU_head == ent);
efc->LRU_head = ent->LRU_next;
} /* end else */
@@ -648,12 +648,12 @@ H5F__efc_try_close_tag1(H5F_shared_t *sf, H5F_shared_t **tail)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(sf);
- HDassert(sf->efc);
- HDassert((sf->efc->tag > 0) || (sf->nrefs == sf->efc->nrefs));
- HDassert(sf->efc->tag != H5F_EFC_TAG_LOCK);
- HDassert(tail);
- HDassert(*tail);
+ assert(sf);
+ assert(sf->efc);
+ assert((sf->efc->tag > 0) || (sf->nrefs == sf->efc->nrefs));
+ assert(sf->efc->tag != H5F_EFC_TAG_LOCK);
+ assert(tail);
+ assert(*tail);
/* Recurse into this file's cached files */
for (ent = sf->efc->LRU_head; ent; ent = ent->LRU_next) {
@@ -662,7 +662,7 @@ H5F__efc_try_close_tag1(H5F_shared_t *sf, H5F_shared_t **tail)
if (esf->efc) {
/* If tag were 0, that would mean there are more actual references
* than are counted by nrefs */
- HDassert(esf->efc->tag != 0);
+ assert(esf->efc->tag != 0);
/* If tag has been set, we have already visited this file so just
* decrement tag and continue */
@@ -678,7 +678,7 @@ H5F__efc_try_close_tag1(H5F_shared_t *sf, H5F_shared_t **tail)
!(ent->nopen)) {
/* If we get here, this file's "tmp_next" pointer must be NULL
*/
- HDassert(esf->efc->tmp_next == NULL);
+ assert(esf->efc->tmp_next == NULL);
/* If nrefs > 1, Add this file to the list of files with nrefs >
* 1 and initialize tag to the number of references (except this
@@ -721,8 +721,8 @@ H5F__efc_try_close_tag2(H5F_shared_t *sf, H5F_shared_t **tail)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(sf);
- HDassert(sf->efc);
+ assert(sf);
+ assert(sf->efc);
/* Recurse into this file's cached files */
for (ent = sf->efc->LRU_head; ent; ent = ent->LRU_next) {
@@ -741,8 +741,8 @@ H5F__efc_try_close_tag2(H5F_shared_t *sf, H5F_shared_t **tail)
((esf->efc->tag == H5F_EFC_TAG_DEFAULT) && (esf->nrefs == esf->efc->nrefs) && !(ent->nopen)))) {
/* tag should always be CLOSE is nrefs > 1 or DEFAULT if nrefs == 1
* here */
- HDassert(((esf->nrefs > 1) && ((esf->efc->tag == H5F_EFC_TAG_CLOSE))) ||
- ((esf->nrefs == 1) && (esf->efc->tag == H5F_EFC_TAG_DEFAULT)));
+ assert(((esf->nrefs > 1) && ((esf->efc->tag == H5F_EFC_TAG_CLOSE))) ||
+ ((esf->nrefs == 1) && (esf->efc->tag == H5F_EFC_TAG_DEFAULT)));
/* If tag is set to DONTCLOSE, we have already visited this file
* *or* it will be the start point of another iteration so just
@@ -831,12 +831,12 @@ H5F__efc_try_close(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->efc);
- HDassert(f->shared->nrefs > f->shared->efc->nrefs);
- HDassert(f->shared->nrefs > 1);
- HDassert(f->shared->efc->tag < 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->efc);
+ assert(f->shared->nrefs > f->shared->efc->nrefs);
+ assert(f->shared->nrefs > 1);
+ assert(f->shared->efc->tag < 0);
if (f->shared->efc->tag == H5F_EFC_TAG_CLOSE) {
/* We must have reentered this function, and we should close this file.
@@ -852,7 +852,7 @@ H5F__efc_try_close(H5F_t *f)
* detect that the parent file is open (directly or through an EFC) and
* refuse to close it. Verify that all files were released from this
* EFC (i.e. none were open). */
- HDassert(f->shared->efc->nfiles == 0);
+ assert(f->shared->efc->nfiles == 0);
HGOTO_DONE(SUCCEED)
} /* end if */
@@ -880,8 +880,8 @@ H5F__efc_try_close(H5F_t *f)
* removed from an EFC), and should have been caught by the above check */
/* If we get here then we must be beginning a new run. Make sure that the
* temporary variables in f->shared->efc are at the default value */
- HDassert(f->shared->efc->tag == H5F_EFC_TAG_DEFAULT);
- HDassert(f->shared->efc->tmp_next == NULL);
+ assert(f->shared->efc->tag == H5F_EFC_TAG_DEFAULT);
+ assert(f->shared->efc->tmp_next == NULL);
/* Set up linked list for traversal into EFC tree. f->shared is guaranteed
* to always be at the head. */
@@ -915,11 +915,11 @@ H5F__efc_try_close(H5F_t *f)
sf = f->shared;
tail = NULL;
while (sf) {
- HDassert(sf->efc->tag >= 0);
+ assert(sf->efc->tag >= 0);
next = sf->efc->tmp_next;
if (sf->efc->tag > 0) {
/* Remove from main list */
- HDassert(tail);
+ assert(tail);
tail->efc->tmp_next = sf->efc->tmp_next;
sf->efc->tmp_next = NULL;
@@ -950,7 +950,7 @@ H5F__efc_try_close(H5F_t *f)
sf = uncloseable_head;
if (sf) {
tail = uncloseable_tail;
- HDassert(tail);
+ assert(tail);
while (sf != tail->efc->tmp_next) {
H5F__efc_try_close_tag2(sf, &uncloseable_tail);
sf = sf->efc->tmp_next;
@@ -966,7 +966,7 @@ H5F__efc_try_close(H5F_t *f)
/* Make sure the file's reference count is now 1 and will be closed by
* H5F_dest(). */
- HDassert(f->shared->nrefs == 1);
+ assert(f->shared->nrefs == 1);
} /* end if */
/* Clean up uncloseable files (reset tag and tmp_next). All closeable files
@@ -975,7 +975,7 @@ H5F__efc_try_close(H5F_t *f)
sf = uncloseable_head;
while (sf) {
next = sf->efc->tmp_next;
- HDassert(sf->efc->tag == H5F_EFC_TAG_DONTCLOSE);
+ assert(sf->efc->tag == H5F_EFC_TAG_DONTCLOSE);
sf->efc->tag = H5F_EFC_TAG_DEFAULT;
sf->efc->tmp_next = NULL;
sf = next;
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 27a9075..3cea9d6 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -209,7 +209,7 @@ H5F__close_cb(H5VL_object_t *file_vol_obj, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file_vol_obj);
+ assert(file_vol_obj);
/* Close the file */
if (H5VL_file_close(file_vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0)
@@ -275,7 +275,7 @@ H5F__set_vol_conn(H5F_t *file)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(file);
+ assert(file);
/* Retrieve a copy of the "top-level" connector property, before any pass-through
* connectors modified or unwrapped it.
@@ -284,7 +284,7 @@ H5F__set_vol_conn(H5F_t *file)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get VOL connector info from API context")
/* Sanity check */
- HDassert(0 != connector_prop.connector_id);
+ assert(0 != connector_prop.connector_id);
/* Retrieve the connector for the ID */
if (NULL == (file->shared->vol_cls = (H5VL_class_t *)H5I_object(connector_prop.connector_id)))
@@ -336,7 +336,7 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Check args */
- HDassert(f);
+ assert(f);
/* Make a copy of the default file access property list */
if (NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g)))
@@ -469,7 +469,7 @@ H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref, size_t *obj_i
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(obj_id_count_ptr);
+ assert(obj_id_count_ptr);
/* Perform the query */
if ((ret_value = H5F__get_objects(f, types, 0, NULL, app_ref, obj_id_count_ptr)) < 0)
@@ -496,7 +496,7 @@ H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(obj_id_count_ptr);
+ assert(obj_id_count_ptr);
/* Perform the query */
if ((ret_value = H5F__get_objects(f, types, max_objs, oid_list, app_ref, obj_id_count_ptr)) < 0)
@@ -527,7 +527,7 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj_id_count_ptr);
+ assert(obj_id_count_ptr);
/* Set up search information */
olist.obj_id_list = (max_nobjs == 0 ? NULL : obj_id_list);
@@ -628,8 +628,8 @@ H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
FUNC_ENTER_PACKAGE
- HDassert(obj_ptr);
- HDassert(olist);
+ assert(obj_ptr);
+ assert(olist);
/* Count file IDs */
if (olist->obj_type == H5I_FILE) {
@@ -816,8 +816,8 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c
FUNC_ENTER_NOAPI_NOINIT
- HDassert(primary_file);
- HDassert(primary_file->shared);
+ assert(primary_file);
+ assert(primary_file->shared);
efc = primary_file->shared->efc;
@@ -843,7 +843,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c
/* Get last component of file_name */
H5_GET_LAST_DELIMITER(file_name, ptr)
- HDassert(ptr);
+ assert(ptr);
/* Increment past delimiter */
ptr++;
@@ -1097,7 +1097,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
f->id_exists = FALSE;
if (shared) {
- HDassert(lf == NULL);
+ assert(lf == NULL);
f->shared = shared;
}
else {
@@ -1105,7 +1105,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
unsigned efc_size; /* External file cache size */
size_t u; /* Local index variable */
- HDassert(lf != NULL);
+ assert(lf != NULL);
if (NULL == (f->shared = H5FL_CALLOC(H5F_shared_t)))
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared file structure")
@@ -1147,7 +1147,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get byte number for object size")
if (H5P_get(plist, H5F_CRT_SHMSG_NINDEXES_NAME, &f->shared->sohm_nindexes) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get number of SOHM indexes")
- HDassert(f->shared->sohm_nindexes < 255);
+ assert(f->shared->sohm_nindexes < 255);
if (H5P_get(plist, H5F_CRT_FILE_SPACE_STRATEGY_NAME, &f->shared->fs_strategy) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file space strategy")
if (H5P_get(plist, H5F_CRT_FREE_SPACE_PERSIST_NAME, &f->shared->fs_persist) < 0)
@@ -1156,7 +1156,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get free-space section threshold")
if (H5P_get(plist, H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME, &f->shared->fs_page_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file space page size")
- HDassert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
+ assert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
/* Temporary for multi/split drivers: fail file creation
* when persisting free-space or using paged aggregation strategy.
@@ -1322,7 +1322,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F
done:
if (!ret_value && f) {
- HDassert(NULL == f->vol_obj);
+ assert(NULL == f->vol_obj);
if (!shared) {
/* Attempt to clean up some of the shared file structures */
@@ -1361,8 +1361,8 @@ H5F__dest(H5F_t *f, hbool_t flush)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
if (1 == f->shared->nrefs) {
int actype; /* metadata cache type (enum value) */
@@ -1402,7 +1402,7 @@ H5F__dest(H5F_t *f, hbool_t flush)
*
* Verify this.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
/* Release the external file cache */
if (f->shared->efc) {
@@ -1418,7 +1418,7 @@ H5F__dest(H5F_t *f, hbool_t flush)
*
* Verify this.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
/* Release objects that depend on the superblock being initialized */
if (f->shared->sblock) {
@@ -1446,7 +1446,7 @@ H5F__dest(H5F_t *f, hbool_t flush)
/* at this point, only the superblock and superblock
* extension should be dirty.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
/* Flush the file again (if requested), as shutting down the
* free space manager may dirty some data structures again.
@@ -1480,7 +1480,7 @@ H5F__dest(H5F_t *f, hbool_t flush)
/* at this point, only the superblock and superblock
* extension should be dirty.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
} /* end if */
} /* end if */
@@ -1504,7 +1504,7 @@ H5F__dest(H5F_t *f, hbool_t flush)
*
* Verify this.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
/* Remove shared file struct from list of open files */
if (H5F__sfile_remove(f->shared) < 0)
@@ -2142,7 +2142,7 @@ H5F__post_open(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check arguments */
- HDassert(f);
+ assert(f);
/* Store a vol object in the file struct */
if (NULL == (f->vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, f, f->shared->vol_id)))
@@ -2169,7 +2169,7 @@ H5F__flush_phase1(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check arguments */
- HDassert(f);
+ assert(f);
/* Flush any cached dataset storage raw data */
if (H5D_flush_all(f) < 0)
@@ -2206,7 +2206,7 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing)
FUNC_ENTER_PACKAGE
/* Sanity check arguments */
- HDassert(f);
+ assert(f);
/* Inform the metadata cache that we are about to flush */
if (H5AC_prep_for_file_flush(f) < 0)
@@ -2285,7 +2285,7 @@ H5F__flush(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check arguments */
- HDassert(f);
+ assert(f);
/* First phase of flushing data */
if (H5F__flush_phase1(f) < 0)
@@ -2329,7 +2329,7 @@ H5F__close(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Perform checks for "semi" file close degree here, since closing the
* file is not allowed if there are objects still open.
@@ -2377,7 +2377,7 @@ H5F__delete(const char *filename, hid_t fapl_id)
FUNC_ENTER_PACKAGE
- HDassert(filename);
+ assert(filename);
/* Delete the file */
if (H5FD_delete(filename, fapl_id) < 0)
@@ -2409,8 +2409,8 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Set the was_closed flag to the default value.
* This flag lets downstream code know if the file struct is
@@ -2462,7 +2462,7 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/)
/* Sanity check: If close degree if "semi" and we have gotten this
* far and there are objects left open, bail out now.
*/
- HDassert(nopen_files == 0 && nopen_objs == 0);
+ assert(nopen_files == 0 && nopen_objs == 0);
/* If we've gotten this far (ie. there are no open objects in the file), fall through to flush &
* close */
@@ -2487,7 +2487,7 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/)
/* If the file close degree is "strong", close all the open objects in this file */
if (f->shared->fc_degree == H5F_CLOSE_STRONG) {
- HDassert(nopen_files == 0);
+ assert(nopen_files == 0);
/* Forced close of all opened objects in this file */
if (f->nopen_objs > 0) {
@@ -2616,7 +2616,7 @@ H5F_get_id(H5F_t *file)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(file);
+ assert(file);
if (H5I_find_id(file, H5I_FILE, &ret_value) < 0 || H5I_INVALID_HID == ret_value) {
/* resurrect the ID - Register an ID with the native connector */
@@ -2649,7 +2649,7 @@ H5F_incr_nopen_objs(H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(++f->nopen_objs)
} /* end H5F_incr_nopen_objs() */
@@ -2669,7 +2669,7 @@ H5F_decr_nopen_objs(H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(--f->nopen_objs)
} /* end H5F_decr_nopen_objs() */
@@ -2698,10 +2698,10 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(fapl);
- HDassert(name);
- HDassert(actual_name);
+ assert(f);
+ assert(fapl);
+ assert(name);
+ assert(actual_name);
/* Clear actual name pointer to begin with */
*actual_name = NULL;
@@ -2816,15 +2816,15 @@ H5F_addr_encode_len(size_t addr_len, uint8_t **pp /*in,out*/, haddr_t addr)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(addr_len);
- HDassert(pp && *pp);
+ assert(addr_len);
+ assert(pp && *pp);
if (H5F_addr_defined(addr)) {
for (u = 0; u < addr_len; u++) {
*(*pp)++ = (uint8_t)(addr & 0xff);
addr >>= 8;
} /* end for */
- HDassert("overflow" && 0 == addr);
+ assert("overflow" && 0 == addr);
} /* end if */
else {
for (u = 0; u < addr_len; u++)
@@ -2850,7 +2850,7 @@ H5F_addr_encode(const H5F_t *f, uint8_t **pp /*in,out*/, haddr_t addr)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
H5F_addr_encode_len(H5F_SIZEOF_ADDR(f), pp, addr);
@@ -2879,9 +2879,9 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp /*in,out*/, haddr_t *add
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(addr_len);
- HDassert(pp && *pp);
- HDassert(addr_p);
+ assert(addr_len);
+ assert(pp && *pp);
+ assert(addr_p);
/* Reset value in destination */
*addr_p = 0;
@@ -2907,8 +2907,8 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp /*in,out*/, haddr_t *add
*addr_p |= tmp;
} /* end if */
else if (!all_zero)
- HDassert(0 == **pp); /*overflow */
- } /* end for */
+ assert(0 == **pp); /*overflow */
+ } /* end for */
/* If 'all_zero' is still TRUE, the address was entirely composed of '0xff'
* bytes, which is the encoded form of 'HADDR_UNDEF', so set the destination
@@ -2938,7 +2938,7 @@ H5F_addr_decode(const H5F_t *f, const uint8_t **pp /*in,out*/, haddr_t *addr_p /
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
H5F_addr_decode_len(H5F_SIZEOF_ADDR(f), pp, addr_p);
@@ -2960,9 +2960,9 @@ H5F_set_grp_btree_shared(H5F_t *f, H5UC_t *rc)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(rc);
+ assert(f);
+ assert(f->shared);
+ assert(rc);
f->shared->grp_btree_shared = rc;
@@ -2984,8 +2984,8 @@ H5F_set_sohm_addr(H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
f->shared->sohm_addr = addr;
@@ -3007,8 +3007,8 @@ H5F_set_sohm_vers(H5F_t *f, unsigned vers)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
f->shared->sohm_vers = vers;
@@ -3030,8 +3030,8 @@ H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
f->shared->sohm_nindexes = nindexes;
@@ -3053,8 +3053,8 @@ H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
f->shared->store_msg_crt_idx = flag;
@@ -3083,8 +3083,8 @@ H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Set the bounds only if the existing setting is different from the inputs */
if (f->shared->low_bound != low || f->shared->high_bound != high) {
@@ -3213,7 +3213,7 @@ H5F__get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, size_t *image_le
tmp_size = H5F_SUPER_STATUS_FLAGS_SIZE(file->shared->sblock->super_vers);
/* Clear "status_flags" */
- HDmemset((uint8_t *)buf_ptr + tmp, 0, tmp_size);
+ memset((uint8_t *)buf_ptr + tmp, 0, tmp_size);
} /* end if */
/* Set *image_len = to EOA */
@@ -3240,12 +3240,12 @@ H5F__get_info(H5F_t *f, H5F_info2_t *finfo)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(finfo);
+ assert(f);
+ assert(f->shared);
+ assert(finfo);
/* Reset file info struct */
- HDmemset(finfo, 0, sizeof(*finfo));
+ memset(finfo, 0, sizeof(*finfo));
/* Get the size of the superblock and any superblock extensions */
if (H5F__super_size(f, &finfo->super.super_size, &finfo->super.super_ext_size) < 0)
@@ -3291,12 +3291,12 @@ H5F_track_metadata_read_retries(H5F_t *f, unsigned actype, unsigned retries)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared->read_attempts > 1);
- HDassert(f->shared->retries_nbins > 0);
- HDassert(retries > 0);
- HDassert(retries < f->shared->read_attempts);
- HDassert(actype < H5AC_NTYPES);
+ assert(f);
+ assert(f->shared->read_attempts > 1);
+ assert(f->shared->retries_nbins > 0);
+ assert(retries > 0);
+ assert(retries < f->shared->read_attempts);
+ assert(actype < H5AC_NTYPES);
/* Allocate memory for retries */
if (NULL == f->shared->retries[actype])
@@ -3307,7 +3307,7 @@ H5F_track_metadata_read_retries(H5F_t *f, unsigned actype, unsigned retries)
/* Index to retries based on log10 */
tmp = HDlog10((double)retries);
log_ind = (unsigned)tmp;
- HDassert(log_ind < f->shared->retries_nbins);
+ assert(log_ind < f->shared->retries_nbins);
/* Increment the # of the "retries" */
f->shared->retries[actype][log_ind]++;
@@ -3335,10 +3335,10 @@ H5F_set_retries(H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Initialize the tracking for metadata read retries */
- HDmemset(f->shared->retries, 0, sizeof(f->shared->retries));
+ memset(f->shared->retries, 0, sizeof(f->shared->retries));
/* Initialize the # of bins for retries */
f->shared->retries_nbins = 0;
@@ -3370,8 +3370,8 @@ H5F_object_flush_cb(H5F_t *f, hid_t obj_id)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Invoke object flush callback if there is one */
if (f->shared->object_flush.func &&
@@ -3397,8 +3397,8 @@ H5F__set_base_addr(const H5F_t *f, haddr_t addr)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Dispatch to driver */
if (H5FD_set_base_addr(f->shared->lf, addr) < 0)
@@ -3423,8 +3423,8 @@ H5F__set_eoa(const H5F_t *f, H5F_mem_t type, haddr_t addr)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Dispatch to driver */
/* (H5FD_set_eoa() will add base_addr to addr) */
@@ -3451,8 +3451,8 @@ H5F__set_paged_aggr(const H5F_t *f, hbool_t paged)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Dispatch to driver */
if (H5FD_set_paged_aggr(f->shared->lf, paged) < 0)
@@ -3481,8 +3481,8 @@ H5F__get_max_eof_eoa(const H5F_t *f, haddr_t *max_eof_eoa)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Get the relative EOA and EOF */
eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT);
@@ -3519,14 +3519,14 @@ H5F_get_metadata_read_retry_info(H5F_t *file, H5F_retry_info_t *info)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(file);
- HDassert(info);
+ assert(file);
+ assert(info);
/* Copy the # of bins for "retries" array */
info->nbins = file->shared->retries_nbins;
/* Initialize the array of "retries" */
- HDmemset(info->retries, 0, sizeof(info->retries));
+ memset(info->retries, 0, sizeof(info->retries));
/* Return if there are no bins -- no retries */
if (!info->nbins)
@@ -3560,7 +3560,7 @@ H5F_get_metadata_read_retry_info(H5F_t *file, H5F_retry_info_t *info)
case H5AC_FARRAY_DBLOCK_ID:
case H5AC_FARRAY_DBLK_PAGE_ID:
case H5AC_SUPERBLOCK_ID:
- HDassert(j < H5F_NUM_METADATA_READ_RETRY_TYPES);
+ assert(j < H5F_NUM_METADATA_READ_RETRY_TYPES);
if (file->shared->retries[i] != NULL) {
/* Allocate memory for retries[i]
*
@@ -3641,8 +3641,8 @@ H5F__start_swmr_write(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Should have write permission */
if ((H5F_INTENT(f) & H5F_ACC_RDWR) == 0)
@@ -3701,7 +3701,7 @@ H5F__start_swmr_write(H5F_t *f)
* or ensure 0 cannot be a valid value and check for 0 at cleanup. */
if ((obj_apl_ids = (hid_t *)H5MM_calloc(grp_dset_count * sizeof(hid_t))) == NULL)
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate buffer for hid_t")
- HDassert(obj_apl_ids[0] == H5P_DEFAULT);
+ assert(obj_apl_ids[0] == H5P_DEFAULT);
/* Get the list of opened object ids (groups & datasets) */
if (H5F_get_obj_ids(f, H5F_OBJ_GROUP | H5F_OBJ_DATASET, grp_dset_count, obj_ids, FALSE,
@@ -3918,8 +3918,8 @@ H5F__format_convert(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Check if the superblock should be downgraded */
if (f->shared->sblock->super_vers > HDF5_SUPERBLOCK_VERSION_V18_LATEST) {
@@ -4044,8 +4044,8 @@ H5F_set_min_dset_ohdr(H5F_t *f, hbool_t minimize)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
f->shared->crt_dset_min_ohdr_flag = minimize;
diff --git a/src/H5Fio.c b/src/H5Fio.c
index 06812fb..1f25a56 100644
--- a/src/H5Fio.c
+++ b/src/H5Fio.c
@@ -88,9 +88,9 @@ H5F_shared_block_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert(buf);
- HDassert(H5F_addr_defined(addr));
+ assert(f_sh);
+ assert(buf);
+ assert(H5F_addr_defined(addr));
/* Check for attempting I/O on 'temporary' file address */
if (H5F_addr_le(f_sh->tmp_addr, (addr + size)))
@@ -130,10 +130,10 @@ H5F_block_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(buf);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(buf);
+ assert(H5F_addr_defined(addr));
/* Check for attempting I/O on 'temporary' file address */
if (H5F_addr_le(f->shared->tmp_addr, (addr + size)))
@@ -173,10 +173,10 @@ H5F_shared_block_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert(H5F_SHARED_INTENT(f_sh) & H5F_ACC_RDWR);
- HDassert(buf);
- HDassert(H5F_addr_defined(addr));
+ assert(f_sh);
+ assert(H5F_SHARED_INTENT(f_sh) & H5F_ACC_RDWR);
+ assert(buf);
+ assert(H5F_addr_defined(addr));
/* Check for attempting I/O on 'temporary' file address */
if (H5F_addr_le(f_sh->tmp_addr, (addr + size)))
@@ -216,11 +216,11 @@ H5F_block_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, const void
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
- HDassert(buf);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(f->shared);
+ assert(H5F_INTENT(f) & H5F_ACC_RDWR);
+ assert(buf);
+ assert(H5F_addr_defined(addr));
/* Check for attempting I/O on 'temporary' file address */
if (H5F_addr_le(f->shared->tmp_addr, (addr + size)))
@@ -262,12 +262,12 @@ H5F_shared_select_read(H5F_shared_t *f_sh, H5FD_mem_t type, uint32_t count, H5S_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(f_sh);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Treat global heap as raw data */
map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
@@ -307,12 +307,12 @@ H5F_shared_select_write(H5F_shared_t *f_sh, H5FD_mem_t type, uint32_t count, H5S
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(f_sh);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Treat global heap as raw data */
map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
@@ -335,11 +335,11 @@ H5F_shared_vector_read(H5F_shared_t *f_sh, uint32_t count, H5FD_mem_t types[], h
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(f_sh);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/*
* Note that we don't try to map global heap data to raw
@@ -349,7 +349,7 @@ H5F_shared_vector_read(H5F_shared_t *f_sh, uint32_t count, H5FD_mem_t types[], h
*/
#ifndef NDEBUG
for (uint32_t i = 0; i < count; i++)
- HDassert(types[i] != H5FD_MEM_GHEAP);
+ assert(types[i] != H5FD_MEM_GHEAP);
#endif
/* Pass down to file driver layer (bypass page buffer for now) */
@@ -380,11 +380,11 @@ H5F_shared_vector_write(H5F_shared_t *f_sh, uint32_t count, H5FD_mem_t types[],
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(f_sh);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/*
* Note that we don't try to map global heap data to raw
@@ -394,7 +394,7 @@ H5F_shared_vector_write(H5F_shared_t *f_sh, uint32_t count, H5FD_mem_t types[],
*/
#ifndef NDEBUG
for (uint32_t i = 0; i < count; i++)
- HDassert(types[i] != H5FD_MEM_GHEAP);
+ assert(types[i] != H5FD_MEM_GHEAP);
#endif
/* Pass down to file driver layer (bypass page buffer for now) */
@@ -487,8 +487,8 @@ H5F__evict_cache_entries(H5F_t *f)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Evict all except pinned entries in the cache */
if (H5AC_evict(f) < 0)
@@ -542,8 +542,8 @@ H5F_get_checksums(const uint8_t *buf, size_t buf_size, uint32_t *s_chksum /*out*
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(buf);
- HDassert(buf_size);
+ assert(buf);
+ assert(buf_size);
/* Return the stored checksum */
if (s_chksum) {
diff --git a/src/H5Fmount.c b/src/H5Fmount.c
index 6c8543a..de27989 100644
--- a/src/H5Fmount.c
+++ b/src/H5Fmount.c
@@ -47,7 +47,7 @@ H5F__close_mounts(H5F_t *f)
FUNC_ENTER_PACKAGE
- HDassert(f);
+ assert(f);
/* Unmount all child files. Loop backwards to avoid having to adjust u when
* a file is unmounted. Note that we rely on unsigned u "wrapping around"
@@ -75,7 +75,7 @@ H5F__close_mounts(H5F_t *f)
}
}
- HDassert(f->nmounts == 0);
+ assert(f->nmounts == 0);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -111,10 +111,10 @@ H5F_mount(const H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UN
FUNC_ENTER_NOAPI(FAIL)
- HDassert(loc);
- HDassert(name && *name);
- HDassert(child);
- HDassert(TRUE == H5P_isa_class(plist_id, H5P_FILE_MOUNT));
+ assert(loc);
+ assert(name && *name);
+ assert(child);
+ assert(TRUE == H5P_isa_class(plist_id, H5P_FILE_MOUNT));
/* Set up group location to fill in */
mp_loc.oloc = &mp_oloc;
@@ -151,11 +151,11 @@ H5F_mount(const H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UN
* "took over" the group location - QAK)
*/
parent = H5G_fileof(mount_point);
- HDassert(parent);
+ assert(parent);
mp_loc.oloc = H5G_oloc(mount_point);
- HDassert(mp_loc.oloc);
+ assert(mp_loc.oloc);
mp_loc.path = H5G_nameof(mount_point);
- HDassert(mp_loc.path);
+ assert(mp_loc.path);
for (ancestor = parent; ancestor; ancestor = ancestor->parent)
if (ancestor->shared == child->shared)
HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount would introduce a cycle")
@@ -275,8 +275,8 @@ H5F_unmount(const H5G_loc_t *loc, const char *name)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up mount point location to fill in */
mp_loc.oloc = &mp_oloc;
@@ -348,7 +348,7 @@ H5F_unmount(const H5G_loc_t *loc, const char *name)
* Could be different due to the shared mount table. */
parent = child->parent;
} /* end else */
- HDassert(child_idx >= 0);
+ assert(child_idx >= 0);
/* Save the information about the child from the mount table */
child_group = parent->shared->mtab.child[child_idx].group;
@@ -411,7 +411,7 @@ H5F_is_mount(const H5F_t *file)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(file);
+ assert(file);
if (file->parent != NULL)
ret_value = TRUE;
@@ -442,9 +442,9 @@ H5F__mount_count_ids_recurse(H5F_t *f, unsigned *nopen_files, unsigned *nopen_ob
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(nopen_files);
- HDassert(nopen_objs);
+ assert(f);
+ assert(nopen_files);
+ assert(nopen_objs);
/* If this file is still open, increment number of file IDs open */
if (H5F_ID_EXISTS(f))
@@ -489,9 +489,9 @@ H5F__mount_count_ids(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(nopen_files);
- HDassert(nopen_objs);
+ assert(f);
+ assert(nopen_files);
+ assert(nopen_objs);
/* Find the top file in the mounting hierarchy */
while (f->parent)
@@ -525,7 +525,7 @@ H5F__flush_mounts_recurse(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Flush all child files, not stopping for errors */
for (u = 0; u < f->shared->mtab.nmounts; u++)
@@ -564,7 +564,7 @@ H5F_flush_mounts(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Find the top file in the mount hierarchy */
while (f->parent)
@@ -604,7 +604,7 @@ H5F_traverse_mount(H5O_loc_t *oloc /*in,out*/)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(oloc);
+ assert(oloc);
/*
* The loop is necessary because we might have file1 mounted at the root
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index 8936dfc..da3871b 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -89,7 +89,7 @@ H5F_mpi_get_rank(const H5F_t *f)
FUNC_ENTER_NOAPI((-1))
- HDassert(f && f->shared);
+ assert(f && f->shared);
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_rank(f->shared->lf)) < 0)
@@ -120,7 +120,7 @@ H5F_mpi_get_comm(const H5F_t *f)
FUNC_ENTER_NOAPI(MPI_COMM_NULL)
- HDassert(f && f->shared);
+ assert(f && f->shared);
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_comm(f->shared->lf)) == MPI_COMM_NULL)
@@ -151,7 +151,7 @@ H5F_shared_mpi_get_size(const H5F_shared_t *f_sh)
FUNC_ENTER_NOAPI((-1))
- HDassert(f_sh);
+ assert(f_sh);
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_size(f_sh->lf)) < 0)
@@ -182,7 +182,7 @@ H5F_mpi_get_size(const H5F_t *f)
FUNC_ENTER_NOAPI((-1))
- HDassert(f && f->shared);
+ assert(f && f->shared);
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_size(f->shared->lf)) < 0)
@@ -209,7 +209,7 @@ H5F__set_mpi_atomicity(H5F_t *file, hbool_t flag)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(file);
+ assert(file);
/* Check VFD */
if (!H5F_HAS_FEATURE(file, H5FD_FEAT_HAS_MPI))
@@ -282,8 +282,8 @@ H5F__get_mpi_atomicity(const H5F_t *file, hbool_t *flag)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(file);
- HDassert(flag);
+ assert(file);
+ assert(flag);
/* Check VFD */
if (!H5F_HAS_FEATURE(file, H5FD_FEAT_HAS_MPI))
@@ -363,7 +363,7 @@ H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(mpi_comm);
+ assert(mpi_comm);
/* Set value to return to invalid MPI comm */
*mpi_comm = MPI_COMM_NULL;
@@ -378,7 +378,7 @@ H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm)
if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
f = loc.oloc->file;
- HDassert(f);
+ assert(f);
/* Check if MPIO driver is used */
if (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
@@ -436,7 +436,7 @@ H5F_get_coll_metadata_reads(const H5F_t *file)
FUNC_ENTER_NOAPI_NOERR
- HDassert(file && file->shared);
+ assert(file && file->shared);
/* Retrieve the file-global flag */
file_flag = H5F_COLL_MD_READ(file);
@@ -514,9 +514,9 @@ H5F_set_coll_metadata_reads(H5F_t *file, H5P_coll_md_read_flag_t *file_flag, hbo
FUNC_ENTER_NOAPI_NOERR
- HDassert(file && file->shared);
- HDassert(file_flag);
- HDassert(context_flag);
+ assert(file && file->shared);
+ assert(file_flag);
+ assert(context_flag);
/* Save old state */
prev_file_flag = H5F_COLL_MD_READ(file);
@@ -565,13 +565,13 @@ H5F_mpi_get_file_block_type(hbool_t commit, MPI_Datatype *new_type, hbool_t *new
FUNC_ENTER_NOAPI(FAIL)
- HDassert(new_type);
- HDassert(new_type_derived);
+ assert(new_type);
+ assert(new_type_derived);
*new_type_derived = FALSE;
field_count = 2;
- HDassert(field_count == sizeof(types) / sizeof(MPI_Datatype));
+ assert(field_count == sizeof(types) / sizeof(MPI_Datatype));
block_lengths[0] = 1;
block_lengths[1] = 1;
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index ee870be..325bdcd 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -457,7 +457,7 @@ typedef struct H5F_t H5F_t;
UINT16ENCODE(p, l); \
break; \
default: \
- HDassert("bad sizeof size" && 0); \
+ assert("bad sizeof size" && 0); \
}
#define H5F_ENCODE_LENGTH(f, p, l) H5F_ENCODE_LENGTH_LEN(p, l, H5F_SIZEOF_SIZE(f))
@@ -474,7 +474,7 @@ typedef struct H5F_t H5F_t;
UINT16DECODE(p, l); \
break; \
default: \
- HDassert("bad sizeof size" && 0); \
+ assert("bad sizeof size" && 0); \
}
#define H5F_DECODE_LENGTH(f, p, l) DECODE_VAR(p, l, H5F_SIZEOF_SIZE(f))
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index 72b173f..6553bc6 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -79,7 +79,7 @@ H5F_shared_get_intent(const H5F_shared_t *f_sh)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f_sh);
+ assert(f_sh);
FUNC_LEAVE_NOAPI(f_sh->flags)
} /* end H5F_shared_get_intent() */
@@ -100,7 +100,7 @@ H5F_get_intent(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared->flags)
} /* end H5F_get_intent() */
@@ -124,7 +124,7 @@ H5F_get_low_bound(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared->low_bound)
} /* end H5F_get_low_bound() */
@@ -148,7 +148,7 @@ H5F_get_high_bound(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared->high_bound)
} /* end H5F_get_high_bound() */
@@ -168,8 +168,8 @@ H5F_get_open_name(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->open_name);
+ assert(f);
+ assert(f->open_name);
FUNC_LEAVE_NOAPI(f->open_name)
} /* end H5F_get_open_name() */
@@ -189,8 +189,8 @@ H5F_get_actual_name(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->actual_name);
+ assert(f);
+ assert(f->actual_name);
FUNC_LEAVE_NOAPI(f->actual_name)
} /* end H5F_get_actual_name() */
@@ -211,9 +211,9 @@ H5F_get_extpath(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->extpath);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->extpath);
FUNC_LEAVE_NOAPI(f->shared->extpath)
} /* end H5F_get_extpath() */
@@ -232,7 +232,7 @@ H5F_get_shared(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared)
} /* end H5F_get_shared() */
@@ -251,10 +251,10 @@ H5F_same_shared(const H5F_t *f1, const H5F_t *f2)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f1);
- HDassert(f1->shared);
- HDassert(f2);
- HDassert(f2->shared);
+ assert(f1);
+ assert(f1->shared);
+ assert(f2);
+ assert(f2->shared);
FUNC_LEAVE_NOAPI(f1->shared == f2->shared)
} /* end H5F_same_shared() */
@@ -273,7 +273,7 @@ H5F_get_nopen_objs(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->nopen_objs)
} /* end H5F_get_nopen_objs() */
@@ -292,7 +292,7 @@ H5F_file_id_exists(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->id_exists)
} /* end H5F_file_id_exists() */
@@ -311,7 +311,7 @@ H5F_get_parent(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->parent)
} /* end H5F_get_parent() */
@@ -330,7 +330,7 @@ H5F_get_nmounts(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->nmounts)
} /* end H5F_get_nmounts() */
@@ -349,7 +349,7 @@ H5F_get_read_attempts(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared->read_attempts)
} /* end H5F_get_read_attempts() */
@@ -369,8 +369,8 @@ H5F_get_fcpl(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->fcpl_id)
} /* end H5F_get_fcpl() */
@@ -391,8 +391,8 @@ H5F_sizeof_addr(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->sizeof_addr)
} /* end H5F_sizeof_addr() */
@@ -413,8 +413,8 @@ H5F_sizeof_size(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->sizeof_size)
} /* H5F_sizeof_size() */
@@ -433,8 +433,8 @@ H5F_get_sohm_addr(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->sohm_addr)
} /* end H5F_get_sohm_addr() */
@@ -453,8 +453,8 @@ H5F_get_sohm_vers(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->sohm_vers)
} /* end H5F_get_sohm_vers() */
@@ -473,8 +473,8 @@ H5F_get_sohm_nindexes(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->sohm_nindexes)
} /* end H5F_get_sohm_nindexes() */
@@ -497,9 +497,9 @@ H5F_sym_leaf_k(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
FUNC_LEAVE_NOAPI(f->shared->sblock->sym_leaf_k)
} /* end H5F_sym_leaf_k() */
@@ -517,7 +517,7 @@ H5F_get_min_dset_ohdr(const H5F_t *f)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared->crt_dset_min_ohdr_flag)
} /* end H5F_get_min_dset_ohdr */
@@ -540,10 +540,10 @@ H5F_Kvalue(const H5F_t *f, const H5B_class_t *type)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
- HDassert(type);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
+ assert(type);
FUNC_LEAVE_NOAPI(f->shared->sblock->btree_k[type->id])
} /* end H5F_Kvalue() */
@@ -562,8 +562,8 @@ H5F_get_nrefs(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->nrefs)
} /* end H5F_get_nrefs() */
@@ -586,8 +586,8 @@ H5F_rdcc_nslots(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->rdcc_nslots)
} /* end H5F_rdcc_nelmts() */
@@ -610,8 +610,8 @@ H5F_rdcc_nbytes(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->rdcc_nbytes)
} /* end H5F_rdcc_nbytes() */
@@ -634,8 +634,8 @@ H5F_rdcc_w0(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->rdcc_w0)
} /* end H5F_rdcc_w0() */
@@ -656,9 +656,9 @@ H5F_get_base_addr(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
FUNC_LEAVE_NOAPI(f->shared->sblock->base_addr)
} /* end H5F_get_base_addr() */
@@ -681,8 +681,8 @@ H5F_grp_btree_shared(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->grp_btree_shared)
} /* end H5F_grp_btree_shared() */
@@ -705,8 +705,8 @@ H5F_sieve_buf_size(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->sieve_buf_size)
} /* end H5F_sieve_buf_size() */
@@ -732,8 +732,8 @@ H5F_gc_ref(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->gc_ref)
} /* end H5F_gc_ref() */
@@ -753,8 +753,8 @@ H5F_get_fc_degree(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->fc_degree)
} /* end H5F_get_fc_degree() */
@@ -776,8 +776,8 @@ H5F_get_evict_on_close(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->evict_on_close)
} /* end H5F_get_evict_on_close() */
@@ -797,8 +797,8 @@ H5F_store_msg_crt_idx(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->store_msg_crt_idx)
} /* end H5F_store_msg_crt_idx() */
@@ -818,7 +818,7 @@ H5F_shared_has_feature(const H5F_shared_t *f_sh, unsigned feature)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f_sh);
+ assert(f_sh);
FUNC_LEAVE_NOAPI((hbool_t)(f_sh->lf->feature_flags & feature))
} /* end H5F_shared_has_feature() */
@@ -838,8 +838,8 @@ H5F_has_feature(const H5F_t *f, unsigned feature)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI((hbool_t)(f->shared->lf->feature_flags & feature))
} /* end H5F_has_feature() */
@@ -860,9 +860,9 @@ H5F_get_driver_id(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
FUNC_LEAVE_NOAPI(f->shared->lf->driver_id)
} /* end H5F_get_driver_id() */
@@ -884,10 +884,10 @@ H5F_get_fileno(const H5F_t *f, unsigned long *filenum)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(filenum);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(filenum);
/* Retrieve the file's serial number */
if (H5FD_get_fileno(f->shared->lf, filenum) < 0)
@@ -912,7 +912,7 @@ H5F_shared_get_eoa(const H5F_shared_t *f_sh, H5FD_mem_t type)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
- HDassert(f_sh);
+ assert(f_sh);
/* Dispatch to driver */
if (HADDR_UNDEF == (ret_value = H5FD_get_eoa(f_sh->lf, type)))
@@ -937,8 +937,8 @@ H5F_get_eoa(const H5F_t *f, H5FD_mem_t type)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Dispatch to driver */
if (HADDR_UNDEF == (ret_value = H5FD_get_eoa(f->shared->lf, type)))
@@ -963,8 +963,8 @@ H5F_shared_get_file_driver(const H5F_shared_t *f_sh, H5FD_t **file_handle)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f_sh);
- HDassert(file_handle);
+ assert(f_sh);
+ assert(file_handle);
*file_handle = f_sh->lf;
@@ -989,8 +989,8 @@ H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(file);
- HDassert(file_handle);
+ assert(file);
+ assert(file_handle);
/* Get the VFD handle */
if (H5FD_get_vfd_handle(file->shared->lf, fapl, file_handle) < 0)
@@ -1017,8 +1017,8 @@ H5F_is_tmp_addr(const H5F_t *f, haddr_t addr)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(H5F_addr_le(f->shared->tmp_addr, addr))
} /* end H5F_is_tmp_addr() */
@@ -1040,8 +1040,8 @@ H5F_use_tmp_space(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->use_tmp_space)
} /* end H5F_use_tmp_space() */
@@ -1063,7 +1063,7 @@ H5F_coll_md_read(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->shared->coll_md_read)
} /* end H5F_coll_md_read() */
@@ -1088,8 +1088,8 @@ H5F_shared_get_mpi_file_sync_required(const H5F_shared_t *f_sh, hbool_t *flag /*
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f_sh);
- HDassert(flag);
+ assert(f_sh);
+ assert(flag);
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_file_sync_required(f_sh->lf, flag)) < 0)
@@ -1117,8 +1117,8 @@ H5F_use_mdc_logging(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->use_mdc_logging)
} /* end H5F_use_mdc_logging() */
@@ -1140,8 +1140,8 @@ H5F_start_mdc_log_on_access(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->start_mdc_log_on_access)
} /* end H5F_start_mdc_log_on_access() */
@@ -1163,8 +1163,8 @@ H5F_mdc_log_location(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->mdc_log_location)
} /* end H5F_mdc_log_location() */
@@ -1184,8 +1184,8 @@ H5F_get_alignment(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->alignment)
} /* end H5F_get_alignment() */
@@ -1205,8 +1205,8 @@ H5F_get_threshold(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->threshold)
} /* end H5F_get_threshold() */
@@ -1226,8 +1226,8 @@ H5F_get_pgend_meta_thres(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->pgend_meta_thres)
} /* end H5F_get_pgend_meta_thres() */
@@ -1247,8 +1247,8 @@ H5F_get_point_of_no_return(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->point_of_no_return)
} /* end H5F_get_point_of_no_return() */
@@ -1268,8 +1268,8 @@ H5F_get_null_fsm_addr(const H5F_t *f)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->null_fsm_addr)
} /* end H5F_get_null_fsm_addr() */
@@ -1291,8 +1291,8 @@ H5F_get_vol_cls(const H5F_t *f)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->vol_cls)
} /* end H5F_get_vol_cls */
@@ -1311,7 +1311,7 @@ H5F_get_vol_obj(const H5F_t *f)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
+ assert(f);
FUNC_LEAVE_NOAPI(f->vol_obj)
} /* end H5F_get_vol_obj */
@@ -1337,8 +1337,8 @@ H5F__get_cont_info(const H5F_t *f, H5VL_file_cont_info_t *info)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Verify structure version */
if (info->version != H5VL_CONTAINER_INFO_VERSION)
@@ -1367,8 +1367,8 @@ H5F_get_file_locking(const H5F_t *f)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
FUNC_LEAVE_NOAPI(f->shared->use_file_locking)
} /* end H5F_get_file_locking */
@@ -1389,8 +1389,8 @@ H5F_has_vector_select_io(const H5F_t *f, hbool_t is_write)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
if (is_write)
ret_value = (f->shared->lf->cls->write_vector != NULL || f->shared->lf->cls->write_selection != NULL);
diff --git a/src/H5Fsfile.c b/src/H5Fsfile.c
index 978d4dc..afebeeb 100644
--- a/src/H5Fsfile.c
+++ b/src/H5Fsfile.c
@@ -56,7 +56,7 @@ H5F_sfile_assert_num(unsigned n)
if (n == 0) {
/* Sanity checking */
- HDassert(H5F_sfile_head_g == NULL);
+ assert(H5F_sfile_head_g == NULL);
} /* end if */
else {
unsigned count; /* Number of open shared files */
@@ -74,7 +74,7 @@ H5F_sfile_assert_num(unsigned n)
} /* end while */
/* Sanity checking */
- HDassert(count == n);
+ assert(count == n);
} /* end else */
FUNC_LEAVE_NOAPI_VOID
@@ -101,7 +101,7 @@ H5F__sfile_add(H5F_shared_t *shared)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(shared);
+ assert(shared);
/* Allocate new shared file node */
if (NULL == (new_shared = H5FL_CALLOC(H5F_sfile_node_t)))
@@ -140,7 +140,7 @@ H5F__sfile_search(H5FD_t *lf)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(lf);
+ assert(lf);
/* Iterate through low-level files for matching low-level file info */
curr = H5F_sfile_head_g;
@@ -179,7 +179,7 @@ H5F__sfile_remove(H5F_shared_t *shared)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(shared);
+ assert(shared);
/* Locate shared file node with correct shared file */
last = NULL;
diff --git a/src/H5Fspace.c b/src/H5Fspace.c
index 1e2b238..44f5653 100644
--- a/src/H5Fspace.c
+++ b/src/H5Fspace.c
@@ -89,11 +89,11 @@ H5F__alloc(H5F_t *f, H5F_mem_t type, hsize_t size, haddr_t *frag_addr, hsize_t *
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Check whether the file can use temporary addresses */
if (f->shared->use_tmp_space) {
@@ -148,11 +148,11 @@ H5F__free(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Call the file driver 'free' routine */
if (H5FD_free(f->shared->lf, type, f, addr, size) < 0)
@@ -192,11 +192,11 @@ H5F__try_extend(H5F_t *f, H5FD_mem_t type, haddr_t blk_end, hsize_t extra_reques
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(extra_requested > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(extra_requested > 0);
/* Extend the object by extending the underlying file */
if ((ret_value = H5FD_try_extend(f->shared->lf, type, f, blk_end, extra_requested)) < 0)
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index cf18fb0..24809b1 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -93,11 +93,11 @@ H5F__super_ext_create(H5F_t *f, H5O_loc_t *ext_ptr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
- HDassert(!H5F_addr_defined(f->shared->sblock->ext_addr));
- HDassert(ext_ptr);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
+ assert(!H5F_addr_defined(f->shared->sblock->ext_addr));
+ assert(ext_ptr);
/* Check for older version of superblock format that can't support superblock extensions */
if (f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2)
@@ -147,9 +147,9 @@ H5F__super_ext_open(H5F_t *f, haddr_t ext_addr, H5O_loc_t *ext_ptr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(ext_addr));
- HDassert(ext_ptr);
+ assert(f);
+ assert(H5F_addr_defined(ext_addr));
+ assert(ext_ptr);
/* Set up "fake" object location for superblock extension */
H5O_loc_reset(ext_ptr);
@@ -185,8 +185,8 @@ H5F__super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hbool_t was_created)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(ext_ptr);
+ assert(f);
+ assert(ext_ptr);
/* Check if extension was created */
if (was_created) {
@@ -243,12 +243,12 @@ H5F__update_super_ext_driver_msg(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
sblock = f->shared->sblock;
- HDassert(sblock);
- HDassert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sblock->cache_info.type == H5AC_SUPERBLOCK);
+ assert(sblock);
+ assert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sblock->cache_info.type == H5AC_SUPERBLOCK);
/* Update the driver information message in the superblock extension
* if appropriate.
@@ -271,7 +271,7 @@ H5F__update_super_ext_driver_msg(H5F_t *f)
uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */
/* Sanity check */
- HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
+ assert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
/* Encode driver-specific data */
if (H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0)
@@ -362,7 +362,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
int mpi_result;
/* Sanity check */
- HDassert(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI));
+ assert(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI));
/* Set up MPI info */
if ((mpi_rank = H5F_mpi_get_rank(f)) < 0)
@@ -495,7 +495,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* Mark the superblock dirty if it was modified during loading */
if (((rw_flags & H5AC__READ_ONLY_FLAG) == 0) && udata.ignore_drvrinfo && udata.drvrinfo_removed) {
- HDassert(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2);
+ assert(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2);
sblock_flags |= H5AC__DIRTIED_FLAG;
} /* end if */
@@ -536,7 +536,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* Handle the B-tree 'K' values */
if (sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) {
/* Sanity check */
- HDassert(udata.sym_leaf_k != 0);
+ assert(udata.sym_leaf_k != 0);
/* Set the symbol table internal node 'K' value */
if (H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &udata.sym_leaf_k) < 0)
@@ -634,7 +634,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* Sanity check - driver info block should only be defined for
* superblock version < 2.
*/
- HDassert(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2);
+ assert(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2);
/* Set up user data */
drvrinfo_udata.f = f;
@@ -726,7 +726,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* Reset driver info message */
H5O_msg_reset(H5O_DRVINFO_ID, &drvinfo);
- HDassert(FALSE == f->shared->drvinfo_sb_msg_exists);
+ assert(FALSE == f->shared->drvinfo_sb_msg_exists);
f->shared->drvinfo_sb_msg_exists = TRUE;
} /* end else */
} /* end if */
@@ -813,8 +813,8 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file space strategy")
} /* end if */
- HDassert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
- HDassert(fsinfo.page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
+ assert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
+ assert(fsinfo.page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
if (f->shared->fs_page_size != fsinfo.page_size) {
f->shared->fs_page_size = fsinfo.page_size;
@@ -839,7 +839,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
* option is used.
*/
if (!skip_eof_check && !f->shared->null_fsm_addr)
- HDassert((!f->shared->fs_persist) || (f->shared->eoa_fsm_fsalloc != HADDR_UNDEF));
+ assert((!f->shared->fs_persist) || (f->shared->eoa_fsm_fsalloc != HADDR_UNDEF));
/*
* A crashed file with persistent free-space managers may have
@@ -889,7 +889,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
* be set -- verify that it is NULL, and then set it.
* Set it back to NULL when we are done.
*/
- HDassert(f->shared->sblock == NULL);
+ assert(f->shared->sblock == NULL);
f->shared->sblock = sblock;
#endif /* JRM */
@@ -973,7 +973,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */
/* Sanity check */
- HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
+ assert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
/* Encode driver-specific data */
if (H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0)
@@ -992,7 +992,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
* be set -- verify that it is NULL, and then set it.
* Set it back to NULL when we are done.
*/
- HDassert(f->shared->sblock == NULL);
+ assert(f->shared->sblock == NULL);
f->shared->sblock = sblock;
#endif /* JRM */
if (H5F__super_ext_write_msg(f, H5O_DRVINFO_ID, &drvinfo, FALSE, H5O_MSG_NO_FLAGS_SET) < 0)
@@ -1305,12 +1305,12 @@ H5F__super_init(H5F_t *f)
/* Files with SOHM indices always need the superblock extension */
if (f->shared->sohm_nindexes > 0) {
- HDassert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
+ assert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
need_ext = TRUE;
} /* end if */
/* Files with non-default free space settings always need the superblock extension */
else if (non_default_fs_settings) {
- HDassert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
+ assert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
need_ext = TRUE;
} /* end if */
/* If we're going to use a version of the superblock format which allows
@@ -1380,10 +1380,10 @@ H5F__super_init(H5F_t *f)
uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */
/* Sanity check */
- HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
+ assert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
/* Encode driver-specific data */
- HDmemset(dbuf, 0, sizeof(dbuf));
+ memset(dbuf, 0, sizeof(dbuf));
if (H5FD_sb_encode(f->shared->lf, info.name, dbuf) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information")
@@ -1393,7 +1393,7 @@ H5F__super_init(H5F_t *f)
if (H5O_msg_create(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update driver info header message")
- HDassert(FALSE == f->shared->drvinfo_sb_msg_exists);
+ assert(FALSE == f->shared->drvinfo_sb_msg_exists);
f->shared->drvinfo_sb_msg_exists = TRUE;
} /* end if */
@@ -1428,7 +1428,7 @@ H5F__super_init(H5F_t *f)
/* Check for creating an "old-style" driver info block */
if (driver_size > 0) {
/* Sanity check */
- HDassert(H5F_addr_defined(sblock->driver_addr));
+ assert(H5F_addr_defined(sblock->driver_addr));
/* Allocate space for the driver info */
if (NULL == (drvinfo = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t))))
@@ -1451,7 +1451,7 @@ H5F__super_init(H5F_t *f)
f->shared->drvinfo = drvinfo;
} /* end if */
else
- HDassert(!H5F_addr_defined(sblock->driver_addr));
+ assert(!H5F_addr_defined(sblock->driver_addr));
} /* end if */
done:
@@ -1528,9 +1528,9 @@ H5F_eoa_dirty(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
/* Mark superblock dirty in cache, so change to EOA will get encoded */
if (H5F_super_dirty(f) < 0)
@@ -1575,9 +1575,9 @@ H5F_super_dirty(H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
/* Mark superblock dirty in cache, so change to EOA will get encoded */
if (H5AC_mark_entry_dirty(f->shared->sblock) < 0)
@@ -1606,7 +1606,7 @@ H5F__super_free(H5F_super_t *sblock)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(sblock);
+ assert(sblock);
/* Free root group symbol table entry, if any */
sblock->root_ent = (H5G_entry_t *)H5MM_xfree(sblock->root_ent);
@@ -1639,9 +1639,9 @@ H5F__super_size(H5F_t *f, hsize_t *super_size, hsize_t *super_ext_size)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
/* Set the superblock size */
if (super_size)
@@ -1705,9 +1705,9 @@ H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg, hbool_t may_create,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
/* Set the ring type in the API context */
H5AC_set_ring(H5AC_RING_SBE, &orig_ring);
@@ -1718,12 +1718,12 @@ H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg, hbool_t may_create,
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension")
} /* end if */
else {
- HDassert(may_create);
+ assert(may_create);
if (H5F__super_ext_create(f, &ext_loc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create file's superblock extension")
ext_created = TRUE;
} /* end else */
- HDassert(H5F_addr_defined(ext_loc.addr));
+ assert(H5F_addr_defined(ext_loc.addr));
ext_opened = TRUE;
/* Check if message with ID does not exist in the object header */
@@ -1789,7 +1789,7 @@ H5F__super_ext_remove_msg(H5F_t *f, unsigned id)
FUNC_ENTER_PACKAGE
/* Make sure that the superblock extension object header exists */
- HDassert(H5F_addr_defined(f->shared->sblock->ext_addr));
+ assert(H5F_addr_defined(f->shared->sblock->ext_addr));
/* Set the ring type in the API context */
H5AC_set_ring(H5AC_RING_SBE, &orig_ring);
@@ -1819,7 +1819,7 @@ H5F__super_ext_remove_msg(H5F_t *f, unsigned id)
if ((null_count = H5O_msg_count(&ext_loc, H5O_NULL_ID)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages")
else if ((unsigned)null_count == hdr_info.nmesgs) {
- HDassert(H5F_addr_defined(ext_loc.addr));
+ assert(H5F_addr_defined(ext_loc.addr));
if (H5O_delete(f, ext_loc.addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages")
f->shared->sblock->ext_addr = HADDR_UNDEF;
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 7dbaf22..9345f66 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -148,11 +148,11 @@ H5F__superblock_prefix_decode(H5F_super_t *sblock, const uint8_t **image_ref, si
FUNC_ENTER_PACKAGE
- HDassert(sblock);
- HDassert(image_ref);
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
+ assert(sblock);
+ assert(image_ref);
+ assert(image);
+ assert(udata);
+ assert(udata->f);
/* Skip over signature (already checked when locating the superblock) */
if (H5_IS_BUFFER_OVERFLOW(image, H5F_SIGNATURE_LEN, end))
@@ -234,11 +234,11 @@ H5F__drvrinfo_prefix_decode(H5O_drvinfo_t *drvrinfo, char *drv_name, const uint8
FUNC_ENTER_PACKAGE
- HDassert(drvrinfo);
- HDassert(image_ref);
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
+ assert(drvrinfo);
+ assert(image_ref);
+ assert(image);
+ assert(udata);
+ assert(udata->f);
/* Version number */
if (H5_IS_BUFFER_OVERFLOW(image, 1, end))
@@ -305,7 +305,7 @@ H5F__cache_superblock_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image_len);
+ assert(image_len);
/* Set the initial image length size */
*image_len = H5F_SUPERBLOCK_FIXED_SIZE + /* Fixed size of superblock */
@@ -333,11 +333,11 @@ H5F__cache_superblock_get_final_load_size(const void *_image, size_t image_len,
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
- HDassert(image_len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
+ assert(image_len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
/* Deserialize the file superblock's prefix */
if (H5F__superblock_prefix_decode(&sblock, &image, image_len, udata, TRUE) < 0)
@@ -375,8 +375,8 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* No checksum for version 0 & 1 */
if (udata->super_vers >= HDF5_SUPERBLOCK_VERSION_2) {
@@ -411,10 +411,10 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata,
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(udata->f);
- HDassert(len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
+ assert(image);
+ assert(udata);
+ assert(udata->f);
+ assert(len >= H5F_SUPERBLOCK_FIXED_SIZE + 6);
/* Allocate space for the superblock */
if (NULL == (sblock = H5FL_CALLOC(H5F_super_t)))
@@ -632,10 +632,10 @@ H5F__cache_superblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(sblock);
- HDassert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sblock->cache_info.type == H5AC_SUPERBLOCK);
- HDassert(image_len);
+ assert(sblock);
+ assert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sblock->cache_info.type == H5AC_SUPERBLOCK);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5F_SUPERBLOCK_SIZE(sblock);
@@ -661,15 +661,15 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(image);
- HDassert(sblock);
+ assert(f);
+ assert(image);
+ assert(sblock);
/* Assert that the superblock is marked as being flushed last (and
collectively in parallel) */
/* (We'll rely on the cache to make sure it actually *is* flushed
last (and collectively in parallel), but this check doesn't hurt) */
- HDassert(sblock->cache_info.flush_me_last);
+ assert(sblock->cache_info.flush_me_last);
/* Encode the common portion of the file superblock for all versions */
H5MM_memcpy(image, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN);
@@ -764,11 +764,11 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU
UINT32ENCODE(image, chksum);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == (size_t)H5F_SUPERBLOCK_SIZE(sblock));
+ assert((size_t)(image - (uint8_t *)_image) == (size_t)H5F_SUPERBLOCK_SIZE(sblock));
}
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -795,9 +795,9 @@ H5F__cache_superblock_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(sblock);
- HDassert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(sblock->cache_info.type == H5AC_SUPERBLOCK);
+ assert(sblock);
+ assert(sblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(sblock->cache_info.type == H5AC_SUPERBLOCK);
/* Destroy superblock */
if (H5F__super_free(sblock) < 0)
@@ -820,7 +820,7 @@ H5F__cache_drvrinfo_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *i
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image_len);
+ assert(image_len);
/* Set the initial image length size */
*image_len = H5F_DRVINFOBLOCK_HDR_SIZE; /* Fixed size portion of driver info block */
@@ -847,11 +847,11 @@ H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t image_len, vo
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
- HDassert(image_len == H5F_DRVINFOBLOCK_HDR_SIZE);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
+ assert(image_len == H5F_DRVINFOBLOCK_HDR_SIZE);
/* Deserialize the file driver info's prefix */
if (H5F__drvrinfo_prefix_decode(&drvrinfo, NULL, &image, image_len, udata, TRUE) < 0)
@@ -884,10 +884,10 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, hb
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(len >= H5F_DRVINFOBLOCK_HDR_SIZE);
- HDassert(udata);
- HDassert(udata->f);
+ assert(image);
+ assert(len >= H5F_DRVINFOBLOCK_HDR_SIZE);
+ assert(udata);
+ assert(udata->f);
/* Allocate space for the driver info */
if (NULL == (drvinfo = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t))))
@@ -898,14 +898,14 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, hb
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode file driver info prefix")
/* Sanity check */
- HDassert(len == (H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len));
+ assert(len == (H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len));
/* Validate and decode driver information */
if (H5FD_sb_load(udata->f->shared->lf, drv_name, image) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "unable to decode driver information")
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= len);
+ assert((size_t)(image - (const uint8_t *)_image) <= len);
ret_value = drvinfo;
@@ -932,10 +932,10 @@ H5F__cache_drvrinfo_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(drvinfo);
- HDassert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(drvinfo->cache_info.type == H5AC_DRVRINFO);
- HDassert(image_len);
+ assert(drvinfo);
+ assert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(drvinfo->cache_info.type == H5AC_DRVRINFO);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)(H5F_DRVINFOBLOCK_HDR_SIZE + /* Fixed-size portion of driver info block */
@@ -962,12 +962,12 @@ H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBU
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(image);
- HDassert(drvinfo);
- HDassert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(drvinfo->cache_info.type == H5AC_DRVRINFO);
- HDassert(len == (size_t)(H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len));
+ assert(f);
+ assert(image);
+ assert(drvinfo);
+ assert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(drvinfo->cache_info.type == H5AC_DRVRINFO);
+ assert(len == (size_t)(H5F_DRVINFOBLOCK_HDR_SIZE + drvinfo->len));
/* Save pointer to beginning of driver info */
dbuf = image;
@@ -989,7 +989,7 @@ H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBU
image += 8 + drvinfo->len;
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1015,9 +1015,9 @@ H5F__cache_drvrinfo_free_icr(void *_thing)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(drvinfo);
- HDassert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(drvinfo->cache_info.type == H5AC_DRVRINFO);
+ assert(drvinfo);
+ assert(drvinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(drvinfo->cache_info.type == H5AC_DRVRINFO);
/* Destroy driver info message */
H5MM_xfree(drvinfo);
diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c
index 62e4070..cc59616 100644
--- a/src/H5Gbtree2.c
+++ b/src/H5Gbtree2.c
@@ -223,8 +223,8 @@ H5G__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(bt2_udata);
- HDassert(bt2_rec);
+ assert(bt2_udata);
+ assert(bt2_rec);
/* Check hash value */
if (bt2_udata->name_hash < bt2_rec->hash)
@@ -235,7 +235,7 @@ H5G__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
H5G_fh_ud_cmp_t fh_udata; /* User data for fractal heap 'op' callback */
/* Sanity check */
- HDassert(bt2_udata->name_hash == bt2_rec->hash);
+ assert(bt2_udata->name_hash == bt2_rec->hash);
/* Prepare user data for callback */
/* down */
@@ -335,9 +335,9 @@ H5G__dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *_
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%x, ", indent, "", fwidth, "Record:", (unsigned)nrecord->hash);
+ fprintf(stream, "%*s%-*s {%x, ", indent, "", fwidth, "Record:", (unsigned)nrecord->hash);
for (u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
- HDfprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
+ fprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G__dense_btree2_name_debug() */
@@ -393,8 +393,8 @@ H5G__dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, i
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(bt2_udata);
- HDassert(bt2_rec);
+ assert(bt2_udata);
+ assert(bt2_rec);
/* Check creation order value */
if (bt2_udata->corder < bt2_rec->corder)
@@ -483,9 +483,9 @@ H5G__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%llu, ", indent, "", fwidth, "Record:", (unsigned long long)nrecord->corder);
+ fprintf(stream, "%*s%-*s {%llu, ", indent, "", fwidth, "Record:", (unsigned long long)nrecord->corder);
for (u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
- HDfprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
+ fprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5G__dense_btree2_corder_debug() */
diff --git a/src/H5Gcache.c b/src/H5Gcache.c
index e088fd8..853c62f 100644
--- a/src/H5Gcache.c
+++ b/src/H5Gcache.c
@@ -112,8 +112,8 @@ H5G__cache_node_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(image_len);
+ assert(f);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)(H5G_NODE_SIZE(f));
@@ -149,10 +149,10 @@ H5G__cache_node_deserialize(const void *_image, size_t len, void *_udata, hbool_
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(len > 0);
- HDassert(f);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(f);
+ assert(dirty);
/* Allocate symbol table data structures */
if (NULL == (sym = H5FL_CALLOC(H5G_node_t)))
@@ -164,7 +164,7 @@ H5G__cache_node_deserialize(const void *_image, size_t len, void *_udata, hbool_
/* Magic */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, image_end))
HGOTO_ERROR(H5E_SYM, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
- if (HDmemcmp(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, NULL, "bad symbol table node signature")
image += H5_SIZEOF_MAGIC;
@@ -215,10 +215,10 @@ H5G__cache_node_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(sym);
- HDassert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sym->cache_info.type == H5AC_SNODE);
- HDassert(image_len);
+ assert(sym);
+ assert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sym->cache_info.type == H5AC_SNODE);
+ assert(image_len);
*image_len = sym->node_size;
@@ -245,12 +245,12 @@ H5G__cache_node_serialize(const H5F_t *f, void *_image, size_t len, void *_thing
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(image);
- HDassert(sym);
- HDassert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(sym->cache_info.type == H5AC_SNODE);
- HDassert(len == sym->node_size);
+ assert(f);
+ assert(image);
+ assert(sym);
+ assert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(sym->cache_info.type == H5AC_SNODE);
+ assert(len == sym->node_size);
/* Magic number */
H5MM_memcpy(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -270,7 +270,7 @@ H5G__cache_node_serialize(const H5F_t *f, void *_image, size_t len, void *_thing
HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't serialize")
/* Clear rest of symbol table node */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -296,9 +296,9 @@ H5G__cache_node_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(sym);
- HDassert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(sym->cache_info.type == H5AC_SNODE);
+ assert(sym);
+ assert(sym->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(sym->cache_info.type == H5AC_SNODE);
/* Destroy symbol table node */
if (H5G__node_free(sym) < 0)
diff --git a/src/H5Gcompact.c b/src/H5Gcompact.c
index 4c5e8e3..138bde8 100644
--- a/src/H5Gcompact.c
+++ b/src/H5Gcompact.c
@@ -85,9 +85,9 @@ H5G__compact_build_table_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(udata);
- HDassert(udata->curr_lnk < udata->ltable->nlinks);
+ assert(lnk);
+ assert(udata);
+ assert(udata->curr_lnk < udata->ltable->nlinks);
/* Copy link message into table */
if (NULL == H5O_msg_copy(H5O_LINK_ID, lnk, &(udata->ltable->lnks[udata->curr_lnk])))
@@ -123,9 +123,9 @@ H5G__compact_build_table(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_ind
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc);
- HDassert(linfo);
- HDassert(ltable);
+ assert(oloc);
+ assert(linfo);
+ assert(ltable);
/* Set size of table */
H5_CHECK_OVERFLOW(linfo->nlinks, hsize_t, size_t);
@@ -183,8 +183,8 @@ H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
- HDassert(obj_lnk);
+ assert(grp_oloc && grp_oloc->file);
+ assert(obj_lnk);
/* Insert link message into group */
if (H5O_msg_create(grp_oloc, H5O_LINK_ID, 0, H5O_UPDATE_TIME, obj_lnk) < 0)
@@ -217,7 +217,7 @@ H5G__compact_get_name_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc);
+ assert(oloc);
/* Build table of all link messages */
if (H5G__compact_build_table(oloc, linfo, idx_type, order, &ltable) < 0)
@@ -268,8 +268,8 @@ H5G__compact_remove_common_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, vo
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(udata);
+ assert(lnk);
+ assert(udata);
/* If we've found the right link, get the object type */
if (HDstrcmp(lnk->name, udata->name) == 0) {
@@ -305,8 +305,8 @@ H5G__compact_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const ch
FUNC_ENTER_PACKAGE
- HDassert(oloc && oloc->file);
- HDassert(name && *name);
+ assert(oloc && oloc->file);
+ assert(name && *name);
/* Initialize data to pass through object header iteration */
udata.file = oloc->file;
@@ -343,8 +343,8 @@ H5G__compact_remove_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5RS
FUNC_ENTER_PACKAGE
- HDassert(oloc && oloc->file);
- HDassert(linfo);
+ assert(oloc && oloc->file);
+ assert(linfo);
/* Build table of all link messages, sorted according to desired order */
if (H5G__compact_build_table(oloc, linfo, idx_type, order, &ltable) < 0)
@@ -394,9 +394,9 @@ H5G__compact_iterate(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_index_t
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc);
- HDassert(linfo);
- HDassert(op);
+ assert(oloc);
+ assert(linfo);
+ assert(op);
/* Build table of all link messages */
if (H5G__compact_build_table(oloc, linfo, idx_type, order, &ltable) < 0)
@@ -437,8 +437,8 @@ H5G__compact_lookup_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_ud
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(udata);
+ assert(lnk);
+ assert(udata);
/* Check for name to get information */
if (HDstrcmp(lnk->name, udata->name) == 0) {
@@ -481,9 +481,9 @@ H5G__compact_lookup(const H5O_loc_t *oloc, const char *name, hbool_t *found, H5O
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(name && *name);
- HDassert(found);
- HDassert(lnk && oloc->file);
+ assert(name && *name);
+ assert(found);
+ assert(lnk && oloc->file);
/* Set up user data for iteration */
udata.name = name;
@@ -523,9 +523,9 @@ H5G__compact_lookup_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_i
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(oloc && oloc->file);
- HDassert(linfo);
- HDassert(lnk);
+ assert(oloc && oloc->file);
+ assert(linfo);
+ assert(lnk);
/* Build table of all link messages, sorted according to desired order */
if (H5G__compact_build_table(oloc, linfo, idx_type, order, &ltable) < 0)
diff --git a/src/H5Gdense.c b/src/H5Gdense.c
index f17afbd..764abce 100644
--- a/src/H5Gdense.c
+++ b/src/H5Gdense.c
@@ -260,12 +260,12 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
+ assert(f);
+ assert(linfo);
/* Set fractal heap creation parameters */
/* XXX: Give some control of these to applications? */
- HDmemset(&fheap_cparam, 0, sizeof(fheap_cparam));
+ memset(&fheap_cparam, 0, sizeof(fheap_cparam));
fheap_cparam.managed.width = H5G_FHEAP_MAN_WIDTH;
fheap_cparam.managed.start_block_size = H5G_FHEAP_MAN_START_BLOCK_SIZE;
fheap_cparam.managed.max_direct_size = H5G_FHEAP_MAN_MAX_DIRECT_SIZE;
@@ -287,10 +287,10 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline)
/* Retrieve the heap's ID length in the file */
if (H5HF_get_id_len(fheap, &fheap_id_len) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length")
- HDassert(fheap_id_len == H5G_DENSE_FHEAP_ID_LEN);
+ assert(fheap_id_len == H5G_DENSE_FHEAP_ID_LEN);
/* Create the name index v2 B-tree */
- HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
+ memset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5G_BT2_NAME;
bt2_cparam.node_size = (size_t)H5G_NAME_BT2_NODE_SIZE;
H5_CHECK_OVERFLOW(fheap_id_len, /* From: */ hsize_t, /* To: */ uint32_t);
@@ -308,7 +308,7 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline)
/* Check if we should create a creation order index v2 B-tree */
if (linfo->index_corder) {
/* Create the creation order index v2 B-tree */
- HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
+ memset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5G_BT2_CORDER;
bt2_cparam.node_size = (size_t)H5G_CORDER_BT2_NODE_SIZE;
H5_CHECK_OVERFLOW(fheap_id_len, /* From: */ hsize_t, /* To: */ uint32_t);
@@ -366,9 +366,9 @@ H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *lnk)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
- HDassert(lnk);
+ assert(f);
+ assert(linfo);
+ assert(lnk);
/* Find out the size of buffer needed for serialized link */
if ((link_size = H5O_msg_raw_size(f, H5O_LINK_ID, FALSE, lnk)) == 0)
@@ -415,7 +415,7 @@ H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *lnk)
/* Check if we should create a creation order index v2 B-tree record */
if (linfo->index_corder) {
/* Open the creation order index v2 B-tree */
- HDassert(H5F_addr_defined(linfo->corder_bt2_addr));
+ assert(H5F_addr_defined(linfo->corder_bt2_addr));
if (NULL == (bt2_corder = H5B2_open(f, linfo->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
@@ -462,8 +462,8 @@ H5G__dense_lookup_cb(const void *_lnk, void *_user_lnk)
/*
* Check arguments.
*/
- HDassert(lnk);
- HDassert(user_lnk);
+ assert(lnk);
+ assert(user_lnk);
/* Copy link information */
if (H5O_msg_copy(H5O_LINK_ID, lnk, user_lnk) == NULL)
@@ -498,11 +498,11 @@ H5G__dense_lookup(H5F_t *f, const H5O_linfo_t *linfo, const char *name, hbool_t
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
- HDassert(name && *name);
- HDassert(found);
- HDassert(lnk);
+ assert(f);
+ assert(linfo);
+ assert(name && *name);
+ assert(found);
+ assert(lnk);
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr)))
@@ -636,9 +636,9 @@ H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
- HDassert(lnk);
+ assert(f);
+ assert(linfo);
+ assert(lnk);
/* Determine the address of the index to use */
if (idx_type == H5_INDEX_NAME) {
@@ -649,7 +649,7 @@ H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type
bt2_addr = HADDR_UNDEF;
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
/* This address may not be defined if creation order is tracked, but
* there's no index on it. If there's no v2 B-tree that indexes
@@ -665,7 +665,7 @@ H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type
*/
if (order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
bt2_addr = linfo->name_bt2_addr;
- HDassert(H5F_addr_defined(bt2_addr));
+ assert(H5F_addr_defined(bt2_addr));
} /* end if */
/* If there is an index defined for the field, use it */
@@ -738,9 +738,9 @@ H5G__dense_build_table_cb(const H5O_link_t *lnk, void *_udata)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(udata);
- HDassert(udata->curr_lnk < udata->ltable->nlinks);
+ assert(lnk);
+ assert(udata);
+ assert(udata->curr_lnk < udata->ltable->nlinks);
/* Copy link information */
if (H5O_msg_copy(H5O_LINK_ID, lnk, &(udata->ltable->lnks[udata->curr_lnk])) == NULL)
@@ -778,9 +778,9 @@ H5G__dense_build_table(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(linfo);
- HDassert(ltable);
+ assert(f);
+ assert(linfo);
+ assert(ltable);
/* Set size of table */
H5_CHECK_OVERFLOW(linfo->nlinks, /* From: */ hsize_t, /* To: */ size_t);
@@ -931,9 +931,9 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
- HDassert(op);
+ assert(f);
+ assert(linfo);
+ assert(op);
/* Determine the address of the index to use */
if (idx_type == H5_INDEX_NAME) {
@@ -944,7 +944,7 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i
bt2_addr = HADDR_UNDEF;
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
/* This address may not be defined if creation order is tracked, but
* there's no index on it. If there's no v2 B-tree that indexes
@@ -959,7 +959,7 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i
* process.
*/
if (order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
- HDassert(H5F_addr_defined(linfo->name_bt2_addr));
+ assert(H5F_addr_defined(linfo->name_bt2_addr));
bt2_addr = linfo->name_bt2_addr;
} /* end if */
@@ -968,7 +968,7 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i
H5G_bt2_ud_it_t udata; /* User data for iterator callback */
/* Sanity check */
- HDassert(H5F_addr_defined(bt2_addr));
+ assert(H5F_addr_defined(bt2_addr));
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr)))
@@ -1127,8 +1127,8 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
+ assert(f);
+ assert(linfo);
/* Determine the address of the index to use */
if (idx_type == H5_INDEX_NAME) {
@@ -1139,7 +1139,7 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5
bt2_addr = HADDR_UNDEF;
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
/* This address may not be defined if creation order is tracked, but
* there's no index on it. If there's no v2 B-tree that indexes
@@ -1155,7 +1155,7 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5
*/
if (order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
bt2_addr = linfo->name_bt2_addr;
- HDassert(H5F_addr_defined(bt2_addr));
+ assert(H5F_addr_defined(bt2_addr));
} /* end if */
/* If there is an index defined for the field, use it */
@@ -1251,7 +1251,7 @@ H5G__dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
- HDassert(lnk->corder_valid);
+ assert(lnk->corder_valid);
bt2_udata.corder = lnk->corder;
/* Remove the record from the name index v2 B-tree */
@@ -1346,9 +1346,9 @@ H5G__dense_remove(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
- HDassert(name && *name);
+ assert(f);
+ assert(linfo);
+ assert(name && *name);
/* Open the fractal heap */
if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr)))
@@ -1448,7 +1448,7 @@ H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
else {
const H5G_dense_bt2_corder_rec_t *record = (const H5G_dense_bt2_corder_rec_t *)_record;
- HDassert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
+ assert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
/* Set the heap ID to operate on */
heap_id = record->id;
@@ -1461,7 +1461,7 @@ H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
/* Call fractal heap 'op' routine, to perform user callback */
if (H5HF_op(bt2_udata->fheap, heap_id, H5G__dense_remove_by_idx_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link removal callback failed")
- HDassert(fh_udata.lnk);
+ assert(fh_udata.lnk);
/* Check for removing the link from the "other" index (creation order, when name used and vice versa) */
if (H5F_addr_defined(bt2_udata->other_bt2_addr)) {
@@ -1473,7 +1473,7 @@ H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
other_bt2_udata.corder = fh_udata.lnk->corder;
} /* end if */
else {
- HDassert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
+ assert(bt2_udata->idx_type == H5_INDEX_CRT_ORDER);
/* Set up the user data for the v2 B-tree 'record remove' callback */
other_bt2_udata.f = bt2_udata->f;
@@ -1549,8 +1549,8 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
+ assert(f);
+ assert(linfo);
/* Determine the address of the index to use */
if (idx_type == H5_INDEX_NAME) {
@@ -1561,7 +1561,7 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful
bt2_addr = HADDR_UNDEF;
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
/* This address may not be defined if creation order is tracked, but
* there's no index on it. If there's no v2 B-tree that indexes
@@ -1577,7 +1577,7 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful
*/
if (order == H5_ITER_NATIVE && !H5F_addr_defined(bt2_addr)) {
bt2_addr = linfo->name_bt2_addr;
- HDassert(H5F_addr_defined(bt2_addr));
+ assert(H5F_addr_defined(bt2_addr));
} /* end if */
/* If there is an index defined for the field, use it */
@@ -1651,8 +1651,8 @@ H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(linfo);
+ assert(f);
+ assert(linfo);
/* Check if we are to adjust the ref. count for all the links */
/* (we adjust the ref. count when deleting a group and we _don't_ adjust
@@ -1696,13 +1696,13 @@ H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link)
/* Check if we should delete the creation order index v2 B-tree */
if (linfo->index_corder) {
/* Delete the creation order index, without adjusting the ref. count on the links */
- HDassert(H5F_addr_defined(linfo->corder_bt2_addr));
+ assert(H5F_addr_defined(linfo->corder_bt2_addr));
if (H5B2_delete(f, linfo->corder_bt2_addr, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for creation order index")
linfo->corder_bt2_addr = HADDR_UNDEF;
} /* end if */
else
- HDassert(!H5F_addr_defined(linfo->corder_bt2_addr));
+ assert(!H5F_addr_defined(linfo->corder_bt2_addr));
/* Delete the fractal heap */
if (H5HF_delete(f, linfo->fheap_addr) < 0)
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 6075ab8..97d67bc 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -1032,7 +1032,7 @@ H5G__get_objinfo_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name,
/* Go retrieve the data model & native object information */
/* (don't need index & heap info) */
- HDassert(obj_loc);
+ assert(obj_loc);
if (H5O_get_info(obj_loc->oloc, &dm_info, H5O_INFO_BASIC | H5O_INFO_TIME) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get data model object info")
if (H5O_get_native_info(obj_loc->oloc, &nat_info, H5O_INFO_HDR) < 0)
@@ -1099,12 +1099,12 @@ H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, H5
FUNC_ENTER_PACKAGE;
/* Sanity checks */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Reset stat buffer */
if (statbuf)
- HDmemset(statbuf, 0, sizeof(H5G_stat_t));
+ memset(statbuf, 0, sizeof(H5G_stat_t));
/* Set up user data for retrieving information */
udata.statbuf = statbuf;
@@ -1137,7 +1137,7 @@ H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, H5
}
else {
/* UD link. H5L_get_info checked for invalid link classes */
- HDassert(linfo.type >= H5L_TYPE_UD_MIN && linfo.type <= H5L_TYPE_MAX);
+ assert(linfo.type >= H5L_TYPE_UD_MIN && linfo.type <= H5L_TYPE_MAX);
statbuf->type = H5G_UDLINK;
}
}
diff --git a/src/H5Gent.c b/src/H5Gent.c
index 096e13e..0a148fb 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -85,9 +85,9 @@ H5G__ent_decode_vec(const H5F_t *f, const uint8_t **pp, const uint8_t *p_end, H5
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(pp);
- HDassert(ent);
+ assert(f);
+ assert(pp);
+ assert(ent);
/* decode entries */
for (u = 0; u < n; u++) {
@@ -126,9 +126,9 @@ H5G_ent_decode(const H5F_t *f, const uint8_t **pp, H5G_entry_t *ent, const uint8
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(f);
- HDassert(pp);
- HDassert(ent);
+ assert(f);
+ assert(pp);
+ assert(ent);
if (H5_IS_BUFFER_OVERFLOW(*pp, ent->name_off, p_end))
HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "image pointer is out of bounds")
@@ -154,7 +154,7 @@ H5G_ent_decode(const H5F_t *f, const uint8_t **pp, H5G_entry_t *ent, const uint8
break;
case H5G_CACHED_STAB:
- HDassert(2 * H5F_SIZEOF_ADDR(f) <= H5G_SIZEOF_SCRATCH);
+ assert(2 * H5F_SIZEOF_ADDR(f) <= H5G_SIZEOF_SCRATCH);
if (H5_IS_BUFFER_OVERFLOW(*pp, H5F_SIZEOF_ADDR(f) * 2, p_end))
HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "image pointer is out of bounds")
H5F_addr_decode(f, pp, &(ent->cache.stab.btree_addr));
@@ -204,9 +204,9 @@ H5G__ent_encode_vec(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent, unsign
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(pp);
- HDassert(ent);
+ assert(f);
+ assert(pp);
+ assert(ent);
/* encode entries */
for (u = 0; u < n; u++)
@@ -242,8 +242,8 @@ H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(f);
- HDassert(pp);
+ assert(f);
+ assert(pp);
/* Check for actual entry to encode */
if (ent) {
@@ -259,7 +259,7 @@ H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
break;
case H5G_CACHED_STAB:
- HDassert(2 * H5F_SIZEOF_ADDR(f) <= H5G_SIZEOF_SCRATCH);
+ assert(2 * H5F_SIZEOF_ADDR(f) <= H5G_SIZEOF_SCRATCH);
H5F_addr_encode(f, pp, ent->cache.stab.btree_addr);
H5F_addr_encode(f, pp, ent->cache.stab.heap_addr);
break;
@@ -283,7 +283,7 @@ H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
/* fill with zero */
if (*pp < p_ret)
- HDmemset(*pp, 0, (size_t)(p_ret - *pp));
+ memset(*pp, 0, (size_t)(p_ret - *pp));
*pp = p_ret;
done:
@@ -319,9 +319,9 @@ H5G__ent_copy(H5G_entry_t *dst, H5G_entry_t *src, H5_copy_depth_t depth)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(src);
- HDassert(dst);
- HDassert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
+ assert(src);
+ assert(dst);
+ assert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
/* Copy the top level information */
H5MM_memcpy(dst, src, sizeof(H5G_entry_t));
@@ -357,10 +357,10 @@ H5G__ent_reset(H5G_entry_t *ent)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(ent);
+ assert(ent);
/* Clear the symbol table entry to an empty state */
- HDmemset(ent, 0, sizeof(H5G_entry_t));
+ memset(ent, 0, sizeof(H5G_entry_t));
ent->header = HADDR_UNDEF;
FUNC_LEAVE_NOAPI_VOID
@@ -389,10 +389,10 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(heap);
- HDassert(name);
- HDassert(lnk);
+ assert(f);
+ assert(heap);
+ assert(name);
+ assert(lnk);
/* Reset the new entry */
H5G__ent_reset(ent);
@@ -428,7 +428,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk
if ((stab_exists = H5O_msg_exists(&targ_oloc, H5O_STAB_ID)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for STAB message")
- HDassert(!stab_exists);
+ assert(!stab_exists);
} /* end else */
#endif /* NDEBUG */
} /* end if */
@@ -528,47 +528,47 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth, con
nested_indent = indent + 3;
nested_fwidth = MAX(0, fwidth - 3);
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Name offset into private heap:", (unsigned long)(ent->name_off));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Name offset into private heap:", (unsigned long)(ent->name_off));
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object header address:", ent->header);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object header address:", ent->header);
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cache info type:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cache info type:");
switch (ent->type) {
case H5G_NOTHING_CACHED:
- HDfprintf(stream, "Nothing Cached\n");
+ fprintf(stream, "Nothing Cached\n");
break;
case H5G_CACHED_STAB:
- HDfprintf(stream, "Symbol Table\n");
+ fprintf(stream, "Symbol Table\n");
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached entry information:");
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth,
- "B-tree address:", ent->cache.stab.btree_addr);
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached entry information:");
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth,
+ "B-tree address:", ent->cache.stab.btree_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth,
- "Heap address:", ent->cache.stab.heap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth,
+ "Heap address:", ent->cache.stab.heap_addr);
break;
case H5G_CACHED_SLINK:
- HDfprintf(stream, "Symbolic Link\n");
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached information:");
- HDfprintf(stream, "%*s%-*s %lu\n", nested_indent, "", nested_fwidth,
- "Link value offset:", (unsigned long)(ent->cache.slink.lval_offset));
+ fprintf(stream, "Symbolic Link\n");
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached information:");
+ fprintf(stream, "%*s%-*s %lu\n", nested_indent, "", nested_fwidth,
+ "Link value offset:", (unsigned long)(ent->cache.slink.lval_offset));
if (heap) {
lval = (const char *)H5HL_offset_into(heap, ent->cache.slink.lval_offset);
- HDfprintf(stream, "%*s%-*s %s\n", nested_indent, "", nested_fwidth,
- "Link value:", (lval == NULL) ? "" : lval);
+ fprintf(stream, "%*s%-*s %s\n", nested_indent, "", nested_fwidth,
+ "Link value:", (lval == NULL) ? "" : lval);
} /* end if */
else
- HDfprintf(stream, "%*s%-*s\n", nested_indent, "", nested_fwidth,
- "Warning: Invalid heap address given, name not displayed!");
+ fprintf(stream, "%*s%-*s\n", nested_indent, "", nested_fwidth,
+ "Warning: Invalid heap address given, name not displayed!");
break;
case H5G_CACHED_ERROR:
case H5G_NCACHED:
default:
- HDfprintf(stream, "*** Unknown symbol type %d\n", ent->type);
+ fprintf(stream, "*** Unknown symbol type %d\n", ent->type);
break;
} /* end switch */
diff --git a/src/H5Gint.c b/src/H5Gint.c
index 416938a..5658cc5 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -191,7 +191,7 @@ H5G_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(0 == H5I_nmembers(H5I_GROUP));
+ assert(0 == H5I_nmembers(H5I_GROUP));
/* Destroy the group object id group */
n += (H5I_dec_type_ref(H5I_GROUP) > 0);
@@ -216,7 +216,7 @@ H5G__close_cb(H5VL_object_t *grp_vol_obj, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(grp_vol_obj);
+ assert(grp_vol_obj);
/* Close the group */
if (H5VL_group_close(grp_vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0)
@@ -254,15 +254,15 @@ H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id, hid_t g
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(lcpl_id != H5P_DEFAULT);
- HDassert(gcpl_id != H5P_DEFAULT);
+ assert(loc);
+ assert(name && *name);
+ assert(lcpl_id != H5P_DEFAULT);
+ assert(gcpl_id != H5P_DEFAULT);
/* Set up group creation info */
gcrt_info.gcpl_id = gcpl_id;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
- HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
+ memset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
/* Set up object creation information */
ocrt_info.obj_type = H5O_TYPE_GROUP;
@@ -272,7 +272,7 @@ H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id, hid_t g
/* Create the new group and link it to its parent group */
if (H5L_link_object(loc, name, &ocrt_info, lcpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create and link to group")
- HDassert(ocrt_info.new_obj);
+ assert(ocrt_info.new_obj);
/* Set the return value */
ret_value = (H5G_t *)ocrt_info.new_obj;
@@ -308,8 +308,8 @@ H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file);
- HDassert(gcrt_info->gcpl_id != H5P_DEFAULT);
+ assert(file);
+ assert(gcrt_info->gcpl_id != H5P_DEFAULT);
/* create an open group */
if (NULL == (grp = H5FL_CALLOC(H5G_t)))
@@ -383,8 +383,8 @@ H5G__open_name(const H5G_loc_t *loc, const char *name)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(loc);
- HDassert(name);
+ assert(loc);
+ assert(name);
/* Set up opened group location to fill in */
grp_loc.oloc = &grp_oloc;
@@ -442,7 +442,7 @@ H5G_open(const H5G_loc_t *loc)
FUNC_ENTER_NOAPI(NULL)
/* Check args */
- HDassert(loc);
+ assert(loc);
/* Allocate the group structure */
if (NULL == (grp = H5FL_CALLOC(H5G_t)))
@@ -533,7 +533,7 @@ H5G__open_oid(H5G_t *grp)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(grp);
+ assert(grp);
/* Allocate the shared information for the group */
if (NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t)))
@@ -581,13 +581,13 @@ H5G_close(H5G_t *grp)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(grp && grp->shared);
- HDassert(grp->shared->fo_count > 0);
+ assert(grp && grp->shared);
+ assert(grp->shared->fo_count > 0);
--grp->shared->fo_count;
if (0 == grp->shared->fo_count) {
- HDassert(grp != H5G_rootof(H5G_fileof(grp)));
+ assert(grp != H5G_rootof(H5G_fileof(grp)));
/* Uncork cache entries with object address tag */
if (H5AC_cork(grp->oloc.file, grp->oloc.addr, H5AC__GET_CORKED, &corked) < 0)
@@ -716,7 +716,7 @@ H5G_fileof(H5G_t *grp)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(grp);
+ assert(grp);
FUNC_LEAVE_NOAPI(grp->oloc.file)
} /* end H5G_fileof() */
@@ -739,7 +739,7 @@ H5G_get_shared_count(H5G_t *grp)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(grp && grp->shared);
+ assert(grp && grp->shared);
FUNC_LEAVE_NOAPI(grp->shared->fo_count)
} /* end H5G_get_shared_count() */
@@ -762,8 +762,8 @@ H5G_mount(H5G_t *grp)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(grp && grp->shared);
- HDassert(grp->shared->mounted == FALSE);
+ assert(grp && grp->shared);
+ assert(grp->shared->mounted == FALSE);
/* Set the 'mounted' flag */
grp->shared->mounted = TRUE;
@@ -789,7 +789,7 @@ H5G_mounted(H5G_t *grp)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(grp && grp->shared);
+ assert(grp && grp->shared);
FUNC_LEAVE_NOAPI(grp->shared->mounted)
} /* end H5G_mounted() */
@@ -812,8 +812,8 @@ H5G_unmount(H5G_t *grp)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(grp && grp->shared);
- HDassert(grp->shared->mounted == TRUE);
+ assert(grp && grp->shared);
+ assert(grp->shared->mounted == TRUE);
/* Reset the 'mounted' flag */
grp->shared->mounted = FALSE;
@@ -843,8 +843,8 @@ H5G__iterate_cb(const H5O_link_t *lnk, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(lnk);
- HDassert(udata);
+ assert(lnk);
+ assert(udata);
switch (udata->lnk_op.op_type) {
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -866,7 +866,7 @@ H5G__iterate_cb(const H5O_link_t *lnk, void *_udata)
} break;
default:
- HDassert(0 && "Unknown link op type?!?");
+ assert(0 && "Unknown link op type?!?");
} /* end switch */
done:
@@ -897,10 +897,10 @@ H5G_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(loc);
- HDassert(group_name);
- HDassert(last_lnk);
- HDassert(lnk_op && lnk_op->op_func.op_new);
+ assert(loc);
+ assert(group_name);
+ assert(last_lnk);
+ assert(lnk_op && lnk_op->op_func.op_new);
/* Open the group on which to operate. We also create a group ID which
* we can pass to the application-defined operator.
@@ -985,8 +985,8 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(lnk);
- HDassert(udata);
+ assert(lnk);
+ assert(udata);
/* Check if we will need more space to store this link's relative path */
/* ("+2" is for string terminator and possible '/' for group separator later) */
@@ -1003,7 +1003,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
} /* end if */
/* Build the link's relative path name */
- HDassert(udata->path[old_path_len] == '\0');
+ assert(udata->path[old_path_len] == '\0');
HDstrncpy(&(udata->path[old_path_len]), lnk->name, link_name_len + 1);
udata->curr_path_len += link_name_len;
@@ -1068,7 +1068,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
htri_t linfo_exists; /* Whether the link info message exists */
/* Add the path separator to the current path */
- HDassert(udata->path[udata->curr_path_len] == '\0');
+ assert(udata->path[udata->curr_path_len] == '\0');
HDstrncpy(&(udata->path[udata->curr_path_len]), "/", (size_t)2);
udata->curr_path_len++;
@@ -1084,7 +1084,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
idx_type = H5_INDEX_NAME;
} /* end if */
else
- HDassert(idx_type == H5_INDEX_NAME);
+ assert(idx_type == H5_INDEX_NAME);
} /* end if */
else {
/* Can only perform name lookups on groups with symbol tables */
@@ -1157,7 +1157,7 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o
herr_t ret_value = FAIL; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
FUNC_ENTER_NOAPI(FAIL)
@@ -1229,7 +1229,7 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o
idx_type = H5_INDEX_NAME;
} /* end if */
else
- HDassert(idx_type == H5_INDEX_NAME);
+ assert(idx_type == H5_INDEX_NAME);
} /* end if */
else {
/* Can only perform name lookups on groups with symbol tables */
@@ -1378,8 +1378,8 @@ H5G__get_info_by_name(const H5G_loc_t *loc, const char *name, H5G_info_t *grp_in
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(grp_info);
+ assert(loc);
+ assert(grp_info);
/* Set up opened group location to fill in */
grp_loc.oloc = &grp_oloc;
@@ -1428,8 +1428,8 @@ H5G__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(grp_info);
+ assert(loc);
+ assert(grp_info);
/* Set up opened group location to fill in */
grp_loc.oloc = &grp_oloc;
diff --git a/src/H5Glink.c b/src/H5Glink.c
index fcdbca3..731bfdf 100644
--- a/src/H5Glink.c
+++ b/src/H5Glink.c
@@ -211,10 +211,10 @@ H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, const H5G_entry_t *ent, co
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(heap);
- HDassert(ent);
- HDassert(name);
+ assert(lnk);
+ assert(heap);
+ assert(ent);
+ assert(name);
/* Set (default) common info for link */
lnk->cset = H5F_DEFAULT_CSET;
@@ -277,8 +277,8 @@ H5G_link_to_info(const H5O_loc_t *link_loc, const H5O_link_t *lnk, H5L_info2_t *
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(link_loc);
- HDassert(lnk);
+ assert(link_loc);
+ assert(lnk);
/* Get information from the link */
if (info) {
@@ -358,9 +358,9 @@ H5G__link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *obj
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(grp_loc);
- HDassert(lnk);
- HDassert(obj_loc);
+ assert(grp_loc);
+ assert(lnk);
+ assert(obj_loc);
/*
* Build location from the link
@@ -404,14 +404,14 @@ H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type, H5_iter_orde
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ltable);
+ assert(ltable);
/* Can't sort when empty since the links table will be NULL */
if (0 == ltable->nlinks)
HGOTO_DONE(ret_value);
/* This should never be NULL if the number of links is non-zero */
- HDassert(ltable->lnks);
+ assert(ltable->lnks);
/* Pick appropriate sorting routine */
if (idx_type == H5_INDEX_NAME) {
@@ -420,16 +420,16 @@ H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type, H5_iter_orde
else if (order == H5_ITER_DEC)
HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G__link_cmp_name_dec);
else
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
} /* end if */
else {
- HDassert(idx_type == H5_INDEX_CRT_ORDER);
+ assert(idx_type == H5_INDEX_CRT_ORDER);
if (order == H5_ITER_INC)
HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G__link_cmp_corder_inc);
else if (order == H5_ITER_DEC)
HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G__link_cmp_corder_dec);
else
- HDassert(order == H5_ITER_NATIVE);
+ assert(order == H5_ITER_NATIVE);
} /* end else */
done:
@@ -460,8 +460,8 @@ H5G__link_iterate_table(const H5G_link_table_t *ltable, hsize_t skip, hsize_t *l
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ltable);
- HDassert(op);
+ assert(ltable);
+ assert(op);
/* Skip over links, if requested */
if (last_lnk)
@@ -507,7 +507,7 @@ H5G__link_release_table(H5G_link_table_t *ltable)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ltable);
+ assert(ltable);
/* Release link info, if any */
if (ltable->nlinks > 0) {
@@ -520,7 +520,7 @@ H5G__link_release_table(H5G_link_table_t *ltable)
H5MM_xfree(ltable->lnks);
} /* end if */
else
- HDassert(ltable->lnks == NULL);
+ assert(ltable->lnks == NULL);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -548,7 +548,7 @@ H5G__link_name_replace(H5F_t *file, H5RS_str_t *grp_full_path_r, const H5O_link_
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(file);
+ assert(file);
/* Search the open IDs and replace names for unlinked object */
if (grp_full_path_r) {
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 2b746b3..3978771 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -291,8 +291,8 @@ H5G_loc_copy(H5G_loc_t *dst, const H5G_loc_t *src, H5_copy_depth_t depth)
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(dst);
- HDassert(src);
+ assert(dst);
+ assert(src);
/* Copy components of the location */
if (H5O_loc_copy(dst->oloc, src->oloc, depth) < 0)
@@ -324,7 +324,7 @@ H5G_loc_reset(H5G_loc_t *loc)
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
+ assert(loc);
/* Reset components of the location */
if (H5O_loc_reset(loc->oloc) < 0)
@@ -356,7 +356,7 @@ H5G_loc_free(H5G_loc_t *loc)
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
+ assert(loc);
/* Reset components of the location */
if (H5G_name_free(loc->path) < 0)
@@ -426,9 +426,9 @@ H5G_loc_find(const H5G_loc_t *loc, const char *name, H5G_loc_t *obj_loc /*out*/)
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(obj_loc);
+ assert(loc);
+ assert(name && *name);
+ assert(obj_loc);
/* Set up user data for locating object */
udata.loc = obj_loc;
@@ -527,9 +527,9 @@ H5G_loc_find_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t idx
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(group_name && *group_name);
- HDassert(obj_loc);
+ assert(loc);
+ assert(group_name && *group_name);
+ assert(obj_loc);
/* Set up user data for locating object */
udata.idx_type = idx_type;
@@ -566,9 +566,9 @@ H5G__loc_insert(H5G_loc_t *grp_loc, char *name, H5G_loc_t *obj_loc, H5O_type_t o
FUNC_ENTER_PACKAGE
/* Check args. */
- HDassert(grp_loc);
- HDassert(name && *name);
- HDassert(obj_loc);
+ assert(grp_loc);
+ assert(name && *name);
+ assert(obj_loc);
/* Create link object for the object location */
lnk.type = H5L_TYPE_HARD;
@@ -650,9 +650,9 @@ H5G_loc_exists(const H5G_loc_t *loc, const char *name, hbool_t *exists)
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(exists);
+ assert(loc);
+ assert(name && *name);
+ assert(exists);
/* Traverse group hierarchy to locate object */
if (H5G_traverse(loc, name, H5G_TARGET_EXISTS, H5G__loc_exists_cb, exists) < 0)
@@ -720,9 +720,9 @@ H5G__loc_addr(const H5G_loc_t *loc, const char *name, haddr_t *addr /*out*/)
FUNC_ENTER_PACKAGE
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(addr);
+ assert(loc);
+ assert(name && *name);
+ assert(addr);
/* Traverse group hierarchy to locate object */
if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_addr_cb, addr) < 0)
@@ -792,9 +792,9 @@ H5G_loc_info(const H5G_loc_t *loc, const char *name, H5O_info2_t *oinfo /*out*/,
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(oinfo);
+ assert(loc);
+ assert(name && *name);
+ assert(oinfo);
/* Set up user data for locating object */
udata.fields = fields;
@@ -868,9 +868,9 @@ H5G_loc_native_info(const H5G_loc_t *loc, const char *name, H5O_native_info_t *o
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(oinfo);
+ assert(loc);
+ assert(name && *name);
+ assert(oinfo);
/* Set up user data for locating object */
udata.fields = fields;
@@ -931,7 +931,7 @@ H5G__loc_set_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
} /* end if */
done:
- HDfree(comment.s);
+ free(comment.s);
/* Indicate that this callback didn't take ownership of the group *
* location for the object */
@@ -962,8 +962,8 @@ H5G_loc_set_comment(const H5G_loc_t *loc, const char *name, const char *comment)
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up user data for locating object */
udata.comment = comment;
@@ -1049,8 +1049,8 @@ H5G_loc_get_comment(const H5G_loc_t *loc, const char *name, char *comment /*out*
FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up user data for locating object */
udata.comment = comment;
diff --git a/src/H5Gname.c b/src/H5Gname.c
index ccb5253..c3c2606 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -116,7 +116,7 @@ H5G__component(const char *name, size_t *size_p)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(name);
+ assert(name);
while ('/' == *name)
name++;
@@ -151,7 +151,7 @@ H5G_normalize(const char *name)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(name);
+ assert(name);
/* Duplicate the name, to return */
if (NULL == (norm = H5MM_strdup(name)))
@@ -215,13 +215,13 @@ H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
/* Get component of each name */
fullpath = H5RS_get_str(fullpath_r);
- HDassert(fullpath);
+ assert(fullpath);
fullpath = H5G__component(fullpath, &nchars1);
- HDassert(fullpath);
+ assert(fullpath);
prefix = H5RS_get_str(prefix_r);
- HDassert(prefix);
+ assert(prefix);
prefix = H5G__component(prefix, &nchars2);
- HDassert(prefix);
+ assert(prefix);
/* Check if we have a real string for each component */
while (*fullpath && *prefix) {
@@ -235,9 +235,9 @@ H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
/* Get next component of each name */
fullpath = H5G__component(fullpath, &nchars1);
- HDassert(fullpath);
+ assert(fullpath);
prefix = H5G__component(prefix, &nchars2);
- HDassert(prefix);
+ assert(prefix);
} /* end if */
else
HGOTO_DONE(FALSE)
@@ -275,8 +275,8 @@ H5G__build_fullpath(const char *prefix, const char *name)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(prefix);
- HDassert(name);
+ assert(prefix);
+ assert(name);
/* Create full path */
if (NULL == (ret_value = H5RS_create(prefix)))
@@ -310,12 +310,12 @@ H5G_build_fullpath_refstr_str(H5RS_str_t *prefix_r, const char *name)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(prefix_r);
- HDassert(name);
+ assert(prefix_r);
+ assert(name);
/* Get the raw string for the user path */
prefix = H5RS_get_str(prefix_r);
- HDassert(prefix);
+ assert(prefix);
/* Create reference counted string for path */
ret_value = H5G__build_fullpath(prefix, name);
@@ -342,13 +342,13 @@ H5G__name_init(H5G_name_t *name, const char *path)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(name);
+ assert(name);
/* Set the initial paths for a name object */
name->full_path_r = H5RS_create(path);
- HDassert(name->full_path_r);
+ assert(name->full_path_r);
name->user_path_r = H5RS_create(path);
- HDassert(name->user_path_r);
+ assert(name->user_path_r);
name->obj_hidden = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -374,9 +374,9 @@ H5G_name_set(const H5G_name_t *loc, H5G_name_t *obj, const char *name)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(loc);
- HDassert(obj);
- HDassert(name);
+ assert(loc);
+ assert(obj);
+ assert(name);
/* Free & reset the object's previous paths info (if they exist) */
H5G_name_free(obj);
@@ -428,13 +428,13 @@ H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
#if defined(H5_USING_MEMCHECKER) || !defined(NDEBUG)
- HDassert(dst->full_path_r == NULL);
- HDassert(dst->user_path_r == NULL);
+ assert(dst->full_path_r == NULL);
+ assert(dst->user_path_r == NULL);
#endif /* H5_USING_MEMCHECKER */
- HDassert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
+ assert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
/* Copy the top level information */
H5MM_memcpy(dst, src, sizeof(H5G_name_t));
@@ -476,7 +476,7 @@ H5G_get_name(const H5G_loc_t *loc, char *name /*out*/, size_t size, size_t *name
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(loc);
+ assert(loc);
/* If the user path is available and it's not "hidden", use it */
if (loc->path->user_path_r != NULL && loc->path->obj_hidden == 0) {
@@ -533,10 +533,10 @@ H5G_name_reset(H5G_name_t *name)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(name);
+ assert(name);
/* Clear the group hier. name to an empty state */
- HDmemset(name, 0, sizeof(H5G_name_t));
+ memset(name, 0, sizeof(H5G_name_t));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_name_reset() */
@@ -560,7 +560,7 @@ H5G_name_free(H5G_name_t *name)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(name);
+ assert(name);
if (name->full_path_r) {
H5RS_decr(name->full_path_r);
@@ -600,14 +600,14 @@ H5G__name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(path_r_ptr && *path_r_ptr);
- HDassert(full_suffix);
- HDassert(src_path);
- HDassert(dst_path);
+ assert(path_r_ptr && *path_r_ptr);
+ assert(full_suffix);
+ assert(src_path);
+ assert(dst_path);
/* Get pointer to path to update */
path = H5RS_get_str(*path_r_ptr);
- HDassert(path);
+ assert(path);
/* Check if path needs to be updated */
full_suffix_len = HDstrlen(full_suffix);
@@ -692,7 +692,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
FUNC_ENTER_PACKAGE
- HDassert(obj_ptr);
+ assert(obj_ptr);
/* Get the symbol table entry */
switch (H5I_get_type(obj_id)) {
@@ -736,8 +736,8 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown data object")
} /* end switch */
- HDassert(oloc);
- HDassert(obj_path);
+ assert(oloc);
+ assert(obj_path);
/* Check if the object has a full path still */
if (!obj_path->full_path_r)
@@ -880,7 +880,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
H5RS_str_t *rs; /* Ref-counted string for new path */
/* Sanity check */
- HDassert(names->dst_full_path_r);
+ assert(names->dst_full_path_r);
/* Get pointers to paths of interest */
full_path = H5RS_get_str(obj_path->full_path_r);
@@ -888,8 +888,8 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
dst_path = H5RS_get_str(names->dst_full_path_r);
/* Make certain that the source and destination names are full (not relative) paths */
- HDassert(*src_path == '/');
- HDassert(*dst_path == '/');
+ assert(*src_path == '/');
+ assert(*dst_path == '/');
/* Get pointer to "full suffix" */
full_suffix = full_path + HDstrlen(src_path);
@@ -947,7 +947,7 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(src_file);
+ assert(src_file);
/* Check if the object we are manipulating has a path */
if (src_full_path_r) {
@@ -1089,10 +1089,10 @@ H5G__get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(path);
- HDassert(linfo);
- HDassert(udata->loc);
- HDassert(udata->path == NULL);
+ assert(path);
+ assert(linfo);
+ assert(udata->loc);
+ assert(udata->path == NULL);
/* Check for hard link with correct address */
if (linfo->type == H5L_TYPE_HARD) {
@@ -1165,7 +1165,7 @@ H5G_get_name_by_addr(H5F_t *f, const H5O_loc_t *loc, char *name, size_t size, si
herr_t ret_value = SUCCEED; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
FUNC_ENTER_NOAPI(FAIL)
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index cc2a793..bdd8bec 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -140,7 +140,7 @@ H5G__node_get_shared(const H5F_t *f, const void H5_ATTR_UNUSED *_udata)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
+ assert(f);
/* Return the pointer to the ref-count object */
FUNC_LEAVE_NOAPI(H5F_GRP_BTREE_SHARED(f))
@@ -165,9 +165,9 @@ H5G__node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(shared);
- HDassert(raw);
- HDassert(key);
+ assert(shared);
+ assert(raw);
+ assert(key);
H5F_DECODE_LENGTH_LEN(raw, key->offset, shared->sizeof_len);
@@ -193,9 +193,9 @@ H5G__node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(shared);
- HDassert(raw);
- HDassert(key);
+ assert(shared);
+ assert(raw);
+ assert(key);
H5F_ENCODE_LENGTH_LEN(raw, key->offset, shared->sizeof_len);
@@ -222,20 +222,20 @@ H5G__node_debug_key(FILE *stream, int indent, int fwidth, const void *_key, cons
FUNC_ENTER_PACKAGE_NOERR
- HDassert(key);
+ assert(key);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Heap offset:", (unsigned)key->offset);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Heap offset:", (unsigned)key->offset);
if (udata->heap) {
const char *s;
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Name:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Name:");
if ((s = (const char *)H5HL_offset_into(udata->heap, key->offset)) != NULL)
- HDfprintf(stream, "%s\n", s);
+ fprintf(stream, "%s\n", s);
} /* end if */
else
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cannot get name; heap address not specified\n");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cannot get name; heap address not specified\n");
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G__node_debug_key() */
@@ -260,10 +260,10 @@ H5G__node_free(H5G_node_t *sym)
/*
* Check arguments.
*/
- HDassert(sym);
+ assert(sym);
/* Verify that node is clean */
- HDassert(sym->cache_info.is_dirty == FALSE);
+ assert(sym->cache_info.is_dirty == FALSE);
if (sym->entry)
sym->entry = H5FL_SEQ_FREE(H5G_entry_t, sym->entry);
@@ -304,8 +304,8 @@ H5G__node_create(H5F_t *f, H5B_ins_t H5_ATTR_UNUSED op, void *_lt_key, void H5_A
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5B_INS_FIRST == op);
+ assert(f);
+ assert(H5B_INS_FIRST == op);
if (NULL == (sym = H5FL_CALLOC(H5G_node_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
@@ -372,9 +372,9 @@ H5G__node_cmp2(void *_lt_key, void *_udata, void *_rt_key)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(udata && udata->heap);
- HDassert(lt_key);
- HDassert(rt_key);
+ assert(udata && udata->heap);
+ assert(lt_key);
+ assert(rt_key);
/* Get pointers to string names */
if ((s1 = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL)
@@ -425,9 +425,9 @@ H5G__node_cmp3(void *_lt_key, void *_udata, void *_rt_key)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(udata && udata->heap);
- HDassert(lt_key);
- HDassert(rt_key);
+ assert(udata && udata->heap);
+ assert(lt_key);
+ assert(rt_key);
/* left side */
if ((s = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL)
@@ -485,10 +485,10 @@ H5G__node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, hboo
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(found);
- HDassert(udata && udata->common.heap);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(found);
+ assert(udata && udata->common.heap);
/*
* Load the symbol table node for exclusive access.
@@ -583,12 +583,12 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(md_key);
- HDassert(rt_key);
- HDassert(udata && udata->common.heap);
- HDassert(new_node_p);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(md_key);
+ assert(rt_key);
+ assert(udata && udata->common.heap);
+ assert(new_node_p);
/*
* Load the symbol node.
@@ -642,7 +642,7 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
snrt_flags |= H5AC__DIRTIED_FLAG;
/* The left node */
- HDmemset(sn->entry + H5F_SYM_LEAF_K(f), 0, H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
+ memset(sn->entry + H5F_SYM_LEAF_K(f), 0, H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
sn->nsyms = H5F_SYM_LEAF_K(f);
sn_flags |= H5AC__DIRTIED_FLAG;
@@ -676,7 +676,7 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H
} /* end else */
/* Move entries down to make room for new entry */
- HDassert(idx >= 0);
+ assert(idx >= 0);
HDmemmove(insert_into->entry + idx + 1, insert_into->entry + idx,
(insert_into->nsyms - (unsigned)idx) * sizeof(H5G_entry_t));
@@ -739,11 +739,11 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert((H5G_node_key_t *)_lt_key);
- HDassert(rt_key);
- HDassert(udata && udata->common.heap);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert((H5G_node_key_t *)_lt_key);
+ assert(rt_key);
+ assert(udata && udata->common.heap);
/* Load the symbol table */
if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__NO_FLAGS_SET)))
@@ -789,7 +789,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
} /* end if */
else {
lnk.type = H5L_TYPE_HARD;
- HDassert(H5F_addr_defined(sn->entry[idx].header));
+ assert(H5F_addr_defined(sn->entry[idx].header));
lnk.u.hard.addr = sn->entry[idx].header;
} /* end else */
@@ -832,7 +832,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
* node and indicate that the pointer to this node in the B-tree
* should be removed also.
*/
- HDassert(0 == idx);
+ assert(0 == idx);
sn->nsyms = 0;
sn_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
ret_value = H5B_INS_REMOVE;
@@ -882,7 +882,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i
for (idx = 0; idx < sn->nsyms; idx++) {
if (!(H5G_CACHED_SLINK == sn->entry[idx].type)) {
/* Decrement the reference count */
- HDassert(H5F_addr_defined(sn->entry[idx].header));
+ assert(H5F_addr_defined(sn->entry[idx].header));
tmp_oloc.addr = sn->entry[idx].header;
if (H5O_link(&tmp_oloc, -1) < 0)
@@ -935,9 +935,9 @@ H5G__node_iterate(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(udata && udata->heap);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(udata && udata->heap);
/* Protect the symbol table node & local heap while we iterate over entries */
if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG)))
@@ -1012,9 +1012,9 @@ H5G__node_sumup(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(num_objs);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(num_objs);
/* Find the object node and add the number of symbol entries. */
if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG)))
@@ -1056,9 +1056,9 @@ H5G__node_by_idx(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(udata);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(udata);
/* Get a pointer to the symbol table node */
if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG)))
@@ -1072,7 +1072,7 @@ H5G__node_by_idx(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
ent_idx = udata->idx - udata->num_objs;
/* Call 'by index' callback */
- HDassert(udata->op);
+ assert(udata->op);
if ((udata->op)(&sn->entry[ent_idx], udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "'by index' callback failed")
@@ -1113,7 +1113,7 @@ H5G__node_init(H5F_t *f)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(f);
+ assert(f);
/* Set the raw key size */
sizeof_rkey = H5F_SIZEOF_SIZE(f); /*name offset */
@@ -1154,7 +1154,7 @@ H5G_node_close(const H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(f);
+ assert(f);
/* Free the raw B-tree node buffer */
if (H5F_GRP_BTREE_SHARED(f))
@@ -1191,9 +1191,9 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(udata);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(udata);
/* load the symbol table into memory from the source file */
if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG)))
@@ -1287,7 +1287,7 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get link name")
} /* else if */
else
- HDassert(0 && "Unknown entry type");
+ assert(0 && "Unknown entry type");
/* Set up common link data */
lnk.cset = H5F_DEFAULT_CSET; /* XXX: Allow user to set this */
@@ -1349,9 +1349,9 @@ H5G__node_build_table(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(udata && udata->heap);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(udata && udata->heap);
/*
* Save information about the symbol table node since we can't lock it
@@ -1420,8 +1420,8 @@ H5G__node_iterate_size(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t H5_
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(stab_size);
+ assert(f);
+ assert(stab_size);
*stab_size += H5G_NODE_SIZE(f);
@@ -1454,11 +1454,11 @@ H5G_node_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, had
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Pin the heap down in memory */
if (heap_addr > 0 && H5F_addr_defined(heap_addr))
@@ -1478,28 +1478,27 @@ H5G_node_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, had
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to debug B-tree node");
} /* end if */
else {
- HDfprintf(stream, "%*sSymbol Table Node...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty:", sn->cache_info.is_dirty ? "Yes" : "No");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Size of Node (in bytes):", (unsigned)sn->node_size);
- HDfprintf(stream, "%*s%-*s %u of %u\n", indent, "", fwidth, "Number of Symbols:", sn->nsyms,
- (unsigned)(2 * H5F_SYM_LEAF_K(f)));
+ fprintf(stream, "%*sSymbol Table Node...\n", indent, "");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Dirty:", sn->cache_info.is_dirty ? "Yes" : "No");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Size of Node (in bytes):", (unsigned)sn->node_size);
+ fprintf(stream, "%*s%-*s %u of %u\n", indent, "", fwidth, "Number of Symbols:", sn->nsyms,
+ (unsigned)(2 * H5F_SYM_LEAF_K(f)));
indent += 3;
fwidth = MAX(0, fwidth - 3);
for (u = 0; u < sn->nsyms; u++) {
- HDfprintf(stream, "%*sSymbol %u:\n", indent - 3, "", u);
+ fprintf(stream, "%*sSymbol %u:\n", indent - 3, "", u);
if (heap) {
const char *s = (const char *)H5HL_offset_into(heap, sn->entry[u].name_off);
if (s)
- HDfprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", s);
+ fprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", s);
} /* end if */
else
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth,
- "Warning: Invalid heap address given, name not displayed!");
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth,
+ "Warning: Invalid heap address given, name not displayed!");
H5G__ent_debug(sn->entry + u, stream, indent, fwidth, heap);
} /* end for */
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index e01354f..0fa1f32 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -120,8 +120,8 @@ H5G__obj_create(H5F_t *f, H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc /*out*/)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(oloc);
+ assert(f);
+ assert(oloc);
/* Get the property list */
if (NULL == (gc_plist = (H5P_genplist_t *)H5I_object(gcrt_info->gcpl_id)))
@@ -173,11 +173,11 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(ginfo);
- HDassert(linfo);
- HDassert(pline);
- HDassert(oloc);
+ assert(f);
+ assert(ginfo);
+ assert(linfo);
+ assert(pline);
+ assert(oloc);
/* Check for invalid access request */
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
@@ -207,14 +207,14 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf
/* Calculate message size information, for creating group's object header */
linfo_size = H5O_msg_size_f(f, gcpl_id, H5O_LINFO_ID, linfo, (size_t)0);
- HDassert(linfo_size);
+ assert(linfo_size);
ginfo_size = H5O_msg_size_f(f, gcpl_id, H5O_GINFO_ID, ginfo, (size_t)0);
- HDassert(ginfo_size);
+ assert(ginfo_size);
if (pline && pline->nused) {
pline_size = H5O_msg_size_f(f, gcpl_id, H5O_PLINE_ID, pline, (size_t)0);
- HDassert(pline_size);
+ assert(pline_size);
} /* end if */
lnk.type = H5L_TYPE_HARD;
@@ -223,7 +223,7 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf
lnk.cset = H5T_CSET_ASCII;
lnk.name = &null_char;
link_size = H5O_msg_size_f(f, gcpl_id, H5O_LINK_ID, &lnk, (size_t)ginfo->est_name_len);
- HDassert(link_size);
+ assert(link_size);
/* Compute size of header to use for creation */
hdr_size = linfo_size + ginfo_size + pline_size + (ginfo->est_num_entries * link_size);
@@ -296,8 +296,8 @@ H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo)
FUNC_ENTER_PACKAGE_TAG(grp_oloc->addr)
/* check arguments */
- HDassert(grp_oloc);
- HDassert(linfo);
+ assert(grp_oloc);
+ assert(linfo);
/* Check for the group having a link info message */
if ((ret_value = H5O_msg_exists(grp_oloc, H5O_LINFO_ID)) < 0)
@@ -359,8 +359,8 @@ H5G__obj_compact_to_dense_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, voi
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(udata);
+ assert(lnk);
+ assert(udata);
/* Insert link into dense link storage */
if (H5G__dense_insert(udata->f, udata->linfo, lnk) < 0)
@@ -392,8 +392,8 @@ H5G__obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(lnk);
- HDassert(udata);
+ assert(lnk);
+ assert(udata);
/* Insert link into group */
H5_GCC_CLANG_DIAG_OFF("cast-qual")
@@ -436,9 +436,9 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
FUNC_ENTER_NOAPI_TAG(grp_oloc->addr, FAIL)
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
- HDassert(name && *name);
- HDassert(obj_lnk);
+ assert(grp_oloc && grp_oloc->file);
+ assert(name && *name);
+ assert(obj_lnk);
/* Check if we have information about the number of objects in this group */
/* (by attempting to get the link info message for this group) */
@@ -631,8 +631,8 @@ H5G__obj_iterate(const H5O_loc_t *grp_oloc, H5_index_t idx_type, H5_iter_order_t
FUNC_ENTER_PACKAGE_TAG(grp_oloc->addr)
/* Sanity check */
- HDassert(grp_oloc);
- HDassert(op);
+ assert(grp_oloc);
+ assert(op);
/* Attempt to get the link info for this group */
if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0)
@@ -702,8 +702,8 @@ H5G__obj_info(const H5O_loc_t *oloc, H5G_info_t *grp_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc);
- HDassert(grp_info);
+ assert(oloc);
+ assert(grp_info);
/* Set up group location to fill in */
grp_loc.oloc = &grp_oloc;
@@ -777,7 +777,7 @@ H5G_obj_get_name_by_idx(const H5O_loc_t *oloc, H5_index_t idx_type, H5_iter_orde
FUNC_ENTER_NOAPI_TAG(oloc->addr, FAIL)
/* Sanity check */
- HDassert(oloc && oloc->file);
+ assert(oloc && oloc->file);
/* Attempt to get the link info for this group */
if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo)) < 0)
@@ -837,8 +837,8 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc);
- HDassert(linfo);
+ assert(oloc);
+ assert(linfo);
/* Decrement # of links in group */
linfo->nlinks--;
@@ -951,8 +951,8 @@ H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *n
FUNC_ENTER_NOAPI_TAG(oloc->addr, FAIL)
/* Sanity check */
- HDassert(oloc);
- HDassert(name && *name);
+ assert(oloc);
+ assert(name && *name);
/* Attempt to get the link info for this group */
if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo)) < 0)
@@ -1015,7 +1015,7 @@ H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, H5
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(grp_oloc && grp_oloc->file);
+ assert(grp_oloc && grp_oloc->file);
/* Attempt to get the link info for this group */
if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0)
@@ -1087,8 +1087,8 @@ H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found, H5O
FUNC_ENTER_PACKAGE_TAG(grp_oloc->addr)
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
- HDassert(name && *name);
+ assert(grp_oloc && grp_oloc->file);
+ assert(name && *name);
/* Attempt to get the link info message for this group */
if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0)
@@ -1139,7 +1139,7 @@ H5G_obj_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_index_t idx_type, H5_iter_or
FUNC_ENTER_NOAPI_TAG(grp_oloc->addr, FAIL)
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
+ assert(grp_oloc && grp_oloc->file);
/* Attempt to get the link info message for this group */
if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0)
diff --git a/src/H5Goh.c b/src/H5Goh.c
index 94d51f0..d84ddeb 100644
--- a/src/H5Goh.c
+++ b/src/H5Goh.c
@@ -129,7 +129,7 @@ H5O__group_free_copy_file_udata(void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(udata);
+ assert(udata);
/* Free the ginfo struct (including nested data structs) */
H5O_msg_free(H5O_PLINE_ID, udata->common.src_pline);
@@ -166,7 +166,7 @@ H5O__group_isa(const H5O_t *oh)
FUNC_ENTER_PACKAGE
- HDassert(oh);
+ assert(oh);
/* Check for any of the messages that indicate a group */
if ((stab_exists = H5O_msg_exists_oh(oh, H5O_STAB_ID)) < 0)
@@ -201,7 +201,7 @@ H5O__group_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type)
FUNC_ENTER_PACKAGE
- HDassert(obj_loc);
+ assert(obj_loc);
*opened_type = H5I_GROUP;
@@ -242,9 +242,9 @@ H5O__group_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(crt_info);
- HDassert(obj_loc);
+ assert(f);
+ assert(crt_info);
+ assert(obj_loc);
/* Create the group */
if (NULL == (grp = H5G__create(f, crt_info)))
@@ -325,11 +325,11 @@ H5O__group_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(oh);
- HDassert(bh_info);
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(oh);
+ assert(bh_info);
/* Check for "new style" group info */
if ((exists = H5O_msg_exists_oh(oh, H5O_LINFO_ID)) < 0)
diff --git a/src/H5Groot.c b/src/H5Groot.c
index 3629f72..b33c1e1 100644
--- a/src/H5Groot.c
+++ b/src/H5Groot.c
@@ -91,17 +91,17 @@ H5G_rootof(H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Walk to top of mounted files */
while (f->parent)
f = f->parent;
/* Sanity check */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->root_grp);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->root_grp);
/* Check to see if the root group was opened through a different
* "top" file, and switch it to point at the current "top" file.
@@ -142,9 +142,9 @@ H5G_mkroot(H5F_t *f, hbool_t create_root)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->sblock);
/* Check if the root group is already initialized */
if (f->shared->root_grp)
@@ -193,7 +193,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root)
sblock_dirty = TRUE;
/* Create the root group symbol table entry */
- HDassert(!f->shared->sblock->root_ent);
+ assert(!f->shared->sblock->root_ent);
if (f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) {
/* Allocate space for the root group symbol table entry */
if (NULL == (f->shared->sblock->root_ent = (H5G_entry_t *)H5MM_calloc(sizeof(H5G_entry_t))))
@@ -287,7 +287,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root)
* exists. Don't count either the superblock extension or the root group
* in the number of open objects in the file.
*/
- HDassert((1 == f->nopen_objs) || (2 == f->nopen_objs && HADDR_UNDEF != f->shared->sblock->ext_addr));
+ assert((1 == f->nopen_objs) || (2 == f->nopen_objs && HADDR_UNDEF != f->shared->sblock->ext_addr));
f->nopen_objs--;
done:
@@ -334,8 +334,8 @@ H5G_root_free(H5G_t *grp)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(grp && grp->shared);
- HDassert(grp->shared->fo_count > 0);
+ assert(grp && grp->shared);
+ assert(grp->shared->fo_count > 0);
/* Free the path */
H5G_name_free(&(grp->path));
@@ -367,12 +367,12 @@ H5G_root_loc(H5F_t *f, H5G_loc_t *loc)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(loc);
+ assert(f);
+ assert(loc);
/* Retrieve the root group for the file */
root_grp = H5G_rootof(f);
- HDassert(root_grp);
+ assert(root_grp);
/* Build the group location for the root group */
if (NULL == (loc->oloc = H5G_oloc(root_grp)))
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 1fb24a4..f31bc39 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -132,9 +132,9 @@ H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(stab);
- HDassert(size_hint > 0);
+ assert(f);
+ assert(stab);
+ assert(size_hint > 0);
/* Create the B-tree */
if (H5B_create(f, H5B_SNODE, NULL, &(stab->btree_addr) /*out*/) < 0)
@@ -155,7 +155,7 @@ H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint)
/* B-trees won't work if the first name isn't at the beginning
* of the heap.
*/
- HDassert(0 == name_offset);
+ assert(0 == name_offset);
done:
/* Release resources */
@@ -196,8 +196,8 @@ H5G__stab_create(H5O_loc_t *grp_oloc, const H5O_ginfo_t *ginfo, H5O_stab_t *stab
/*
* Check arguments.
*/
- HDassert(grp_oloc);
- HDassert(stab);
+ assert(grp_oloc);
+ assert(stab);
/* Adjust the size hint, if necessary */
if (ginfo->lheap_size_hint == 0)
@@ -251,10 +251,10 @@ H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab, const char *name, H5O_li
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(stab);
- HDassert(name && *name);
- HDassert(obj_lnk);
+ assert(f);
+ assert(stab);
+ assert(name && *name);
+ assert(obj_lnk);
/* Pin the heap down in memory */
if (NULL == (heap = H5HL_protect(f, stab->heap_addr, H5AC__NO_FLAGS_SET)))
@@ -303,9 +303,9 @@ H5G__stab_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_ln
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
- HDassert(name && *name);
- HDassert(obj_lnk);
+ assert(grp_oloc && grp_oloc->file);
+ assert(name && *name);
+ assert(obj_lnk);
/* Retrieve symbol table message */
if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab))
@@ -340,8 +340,8 @@ H5G__stab_remove(const H5O_loc_t *loc, H5RS_str_t *grp_full_path_r, const char *
FUNC_ENTER_PACKAGE
- HDassert(loc && loc->file);
- HDassert(name && *name);
+ assert(loc && loc->file);
+ assert(name && *name);
/* Read in symbol table message */
if (NULL == H5O_msg_read(loc, H5O_STAB_ID, &stab))
@@ -393,7 +393,7 @@ H5G__stab_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
FUNC_ENTER_PACKAGE
- HDassert(grp_oloc && grp_oloc->file);
+ assert(grp_oloc && grp_oloc->file);
/* Look up name of link to remove, by index */
if (H5G__stab_lookup_by_idx(grp_oloc, order, n, &obj_lnk) < 0)
@@ -450,10 +450,10 @@ H5G__stab_delete(H5F_t *f, const H5O_stab_t *stab)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(stab);
- HDassert(H5F_addr_defined(stab->btree_addr));
- HDassert(H5F_addr_defined(stab->heap_addr));
+ assert(f);
+ assert(stab);
+ assert(H5F_addr_defined(stab->btree_addr));
+ assert(H5F_addr_defined(stab->heap_addr));
/* Pin the heap down in memory */
if (NULL == (heap = H5HL_protect(f, stab->heap_addr, H5AC__NO_FLAGS_SET)))
@@ -508,8 +508,8 @@ H5G__stab_iterate(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t skip, hs
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc);
- HDassert(op);
+ assert(oloc);
+ assert(op);
/* Get the B-tree info */
if (NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab))
@@ -596,8 +596,8 @@ H5G__stab_count(const H5O_loc_t *oloc, hsize_t *num_objs)
FUNC_ENTER_PACKAGE_TAG(oloc->addr)
/* Sanity check */
- HDassert(oloc);
- HDassert(num_objs);
+ assert(oloc);
+ assert(num_objs);
/* Reset the number of objects in the group */
*num_objs = 0;
@@ -636,9 +636,9 @@ H5G__stab_bh_size(H5F_t *f, const H5O_stab_t *stab, H5_ih_info_t *bh_info)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(stab);
- HDassert(bh_info);
+ assert(f);
+ assert(stab);
+ assert(bh_info);
/* Set up user data for B-tree iteration */
snode_size = 0;
@@ -683,8 +683,8 @@ H5G__stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ent);
- HDassert(udata && udata->heap);
+ assert(ent);
+ assert(udata && udata->heap);
/* Get name offset in heap */
name_off = ent->name_off;
@@ -722,12 +722,12 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t
herr_t ret_value = SUCCEED; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(oloc);
+ assert(oloc);
/* Get the B-tree & local heap info */
if (NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab))
@@ -843,10 +843,10 @@ H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found, H5
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
- HDassert(name && *name);
- HDassert(found);
- HDassert(lnk);
+ assert(grp_oloc && grp_oloc->file);
+ assert(name && *name);
+ assert(found);
+ assert(lnk);
/* Retrieve the symbol table message for the group */
if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab))
@@ -903,8 +903,8 @@ H5G__stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ent);
- HDassert(udata && udata->heap);
+ assert(ent);
+ assert(udata && udata->heap);
/* Get a pointer to the link name */
if ((name = (const char *)H5HL_offset_into(udata->heap, ent->name_off)) == NULL)
@@ -942,8 +942,8 @@ H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(grp_oloc && grp_oloc->file);
- HDassert(lnk);
+ assert(grp_oloc && grp_oloc->file);
+ assert(lnk);
/* Get the B-tree & local heap info */
if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab))
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index bd2697c..c30aa9d 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -560,8 +560,8 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(user_path_len);
- HDassert(obj_hidden);
+ assert(user_path_len);
+ assert(obj_hidden);
/* Get pointer to object for ID */
if (NULL == (obj_ptr = H5VL_object(obj_id)))
@@ -611,7 +611,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown data object type")
} /* end switch */
- HDassert(obj_path);
+ assert(obj_path);
/* Retrieve a copy of the user path and put it into the buffer */
if (obj_path->user_path_r) {
@@ -723,8 +723,8 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, h
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Load the node */
if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG)))
@@ -777,7 +777,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
if (targ_oh) {
- HDassert(ret_value == H5_ITER_ERROR);
+ assert(ret_value == H5_ITER_ERROR);
if (H5O_unprotect(&targ_oloc, targ_oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTUNPROTECT, H5_ITER_ERROR, "unable to release object header");
} /* end if */
@@ -815,7 +815,7 @@ H5G__verify_cached_stabs_test(hid_t gid)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(gid >= 0);
+ assert(gid >= 0);
/* Check args */
if (NULL == (grp = (H5G_t *)H5VL_object_verify(gid, H5I_GROUP)))
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index 1aa9949..d744f0b 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -165,10 +165,10 @@ H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(grp_loc);
- HDassert(lnk);
- HDassert(lnk->type >= H5L_TYPE_UD_MIN);
- HDassert(obj_loc);
+ assert(grp_loc);
+ assert(lnk);
+ assert(lnk->type >= H5L_TYPE_UD_MIN);
+ assert(obj_loc);
/* Get the link class for this type of link. */
if (NULL == (link_class = H5L_find_class(lnk->type)))
@@ -286,9 +286,9 @@ H5G__traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(grp_loc);
- HDassert(lnk);
- HDassert(lnk->type == H5L_TYPE_SOFT);
+ assert(grp_loc);
+ assert(lnk);
+ assert(lnk->type == H5L_TYPE_SOFT);
/* Set up temporary location */
tmp_grp_loc.oloc = &tmp_grp_oloc;
@@ -358,9 +358,9 @@ H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(grp_loc);
- HDassert(lnk);
- HDassert(obj_loc);
+ assert(grp_loc);
+ assert(lnk);
+ assert(obj_loc);
/* If we found a symbolic link then we should follow it. But if this
* is the last component of the name and the H5G_TARGET_SLINK bit of
@@ -477,9 +477,9 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(_loc);
- HDassert(name);
- HDassert(op);
+ assert(_loc);
+ assert(name);
+ assert(op);
/*
* Where does the searching start? For absolute names it starts at the
@@ -491,7 +491,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
/* Look up root group for starting location */
root_grp = H5G_rootof(_loc->oloc->file);
- HDassert(root_grp);
+ assert(root_grp);
/* Set the location entry to the root group's info */
loc.oloc = &(root_grp->oloc);
@@ -571,8 +571,8 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
/* If the lookup was OK, build object location and traverse special links, etc. */
if (lookup_status) {
/* Sanity check link and indicate it's valid */
- HDassert(lnk.type >= H5L_TYPE_HARD);
- HDassert(!HDstrcmp(comp, lnk.name));
+ assert(lnk.type >= H5L_TYPE_HARD);
+ assert(!HDstrcmp(comp, lnk.name));
link_valid = TRUE;
/* Build object location from the link */
@@ -603,7 +603,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
cb_loc = NULL;
} /* end if */
else {
- HDassert(!obj_loc_valid);
+ assert(!obj_loc_valid);
cb_lnk = NULL;
cb_loc = NULL;
} /* end else */
@@ -686,7 +686,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
/* XXX: Should we allow user to control the group creation params here? -QAK */
gcrt_info.gcpl_id = H5P_GROUP_CREATE_DEFAULT;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
- HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
+ memset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
if (H5G__obj_create_real(grp_oloc.file, ginfo, linfo, pline, &gcrt_info,
obj_loc.oloc /*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry")
@@ -748,14 +748,14 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G
* Since we don't have a group location or a link to the object we pass in
* NULL.
*/
- HDassert(group_copy);
+ assert(group_copy);
if ((op)(NULL, ".", NULL, &grp_loc, op_data, &own_loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "traversal operator failed")
/* If the callback took ownership of the object location, it actually has
* ownership of grp_loc. It shouldn't have tried to take ownership of
* the "group location", which was NULL. */
- HDassert(!(own_loc & H5G_OWN_GRP_LOC));
+ assert(!(own_loc & H5G_OWN_GRP_LOC));
if (own_loc & H5G_OWN_OBJ_LOC)
own_loc |= H5G_OWN_GRP_LOC;
diff --git a/src/H5HF.c b/src/H5HF.c
index 9ac51b4..8b4ea92 100644
--- a/src/H5HF.c
+++ b/src/H5HF.c
@@ -151,8 +151,8 @@ H5HF_create(H5F_t *f, const H5HF_create_t *cparam)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
/* Create shared fractal heap header */
if (HADDR_UNDEF == (fh_addr = H5HF__hdr_create(f, cparam)))
@@ -216,8 +216,8 @@ H5HF_open(H5F_t *f, haddr_t fh_addr)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(fh_addr));
+ assert(f);
+ assert(H5F_addr_defined(fh_addr));
/* Load the heap header into memory */
if (NULL == (hdr = H5HF__hdr_protect(f, fh_addr, H5AC__READ_ONLY_FLAG)))
@@ -276,8 +276,8 @@ H5HF_get_id_len(H5HF_t *fh, size_t *id_len_p)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id_len_p);
+ assert(fh);
+ assert(id_len_p);
/* Retrieve the ID length for entries in this heap */
*id_len_p = fh->hdr->id_len;
@@ -305,8 +305,8 @@ H5HF_get_heap_addr(const H5HF_t *fh, haddr_t *heap_addr_p)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(heap_addr_p);
+ assert(fh);
+ assert(heap_addr_p);
/* Retrieve the heap header address for this heap */
*heap_addr_p = fh->hdr->heap_addr;
@@ -336,9 +336,9 @@ H5HF_insert(H5HF_t *fh, size_t size, const void *obj, void *id /*out*/)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(fh);
- HDassert(obj);
- HDassert(id);
+ assert(fh);
+ assert(obj);
+ assert(id);
/* Check arguments */
if (size == 0)
@@ -408,9 +408,9 @@ H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id);
- HDassert(obj_len_p);
+ assert(fh);
+ assert(id);
+ assert(obj_len_p);
/* Get the ID flags */
id_flags = *id;
@@ -436,7 +436,7 @@ H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'tiny' object's length")
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -468,9 +468,9 @@ H5HF_get_obj_off(H5HF_t *fh, const void *_id, hsize_t *obj_off_p)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id);
- HDassert(obj_off_p);
+ assert(fh);
+ assert(id);
+ assert(obj_off_p);
/* Get the ID flags */
id_flags = *id;
@@ -496,7 +496,7 @@ H5HF_get_obj_off(H5HF_t *fh, const void *_id, hsize_t *obj_off_p)
*obj_off_p = (hsize_t)0;
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -528,9 +528,9 @@ H5HF_read(H5HF_t *fh, const void *_id, void *obj /*out*/)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id);
- HDassert(obj);
+ assert(fh);
+ assert(id);
+ assert(obj);
/* Get the ID flags */
id_flags = *id;
@@ -559,7 +559,7 @@ H5HF_read(H5HF_t *fh, const void *_id, void *obj /*out*/)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read 'tiny' object from fractal heap")
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -603,9 +603,9 @@ H5HF_write(H5HF_t *fh, void *_id, hbool_t H5_ATTR_UNUSED *id_changed, const void
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id);
- HDassert(obj);
+ assert(fh);
+ assert(id);
+ assert(obj);
/* Get the ID flags */
id_flags = *id;
@@ -635,7 +635,7 @@ H5HF_write(H5HF_t *fh, void *_id, hbool_t H5_ATTR_UNUSED *id_changed, const void
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "modifying 'tiny' object not supported yet")
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -672,9 +672,9 @@ H5HF_op(H5HF_t *fh, const void *_id, H5HF_operator_t op, void *op_data)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id);
- HDassert(op);
+ assert(fh);
+ assert(id);
+ assert(op);
/* Get the ID flags */
id_flags = *id;
@@ -703,7 +703,7 @@ H5HF_op(H5HF_t *fh, const void *_id, H5HF_operator_t op, void *op_data)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on 'tiny' object from fractal heap")
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -735,9 +735,9 @@ H5HF_remove(H5HF_t *fh, const void *_id)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(fh->hdr);
- HDassert(id);
+ assert(fh);
+ assert(fh->hdr);
+ assert(id);
/* Get the ID flags */
id_flags = *id;
@@ -766,7 +766,7 @@ H5HF_remove(H5HF_t *fh, const void *_id)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove 'tiny' object from fractal heap")
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -798,7 +798,7 @@ H5HF_close(H5HF_t *fh)
/*
* Check arguments.
*/
- HDassert(fh);
+ assert(fh);
/* Decrement file reference & check if this is the last open fractal heap using the shared heap header */
if (0 == H5HF__hdr_fuse_decr(fh->hdr)) {
@@ -892,8 +892,8 @@ H5HF_delete(H5F_t *f, haddr_t fh_addr)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(fh_addr));
+ assert(f);
+ assert(H5F_addr_defined(fh_addr));
/* Lock the heap header into memory */
if (NULL == (hdr = H5HF__hdr_protect(f, fh_addr, H5AC__NO_FLAGS_SET)))
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
index a00eb65..84542ae 100644
--- a/src/H5HFbtree2.c
+++ b/src/H5HFbtree2.c
@@ -194,7 +194,7 @@ H5HF__huge_bt2_crt_context(void *_f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Allocate callback context */
if (NULL == (ctx = H5FL_MALLOC(H5HF_huge_bt2_ctx_t)))
@@ -234,7 +234,7 @@ H5HF__huge_bt2_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Release callback context */
ctx = H5FL_FREE(H5HF_huge_bt2_ctx_t, ctx);
@@ -370,7 +370,7 @@ H5HF__huge_bt2_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, nrecord->addr);
@@ -402,7 +402,7 @@ H5HF__huge_bt2_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &nrecord->addr);
@@ -433,8 +433,8 @@ H5HF__huge_bt2_indir_debug(FILE *stream, int indent, int fwidth, const void *_nr
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent, "", fwidth,
- "Record:", nrecord->addr, nrecord->len, nrecord->id);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent, "", fwidth,
+ "Record:", nrecord->addr, nrecord->len, nrecord->id);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_indir_debug() */
@@ -568,7 +568,7 @@ H5HF__huge_bt2_filt_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, nrecord->addr);
@@ -602,7 +602,7 @@ H5HF__huge_bt2_filt_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &nrecord->addr);
@@ -635,9 +635,9 @@ H5HF__huge_bt2_filt_indir_debug(FILE *stream, int indent, int fwidth, const void
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE ", %" PRIuHSIZE "}\n",
- indent, "", fwidth, "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask,
- nrecord->obj_size, nrecord->id);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent,
+ "", fwidth, "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size,
+ nrecord->id);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_filt_indir_debug() */
@@ -757,7 +757,7 @@ H5HF__huge_bt2_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, nrecord->addr);
@@ -788,7 +788,7 @@ H5HF__huge_bt2_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &nrecord->addr);
@@ -818,8 +818,8 @@ H5HF__huge_bt2_dir_debug(FILE *stream, int indent, int fwidth, const void *_nrec
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE "}\n", indent, "", fwidth,
- "Record:", nrecord->addr, nrecord->len);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE "}\n", indent, "", fwidth,
+ "Record:", nrecord->addr, nrecord->len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_dir_debug() */
@@ -964,7 +964,7 @@ H5HF__huge_bt2_filt_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Encode the record's fields */
H5F_addr_encode_len(ctx->sizeof_addr, &raw, nrecord->addr);
@@ -997,7 +997,7 @@ H5HF__huge_bt2_filt_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Decode the record's fields */
H5F_addr_decode_len(ctx->sizeof_addr, &raw, &nrecord->addr);
@@ -1029,8 +1029,8 @@ H5HF__huge_bt2_filt_dir_debug(FILE *stream, int indent, int fwidth, const void *
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE "}\n", indent, "", fwidth,
- "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE "}\n", indent, "", fwidth,
+ "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__huge_bt2_filt_dir_debug() */
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index ab01c1e..a01bcf8 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -204,11 +204,11 @@ H5HF__hdr_prefix_decode(H5HF_hdr_t *hdr, const uint8_t **image_ref)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(hdr);
- HDassert(image);
+ assert(hdr);
+ assert(image);
/* Magic number */
- if (HDmemcmp(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "wrong fractal heap header signature")
image += H5_SIZEOF_MAGIC;
@@ -247,9 +247,9 @@ H5HF__dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(pp && *pp);
- HDassert(dtable);
+ assert(f);
+ assert(pp && *pp);
+ assert(dtable);
/* Table width */
UINT16DECODE(*pp, dtable->cparam.width);
@@ -295,9 +295,9 @@ H5HF__dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(pp && *pp);
- HDassert(dtable);
+ assert(f);
+ assert(pp && *pp);
+ assert(dtable);
/* Table width */
UINT16ENCODE(*pp, dtable->cparam.width);
@@ -351,8 +351,8 @@ H5HF__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(udata);
- HDassert(image_len);
+ assert(udata);
+ assert(image_len);
/* Set the internal parameters for the heap */
dummy_hdr.f = udata->f;
@@ -391,10 +391,10 @@ H5HF__cache_hdr_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UN
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
/* Deserialize the fractal heap header's prefix */
if (H5HF__hdr_prefix_decode(&hdr, &image) < 0)
@@ -435,7 +435,7 @@ H5HF__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -475,10 +475,10 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(dirty);
/* Allocate space for the fractal heap data structure */
if (NULL == (hdr = H5HF__hdr_alloc(udata->f)))
@@ -524,14 +524,14 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (hdr->heap_size - H5HF_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (hdr->heap_size - H5HF_SIZEOF_CHKSUM));
/* Check for I/O filter information to decode */
if (hdr->filter_len > 0) {
H5O_pline_t *pline; /* Pipeline information from the header on disk */
/* Sanity check */
- HDassert(len > hdr->heap_size); /* A header with filter info is > than a standard header */
+ assert(len > hdr->heap_size); /* A header with filter info is > than a standard header */
/* Compute the heap header's size */
hdr->heap_size += (size_t)(hdr->sizeof_size /* Size of size for filtered root direct block */
@@ -563,7 +563,7 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == hdr->heap_size);
+ assert((size_t)(image - (const uint8_t *)_image) == hdr->heap_size);
/* Finish initialization of heap header */
if (H5HF__hdr_finish_init(hdr) < 0)
@@ -605,10 +605,10 @@ H5HF__cache_hdr_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(image_len);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(image_len);
*image_len = hdr->heap_size;
@@ -646,15 +646,15 @@ H5HF__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t len,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(H5F_addr_defined(addr));
- HDassert(addr == hdr->heap_addr);
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(f);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(H5F_addr_defined(addr));
+ assert(addr == hdr->heap_addr);
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
#ifndef NDEBUG
{
@@ -690,7 +690,7 @@ H5HF__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t len,
if (H5HF__cache_verify_hdr_descendants_clean((H5F_t *)f, hdr, &fd_children_clean,
&descendants_clean) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify hdr descendants clean.")
- HDassert(fd_children_clean);
+ assert(fd_children_clean);
}
#endif /* NDEBUG */
@@ -733,12 +733,12 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(image);
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(len == hdr->heap_size);
+ assert(f);
+ assert(image);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(len == hdr->heap_size);
/* Set the shared heap header's file context for this operation */
H5_GCC_DIAG_OFF("discarded-qualifiers")
@@ -810,7 +810,7 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
UINT32ENCODE(image, metadata_chksum);
/* sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -849,10 +849,10 @@ H5HF__cache_hdr_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(hdr->rc == 0);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(hdr->rc == 0);
if (H5HF__hdr_free(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "unable to release fractal heap header")
@@ -883,10 +883,10 @@ H5HF__cache_iblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(udata);
- HDassert(udata->par_info);
- HDassert(udata->par_info->hdr);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->par_info);
+ assert(udata->par_info->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5HF_MAN_INDIRECT_SIZE(udata->par_info->hdr, *udata->nrows);
@@ -918,7 +918,7 @@ H5HF__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -965,11 +965,11 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
- HDassert(dirty);
+ assert(image);
+ assert(udata);
+ assert(dirty);
hdr = udata->par_info->hdr;
- HDassert(hdr->f);
+ assert(hdr->f);
/* Set the shared heap header's file context for this operation */
hdr->f = udata->f;
@@ -992,10 +992,10 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock->nrows);
/* sanity check */
- HDassert(iblock->size == len);
+ assert(iblock->size == len);
/* Magic number */
- if (HDmemcmp(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong fractal heap indirect block signature")
image += H5_SIZEOF_MAGIC;
@@ -1036,7 +1036,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
UINT64DECODE_VAR(image, iblock->block_off, hdr->heap_off_size);
/* Allocate & decode child block entry tables */
- HDassert(iblock->nrows > 0);
+ assert(iblock->nrows > 0);
if (NULL == (iblock->ents = H5FL_SEQ_MALLOC(H5HF_indirect_ent_t,
(size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for direct entries")
@@ -1062,7 +1062,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
/* Check for heap with I/O filters */
if (hdr->filter_len > 0) {
/* Sanity check */
- HDassert(iblock->filt_ents);
+ assert(iblock->filt_ents);
/* Decode extra information for direct blocks */
if (u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) {
@@ -1073,8 +1073,8 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
/* (either both the address & size are defined or both are
* not defined)
*/
- HDassert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
- (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
+ assert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
+ (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
/* I/O filter mask for filtered direct block */
UINT32DECODE(image, iblock->filt_ents[u].filter_mask);
@@ -1089,7 +1089,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
} /* end for */
/* Sanity check */
- HDassert(iblock->nchildren); /* indirect blocks w/no children should have been deleted */
+ assert(iblock->nchildren); /* indirect blocks w/no children should have been deleted */
/* checksum verification already done by verify_chksum cb */
@@ -1097,7 +1097,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == iblock->size);
+ assert((size_t)(image - (const uint8_t *)_image) == iblock->size);
/* Check if we have any indirect block children */
if (iblock->nrows > hdr->man_dtable.max_direct_rows) {
@@ -1146,10 +1146,10 @@ H5HF__cache_iblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(image_len);
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(image_len);
*image_len = iblock->size;
@@ -1187,20 +1187,20 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock->cache_info.size == iblock->size);
- HDassert(H5F_addr_defined(addr));
- HDassert(H5F_addr_eq(iblock->addr, addr));
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(f);
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock->cache_info.size == iblock->size);
+ assert(H5F_addr_defined(addr));
+ assert(H5F_addr_eq(iblock->addr, addr));
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
hdr = iblock->hdr;
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
#ifndef NDEBUG
{
@@ -1223,7 +1223,7 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5
if (H5HF__cache_verify_iblock_descendants_clean((H5F_t *)f, iblock->addr, iblock, &iblock_status,
&fd_children_clean, &descendants_clean) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify descendants clean.")
- HDassert(fd_children_clean);
+ assert(fd_children_clean);
}
#endif /* NDEBUG */
@@ -1239,7 +1239,7 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
/* Sanity check */
- HDassert(!H5F_addr_eq(iblock->addr, iblock_addr));
+ assert(!H5F_addr_eq(iblock->addr, iblock_addr));
/* Let the metadata cache know the block moved */
if (H5AC_move_entry((H5F_t *)f, H5AC_FHEAP_IBLOCK, iblock->addr, iblock_addr) < 0)
@@ -1315,17 +1315,17 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(image);
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock->cache_info.size == iblock->size);
- HDassert(len == iblock->size);
+ assert(f);
+ assert(image);
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock->cache_info.size == iblock->size);
+ assert(len == iblock->size);
/* Indirect block must be in 'normal' file space */
- HDassert(!H5F_IS_TMP_ADDR(f, iblock->addr));
- HDassert(H5F_addr_eq(iblock->addr, iblock->cache_info.addr));
+ assert(!H5F_IS_TMP_ADDR(f, iblock->addr));
+ assert(H5F_addr_eq(iblock->addr, iblock->cache_info.addr));
/* Get the pointer to the shared heap header */
hdr = iblock->hdr;
@@ -1358,7 +1358,7 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
/* Check for heap with I/O filters */
if (hdr->filter_len > 0) {
/* Sanity check */
- HDassert(iblock->filt_ents);
+ assert(iblock->filt_ents);
/* Encode extra information for direct blocks */
if (u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) {
@@ -1366,8 +1366,8 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
/* (either both the address & size are defined or both are
* not defined)
*/
- HDassert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
- (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
+ assert((H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
+ (!H5F_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
/* Size of filtered direct block */
H5F_ENCODE_LENGTH(f, image, iblock->filt_ents[u].size);
@@ -1394,10 +1394,10 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
UINT32ENCODE(image, metadata_chksum);
/* Sanity checks */
- HDassert((size_t)(image - (uint8_t *)_image) == iblock->size);
+ assert((size_t)(image - (uint8_t *)_image) == iblock->size);
#ifndef NDEBUG
- HDassert(nchildren == iblock->nchildren);
- HDassert(max_child == iblock->max_child);
+ assert(nchildren == iblock->nchildren);
+ assert(max_child == iblock->max_child);
#endif /* NDEBUG */
FUNC_LEAVE_NOAPI(ret_value)
@@ -1430,10 +1430,10 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock->hdr);
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock->hdr);
/* further sanity checks */
if (iblock->parent == NULL) {
@@ -1441,7 +1441,7 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
/* the fractal heap has already pinned the hdr. Do what */
/* sanity checking we can. */
if ((iblock->block_off == 0) && (iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED))
- HDassert(iblock->hdr->root_iblock == iblock);
+ assert(iblock->hdr->root_iblock == iblock);
} /* end if */
else {
/* if this is a child iblock, verify that the pointers are */
@@ -1450,9 +1450,9 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
unsigned H5_ATTR_NDEBUG_UNUSED indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
- HDassert(par_iblock->child_iblocks);
- HDassert(iblock->par_entry >=
- (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
+ assert(par_iblock->child_iblocks);
+ assert(iblock->par_entry >=
+ (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
indir_idx = iblock->par_entry -
@@ -1461,8 +1461,8 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
/* The pointer to iblock in the parent may not be set yet -- */
/* verify that it is either NULL, or that it has been set to */
/* iblock. */
- HDassert((NULL == par_iblock->child_iblocks[indir_idx]) ||
- (par_iblock->child_iblocks[indir_idx] == iblock));
+ assert((NULL == par_iblock->child_iblocks[indir_idx]) ||
+ (par_iblock->child_iblocks[indir_idx] == iblock));
} /* end else */
switch (action) {
@@ -1529,11 +1529,11 @@ H5HF__cache_iblock_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock->rc == 0);
- HDassert(iblock->hdr);
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock->rc == 0);
+ assert(iblock->hdr);
/* Destroy fractal heap indirect block */
if (H5HF__man_iblock_dest(iblock) < 0)
@@ -1567,14 +1567,14 @@ H5HF__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(udata);
- HDassert(image_len);
+ assert(udata);
+ assert(image_len);
/* Convenience variables */
par_info = (const H5HF_parent_t *)(&(udata->par_info));
- HDassert(par_info);
+ assert(par_info);
hdr = par_info->hdr;
- HDassert(hdr);
+ assert(hdr);
/* Check for I/O filters on this heap */
if (hdr->filter_len > 0) {
@@ -1622,12 +1622,12 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
par_info = (H5HF_parent_t *)(&(udata->par_info));
- HDassert(par_info);
+ assert(par_info);
hdr = par_info->hdr;
- HDassert(hdr);
+ assert(hdr);
/* Get out if data block is not checksummed */
if (!(hdr->checksum_dblocks))
@@ -1682,7 +1682,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
chk_p -= H5HF_SIZEOF_CHKSUM;
/* Reset checksum field, for computing the checksum */
- HDmemset(chk_p, 0, (size_t)H5HF_SIZEOF_CHKSUM);
+ memset(chk_p, 0, (size_t)H5HF_SIZEOF_CHKSUM);
/* Compute checksum on entire direct block */
computed_chksum = H5_checksum_metadata(read_buf, len, 0);
@@ -1697,8 +1697,8 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
/* Save the decompressed data to be used later in deserialize callback */
if (hdr->filter_len > 0) {
/* Sanity check */
- HDassert(udata->decompressed);
- HDassert(len == udata->dblock_size);
+ assert(udata->decompressed);
+ assert(len == udata->dblock_size);
/* Allocate block buffer */
if (NULL == (udata->dblk = H5FL_BLK_MALLOC(direct_block, (size_t)len)))
@@ -1751,20 +1751,20 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
par_info = (H5HF_parent_t *)(&(udata->par_info));
- HDassert(par_info);
+ assert(par_info);
hdr = par_info->hdr;
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(dirty);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(dirty);
/* Allocate space for the fractal heap direct block */
if (NULL == (dblock = H5FL_CALLOC(H5HF_direct_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- HDmemset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
/* Set the shared heap header's file context for this operation */
hdr->f = udata->f;
@@ -1782,7 +1782,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
/* Direct block is already decompressed in verify_chksum callback */
if (udata->decompressed) {
/* Sanity check */
- HDassert(udata->dblk);
+ assert(udata->dblk);
/* Take ownership of the decompressed direct block */
dblock->blk = udata->dblk;
@@ -1794,7 +1794,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
unsigned filter_mask; /* Excluded filters for direct block */
/* Sanity check */
- HDassert(udata->dblk == NULL);
+ assert(udata->dblk == NULL);
/* Initialize the filter callback struct */
filter_cb.op_data = NULL;
@@ -1818,7 +1818,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, NULL, "output pipeline failed")
/* Sanity check */
- HDassert(nbytes == dblock->size);
+ assert(nbytes == dblock->size);
/* Copy un-filtered data into block's buffer */
H5MM_memcpy(dblock->blk, read_buf, dblock->size);
@@ -1826,8 +1826,8 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
} /* end if */
else {
/* Sanity checks */
- HDassert(udata->dblk == NULL);
- HDassert(!udata->decompressed);
+ assert(udata->dblk == NULL);
+ assert(!udata->decompressed);
/* Allocate block buffer */
/* XXX: Change to using free-list factories */
@@ -1835,7 +1835,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy image to dblock->blk */
- HDassert(dblock->size == len);
+ assert(dblock->size == len);
H5MM_memcpy(dblock->blk, image, dblock->size);
} /* end else */
@@ -1843,7 +1843,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
image = dblock->blk;
/* Magic number */
- if (HDmemcmp(image, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong fractal heap direct block signature")
image += H5_SIZEOF_MAGIC;
@@ -1884,7 +1884,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
} /* end if */
/* Sanity check */
- HDassert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
+ assert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
/* Set return value */
ret_value = (void *)dblock;
@@ -1927,14 +1927,14 @@ H5HF__cache_dblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert(image_len);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(image_len);
/* Set up convenience variables */
hdr = dblock->hdr;
- HDassert(hdr);
+ assert(hdr);
/* Check for I/O filters on this heap */
if (hdr->filter_len > 0) {
@@ -1981,7 +1981,7 @@ H5HF__cache_dblock_image_len(const void *_thing, size_t *image_len)
size = dblock->size;
/* Set the image size */
- HDassert(size > 0);
+ assert(size > 0);
*image_len = size;
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -2069,17 +2069,17 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert(dblock->write_buf == NULL);
- HDassert(dblock->write_size == 0);
- HDassert(dblock->cache_info.size == len);
- HDassert(H5F_addr_defined(addr));
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(f);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(dblock->write_buf == NULL);
+ assert(dblock->write_size == 0);
+ assert(dblock->cache_info.size == len);
+ assert(H5F_addr_defined(addr));
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
/* Set up local variables */
hdr = dblock->hdr;
@@ -2088,9 +2088,9 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Set the shared heap header's file context for this operation */
hdr->f = (H5F_t *)f;
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
if (dblock->parent) {
/* this is the common case, in which the direct block is the child
@@ -2102,9 +2102,9 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
par_iblock = dblock->parent;
par_entry = dblock->par_entry;
- HDassert(par_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(par_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr));
+ assert(par_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(par_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr));
} /* end if */
else {
/* the direct block is a root direct block -- just set par_iblock
@@ -2121,7 +2121,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
* and the checksum at the beginning of the block.
*/
- HDassert(dblock->blk);
+ assert(dblock->blk);
image = dblock->blk;
/* Magic number */
@@ -2142,7 +2142,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
uint32_t metadata_chksum; /* Computed metadata checksum value */
/* Clear the checksum field, to compute the checksum */
- HDmemset(image, 0, (size_t)H5HF_SIZEOF_CHKSUM);
+ memset(image, 0, (size_t)H5HF_SIZEOF_CHKSUM);
/* Compute checksum on entire direct block */
metadata_chksum = H5_checksum_metadata(dblock->blk, dblock->size, 0);
@@ -2157,7 +2157,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
*/
/* Sanity check */
- HDassert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
+ assert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
/* If I/O filters are enabled on this heap, we must run the direct block
* image through the filters to obtain the image that we will hand off
@@ -2204,8 +2204,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
hbool_t hdr_changed = FALSE; /* Whether the header info changed */
/* Sanity check */
- HDassert(H5F_addr_eq(hdr->man_dtable.table_addr, addr));
- HDassert(hdr->pline_root_direct_size > 0);
+ assert(H5F_addr_eq(hdr->man_dtable.table_addr, addr));
+ assert(hdr->pline_root_direct_size > 0);
/* Check if the filter mask changed */
if (hdr->pline_root_direct_filter_mask != filter_mask) {
@@ -2217,7 +2217,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
* size matches the heap's last record. This value will
* likely change shortly.
*/
- HDassert(len == hdr->pline_root_direct_size);
+ assert(len == hdr->pline_root_direct_size);
/* Check if we need to re-size the block on disk */
if (hdr->pline_root_direct_size != write_size || at_tmp_addr) {
@@ -2240,8 +2240,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Update information about compressed direct block's
* location & size
*/
- HDassert(hdr->man_dtable.table_addr == addr);
- HDassert(hdr->pline_root_direct_size == len);
+ assert(hdr->man_dtable.table_addr == addr);
+ assert(hdr->pline_root_direct_size == len);
hdr->man_dtable.table_addr = dblock_addr;
hdr->pline_root_direct_size = write_size;
@@ -2258,8 +2258,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
hbool_t par_changed = FALSE; /* Whether the parent's infochanged */
/* Sanity check */
- HDassert(par_iblock);
- HDassert(par_iblock->filt_ents[par_entry].size > 0);
+ assert(par_iblock);
+ assert(par_iblock->filt_ents[par_entry].size > 0);
/* Check if the filter mask changed */
if (par_iblock->filt_ents[par_entry].filter_mask != filter_mask) {
@@ -2271,7 +2271,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
* size matches the heap's last record. This value will
* likely change shortly.
*/
- HDassert(len == par_iblock->filt_ents[par_entry].size);
+ assert(len == par_iblock->filt_ents[par_entry].size);
/* Check if we need to re-size the block on disk */
if (par_iblock->filt_ents[par_entry].size != write_size || at_tmp_addr) {
@@ -2295,8 +2295,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Update information about compressed direct block's
* location & size
*/
- HDassert(par_iblock->ents[par_entry].addr == addr);
- HDassert(par_iblock->filt_ents[par_entry].size == len);
+ assert(par_iblock->ents[par_entry].addr == addr);
+ assert(par_iblock->filt_ents[par_entry].size == len);
par_iblock->ents[par_entry].addr = dblock_addr;
par_iblock->filt_ents[par_entry].size = write_size;
@@ -2337,8 +2337,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Check for root direct block */
if (NULL == dblock->parent) {
/* Sanity checks */
- HDassert(H5F_addr_eq(hdr->man_dtable.table_addr, addr));
- HDassert(!H5F_addr_eq(hdr->man_dtable.table_addr, dblock_addr));
+ assert(H5F_addr_eq(hdr->man_dtable.table_addr, addr));
+ assert(!H5F_addr_eq(hdr->man_dtable.table_addr, dblock_addr));
/* Update information about direct block's location */
hdr->man_dtable.table_addr = dblock_addr;
@@ -2349,10 +2349,10 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
} /* end if */
else { /* the direct block's parent is an indirect block */
/* Sanity checks */
- HDassert(par_iblock);
- HDassert(par_iblock->ents);
- HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr));
- HDassert(!H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr));
+ assert(par_iblock);
+ assert(par_iblock->ents);
+ assert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr));
+ assert(!H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr));
/* Update information about direct block's location */
par_iblock->ents[par_entry].addr = dblock_addr;
@@ -2391,8 +2391,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
*flags = dblock_flags;
/* final sanity check */
- HDassert(dblock->write_buf);
- HDassert(dblock->write_size > 0);
+ assert(dblock->write_buf);
+ assert(dblock->write_size > 0);
done:
/* discard the write buf if we have an error */
@@ -2433,17 +2433,17 @@ H5HF__cache_dblock_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(image);
- HDassert(len > 0);
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert((dblock->blk != dblock->write_buf) || (dblock->cache_info.size == dblock->size));
- HDassert(dblock->write_buf);
- HDassert(dblock->write_size > 0);
- HDassert((dblock->blk != dblock->write_buf) || (dblock->write_size == dblock->size));
- HDassert(dblock->write_size == len);
+ assert(f);
+ assert(image);
+ assert(len > 0);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert((dblock->blk != dblock->write_buf) || (dblock->cache_info.size == dblock->size));
+ assert(dblock->write_buf);
+ assert(dblock->write_size > 0);
+ assert((dblock->blk != dblock->write_buf) || (dblock->write_size == dblock->size));
+ assert(dblock->write_size == len);
/* Copy the image from *(dblock->write_buf) to *image */
H5MM_memcpy(image, dblock->write_buf, dblock->write_size);
@@ -2484,10 +2484,10 @@ H5HF__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert(dblock->hdr);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(dblock->hdr);
switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
@@ -2553,9 +2553,9 @@ H5HF__cache_dblock_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
/* Destroy fractal heap direct block */
if (H5HF__man_dblock_dest(dblock) < 0)
@@ -2588,11 +2588,11 @@ H5HF__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dblock);
- HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert(dblock->file_size > 0);
- HDassert(fsf_size);
+ assert(dblock);
+ assert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(dblock->file_size > 0);
+ assert(fsf_size);
/* Set free space in file size */
*fsf_size = dblock->file_size;
@@ -2675,18 +2675,18 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(hdr);
- HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(fd_clean);
- HDassert(clean);
+ assert(f);
+ assert(hdr);
+ assert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(fd_clean);
+ assert(clean);
hdr_addr = hdr->cache_info.addr;
- HDassert(hdr_addr == hdr->heap_addr);
+ assert(hdr_addr == hdr->heap_addr);
if (H5AC_get_entry_status(f, hdr_addr, &hdr_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get hdr status")
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IN_CACHE);
/* We have three basic scenarios we have to deal with:
*
@@ -2736,12 +2736,12 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
root_iblock_addr = root_iblock->addr;
/* get the status of the root iblock */
- HDassert(root_iblock_addr != HADDR_UNDEF);
+ assert(root_iblock_addr != HADDR_UNDEF);
if (H5AC_get_entry_status(f, root_iblock_addr, &root_iblock_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get root iblock status")
root_iblock_in_cache = ((root_iblock_status & H5AC_ES__IN_CACHE) != 0);
- HDassert(root_iblock_in_cache || (root_iblock == NULL));
+ assert(root_iblock_in_cache || (root_iblock == NULL));
if (!root_iblock_in_cache) { /* we are done */
*clean = TRUE;
@@ -2757,7 +2757,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
*/
if (H5AC_flush_dependency_exists(f, hdr->heap_addr, root_iblock_addr, &fd_exists) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency")
- HDassert(fd_exists);
+ assert(fd_exists);
*fd_clean = FALSE;
} /* end else-if */
@@ -2840,7 +2840,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
*/
if (H5AC_get_entry_ptr_from_addr(f, root_iblock_addr, (void **)(&root_iblock)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "H5AC_get_entry_ptr_from_addr() failed.")
- HDassert(root_iblock);
+ assert(root_iblock);
} /* end else */
} /* end if */
else { /* root_iblock != NULL */
@@ -2876,7 +2876,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
H5_END_TAG
unprotect_root_iblock = TRUE;
- HDassert(iblock == root_iblock);
+ assert(iblock == root_iblock);
} /* end if */
} /* end else */
@@ -2884,8 +2884,8 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
* in memory for the duration of the call. Do some sanity checks,
* and then call H5HF__cache_verify_iblock_descendants_clean().
*/
- HDassert(root_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(root_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(root_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(root_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
if (H5HF__cache_verify_iblock_descendants_clean(f, hdr->heap_addr, root_iblock,
&root_iblock_status, fd_clean, clean) < 0)
@@ -2893,7 +2893,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
/* Unprotect the root indirect block if required */
if (unprotect_root_iblock) {
- HDassert(root_iblock);
+ assert(root_iblock);
if (H5AC_unprotect(f, H5AC_FHEAP_IBLOCK, root_iblock_addr, root_iblock, H5AC__NO_FLAGS_SET) <
0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "H5AC_unprotect() failed.")
@@ -2914,7 +2914,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
if (root_dblock_status & H5AC_ES__IN_CACHE) {
if (H5AC_verify_entry_type(f, root_dblock_addr, &H5AC_FHEAP_DBLOCK[0], &in_cache, &type_ok) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check dblock type")
- HDassert(in_cache);
+ assert(in_cache);
if (!type_ok)
HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "root dblock addr doesn't refer to a dblock?!?")
@@ -3039,15 +3039,15 @@ H5HF__cache_verify_iblock_descendants_clean(H5F_t *f, haddr_t fd_parent_addr, H5
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5F_addr_defined(fd_parent_addr));
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock_status);
- HDassert(fd_clean);
- HDassert(*fd_clean);
- HDassert(clean); /* note that *clean need not be TRUE */
+ assert(f);
+ assert(H5F_addr_defined(fd_parent_addr));
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock_status);
+ assert(fd_clean);
+ assert(*fd_clean);
+ assert(clean); /* note that *clean need not be TRUE */
if ((*fd_clean) && H5HF__cache_verify_iblocks_dblocks_clean(f, fd_parent_addr, iblock, fd_clean, clean,
&has_dblocks) < 0)
@@ -3158,22 +3158,22 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5F_addr_defined(fd_parent_addr));
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(fd_clean);
- HDassert(*fd_clean);
- HDassert(clean); /* note that *clean need not be true */
- HDassert(has_dblocks);
+ assert(f);
+ assert(H5F_addr_defined(fd_parent_addr));
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(fd_clean);
+ assert(*fd_clean);
+ assert(clean); /* note that *clean need not be true */
+ assert(has_dblocks);
i = 0;
num_direct_rows = MIN(iblock->nrows, iblock->hdr->man_dtable.max_direct_rows);
- HDassert(num_direct_rows <= iblock->nrows);
+ assert(num_direct_rows <= iblock->nrows);
max_dblock_index = (num_direct_rows * iblock->hdr->man_dtable.cparam.width) - 1;
iblock_addr = iblock->addr;
- HDassert(H5F_addr_defined(iblock_addr));
+ assert(H5F_addr_defined(iblock_addr));
while ((*fd_clean) && (i <= max_dblock_index)) {
haddr_t dblock_addr;
@@ -3196,7 +3196,7 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_
if (H5AC_get_entry_status(f, dblock_addr, &dblock_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get dblock status")
- HDassert(dblock_status & H5AC_ES__IN_CACHE);
+ assert(dblock_status & H5AC_ES__IN_CACHE);
*has_dblocks = TRUE;
@@ -3323,17 +3323,17 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5F_addr_defined(fd_parent_addr));
- HDassert(iblock);
- HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(fd_clean);
- HDassert(*fd_clean);
- HDassert(clean); /* note that *clean need not be true */
- HDassert(has_iblocks);
+ assert(f);
+ assert(H5F_addr_defined(fd_parent_addr));
+ assert(iblock);
+ assert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(fd_clean);
+ assert(*fd_clean);
+ assert(clean); /* note that *clean need not be true */
+ assert(has_iblocks);
num_direct_rows = MIN(iblock->nrows, iblock->hdr->man_dtable.max_direct_rows);
- HDassert(num_direct_rows <= iblock->nrows);
+ assert(num_direct_rows <= iblock->nrows);
iblock_addr = iblock->addr;
first_iblock_index = num_direct_rows * iblock->hdr->man_dtable.cparam.width;
@@ -3464,13 +3464,13 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
"H5AC_get_entry_ptr_from_addr() failed.")
- HDassert(child_iblock);
+ assert(child_iblock);
} /* end else */
} /* end if */
else {
/* child iblock is pinned -- look it up in the */
/* parent iblocks child_iblocks array. */
- HDassert(iblock->child_iblocks);
+ assert(iblock->child_iblocks);
child_iblock = iblock->child_iblocks[i - first_iblock_index];
} /* end else */
@@ -3478,10 +3478,10 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
* a pointer to the child iblock. Verify that we
* that we have the correct one.
*/
- HDassert(child_iblock);
- HDassert(child_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(child_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(child_iblock->addr == child_iblock_addr);
+ assert(child_iblock);
+ assert(child_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(child_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(child_iblock->addr == child_iblock_addr);
/* now make the recursive call */
if (H5HF__cache_verify_iblock_descendants_clean(
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index 1e14284..d16e7e7 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -115,11 +115,11 @@ H5HF_id_print(H5HF_t *fh, const void *_id, FILE *stream, int indent, int fwidth)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(id);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(fh);
+ assert(id);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Get the ID flags */
id_flags = *id;
@@ -139,7 +139,7 @@ H5HF_id_print(H5HF_t *fh, const void *_id, FILE *stream, int indent, int fwidth)
id_type = 'T';
} /* end if */
else {
- HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
+ fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
} /* end else */
@@ -152,8 +152,8 @@ H5HF_id_print(H5HF_t *fh, const void *_id, FILE *stream, int indent, int fwidth)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve heap ID length")
/* Display the heap ID */
- HDfprintf(stream, "%*s%-*s (%c, %" PRIuHSIZE " , %zu)\n", indent, "", fwidth,
- "Heap ID info: (type, offset, length)", id_type, obj_off, obj_len);
+ fprintf(stream, "%*s%-*s (%c, %" PRIuHSIZE " , %zu)\n", indent, "", fwidth,
+ "Heap ID info: (type, offset, length)", id_type, obj_off, obj_len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -179,40 +179,39 @@ H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fw
/*
* Check arguments.
*/
- HDassert(dtable);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(dtable);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/*
* Print the values.
*/
/* Creation parameter values */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Doubling table width:", dtable->cparam.width);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Starting block size:", dtable->cparam.start_block_size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Max. direct block size:", dtable->cparam.max_direct_size);
- HDfprintf(stream, "%*s%-*s %u (bits)\n", indent, "", fwidth,
- "Max. index size:", dtable->cparam.max_index);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Starting # of rows in root indirect block:", dtable->cparam.start_root_rows);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Doubling table width:", dtable->cparam.width);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Starting block size:", dtable->cparam.start_block_size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Max. direct block size:", dtable->cparam.max_direct_size);
+ fprintf(stream, "%*s%-*s %u (bits)\n", indent, "", fwidth, "Max. index size:", dtable->cparam.max_index);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Starting # of rows in root indirect block:", dtable->cparam.start_root_rows);
/* Run-time varying parameter values */
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Table's root address:", dtable->table_addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Current # of rows in root indirect block:", dtable->curr_root_rows);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Table's root address:", dtable->table_addr);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Current # of rows in root indirect block:", dtable->curr_root_rows);
/* Computed values */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of rows in root indirect block:", dtable->max_root_rows);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of direct rows in any indirect block:", dtable->max_direct_rows);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of bits for IDs in first row:", dtable->first_row_bits);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "# of IDs in first row:", dtable->num_id_first_row);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Max. # of rows in root indirect block:", dtable->max_root_rows);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Max. # of direct rows in any indirect block:", dtable->max_direct_rows);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "# of bits for IDs in first row:", dtable->first_row_bits);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "# of IDs in first row:", dtable->num_id_first_row);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF__dtable_debug() */
@@ -237,76 +236,76 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(hdr);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Print opening message */
- HDfprintf(stream, "%*sFractal Heap Header...\n", indent, "");
+ fprintf(stream, "%*sFractal Heap Header...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Heap is:", hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Objects stored in 'debugging' format:", hdr->debug_objs ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "'Write once' flag:", hdr->write_once ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "'Huge' object IDs have wrapped:", hdr->huge_ids_wrapped ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Free space in managed blocks:", hdr->total_man_free);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Managed space data block size:", hdr->man_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Total managed space allocated:", hdr->man_alloc_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Offset of managed space iterator:", hdr->man_iter_off);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Number of managed objects in heap:", hdr->man_nobjs);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Address of free space manager for managed blocks:", hdr->fs_addr);
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Max. size of managed object:", (unsigned long)hdr->max_man_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "'Huge' object space used:", hdr->huge_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Number of 'huge' objects in heap:", hdr->huge_nobjs);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "ID of next 'huge' object:", hdr->huge_next_id);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Address of v2 B-tree for 'huge' objects:", hdr->huge_bt2_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "'Tiny' object space used:", hdr->tiny_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Number of 'tiny' objects in heap:", hdr->tiny_nobjs);
-
- HDfprintf(stream, "%*sManaged Objects Doubling-Table Info...\n", indent, "");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Heap is:", hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Objects stored in 'debugging' format:", hdr->debug_objs ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "'Write once' flag:", hdr->write_once ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "'Huge' object IDs have wrapped:", hdr->huge_ids_wrapped ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Free space in managed blocks:", hdr->total_man_free);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Managed space data block size:", hdr->man_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Total managed space allocated:", hdr->man_alloc_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Offset of managed space iterator:", hdr->man_iter_off);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Number of managed objects in heap:", hdr->man_nobjs);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Address of free space manager for managed blocks:", hdr->fs_addr);
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Max. size of managed object:", (unsigned long)hdr->max_man_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "'Huge' object space used:", hdr->huge_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Number of 'huge' objects in heap:", hdr->huge_nobjs);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "ID of next 'huge' object:", hdr->huge_next_id);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Address of v2 B-tree for 'huge' objects:", hdr->huge_bt2_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "'Tiny' object space used:", hdr->tiny_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Number of 'tiny' objects in heap:", hdr->tiny_nobjs);
+
+ fprintf(stream, "%*sManaged Objects Doubling-Table Info...\n", indent, "");
H5HF__dtable_debug(&hdr->man_dtable, stream, indent + 3, MAX(0, fwidth - 3));
/* Print information about I/O filters */
if (hdr->filter_len > 0) {
- HDfprintf(stream, "%*sI/O filter Info...\n", indent, "");
+ fprintf(stream, "%*sI/O filter Info...\n", indent, "");
if (hdr->man_dtable.curr_root_rows == 0) {
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Compressed size of root direct block:", hdr->pline_root_direct_size);
- HDfprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter mask for root direct block:", hdr->pline_root_direct_filter_mask);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Compressed size of root direct block:", hdr->pline_root_direct_size);
+ fprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Filter mask for root direct block:", hdr->pline_root_direct_filter_mask);
} /* end if */
H5O_debug_id(H5O_PLINE_ID, hdr->f, &(hdr->pline), stream, indent + 3, MAX(0, fwidth - 3));
} /* end if */
/* Print internal (runtime) information, if requested */
if (dump_internal) {
- HDfprintf(stream, "%*sFractal Heap Header Internal Information:\n", indent, "");
+ fprintf(stream, "%*sFractal Heap Header Internal Information:\n", indent, "");
/* Dump root iblock, if there is one */
- HDfprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Root indirect block flags:", hdr->root_iblock_flags);
- HDfprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
- "Root indirect block pointer:", (void *)hdr->root_iblock);
+ fprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Root indirect block flags:", hdr->root_iblock_flags);
+ fprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Root indirect block pointer:", (void *)hdr->root_iblock);
if (hdr->root_iblock)
H5HF_iblock_print(hdr->root_iblock, dump_internal, stream, indent + 3, fwidth);
} /* end if */
@@ -337,11 +336,11 @@ H5HF_hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Load the fractal heap header */
if (NULL == (hdr = H5HF__hdr_protect(f, addr, H5AC__READ_ONLY_FLAG)))
@@ -382,16 +381,16 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(udata);
+ assert(sect);
+ assert(udata);
/* Set up some local variables, for convenience */
sect_start = sect->sect_info.addr;
sect_end = (sect->sect_info.addr + sect->sect_info.size) - 1;
- HDassert(sect_end >= sect_start);
+ assert(sect_end >= sect_start);
dblock_start = udata->dblock_addr;
dblock_end = (udata->dblock_addr + udata->dblock_size) - 1;
- HDassert(dblock_end >= dblock_start);
+ assert(dblock_end >= dblock_start);
/* Check for overlap between free space section & direct block */
if ((sect_start <= dblock_end &&
@@ -417,8 +416,8 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
len = end - start;
HDsnprintf(temp_str, sizeof(temp_str), "Section #%u:", (unsigned)udata->sect_count);
- HDfprintf(udata->stream, "%*s%-*s %8zu, %8zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
- temp_str, start, len);
+ fprintf(udata->stream, "%*s%-*s %8zu, %8zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
+ temp_str, start, len);
udata->sect_count++;
/* Mark this node's free space & check for overlaps w/other sections */
@@ -431,7 +430,7 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/* Flag overlaps */
if (overlap)
- HDfprintf(udata->stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
+ fprintf(udata->stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
else
udata->amount_free += len;
} /* end if */
@@ -467,13 +466,13 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(block_size > 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(block_size > 0);
/* Load the fractal heap header */
if (NULL == (hdr = H5HF__hdr_protect(f, hdr_addr, H5AC__READ_ONLY_FLAG)))
@@ -486,17 +485,17 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap direct block")
/* Print opening message */
- HDfprintf(stream, "%*sFractal Heap Direct Block...\n", indent, "");
+ fprintf(stream, "%*sFractal Heap Direct Block...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Address of fractal heap that owns this block:", hdr->heap_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Offset of direct block in heap:", dblock->block_off);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Address of fractal heap that owns this block:", hdr->heap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Offset of direct block in heap:", dblock->block_off);
blk_prefix_size = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of block header:", blk_prefix_size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of block header:", blk_prefix_size);
/* Allocate space for the free space markers */
if (NULL == (marker = (uint8_t *)H5MM_calloc(dblock->size)))
@@ -521,7 +520,7 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
udata.amount_free = 0;
/* Print header */
- HDfprintf(stream, "%*sFree Blocks (offset, size):\n", indent, "");
+ fprintf(stream, "%*sFree Blocks (offset, size):\n", indent, "");
/* Iterate over the free space sections, to detect overlaps with this block */
if (H5FS_sect_iterate(f, hdr->fspace, H5HF_dblock_debug_cb, &udata) < 0)
@@ -536,14 +535,14 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/* Check for no free space */
if (amount_free == 0)
- HDfprintf(stream, "%*s<none>\n", indent + 3, "");
+ fprintf(stream, "%*s<none>\n", indent + 3, "");
} /* end if */
else
amount_free = 0;
- HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of available space for data used:",
- (100.0 * (double)((dblock->size - blk_prefix_size) - amount_free) /
- (double)(dblock->size - blk_prefix_size)));
+ fprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of available space for data used:",
+ (100.0 * (double)((dblock->size - blk_prefix_size) - amount_free) /
+ (double)(dblock->size - blk_prefix_size)));
/*
* Print the data in a VMS-style octal dump.
@@ -584,54 +583,54 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st
/*
* Check arguments.
*/
- HDassert(iblock);
- HDassert(iblock->hdr);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(iblock);
+ assert(iblock->hdr);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Set up convenience variables */
hdr = iblock->hdr;
/* Print opening message */
- HDfprintf(stream, "%*sFractal Heap Indirect Block...\n", indent, "");
+ fprintf(stream, "%*sFractal Heap Indirect Block...\n", indent, "");
/*
* Print the values.
*/
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Address of fractal heap that owns this block:", hdr->heap_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
- "Offset of indirect block in heap:", iblock->block_off);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of indirect block:", iblock->size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Current # of rows:", iblock->nrows);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of rows:", iblock->max_rows);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max direct block rows:", hdr->man_dtable.max_direct_rows);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Address of fractal heap that owns this block:", hdr->heap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth,
+ "Offset of indirect block in heap:", iblock->block_off);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of indirect block:", iblock->size);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Current # of rows:", iblock->nrows);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of rows:", iblock->max_rows);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Max direct block rows:", hdr->man_dtable.max_direct_rows);
/* Print the entry tables */
if (hdr->filter_len > 0)
- HDfprintf(stream, "%*sDirect Block Entries: (address/compressed size/filter mask)\n", indent, "");
+ fprintf(stream, "%*sDirect Block Entries: (address/compressed size/filter mask)\n", indent, "");
else
- HDfprintf(stream, "%*sDirect Block Entries: (address)\n", indent, "");
+ fprintf(stream, "%*sDirect Block Entries: (address)\n", indent, "");
for (u = 0; u < hdr->man_dtable.max_direct_rows && u < iblock->nrows; u++) {
HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (block size: %lu)", (unsigned)u,
(unsigned long)hdr->man_dtable.row_block_size[u]);
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
for (v = 0; v < hdr->man_dtable.cparam.width; v++) {
size_t off = (u * hdr->man_dtable.cparam.width) + v;
HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
if (hdr->filter_len > 0)
- HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "/%6zu/%x\n", indent + 6, "", MAX(0, fwidth - 6),
- temp_str, iblock->ents[off].addr, iblock->filt_ents[off].size,
- iblock->filt_ents[off].filter_mask);
+ fprintf(stream, "%*s%-*s %9" PRIuHADDR "/%6zu/%x\n", indent + 6, "", MAX(0, fwidth - 6),
+ temp_str, iblock->ents[off].addr, iblock->filt_ents[off].size,
+ iblock->filt_ents[off].filter_mask);
else
- HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str,
- iblock->ents[off].addr);
+ fprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str,
+ iblock->ents[off].addr);
} /* end for */
} /* end for */
- HDfprintf(stream, "%*sIndirect Block Entries:\n", indent, "");
+ fprintf(stream, "%*sIndirect Block Entries:\n", indent, "");
if (iblock->nrows > hdr->man_dtable.max_direct_rows) {
unsigned first_row_bits; /* Number of bits used bit addresses in first row */
unsigned num_indirect_rows; /* Number of rows of blocks in each indirect block */
@@ -642,30 +641,29 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st
num_indirect_rows = (H5VM_log2_gen(hdr->man_dtable.row_block_size[u]) - first_row_bits) + 1;
HDsnprintf(temp_str, sizeof(temp_str), "Row #%u: (# of rows: %u)", (unsigned)u,
num_indirect_rows);
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), temp_str);
for (v = 0; v < hdr->man_dtable.cparam.width; v++) {
size_t off = (u * hdr->man_dtable.cparam.width) + v;
HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v);
- HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str,
- iblock->ents[off].addr);
+ fprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str,
+ iblock->ents[off].addr);
} /* end for */
} /* end for */
} /* end if */
else
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "<none>");
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "<none>");
/* Print internal (runtime) information, if requested */
if (dump_internal) {
- HDfprintf(stream, "%*sFractal Indirect Block Internal Information:\n", indent, "");
+ fprintf(stream, "%*sFractal Indirect Block Internal Information:\n", indent, "");
/* Print general information */
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Reference count:", iblock->rc);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Reference count:", iblock->rc);
/* Print parent's information */
- HDfprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
- "Parent indirect block address:", (void *)iblock->parent);
+ fprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Parent indirect block address:", (void *)iblock->parent);
if (iblock->parent)
H5HF_iblock_print(iblock->parent, TRUE, stream, indent + 6, fwidth);
} /* end if */
@@ -699,13 +697,13 @@ H5HF_iblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
- HDassert(H5F_addr_defined(hdr_addr));
- HDassert(nrows > 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+ assert(H5F_addr_defined(hdr_addr));
+ assert(nrows > 0);
/* Load the fractal heap header */
if (NULL == (hdr = H5HF__hdr_protect(f, hdr_addr, H5AC__READ_ONLY_FLAG)))
@@ -754,21 +752,20 @@ H5HF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(udata);
+ assert(sect);
+ assert(udata);
/* Print generic section information */
- HDfprintf(
- udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:",
- (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE
- ? "single"
- : (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW
- ? "first row"
- : (sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW ? "normal row" : "unknown"))));
- HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
- "Section address:", sect->sect_info.addr);
- HDfprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth,
- "Section size:", sect->sect_info.size);
+ fprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:",
+ (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE
+ ? "single"
+ : (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW
+ ? "first row"
+ : (sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW ? "normal row" : "unknown"))));
+ fprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
+ "Section address:", sect->sect_info.addr);
+ fprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth,
+ "Section size:", sect->sect_info.size);
/* Dump section-specific debugging information */
if (H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) <
@@ -802,11 +799,11 @@ H5HF_sects_debug(H5F_t *f, haddr_t fh_addr, FILE *stream, int indent, int fwidth
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(fh_addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(fh_addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Load the fractal heap header */
if (NULL == (hdr = H5HF__hdr_protect(f, fh_addr, H5AC__READ_ONLY_FLAG)))
diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c
index cf1fcdd..4e410a4 100644
--- a/src/H5HFdblock.c
+++ b/src/H5HFdblock.c
@@ -95,7 +95,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/*
* Allocate file and memory data structures.
@@ -104,7 +104,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fractal heap direct block")
/* Reset the metadata cache info for the heap header */
- HDmemset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
/* Share common heap information */
dblock->hdr = hdr;
@@ -134,7 +134,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
/* XXX: Change to using free-list factories */
if ((dblock->blk = H5FL_BLK_MALLOC(direct_block, dblock->size)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- HDmemset(dblock->blk, 0, dblock->size);
+ memset(dblock->blk, 0, dblock->size);
dblock->write_buf = NULL;
dblock->write_size = 0;
@@ -226,8 +226,8 @@ H5HF__man_dblock_destroy(H5HF_hdr_t *hdr, H5HF_direct_t *dblock, haddr_t dblock_
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(dblock);
+ assert(hdr);
+ assert(dblock);
/* Check for I/O filters on this heap */
if (hdr->filter_len > 0) {
@@ -257,11 +257,11 @@ H5HF__man_dblock_destroy(H5HF_hdr_t *hdr, H5HF_direct_t *dblock, haddr_t dblock_
/* Check for root direct block */
if (hdr->man_dtable.curr_root_rows == 0) {
/* Sanity check */
- HDassert(hdr->man_dtable.table_addr == dblock_addr);
- HDassert(hdr->man_dtable.cparam.start_block_size == dblock->size);
+ assert(hdr->man_dtable.table_addr == dblock_addr);
+ assert(hdr->man_dtable.cparam.start_block_size == dblock->size);
/* Sanity check block iterator */
- HDassert(!H5HF__man_iter_ready(&hdr->next_block));
+ assert(!H5HF__man_iter_ready(&hdr->next_block));
/* Reset header information back to "empty heap" state */
if (H5HF__hdr_empty(hdr) < 0)
@@ -338,15 +338,15 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request, H5HF_free_section_t **ret_
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(request > 0);
+ assert(hdr);
+ assert(request > 0);
/* Compute the min. size of the direct block needed to fulfill the request */
if (request < hdr->man_dtable.cparam.start_block_size)
min_dblock_size = hdr->man_dtable.cparam.start_block_size;
else {
min_dblock_size = ((size_t)1) << (1 + H5VM_log2_gen((uint64_t)request));
- HDassert(min_dblock_size <= hdr->man_dtable.cparam.max_direct_size);
+ assert(min_dblock_size <= hdr->man_dtable.cparam.max_direct_size);
} /* end else */
/* Adjust the size of block needed to fulfill request, with overhead */
@@ -388,15 +388,14 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request, H5HF_free_section_t **ret_
/* Retrieve information about current iterator position */
if (H5HF__man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
- HDassert(next_row < iblock->nrows);
+ assert(next_row < iblock->nrows);
H5_CHECKED_ASSIGN(next_size, size_t, hdr->man_dtable.row_block_size[next_row], hsize_t);
/* Check for skipping over blocks */
if (min_dblock_size > next_size) {
- HDfprintf(
- stderr,
- "%s: Skipping direct block sizes not supported, min_dblock_size = %zu, next_size = %zu\n",
- __func__, min_dblock_size, next_size);
+ fprintf(stderr,
+ "%s: Skipping direct block sizes not supported, min_dblock_size = %zu, next_size = %zu\n",
+ __func__, min_dblock_size, next_size);
HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "skipping direct block sizes not supported yet")
} /* end if */
@@ -439,12 +438,12 @@ H5HF__man_dblock_protect(H5HF_hdr_t *hdr, haddr_t dblock_addr, size_t dblock_siz
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(dblock_addr));
- HDassert(dblock_size > 0);
+ assert(hdr);
+ assert(H5F_addr_defined(dblock_addr));
+ assert(dblock_size > 0);
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up parent info */
udata.par_info.hdr = hdr;
@@ -467,7 +466,7 @@ H5HF__man_dblock_protect(H5HF_hdr_t *hdr, haddr_t dblock_addr, size_t dblock_siz
} /* end if */
else {
/* Sanity check */
- HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr));
+ assert(H5F_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr));
/* Set up parameters to read filtered direct block */
udata.odi_size = par_iblock->filt_ents[par_entry].size;
@@ -523,13 +522,13 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(hdr->man_dtable.curr_root_rows); /* Only works for heaps with indirect root block */
- HDassert(ret_iblock);
- HDassert(ret_did_protect);
+ assert(hdr);
+ assert(hdr->man_dtable.curr_root_rows); /* Only works for heaps with indirect root block */
+ assert(ret_iblock);
+ assert(ret_did_protect);
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Look up row & column for object */
if (H5HF__dtable_lookup(&hdr->man_dtable, obj_off, &row, &col) < 0)
@@ -552,7 +551,7 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_
/* Compute # of rows in child indirect block */
nrows = (H5VM_log2_gen(hdr->man_dtable.row_block_size[row]) - hdr->man_dtable.first_row_bits) + 1;
- HDassert(nrows < iblock->nrows); /* child must be smaller than parent */
+ assert(nrows < iblock->nrows); /* child must be smaller than parent */
/* Compute indirect block's entry */
entry = (row * hdr->man_dtable.cparam.width) + col;
@@ -585,8 +584,8 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_
/* Look up row & column in new indirect block for object */
if (H5HF__dtable_lookup(&hdr->man_dtable, (obj_off - iblock->block_off), &row, &col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of object")
- HDassert(row < iblock->nrows); /* child must be smaller than parent */
- } /* end while */
+ assert(row < iblock->nrows); /* child must be smaller than parent */
+ } /* end while */
/* Set return parameters */
if (ret_entry)
@@ -626,9 +625,9 @@ H5HF__man_dblock_delete(H5F_t *f, haddr_t dblock_addr, hsize_t dblock_size)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(H5F_addr_defined(dblock_addr));
- HDassert(dblock_size > 0);
+ assert(f);
+ assert(H5F_addr_defined(dblock_addr));
+ assert(dblock_size > 0);
/* Check the direct block's status in the metadata cache */
if (H5AC_get_entry_status(f, dblock_addr, &dblock_status) < 0)
@@ -637,8 +636,8 @@ H5HF__man_dblock_delete(H5F_t *f, haddr_t dblock_addr, hsize_t dblock_size)
/* If the direct block is in the cache, expunge it now */
if (dblock_status & H5AC_ES__IN_CACHE) {
/* Sanity checks on direct block */
- HDassert(!(dblock_status & H5AC_ES__IS_PINNED));
- HDassert(!(dblock_status & H5AC_ES__IS_PROTECTED));
+ assert(!(dblock_status & H5AC_ES__IS_PINNED));
+ assert(!(dblock_status & H5AC_ES__IS_PROTECTED));
/* Evict the direct block from the metadata cache */
if (H5AC_expunge_entry(f, H5AC_FHEAP_DBLOCK, dblock_addr, H5AC__NO_FLAGS_SET) < 0)
@@ -688,10 +687,10 @@ H5HF__man_dblock_dest(H5HF_direct_t *dblock)
/*
* Check arguments.
*/
- HDassert(dblock);
+ assert(dblock);
/* Decrement reference count on shared fractal heap info */
- HDassert(dblock->hdr != NULL);
+ assert(dblock->hdr != NULL);
if (H5HF__hdr_decr(dblock->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
if (dblock->parent)
diff --git a/src/H5HFdtable.c b/src/H5HFdtable.c
index 9b971be..c71ed98 100644
--- a/src/H5HFdtable.c
+++ b/src/H5HFdtable.c
@@ -89,7 +89,7 @@ H5HF__dtable_init(H5HF_dtable_t *dtable)
/*
* Check arguments.
*/
- HDassert(dtable);
+ assert(dtable);
/* Compute/cache some values */
dtable->start_bits = H5VM_log2_of2((uint32_t)dtable->cparam.start_block_size);
@@ -147,9 +147,9 @@ H5HF__dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off, unsigned *row, uns
/*
* Check arguments.
*/
- HDassert(dtable);
- HDassert(row);
- HDassert(col);
+ assert(dtable);
+ assert(row);
+ assert(col);
/* Check for offset in first row */
if (off < dtable->num_id_first_row) {
@@ -187,7 +187,7 @@ H5HF__dtable_dest(H5HF_dtable_t *dtable)
/*
* Check arguments.
*/
- HDassert(dtable);
+ assert(dtable);
/* Free the block size lookup table for the doubling table */
H5MM_xfree(dtable->row_block_size);
@@ -226,7 +226,7 @@ H5HF__dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
/*
* Check arguments.
*/
- HDassert(dtable);
+ assert(dtable);
if (block_size == dtable->cparam.start_block_size)
row = 0;
@@ -260,7 +260,7 @@ H5HF__dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size)
/*
* Check arguments.
*/
- HDassert(dtable);
+ assert(dtable);
rows = (H5VM_log2_gen(size) - dtable->first_row_bits) + 1;
@@ -294,8 +294,8 @@ H5HF__dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row, unsigned
/*
* Check arguments.
*/
- HDassert(dtable);
- HDassert(num_entries > 0);
+ assert(dtable);
+ assert(num_entries > 0);
/* Compute starting entry */
start_entry = (start_row * dtable->cparam.width) + start_col;
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index f5a69bb..af776ed 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -106,7 +106,7 @@ H5HF__hdr_alloc(H5F_t *f)
/*
* Check arguments.
*/
- HDassert(f);
+ assert(f);
/* Allocate space for the shared information */
if (NULL == (hdr = H5FL_CALLOC(H5HF_hdr_t)))
@@ -152,8 +152,8 @@ H5HF__hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(iblock_row >= hdr->man_dtable.max_direct_rows);
+ assert(hdr);
+ assert(iblock_row >= hdr->man_dtable.max_direct_rows);
/* Set the free space in direct blocks */
acc_heap_size = 0;
@@ -198,7 +198,7 @@ H5HF__hdr_finish_init_phase1(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Compute/cache some values */
hdr->heap_off_size = (uint8_t)H5HF_SIZEOF_OFFSET_BITS(hdr->man_dtable.cparam.max_index);
@@ -236,7 +236,7 @@ H5HF__hdr_finish_init_phase2(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Set the free space in direct blocks */
for (u = 0; u < hdr->man_dtable.max_root_rows; u++) {
@@ -289,7 +289,7 @@ H5HF__hdr_finish_init(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* First phase of header final initialization */
if (H5HF__hdr_finish_init_phase1(hdr) < 0)
@@ -327,8 +327,8 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(cparam);
+ assert(f);
+ assert(cparam);
#ifndef NDEBUG
/* Check for valid parameters */
@@ -520,11 +520,11 @@ H5HF__hdr_protect(H5F_t *f, haddr_t addr, unsigned flags)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Set up userdata for protect call */
cache_udata.f = f;
@@ -566,7 +566,7 @@ H5HF__hdr_incr(H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Mark header as un-evictable when a block is depending on it */
if (hdr->rc == 0)
@@ -600,15 +600,15 @@ H5HF__hdr_decr(H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->rc);
+ assert(hdr);
+ assert(hdr->rc);
/* Decrement reference count on shared header */
hdr->rc--;
/* Mark header as evictable again when no child blocks depend on it */
if (hdr->rc == 0) {
- HDassert(hdr->file_rc == 0);
+ assert(hdr->file_rc == 0);
if (H5AC_unpin_entry(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap header")
} /* end if */
@@ -635,7 +635,7 @@ H5HF__hdr_fuse_incr(H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Increment file reference count on shared header */
hdr->file_rc++;
@@ -661,8 +661,8 @@ H5HF__hdr_fuse_decr(H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(hdr);
- HDassert(hdr->file_rc);
+ assert(hdr);
+ assert(hdr->file_rc);
/* Decrement file reference count on shared header */
hdr->file_rc--;
@@ -690,7 +690,7 @@ H5HF__hdr_dirty(H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Resize pinned header in cache if I/O filter is present. */
if (hdr->filter_len > 0)
@@ -727,10 +727,10 @@ H5HF__hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Update heap header */
- HDassert(amt > 0 || hdr->total_man_free >= (hsize_t)-amt);
+ assert(amt > 0 || hdr->total_man_free >= (hsize_t)-amt);
hdr->total_man_free = (hsize_t)((hssize_t)hdr->total_man_free + amt);
/* Mark heap header as modified */
@@ -763,13 +763,13 @@ H5HF__hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Set the total managed space in heap */
hdr->man_size = new_size;
/* Adjust the free space in direct blocks */
- HDassert(extra_free > 0 || hdr->total_man_free >= (hsize_t)-extra_free);
+ assert(extra_free > 0 || hdr->total_man_free >= (hsize_t)-extra_free);
hdr->total_man_free = (hsize_t)((hssize_t)hdr->total_man_free + extra_free);
/* Mark heap header as modified */
@@ -800,8 +800,8 @@ H5HF__hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(alloc_size);
+ assert(hdr);
+ assert(alloc_size);
/* Update the "allocated" size within the heap */
hdr->man_alloc_size += alloc_size;
@@ -831,8 +831,8 @@ H5HF__hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off,
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(iblock);
+ assert(hdr);
+ assert(iblock);
/* Set up "next block" iterator at correct location */
if (H5HF__man_iter_start_entry(hdr, &hdr->next_block, iblock, curr_entry) < 0)
@@ -867,7 +867,7 @@ H5HF__hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Reset "next block" iterator */
if (H5HF__man_iter_reset(&hdr->next_block) < 0)
@@ -904,15 +904,15 @@ H5HF__hdr_skip_blocks(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, unsigned start_e
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(iblock);
- HDassert(nentries);
+ assert(hdr);
+ assert(iblock);
+ assert(nentries);
/* Compute the span within the heap to skip */
row = start_entry / hdr->man_dtable.cparam.width;
col = start_entry % hdr->man_dtable.cparam.width;
sect_size = H5HF__dtable_span_size(&hdr->man_dtable, row, col, nentries);
- HDassert(sect_size > 0);
+ assert(sect_size > 0);
/* Advance the new block iterator */
if (H5HF__hdr_inc_iter(hdr, sect_size, nentries) < 0)
@@ -952,8 +952,8 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(min_dblock_size > 0);
+ assert(hdr);
+ assert(min_dblock_size > 0);
/* Check for creating first indirect block */
if (hdr->man_dtable.curr_root_rows == 0) {
@@ -1039,7 +1039,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
if (next_row >= hdr->man_dtable.max_direct_rows) {
unsigned child_nrows; /* Number of rows in new indirect block */
- HDassert(!H5F_addr_defined(iblock->ents[next_entry].addr));
+ assert(!H5F_addr_defined(iblock->ents[next_entry].addr));
/* Compute # of rows in next child indirect block to use */
child_nrows =
@@ -1055,7 +1055,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
child_rows_needed = (H5VM_log2_of2((uint32_t)min_dblock_size) -
H5VM_log2_of2((uint32_t)hdr->man_dtable.cparam.start_block_size)) +
2;
- HDassert(child_rows_needed > child_nrows);
+ assert(child_rows_needed > child_nrows);
child_entry =
(next_row + (child_rows_needed - child_nrows)) * hdr->man_dtable.cparam.width;
if (child_entry > (iblock->nrows * hdr->man_dtable.cparam.width))
@@ -1145,8 +1145,8 @@ H5HF__hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(nentries);
+ assert(hdr);
+ assert(nentries);
/* Advance the iterator for the current location within the indirect block */
if (hdr->next_block.curr)
@@ -1187,7 +1187,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Initialize block iterator, if necessary */
if (!H5HF__man_iter_ready(&hdr->next_block))
@@ -1333,7 +1333,7 @@ H5HF__hdr_empty(H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
+ assert(hdr);
/* Reset block iterator, if necessary */
if (H5HF__man_iter_ready(&hdr->next_block))
@@ -1384,7 +1384,7 @@ H5HF__hdr_free(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Free the block size lookup table for the doubling table */
if (H5HF__dtable_dest(&hdr->man_dtable) < 0)
@@ -1425,8 +1425,8 @@ H5HF__hdr_delete(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(!hdr->file_rc);
+ assert(hdr);
+ assert(!hdr->file_rc);
#ifndef NDEBUG
{
@@ -1437,8 +1437,8 @@ H5HF__hdr_delete(H5HF_hdr_t *hdr)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for heap header")
/* Sanity checks on heap header */
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
- HDassert(hdr_status & H5AC_ES__IS_PROTECTED);
+ assert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IS_PROTECTED);
} /* end block */
#endif /* NDEBUG */
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index e12c0c8..d1c8d47 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -100,7 +100,7 @@ H5HF__huge_bt2_create(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Compute the size of 'raw' records on disk */
/* (Note: the size for huge IDs could be set to 'huge_id_size', instead
@@ -178,7 +178,7 @@ H5HF__huge_init(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Compute information about 'huge' objects for the heap */
@@ -250,7 +250,7 @@ H5HF__huge_new_id(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Check for wrapping around 'huge' object ID space */
if (hdr->huge_ids_wrapped)
@@ -300,10 +300,10 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(obj_size > hdr->max_man_size);
- HDassert(obj);
- HDassert(id);
+ assert(hdr);
+ assert(obj_size > hdr->max_man_size);
+ assert(obj);
+ assert(id);
/* Check if the v2 B-tree for tracking 'huge' heap objects has been created yet */
if (!H5F_addr_defined(hdr->huge_bt2_addr)) {
@@ -321,7 +321,7 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id)
"unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
} /* end else */
- HDassert(hdr->huge_bt2);
+ assert(hdr->huge_bt2);
/* Check for I/O pipeline filter on heap */
if (hdr->filter_len > 0) {
@@ -362,7 +362,7 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id)
/* Release buffer for writing, if we had one */
if (write_buf != obj) {
- HDassert(hdr->filter_len > 0);
+ assert(hdr->filter_len > 0);
H5MM_xfree(write_buf);
} /* end if */
@@ -481,10 +481,10 @@ H5HF__huge_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
- HDassert(id);
- HDassert(obj_len_p);
+ assert(hdr);
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(id);
+ assert(obj_len_p);
/* Skip over the flag byte */
id++;
@@ -579,10 +579,10 @@ H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off_p)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
- HDassert(id);
- HDassert(obj_off_p);
+ assert(hdr);
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(id);
+ assert(obj_off_p);
/* Skip over the flag byte */
id++;
@@ -596,7 +596,7 @@ H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off_p)
hbool_t found = FALSE; /* Whether entry was found */
/* Sanity check */
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
/* Check if v2 B-tree is open yet */
if (NULL == hdr->huge_bt2) {
@@ -674,9 +674,9 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(is_read || op);
+ assert(hdr);
+ assert(id);
+ assert(is_read || op);
/* Skip over the flag byte */
id++;
@@ -695,7 +695,7 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope
hbool_t found = FALSE; /* Whether entry was found */
/* Sanity check */
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
/* Check if v2 B-tree is open yet */
if (NULL == hdr->huge_bt2) {
@@ -829,9 +829,9 @@ H5HF__huge_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj);
+ assert(hdr);
+ assert(id);
+ assert(obj);
/* Check for filters on the heap */
if (hdr->filter_len > 0)
@@ -852,7 +852,7 @@ H5HF__huge_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj)
hbool_t found = FALSE; /* Whether entry was found */
/* Sanity check */
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
/* Check if v2 B-tree is open yet */
if (NULL == hdr->huge_bt2) {
@@ -907,9 +907,9 @@ H5HF__huge_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj);
+ assert(hdr);
+ assert(id);
+ assert(obj);
/* Call the internal 'op' routine */
if (H5HF__huge_op_real(hdr, id, TRUE, NULL, obj) < 0)
@@ -941,9 +941,9 @@ H5HF__huge_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_d
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(op);
+ assert(hdr);
+ assert(id);
+ assert(op);
/* Call the internal 'op' routine routine */
if (H5HF__huge_op_real(hdr, id, FALSE, op, op_data) < 0)
@@ -976,9 +976,9 @@ H5HF__huge_remove(H5HF_hdr_t *hdr, const uint8_t *id)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
- HDassert(id);
+ assert(hdr);
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(id);
/* Check if v2 B-tree is open yet */
if (NULL == hdr->huge_bt2) {
@@ -1082,12 +1082,12 @@ H5HF__huge_term(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Check if v2 B-tree index is open */
if (hdr->huge_bt2) {
/* Sanity check */
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
/* Close v2 B-tree index */
if (H5B2_close(hdr->huge_bt2) < 0)
@@ -1100,7 +1100,7 @@ H5HF__huge_term(H5HF_hdr_t *hdr)
*/
if (H5F_addr_defined(hdr->huge_bt2_addr) && hdr->huge_nobjs == 0) {
/* Sanity check */
- HDassert(hdr->huge_size == 0);
+ assert(hdr->huge_size == 0);
/* Delete the v2 B-tree */
/* (any v2 B-tree class will work here) */
@@ -1146,10 +1146,10 @@ H5HF__huge_delete(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(hdr->huge_bt2_addr));
- HDassert(hdr->huge_nobjs);
- HDassert(hdr->huge_size);
+ assert(hdr);
+ assert(H5F_addr_defined(hdr->huge_bt2_addr));
+ assert(hdr->huge_nobjs);
+ assert(hdr->huge_size);
/* Set up the callback info */
udata.hdr = hdr;
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index ccc0669..b03e1f5 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -101,7 +101,7 @@ H5HF__iblock_pin(H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(iblock);
+ assert(iblock);
/* Mark block as un-evictable */
if (H5AC_pin_protected_entry(iblock) < 0)
@@ -113,27 +113,27 @@ H5HF__iblock_pin(H5HF_indirect_t *iblock)
unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
- HDassert(par_iblock->child_iblocks);
- HDassert(iblock->par_entry >=
- (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
+ assert(par_iblock->child_iblocks);
+ assert(iblock->par_entry >=
+ (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
indir_idx = iblock->par_entry -
(iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width);
/* Set pointer to pinned indirect block in parent */
- HDassert(par_iblock->child_iblocks[indir_idx] == NULL);
+ assert(par_iblock->child_iblocks[indir_idx] == NULL);
par_iblock->child_iblocks[indir_idx] = iblock;
} /* end if */
else {
/* Check for pinning the root indirect block */
if (iblock->block_off == 0) {
/* Sanity check - shouldn't be recursively pinning root indirect block */
- HDassert(0 == (iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED));
+ assert(0 == (iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED));
/* Check if we should set the root iblock pointer */
if (0 == iblock->hdr->root_iblock_flags) {
- HDassert(NULL == iblock->hdr->root_iblock);
+ assert(NULL == iblock->hdr->root_iblock);
iblock->hdr->root_iblock = iblock;
} /* end if */
@@ -166,7 +166,7 @@ H5HF__iblock_unpin(H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
+ assert(iblock);
/* Mark block as evictable again */
if (H5AC_unpin_entry(iblock) < 0)
@@ -196,8 +196,8 @@ H5HF__iblock_incr(H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(iblock);
- HDassert(iblock->block_off == 0 || iblock->parent);
+ assert(iblock);
+ assert(iblock->block_off == 0 || iblock->parent);
/* Mark block as un-evictable when a child block is depending on it */
if (iblock->rc == 0)
@@ -231,7 +231,7 @@ H5HF__iblock_decr(H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
+ assert(iblock);
/* Decrement reference count on shared indirect block */
iblock->rc--;
@@ -245,27 +245,27 @@ H5HF__iblock_decr(H5HF_indirect_t *iblock)
unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
- HDassert(par_iblock->child_iblocks);
- HDassert(iblock->par_entry >=
- (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
+ assert(par_iblock->child_iblocks);
+ assert(iblock->par_entry >=
+ (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
indir_idx = iblock->par_entry -
(iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width);
/* Reset pointer to pinned child indirect block in parent */
- HDassert(par_iblock->child_iblocks[indir_idx]);
+ assert(par_iblock->child_iblocks[indir_idx]);
par_iblock->child_iblocks[indir_idx] = NULL;
} /* end if */
else {
/* Check for root indirect block */
if (iblock->block_off == 0) {
/* Sanity check - shouldn't be recursively unpinning root indirect block */
- HDassert(iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED);
+ assert(iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED);
/* Check if we should reset the root iblock pointer */
if (H5HF_ROOT_IBLOCK_PINNED == iblock->hdr->root_iblock_flags) {
- HDassert(NULL != iblock->hdr->root_iblock);
+ assert(NULL != iblock->hdr->root_iblock);
iblock->hdr->root_iblock = NULL;
} /* end if */
@@ -311,7 +311,7 @@ H5HF__iblock_dirty(H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
+ assert(iblock);
/* Mark indirect block as dirty in cache */
if (H5AC_mark_entry_dirty(iblock) < 0)
@@ -509,8 +509,8 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size)
next_size = hdr->man_dtable.row_block_size[next_row];
/* Make certain the iterator is at the root indirect block */
- HDassert(iblock->parent == NULL);
- HDassert(iblock->block_off == 0);
+ assert(iblock->parent == NULL);
+ assert(iblock->block_off == 0);
/* Keep this for later */
old_nrows = iblock->nrows;
@@ -518,7 +518,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size)
/* Check for skipping over direct block rows */
if (iblock->nrows < hdr->man_dtable.max_direct_rows && min_dblock_size > next_size) {
/* Sanity check */
- HDassert(min_dblock_size > hdr->man_dtable.cparam.start_block_size);
+ assert(min_dblock_size > hdr->man_dtable.cparam.start_block_size);
/* Set flag */
skip_direct_rows = TRUE;
@@ -595,7 +595,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size)
/* Compute the number of direct rows for this indirect block */
dir_rows = MIN(iblock->nrows, hdr->man_dtable.max_direct_rows);
- HDassert(dir_rows > old_nrows);
+ assert(dir_rows > old_nrows);
/* Re-allocate filtered direct block entry array */
if (NULL == (iblock->filt_ents = H5FL_SEQ_REALLOC(H5HF_indirect_filt_ent_t, iblock->filt_ents,
@@ -681,9 +681,9 @@ H5HF__man_iblock_root_halve(H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(iblock);
- HDassert(iblock->parent == NULL);
- HDassert(hdr);
+ assert(iblock);
+ assert(iblock->parent == NULL);
+ assert(hdr);
/* Compute maximum row used by child of indirect block */
max_child_row = iblock->max_child / hdr->man_dtable.cparam.width;
@@ -813,7 +813,7 @@ H5HF__man_iblock_root_revert(H5HF_indirect_t *root_iblock)
/*
* Check arguments.
*/
- HDassert(root_iblock);
+ assert(root_iblock);
/* Set up local convenience variables */
hdr = root_iblock->hdr;
@@ -824,8 +824,8 @@ H5HF__man_iblock_root_revert(H5HF_indirect_t *root_iblock)
if (NULL == (dblock = H5HF__man_dblock_protect(hdr, dblock_addr, dblock_size, root_iblock, 0,
H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block")
- HDassert(dblock->parent == root_iblock);
- HDassert(dblock->par_entry == 0);
+ assert(dblock->parent == root_iblock);
+ assert(dblock->par_entry == 0);
/* Check for I/O filters on this heap */
if (hdr->filter_len > 0) {
@@ -903,9 +903,9 @@ H5HF__man_iblock_alloc_row(H5HF_hdr_t *hdr, H5HF_free_section_t **sec_node)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sec_node && old_sec_node);
- HDassert(old_sec_node->u.row.row < hdr->man_dtable.max_direct_rows);
+ assert(hdr);
+ assert(sec_node && old_sec_node);
+ assert(old_sec_node->u.row.row < hdr->man_dtable.max_direct_rows);
/* Check for serialized row section, or serialized / deleted indirect
* section under it. */
@@ -968,9 +968,9 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(nrows > 0);
- HDassert(addr_p);
+ assert(hdr);
+ assert(nrows > 0);
+ assert(addr_p);
/*
* Allocate file and memory data structures.
@@ -980,7 +980,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p
"memory allocation failed for fractal heap indirect block")
/* Reset the metadata cache info for the heap header */
- HDmemset(&iblock->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&iblock->cache_info, 0, sizeof(H5AC_info_t));
/* Share common heap information */
iblock->hdr = hdr;
@@ -1118,13 +1118,13 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(iblock_addr));
- HDassert(iblock_nrows > 0);
- HDassert(did_protect);
+ assert(hdr);
+ assert(H5F_addr_defined(iblock_addr));
+ assert(iblock_nrows > 0);
+ assert(did_protect);
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Check if we are allowed to use existing pinned iblock pointer */
if (!must_protect) {
@@ -1133,8 +1133,8 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n
unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
- HDassert(par_iblock->child_iblocks);
- HDassert(par_entry >= (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width));
+ assert(par_iblock->child_iblocks);
+ assert(par_entry >= (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
indir_idx = par_entry - (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width);
@@ -1151,14 +1151,14 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n
/* Check for valid pointer to pinned indirect block in root */
if (H5HF_ROOT_IBLOCK_PINNED == hdr->root_iblock_flags) {
/* Sanity check */
- HDassert(NULL != hdr->root_iblock);
+ assert(NULL != hdr->root_iblock);
/* Return the pointer to the pinned root indirect block */
iblock = hdr->root_iblock;
} /* end if */
else {
/* Sanity check */
- HDassert(NULL == hdr->root_iblock);
+ assert(NULL == hdr->root_iblock);
should_protect = TRUE;
} /* end else */
@@ -1193,11 +1193,11 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n
/* Check for root indirect block */
if (iblock->block_off == 0) {
/* Sanity check - shouldn't be recursively protecting root indirect block */
- HDassert(0 == (hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PROTECTED));
+ assert(0 == (hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PROTECTED));
/* Check if we should set the root iblock pointer */
if (0 == hdr->root_iblock_flags) {
- HDassert(NULL == hdr->root_iblock);
+ assert(NULL == hdr->root_iblock);
hdr->root_iblock = iblock;
} /* end if */
@@ -1241,7 +1241,7 @@ H5HF__man_iblock_unprotect(H5HF_indirect_t *iblock, unsigned cache_flags, hbool_
/*
* Check arguments.
*/
- HDassert(iblock);
+ assert(iblock);
/* Check if we previously protected this indirect block */
/* (as opposed to using an existing pointer to a pinned child indirect block) */
@@ -1249,11 +1249,11 @@ H5HF__man_iblock_unprotect(H5HF_indirect_t *iblock, unsigned cache_flags, hbool_
/* Check for root indirect block */
if (iblock->block_off == 0) {
/* Sanity check - shouldn't be recursively unprotecting root indirect block */
- HDassert(iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PROTECTED);
+ assert(iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PROTECTED);
/* Check if we should reset the root iblock pointer */
if (H5HF_ROOT_IBLOCK_PROTECTED == iblock->hdr->root_iblock_flags) {
- HDassert(NULL != iblock->hdr->root_iblock);
+ assert(NULL != iblock->hdr->root_iblock);
iblock->hdr->root_iblock = NULL;
} /* end if */
@@ -1292,9 +1292,9 @@ H5HF__man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_a
/*
* Check arguments.
*/
- HDassert(iblock);
- HDassert(H5F_addr_defined(child_addr));
- HDassert(!H5F_addr_defined(iblock->ents[entry].addr));
+ assert(iblock);
+ assert(H5F_addr_defined(child_addr));
+ assert(!H5F_addr_defined(iblock->ents[entry].addr));
/* Increment the reference count on this indirect block */
if (H5HF__iblock_incr(iblock) < 0)
@@ -1308,7 +1308,7 @@ H5HF__man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_a
unsigned row; /* Row for entry */
/* Sanity check */
- HDassert(iblock->filt_ents);
+ assert(iblock->filt_ents);
/* Compute row for entry */
row = entry / iblock->hdr->man_dtable.cparam.width;
@@ -1358,8 +1358,8 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
/*
* Check arguments.
*/
- HDassert(iblock);
- HDassert(iblock->nchildren);
+ assert(iblock);
+ assert(iblock->nchildren);
/* Set up convenience variables */
hdr = iblock->hdr;
@@ -1373,7 +1373,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
/* Check for I/O filters on this heap */
if (hdr->filter_len > 0) {
/* Sanity check */
- HDassert(iblock->filt_ents);
+ assert(iblock->filt_ents);
/* If this is a direct block, reset its initial size */
if (row < hdr->man_dtable.max_direct_rows) {
@@ -1387,13 +1387,13 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
- HDassert(iblock->child_iblocks);
+ assert(iblock->child_iblocks);
/* Compute index in child iblock pointer array */
indir_idx = entry - (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width);
/* Sanity check */
- HDassert(iblock->child_iblocks[indir_idx]);
+ assert(iblock->child_iblocks[indir_idx]);
/* Reset pointer to child indirect block in parent */
iblock->child_iblocks[indir_idx] = NULL;
@@ -1470,7 +1470,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
iblock->parent, iblock->par_entry, TRUE,
H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
- HDassert(did_protect == TRUE);
+ assert(did_protect == TRUE);
/* Check for deleting root indirect block (and no root direct block) */
if (iblock->block_off == 0 && hdr->man_dtable.curr_root_rows > 0)
@@ -1570,8 +1570,8 @@ H5HF__man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry, haddr_t *ch
/*
* Check arguments.
*/
- HDassert(iblock);
- HDassert(child_addr);
+ assert(iblock);
+ assert(child_addr);
/* Retrieve address of entry */
*child_addr = iblock->ents[entry].addr;
@@ -1611,16 +1611,16 @@ H5HF__man_iblock_delete(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_nr
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(H5F_addr_defined(iblock_addr));
- HDassert(iblock_nrows > 0);
+ assert(hdr);
+ assert(H5F_addr_defined(iblock_addr));
+ assert(iblock_nrows > 0);
/* Lock indirect block */
if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, iblock_nrows, par_iblock, par_entry,
TRUE, H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
- HDassert(iblock->nchildren > 0);
- HDassert(did_protect == TRUE);
+ assert(iblock->nchildren > 0);
+ assert(did_protect == TRUE);
/* Iterate over rows in this indirect block */
entry = 0;
@@ -1674,7 +1674,7 @@ H5HF__man_iblock_delete(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_nr
"unable to check metadata cache status for indirect block")
/* Check if indirect block is pinned */
- HDassert(!(iblock_status & H5AC_ES__IS_PINNED));
+ assert(!(iblock_status & H5AC_ES__IS_PINNED));
}
#endif /* NDEBUG */
@@ -1720,10 +1720,10 @@ H5HF__man_iblock_size(H5F_t *f, H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned n
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(hdr);
- HDassert(H5F_addr_defined(iblock_addr));
- HDassert(heap_size);
+ assert(f);
+ assert(hdr);
+ assert(H5F_addr_defined(iblock_addr));
+ assert(heap_size);
/* Protect the indirect block */
if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, nrows, par_iblock, par_entry, FALSE,
@@ -1797,16 +1797,16 @@ H5HF__man_iblock_parent_info(const H5HF_hdr_t *hdr, hsize_t block_off, hsize_t *
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(block_off > 0);
- HDassert(ret_entry);
+ assert(hdr);
+ assert(block_off > 0);
+ assert(ret_entry);
/* Look up row & column for object */
if (H5HF__dtable_lookup(&hdr->man_dtable, block_off, &row, &col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of block")
/* Sanity check - first lookup must be an indirect block */
- HDassert(row >= hdr->man_dtable.max_direct_rows);
+ assert(row >= hdr->man_dtable.max_direct_rows);
/* Traverse down, until a direct block at the offset is found, then
* use previous (i.e. parent's) offset, row, and column.
@@ -1831,8 +1831,8 @@ H5HF__man_iblock_parent_info(const H5HF_hdr_t *hdr, hsize_t block_off, hsize_t *
} /* end while */
/* Sanity check */
- HDassert(row == 0);
- HDassert(col == 0);
+ assert(row == 0);
+ assert(col == 0);
/* Set return parameters */
*ret_par_block_off = prev_par_block_off;
@@ -1864,11 +1864,11 @@ H5HF__man_iblock_dest(H5HF_indirect_t *iblock)
/*
* Check arguments.
*/
- HDassert(iblock);
- HDassert(iblock->rc == 0);
+ assert(iblock);
+ assert(iblock->rc == 0);
/* Decrement reference count on shared info */
- HDassert(iblock->hdr);
+ assert(iblock->hdr);
if (H5HF__hdr_decr(iblock->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
if (iblock->parent)
diff --git a/src/H5HFiter.c b/src/H5HFiter.c
index 6d40979..0059029 100644
--- a/src/H5HFiter.c
+++ b/src/H5HFiter.c
@@ -88,10 +88,10 @@ H5HF__man_iter_init(H5HF_block_iter_t *biter)
/*
* Check arguments.
*/
- HDassert(biter);
+ assert(biter);
/* Reset block iterator information */
- HDmemset(biter, 0, sizeof(H5HF_block_iter_t));
+ memset(biter, 0, sizeof(H5HF_block_iter_t));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF__man_iter_init() */
@@ -128,11 +128,11 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o
/*
* Check arguments.
*/
- HDassert(biter);
- HDassert(!biter->ready);
+ assert(biter);
+ assert(!biter->ready);
/* Check for empty heap */
- HDassert(offset >= hdr->man_dtable.cparam.start_block_size);
+ assert(offset >= hdr->man_dtable.cparam.start_block_size);
/* Allocate level structure */
if (NULL == (biter->curr = H5FL_MALLOC(H5HF_block_loc_t)))
@@ -225,7 +225,7 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o
/* Or, if the offset has just filled up a direct or indirect block */
if (curr_offset == (col * hdr->man_dtable.row_block_size[row]) ||
row < hdr->man_dtable.max_direct_rows) {
- HDassert(curr_offset - (col * hdr->man_dtable.row_block_size[row]) == 0);
+ assert(curr_offset - (col * hdr->man_dtable.row_block_size[row]) == 0);
break; /* Done now */
} /* end if */
/* Indirect block row */
@@ -275,7 +275,7 @@ H5HF__man_iter_set_entry(const H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsign
/*
* Check arguments.
*/
- HDassert(biter);
+ assert(biter);
/* Set location context */
biter->curr->entry = entry;
@@ -310,10 +310,10 @@ H5HF__man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, H5HF_indir
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(biter);
- HDassert(!biter->ready);
- HDassert(iblock);
+ assert(hdr);
+ assert(biter);
+ assert(!biter->ready);
+ assert(iblock);
/* Create new location for iterator */
if (NULL == (new_loc = H5FL_MALLOC(H5HF_block_loc_t)))
@@ -367,7 +367,7 @@ H5HF__man_iter_reset(H5HF_block_iter_t *biter)
/*
* Check arguments.
*/
- HDassert(biter);
+ assert(biter);
/* Free any location contexts that exist */
if (biter->curr) {
@@ -424,16 +424,16 @@ H5HF__man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned nentries
/*
* Check arguments.
*/
- HDassert(biter);
- HDassert(biter->curr);
- HDassert(biter->curr->context);
- HDassert(biter->curr->row < biter->curr->context->nrows);
+ assert(biter);
+ assert(biter->curr);
+ assert(biter->curr->context);
+ assert(biter->curr->row < biter->curr->context->nrows);
/* Advance entry in current block */
biter->curr->entry += nentries;
biter->curr->row = biter->curr->entry / hdr->man_dtable.cparam.width;
biter->curr->col = biter->curr->entry % hdr->man_dtable.cparam.width;
- /* HDassert(biter->curr->row <= biter->curr->context->nrows); */
+ /* assert(biter->curr->row <= biter->curr->context->nrows); */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF__man_iter_next() */
@@ -461,11 +461,11 @@ H5HF__man_iter_up(H5HF_block_iter_t *biter)
/*
* Check arguments.
*/
- HDassert(biter);
- HDassert(biter->ready);
- HDassert(biter->curr);
- HDassert(biter->curr->up);
- HDassert(biter->curr->context);
+ assert(biter);
+ assert(biter->ready);
+ assert(biter->curr);
+ assert(biter->curr->up);
+ assert(biter->curr->context);
/* Release hold on current location's indirect block */
if (H5HF__iblock_decr(biter->curr->context) < 0)
@@ -507,10 +507,10 @@ H5HF__man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock)
/*
* Check arguments.
*/
- HDassert(biter);
- HDassert(biter->ready);
- HDassert(biter->curr);
- HDassert(biter->curr->context);
+ assert(biter);
+ assert(biter->ready);
+ assert(biter->curr);
+ assert(biter->curr->context);
/* Create new location to move down to */
if (NULL == (down_loc = H5FL_MALLOC(H5HF_block_loc_t)))
@@ -559,8 +559,8 @@ H5HF__man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col, unsi
/*
* Check arguments.
*/
- HDassert(biter);
- HDassert(biter->ready);
+ assert(biter);
+ assert(biter->ready);
/* Retrieve the information asked for */
if (row)
@@ -595,7 +595,7 @@ H5HF__man_iter_ready(H5HF_block_iter_t *biter)
/*
* Check arguments.
*/
- HDassert(biter);
+ assert(biter);
FUNC_LEAVE_NOAPI(biter->ready)
} /* end H5HF__man_iter_ready() */
diff --git a/src/H5HFman.c b/src/H5HFman.c
index 9827db7..b0de905 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -109,10 +109,10 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(obj_size > 0);
- HDassert(obj);
- HDassert(id);
+ assert(hdr);
+ assert(obj_size > 0);
+ assert(obj);
+ assert(id);
/* Check pipeline */
H5HF_MAN_WRITE_CHECK_PLINE(hdr)
@@ -135,13 +135,13 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
if (H5HF__man_iblock_alloc_row(hdr, &sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't break up row section")
} /* end if */
- HDassert(sec_node->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(sec_node->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
/* Check for 'single' section being serialized */
if (sec_node->sect_info.state == H5FS_SECT_SERIALIZED)
if (H5HF__sect_single_revive(hdr, sec_node) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section")
- HDassert(sec_node->sect_info.state == H5FS_SECT_LIVE);
+ assert(sec_node->sect_info.state == H5FS_SECT_LIVE);
/* Retrieve direct block address from section */
if (H5HF__sect_single_dblock_info(hdr, sec_node, &dblock_addr, &dblock_size) < 0)
@@ -159,7 +159,7 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
blk_off = (size_t)(sec_node->sect_info.addr - dblock->block_off);
/* Sanity checks */
- HDassert(sec_node->sect_info.size >= obj_size);
+ assert(sec_node->sect_info.size >= obj_size);
/* Reduce (& possibly re-add) single section */
if (H5HF__sect_single_reduce(hdr, sec_node, obj_size) < 0)
@@ -178,7 +178,7 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
p += obj_size;
/* Sanity check */
- HDassert((size_t)(p - (dblock->blk + blk_off)) == obj_size);
+ assert((size_t)(p - (dblock->blk + blk_off)) == obj_size);
} /* end block */
/* Set the heap ID for the new object (heap offset & obj length) */
@@ -225,9 +225,9 @@ H5HF__man_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj_len_p);
+ assert(hdr);
+ assert(id);
+ assert(obj_len_p);
/* Skip over the flag byte */
id++;
@@ -261,9 +261,9 @@ H5HF__man_get_obj_off(const H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj_off_p);
+ assert(hdr);
+ assert(id);
+ assert(obj_off_p);
/* Skip over the flag byte */
id++;
@@ -310,9 +310,9 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(op);
+ assert(hdr);
+ assert(id);
+ assert(op);
/* Set the access mode for the direct block */
if (op_flags & H5HF_OP_MODIFY) {
@@ -400,7 +400,7 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *
} /* end else */
/* Compute offset of object within block */
- HDassert((obj_off - dblock->block_off) < (hsize_t)dblock_size);
+ assert((obj_off - dblock->block_off) < (hsize_t)dblock_size);
blk_off = (size_t)(obj_off - dblock->block_off);
/* Check for object's offset in the direct block prefix information */
@@ -448,9 +448,9 @@ H5HF__man_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj);
+ assert(hdr);
+ assert(id);
+ assert(obj);
/* Call the internal 'op' routine routine */
if (H5HF__man_op_real(hdr, id, H5HF__op_read, obj, 0) < 0)
@@ -482,9 +482,9 @@ H5HF__man_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj);
+ assert(hdr);
+ assert(id);
+ assert(obj);
/* Call the internal 'op' routine routine
*
@@ -523,9 +523,9 @@ H5HF__man_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_da
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(op);
+ assert(hdr);
+ assert(id);
+ assert(op);
/* Call the internal 'op' routine routine */
if (H5HF__man_op_real(hdr, id, op, op_data, 0) < 0)
@@ -566,8 +566,8 @@ H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
+ assert(hdr);
+ assert(id);
/* Check pipeline */
H5HF_MAN_WRITE_CHECK_PLINE(hdr)
@@ -622,7 +622,7 @@ H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id)
} /* end else */
/* Compute offset of object within block */
- HDassert((obj_off - dblock_block_off) < (hsize_t)dblock_size);
+ assert((obj_off - dblock_block_off) < (hsize_t)dblock_size);
blk_off = (size_t)(obj_off - dblock_block_off);
/* Check for object's offset in the direct block prefix information */
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index f323c41..2dad0a1 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -297,8 +297,8 @@ H5FS__sect_init_cls(H5FS_section_class_t *cls, H5HF_hdr_t *hdr)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
- HDassert(!cls->cls_private);
+ assert(cls);
+ assert(!cls->cls_private);
/* Allocate & initialize the class-private (i.e. private shared) information
* for this type of section
@@ -338,7 +338,7 @@ H5FS__sect_term_cls(H5FS_section_class_t *cls)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
+ assert(cls);
/* Get pointer to class private info */
cls_prvt = (H5HF_sect_private_t *)cls->cls_private;
@@ -377,7 +377,7 @@ H5FS__sect_node_new(unsigned sect_type, haddr_t sect_addr, hsize_t sect_size, H5
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(H5F_addr_defined(sect_addr));
+ assert(H5F_addr_defined(sect_addr));
/* Create free list section node */
if (NULL == (new_sect = H5FL_MALLOC(H5HF_free_section_t)))
@@ -420,7 +420,7 @@ H5HF__sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *iblock)
FUNC_ENTER_PACKAGE
- HDassert(sect);
+ assert(sect);
/* Release indirect block, if there was one */
if (iblock)
@@ -458,7 +458,7 @@ H5HF__sect_single_new(hsize_t sect_off, size_t sect_size, H5HF_indirect_t *paren
/*
* Check arguments.
*/
- HDassert(sect_size);
+ assert(sect_size);
/* Create free space section node */
if (NULL ==
@@ -511,9 +511,9 @@ H5HF__sect_single_locate_parent(H5HF_hdr_t *hdr, hbool_t refresh, H5HF_free_sect
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(hdr->man_dtable.curr_root_rows > 0);
- HDassert(sect);
+ assert(hdr);
+ assert(hdr->man_dtable.curr_root_rows > 0);
+ assert(sect);
/* Look up indirect block containing direct blocks for range */
if (H5HF__man_dblock_locate(hdr, sect->sect_info.addr, &sec_iblock, &sec_entry, &did_protect,
@@ -569,14 +569,14 @@ H5HF__sect_single_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
/* Check for root direct block */
if (hdr->man_dtable.curr_root_rows == 0) {
/* Set the information for the section */
- HDassert(H5F_addr_defined(hdr->man_dtable.table_addr));
+ assert(H5F_addr_defined(hdr->man_dtable.table_addr));
sect->u.single.parent = NULL;
sect->u.single.par_entry = 0;
} /* end if */
@@ -614,17 +614,17 @@ H5HF__sect_single_dblock_info(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
- HDassert(dblock_addr);
- HDassert(dblock_size);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(dblock_addr);
+ assert(dblock_size);
/* Check for root direct block */
if (hdr->man_dtable.curr_root_rows == 0) {
/* Retrieve direct block info from heap header */
- HDassert(H5F_addr_defined(hdr->man_dtable.table_addr));
+ assert(H5F_addr_defined(hdr->man_dtable.table_addr));
*dblock_addr = hdr->man_dtable.table_addr;
*dblock_size = hdr->man_dtable.cparam.start_block_size;
} /* end if */
@@ -662,10 +662,10 @@ H5HF__sect_single_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, size_t amt)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
/* Check for eliminating the section */
if (sect->sect_info.size == amt) {
@@ -715,9 +715,9 @@ H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
- HDassert(hdr);
+ assert(sect);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(hdr);
/* Retrieve direct block address from section */
if (H5HF__sect_single_dblock_info(hdr, sect, &dblock_addr, &dblock_size) < 0)
@@ -733,7 +733,7 @@ H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
if (NULL == (dblock = H5HF__man_dblock_protect(hdr, dblock_addr, dblock_size, sect->u.single.parent,
sect->u.single.par_entry, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block")
- HDassert(H5F_addr_eq(dblock->block_off + dblock_overhead, sect->sect_info.addr));
+ assert(H5F_addr_eq(dblock->block_off + dblock_overhead, sect->sect_info.addr));
/* Convert 'single' section into 'row' section */
if (H5HF__sect_row_from_single(hdr, sect, dblock) < 0)
@@ -786,8 +786,8 @@ H5HF__sect_single_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
/* Sanity check */
- HDassert(sect);
- HDassert(hdr);
+ assert(sect);
+ assert(hdr);
/* Check if single section covers entire direct block it's in */
/* (converts to row section possibly) */
@@ -830,8 +830,8 @@ H5HF__sect_single_deserialize(const H5FS_section_class_t H5_ATTR_UNUSED *cls,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(H5F_addr_defined(sect_addr));
- HDassert(sect_size);
+ assert(H5F_addr_defined(sect_addr));
+ assert(sect_size);
/* Create free list section node */
if (NULL ==
@@ -872,10 +872,10 @@ H5HF__sect_single_can_merge(const H5FS_section_info_t *_sect1, const H5FS_sectio
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect1);
- HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ assert(sect1);
+ assert(sect2);
+ assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ assert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Check if second section adjoins first section */
/* (This can only occur within a direct block, due to the direct block
@@ -917,11 +917,11 @@ H5HF__sect_single_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect1);
- HDassert((*sect1)->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
- HDassert(sect2);
- HDassert(sect2->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
- HDassert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
+ assert(sect1);
+ assert((*sect1)->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(sect2);
+ assert(sect2->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
/* Add second section's size to first section */
(*sect1)->sect_info.size += sect2->sect_info.size;
@@ -973,7 +973,7 @@ H5HF__sect_single_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
/* Check for section occupying entire root direct block */
/* (We shouldn't ever have a single section that occupies an entire
@@ -994,7 +994,7 @@ H5HF__sect_single_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* We shouldn't have a situation where the 'next block' iterator
* is moved before a direct block that still has objects within it.
*/
- HDassert(hdr->man_iter_off > sect->sect_info.addr);
+ assert(hdr->man_iter_off > sect->sect_info.addr);
HGOTO_DONE(FALSE)
} /* end else */
@@ -1030,9 +1030,9 @@ H5HF__sect_single_shrink(H5FS_section_info_t **_sect, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(*sect);
- HDassert((*sect)->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(sect);
+ assert(*sect);
+ assert((*sect)->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
/* Check to see if we should revive section */
if ((*sect)->sect_info.state != H5FS_SECT_LIVE)
@@ -1045,11 +1045,11 @@ H5HF__sect_single_shrink(H5FS_section_info_t **_sect, void *_udata)
/* Protect the direct block for the section */
/* (should be a root direct block) */
- HDassert(dblock_addr == hdr->man_dtable.table_addr);
+ assert(dblock_addr == hdr->man_dtable.table_addr);
if (NULL == (dblock = H5HF__man_dblock_protect(hdr, dblock_addr, dblock_size, (*sect)->u.single.parent,
(*sect)->u.single.par_entry, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block")
- HDassert(H5F_addr_eq(dblock->block_off + dblock_size, (*sect)->sect_info.addr + (*sect)->sect_info.size));
+ assert(H5F_addr_eq(dblock->block_off + dblock_size, (*sect)->sect_info.addr + (*sect)->sect_info.size));
/* Get rid of section */
if (H5HF__sect_single_free((H5FS_section_info_t *)*sect) < 0)
@@ -1091,7 +1091,7 @@ H5HF__sect_single_free(H5FS_section_info_t *_sect)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
/* Check for live reference to an indirect block */
if (sect->sect_info.state == H5FS_SECT_LIVE)
@@ -1128,7 +1128,7 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
if (sect->sect_info.state == H5FS_SECT_LIVE) {
/* Check if this section is not in a direct block that is the root direct block */
@@ -1143,25 +1143,25 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
/* Sanity check settings for section's direct block's parent */
iblock = sect->u.single.parent;
- HDassert(H5F_addr_defined(iblock->ents[sect->u.single.par_entry].addr));
+ assert(H5F_addr_defined(iblock->ents[sect->u.single.par_entry].addr));
/* Retrieve direct block address from section */
status = H5HF__sect_single_dblock_info(iblock->hdr, (const H5HF_free_section_t *)sect,
&dblock_addr, &dblock_size);
- HDassert(status >= 0);
- HDassert(H5F_addr_eq(iblock->ents[sect->u.single.par_entry].addr, dblock_addr));
- HDassert(dblock_size > 0);
+ assert(status >= 0);
+ assert(H5F_addr_eq(iblock->ents[sect->u.single.par_entry].addr, dblock_addr));
+ assert(dblock_size > 0);
/* Check if the section is actually within the heap */
- HDassert(sect->sect_info.addr < iblock->hdr->man_iter_off);
+ assert(sect->sect_info.addr < iblock->hdr->man_iter_off);
/* Check that the direct block has been merged correctly */
dblock_overhead = H5HF_MAN_ABS_DIRECT_OVERHEAD(iblock->hdr);
- HDassert((sect->sect_info.size + dblock_overhead) < dblock_size);
+ assert((sect->sect_info.size + dblock_overhead) < dblock_size);
/* Check the direct block's status in the metadata cache */
status = H5AC_get_entry_status(iblock->hdr->f, dblock_addr, &dblock_status);
- HDassert(status >= 0);
+ assert(status >= 0);
/* If the direct block for the section isn't already protected,
* protect it here in order to check single section's sanity
@@ -1173,19 +1173,19 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
/* Protect the direct block for the section */
dblock = H5HF__man_dblock_protect(iblock->hdr, dblock_addr, dblock_size, iblock,
sect->u.single.par_entry, H5AC__READ_ONLY_FLAG);
- HDassert(dblock);
+ assert(dblock);
/* Sanity check settings for section */
- HDassert(dblock_size == dblock->size);
- HDassert(dblock->size > sect->sect_info.size);
- HDassert(H5F_addr_lt(dblock->block_off, sect->sect_info.addr));
- HDassert(H5F_addr_ge((dblock->block_off + dblock->size),
- (sect->sect_info.addr + sect->sect_info.size)));
+ assert(dblock_size == dblock->size);
+ assert(dblock->size > sect->sect_info.size);
+ assert(H5F_addr_lt(dblock->block_off, sect->sect_info.addr));
+ assert(H5F_addr_ge((dblock->block_off + dblock->size),
+ (sect->sect_info.addr + sect->sect_info.size)));
/* Release direct block */
status = H5AC_unprotect(iblock->hdr->f, H5AC_FHEAP_DBLOCK, dblock_addr, dblock,
H5AC__NO_FLAGS_SET);
- HDassert(status >= 0);
+ assert(status >= 0);
} /* end if */
} /* end if */
} /* end if */
@@ -1217,9 +1217,9 @@ H5HF__sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first, uns
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect_size);
- HDassert(nentries);
- HDassert(under_sect);
+ assert(sect_size);
+ assert(nentries);
+ assert(under_sect);
/* Create 'row' free space section node */
/* ("inherits" underlying indirect section's state) */
@@ -1264,9 +1264,9 @@ H5HF__sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_dire
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(dblock);
+ assert(hdr);
+ assert(sect);
+ assert(dblock);
/* Convert 'single' section information to 'row' section info */
sect->sect_info.addr = dblock->block_off;
@@ -1310,9 +1310,9 @@ H5HF__sect_row_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->u.row.under);
+ assert(hdr);
+ assert(sect);
+ assert(sect->u.row.under);
/* If the indirect section's iblock has been removed from the cache, but the
* section is still marked as "live", switch it to the "serialized" state.
@@ -1326,7 +1326,7 @@ H5HF__sect_row_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
/* (which will mark this section as "live") */
if (H5HF__sect_indirect_revive_row(hdr, sect->u.row.under) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section")
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1357,15 +1357,15 @@ H5HF__sect_row_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned *entr
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
- sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
- HDassert(entry_p);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
+ sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(entry_p);
/* Mark the row as checked out from the free space manager */
- HDassert(sect->u.row.checked_out == FALSE);
+ assert(sect->u.row.checked_out == FALSE);
sect->u.row.checked_out = TRUE;
/* Forward row section to indirect routines, to handle reducing underlying indirect section */
@@ -1427,9 +1427,9 @@ H5HF__sect_row_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
/* If the row is already checked out from the free space manager, just
* change it's class directly and the free space manager will adjust when
@@ -1468,10 +1468,10 @@ H5HF__sect_row_get_iblock(H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
- sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
+ sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
ret_value = H5HF__sect_indirect_get_iblock(sect->u.row.under);
@@ -1501,7 +1501,7 @@ H5HF__sect_row_parent_removed(H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(sect);
+ assert(sect);
/* Get a copy of the indirect block's offset before decrementing refcount on it */
tmp_iblock_off = sect->u.row.under->u.indirect.u.iblock->block_off;
@@ -1555,8 +1555,8 @@ H5HF__sect_row_init_cls(H5FS_section_class_t *cls, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
- HDassert(hdr);
+ assert(cls);
+ assert(hdr);
/* Call common class initialization */
if (H5FS__sect_init_cls(cls, hdr) < 0)
@@ -1597,7 +1597,7 @@ H5HF__sect_row_term_cls(H5FS_section_class_t *cls)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
+ assert(cls);
/* Call common class termination */
if (H5FS__sect_term_cls(cls) < 0)
@@ -1631,11 +1631,11 @@ H5HF__sect_row_serialize(const H5FS_section_class_t *cls, const H5FS_section_inf
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
- HDassert(buf);
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
- HDassert(sect->sect_info.addr == sect->u.row.under->sect_info.addr);
+ assert(cls);
+ assert(buf);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(sect->sect_info.addr == sect->u.row.under->sect_info.addr);
/* Forward to indirect routine to serialize underlying section */
hdr = ((H5HF_sect_private_t *)(cls->cls_private))->hdr;
@@ -1674,10 +1674,10 @@ H5HF__sect_row_deserialize(const H5FS_section_class_t *cls, const uint8_t *buf,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
- HDassert(buf);
- HDassert(H5F_addr_defined(sect_addr));
- HDassert(sect_size);
+ assert(cls);
+ assert(buf);
+ assert(H5F_addr_defined(sect_addr));
+ assert(sect_size);
/* Forward to indirect routine to deserialize underlying section */
hdr = ((H5HF_sect_private_t *)(cls->cls_private))->hdr;
@@ -1717,17 +1717,17 @@ H5HF__sect_row_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_i
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect1);
- HDassert(sect1->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
- HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ assert(sect1);
+ assert(sect1->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(sect2);
+ assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ assert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Get the top indirect section underlying each row */
top_indir_sect1 = H5HF__sect_indirect_top(sect1->u.row.under);
- HDassert(top_indir_sect1);
+ assert(top_indir_sect1);
top_indir_sect2 = H5HF__sect_indirect_top(sect2->u.row.under);
- HDassert(top_indir_sect2);
+ assert(top_indir_sect2);
/* Check if second section shares the same underlying indirect block as
* the first section, but doesn't already have same underlying indirect
@@ -1773,10 +1773,10 @@ H5HF__sect_row_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect1);
- HDassert((*sect1)->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
- HDassert(sect2);
- HDassert(sect2->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(sect1);
+ assert((*sect1)->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(sect2);
+ assert(sect2->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
/* Check if second section is past end of "next block" iterator */
if (sect2->sect_info.addr >= hdr->man_iter_off) {
@@ -1827,8 +1827,8 @@ H5HF__sect_row_can_shrink(const H5FS_section_info_t *_sect, void H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
/* Check if section is past end of "next block" iterator */
if (sect->sect_info.addr >= hdr->man_iter_off)
@@ -1864,9 +1864,9 @@ H5HF__sect_row_shrink(H5FS_section_info_t **_sect, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(*sect);
- HDassert((*sect)->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(sect);
+ assert(*sect);
+ assert((*sect)->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
/* Get the top indirect section underlying each row */
top_indir_sect = H5HF__sect_indirect_top((*sect)->u.row.under);
@@ -1903,7 +1903,7 @@ H5HF__sect_row_free_real(H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
- HDassert(sect);
+ assert(sect);
/* Release the section */
if (H5HF__sect_node_free(sect, NULL) < 0)
@@ -1935,8 +1935,8 @@ H5HF__sect_row_free(H5FS_section_info_t *_sect)
FUNC_ENTER_PACKAGE
- HDassert(sect);
- HDassert(sect->u.row.under);
+ assert(sect);
+ assert(sect->u.row.under);
/* Decrement the ref. count on the row section's underlying indirect section */
if (H5HF__sect_indirect_decr(sect->u.row.under) < 0)
@@ -1975,30 +1975,30 @@ H5HF__sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t
FUNC_ENTER_PACKAGE_NOERR
/* Basic sanity check */
- HDassert(cls);
- HDassert(sect);
+ assert(cls);
+ assert(sect);
/* Retrieve class private information */
cls_prvt = (H5HF_sect_private_t *)cls->cls_private;
hdr = cls_prvt->hdr;
/* Sanity checking on the row */
- HDassert(sect->u.row.under);
- HDassert(sect->u.row.num_entries);
- HDassert(sect->u.row.checked_out == FALSE);
+ assert(sect->u.row.under);
+ assert(sect->u.row.num_entries);
+ assert(sect->u.row.checked_out == FALSE);
indir_sect = sect->u.row.under;
indir_idx = sect->u.row.row - indir_sect->u.indirect.row;
- HDassert(indir_sect->u.indirect.dir_rows[indir_idx] == sect);
+ assert(indir_sect->u.indirect.dir_rows[indir_idx] == sect);
/* Check if the section is actually within the heap */
- HDassert(sect->sect_info.addr < hdr->man_iter_off);
+ assert(sect->sect_info.addr < hdr->man_iter_off);
/* Different checking for different kinds of rows */
if (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW) {
H5HF_free_section_t *top_indir_sect; /* Top indirect section for row */
/* Some extra sanity checks on the row */
- HDassert(sect->u.row.row == indir_sect->u.indirect.row);
+ assert(sect->u.row.row == indir_sect->u.indirect.row);
/* Get the top indirect section underlying row */
top_indir_sect = H5HF__sect_indirect_top(sect->u.row.under);
@@ -2031,17 +2031,17 @@ H5HF__sect_row_debug(const H5FS_section_info_t *_sect, FILE *stream, int indent,
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
/* Print indirect section information */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.row.row);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.row.col);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.row.num_entries);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.row.row);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.row.col);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.row.num_entries);
/* If this is a first row section display information about underlying indirect section */
if (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW) {
/* Print indirect section header */
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Underlying indirect section:");
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Underlying indirect section:");
H5HF__sect_indirect_debug(sect->u.row.under, stream, indent + 3, MAX(0, fwidth - 3));
} /* end if */
@@ -2071,7 +2071,7 @@ H5HF__sect_indirect_iblock_off(const H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(sect);
+ assert(sect);
ret_value = sect->sect_info.state == H5FS_SECT_LIVE ? sect->u.indirect.u.iblock->block_off
: sect->u.indirect.u.iblock_off;
@@ -2101,7 +2101,7 @@ H5HF__sect_indirect_top(H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(sect);
+ assert(sect);
if (sect->u.indirect.parent)
ret_value = H5HF__sect_indirect_top(sect->u.indirect.parent);
@@ -2134,8 +2134,8 @@ H5HF__sect_indirect_init_cls(H5FS_section_class_t *cls, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
- HDassert(hdr);
+ assert(cls);
+ assert(hdr);
/* Call to common class initialization */
if (H5FS__sect_init_cls(cls, hdr) < 0)
@@ -2170,7 +2170,7 @@ H5HF__sect_indirect_term_cls(H5FS_section_class_t *cls)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
+ assert(cls);
/* Call common class termination */
if (H5FS__sect_term_cls(cls) < 0)
@@ -2205,8 +2205,8 @@ H5HF__sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size, H5
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(nentries);
+ assert(hdr);
+ assert(nentries);
/* Create free space section node */
if (NULL == (sect = H5FS__sect_node_new(H5HF_FSPACE_SECT_INDIRECT, sect_off, sect_size,
@@ -2231,7 +2231,7 @@ H5HF__sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size, H5
/* Compute span size of indirect section */
sect->u.indirect.span_size = H5HF__dtable_span_size(&hdr->man_dtable, row, col, nentries);
- HDassert(sect->u.indirect.span_size > 0);
+ assert(sect->u.indirect.span_size > 0);
/* This indirect section doesn't (currently) have a parent */
sect->u.indirect.parent = NULL;
@@ -2272,10 +2272,10 @@ H5HF__sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, H5HF_free_
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(iblock);
- HDassert(row_sect);
- HDassert(row_sect->u.row.row < hdr->man_dtable.max_direct_rows);
+ assert(hdr);
+ assert(iblock);
+ assert(row_sect);
+ assert(row_sect->u.row.row < hdr->man_dtable.max_direct_rows);
/* Create free space section node */
if (NULL == (sect = H5HF__sect_indirect_new(hdr, row_sect->sect_info.addr, row_sect->sect_info.size,
@@ -2344,8 +2344,8 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(sect->u.indirect.span_size > 0);
+ assert(sect);
+ assert(sect->u.indirect.span_size > 0);
/* Reset reference count for indirect section */
/* (Also reset the direct & indirect row pointers */
@@ -2551,7 +2551,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_
sect->u.indirect.dir_nrows = dir_nrows;
/* Make certain we've tracked the section's dependents correctly */
- HDassert(sect->u.indirect.rc == (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
+ assert(sect->u.indirect.rc == (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
done:
if (ret_value < 0) {
@@ -2596,9 +2596,9 @@ H5HF__sect_indirect_add(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, unsigned start
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(iblock);
- HDassert(nentries);
+ assert(hdr);
+ assert(iblock);
+ assert(nentries);
/* Compute starting column & row */
start_row = start_entry / hdr->man_dtable.cparam.width;
@@ -2624,7 +2624,7 @@ H5HF__sect_indirect_add(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, unsigned start
if (H5HF__sect_indirect_init_rows(hdr, sect, TRUE, &first_row_sect, H5FS_ADD_SKIP_VALID, start_row,
start_col, end_row, end_col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize indirect section")
- HDassert(first_row_sect);
+ assert(first_row_sect);
/* Now that underlying indirect section is consistent, add first row
* section to free space manager for the heap
@@ -2662,8 +2662,8 @@ H5HF__sect_indirect_decr(H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(sect->u.indirect.rc);
+ assert(sect);
+ assert(sect->u.indirect.rc);
/* Decrement ref. count for indirect section */
sect->u.indirect.rc--;
@@ -2714,9 +2714,9 @@ H5HF__sect_indirect_revive_row(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
/* Look up indirect block containing indirect blocks for section */
if (H5HF__man_dblock_locate(hdr, sect->sect_info.addr, &sec_iblock, NULL, &did_protect,
@@ -2758,10 +2758,10 @@ H5HF__sect_indirect_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_indi
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
- HDassert(sect_iblock);
+ assert(hdr);
+ assert(sect);
+ assert(sect->sect_info.state == H5FS_SECT_SERIALIZED);
+ assert(sect_iblock);
/* Increment reference count on indirect block that free section is in */
if (H5HF__iblock_incr(sect_iblock) < 0)
@@ -2823,8 +2823,8 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(row_sect);
+ assert(hdr);
+ assert(row_sect);
/* Compute starting & ending information for row section */
row_start_entry = (row_sect->u.row.row * hdr->man_dtable.cparam.width) + row_sect->u.row.col;
@@ -2839,11 +2839,11 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
end_row = end_entry / hdr->man_dtable.cparam.width;
/* Additional sanity check */
- HDassert(sect->u.indirect.span_size > 0);
- HDassert(sect->u.indirect.iblock_entries > 0);
- HDassert(sect->u.indirect.dir_nrows > 0);
- HDassert(sect->u.indirect.dir_rows);
- HDassert(sect->u.indirect.dir_rows[(row_sect->u.row.row - start_row)] == row_sect);
+ assert(sect->u.indirect.span_size > 0);
+ assert(sect->u.indirect.iblock_entries > 0);
+ assert(sect->u.indirect.dir_nrows > 0);
+ assert(sect->u.indirect.dir_rows);
+ assert(sect->u.indirect.dir_rows[(row_sect->u.row.row - start_row)] == row_sect);
/* Check if we should allocate from end of indirect section */
if (row_end_entry == end_entry && start_row != end_row) {
@@ -2886,7 +2886,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
/* Adjust block coordinates of span */
sect->u.indirect.col++;
if (sect->u.indirect.col == hdr->man_dtable.cparam.width) {
- HDassert(row_sect->u.row.num_entries == 1);
+ assert(row_sect->u.row.num_entries == 1);
/* Adjust section's span information */
sect->u.indirect.row++;
@@ -2897,10 +2897,10 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
/* Adjust direct row sections for indirect section */
if (sect->u.indirect.dir_nrows > 0) {
- HDassert(sect->u.indirect.dir_rows);
+ assert(sect->u.indirect.dir_rows);
HDmemmove(&sect->u.indirect.dir_rows[0], &sect->u.indirect.dir_rows[1],
sect->u.indirect.dir_nrows * sizeof(H5HF_free_section_t *));
- HDassert(sect->u.indirect.dir_rows[0]);
+ assert(sect->u.indirect.dir_rows[0]);
/* Make new "first row" in indirect section */
if (row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW)
@@ -2910,8 +2910,8 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
} /* end if */
else {
/* Sanity check */
- HDassert(sect->u.indirect.indir_nents > 0);
- HDassert(sect->u.indirect.indir_ents);
+ assert(sect->u.indirect.indir_nents > 0);
+ assert(sect->u.indirect.indir_ents);
/* Eliminate direct rows for this section */
sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.dir_rows);
@@ -2931,17 +2931,17 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
unsigned new_end_row; /* New end row for entries */
/* Sanity check */
- HDassert(sect->u.indirect.indir_nents == 0);
- HDassert(sect->u.indirect.indir_ents == NULL);
+ assert(sect->u.indirect.indir_nents == 0);
+ assert(sect->u.indirect.indir_ents == NULL);
/* Adjust number of entries covered */
sect->u.indirect.num_entries--;
/* Check for eliminating a direct row */
new_end_row = ((start_entry + sect->u.indirect.num_entries) - 1) / hdr->man_dtable.cparam.width;
- HDassert(new_end_row <= end_row);
+ assert(new_end_row <= end_row);
if (new_end_row < end_row) {
- HDassert(new_end_row == (end_row - 1));
+ assert(new_end_row == (end_row - 1));
sect->u.indirect.dir_nrows--;
} /* end if */
} /* end if */
@@ -2954,11 +2954,11 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
unsigned u; /* Local index variable */
/* Sanity checks */
- HDassert(row_sect->u.row.col == 0);
- HDassert(row_sect->u.row.row > 0);
- HDassert(row_sect->u.row.row < hdr->man_dtable.max_direct_rows);
- HDassert(row_sect->u.row.num_entries == hdr->man_dtable.cparam.width);
- HDassert(row_sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ assert(row_sect->u.row.col == 0);
+ assert(row_sect->u.row.row > 0);
+ assert(row_sect->u.row.row < hdr->man_dtable.max_direct_rows);
+ assert(row_sect->u.row.num_entries == hdr->man_dtable.cparam.width);
+ assert(row_sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
/* Compute basic information about peer & current indirect sections */
new_start_row = row_sect->u.row.row;
@@ -2995,7 +2995,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
HDmemmove(&sect->u.indirect.dir_rows[0], &sect->u.indirect.dir_rows[peer_dir_nrows],
(sizeof(H5HF_free_section_t *) * (sect->u.indirect.dir_nrows - peer_dir_nrows)));
sect->u.indirect.dir_nrows -= peer_dir_nrows;
- HDassert(row_sect == sect->u.indirect.dir_rows[0]);
+ assert(row_sect == sect->u.indirect.dir_rows[0]);
/* Re-target transferred row sections to point to new underlying indirect section */
for (u = 0; u < peer_dir_nrows; u++)
@@ -3026,9 +3026,9 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
(peer_nentries + 1); /* Transferred entries, plus the entry allocated out of the row */
/* Make certain we've tracked the sections' dependents correctly */
- HDassert(sect->u.indirect.rc == (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
- HDassert(peer_sect->u.indirect.rc ==
- (peer_sect->u.indirect.indir_nents + peer_sect->u.indirect.dir_nrows));
+ assert(sect->u.indirect.rc == (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
+ assert(peer_sect->u.indirect.rc ==
+ (peer_sect->u.indirect.indir_nents + peer_sect->u.indirect.dir_nrows));
/* Reset the peer_sect variable, to indicate that it has been hooked into the data structures
* correctly and shouldn't be freed */
@@ -3039,7 +3039,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h
/* Decrement count of entries & rows */
sect->u.indirect.num_entries--;
sect->u.indirect.dir_nrows--;
- HDassert(sect->u.indirect.dir_nrows == 0);
+ assert(sect->u.indirect.dir_nrows == 0);
/* Eliminate direct rows for this section */
sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.dir_rows);
@@ -3050,7 +3050,7 @@ done:
* into the main free space structures (via the direct blocks), and the reference count is updated. */
if (peer_sect) {
/* Sanity check - we should only be here if an error occurred */
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (H5HF__sect_indirect_free(peer_sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
@@ -3089,10 +3089,10 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(sect);
- HDassert(sect->u.indirect.span_size > 0);
- HDassert(sect->u.indirect.iblock_entries > 0);
+ assert(hdr);
+ assert(sect);
+ assert(sect->u.indirect.span_size > 0);
+ assert(sect->u.indirect.iblock_entries > 0);
/* Compute starting & ending information for indirect section */
start_row = sect->u.indirect.row;
@@ -3126,10 +3126,10 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
/* Check if we can allocate from start of indirect section */
if (child_entry == start_entry) {
/* Sanity check */
- HDassert(sect->u.indirect.dir_nrows == 0);
- HDassert(sect->u.indirect.dir_rows == NULL);
- HDassert(sect->u.indirect.indir_nents > 0);
- HDassert(sect->u.indirect.indir_ents);
+ assert(sect->u.indirect.dir_nrows == 0);
+ assert(sect->u.indirect.dir_rows == NULL);
+ assert(sect->u.indirect.indir_nents > 0);
+ assert(sect->u.indirect.indir_ents);
/* Adjust section start */
sect->sect_info.addr += hdr->man_dtable.row_block_size[start_row];
@@ -3147,7 +3147,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
sect->u.indirect.indir_nents--;
HDmemmove(&sect->u.indirect.indir_ents[0], &sect->u.indirect.indir_ents[1],
sect->u.indirect.indir_nents * sizeof(H5HF_free_section_t *));
- HDassert(sect->u.indirect.indir_ents[0]);
+ assert(sect->u.indirect.indir_ents[0]);
/* Make new "first row" in new first indirect child section */
if (H5HF__sect_indirect_first(hdr, sect->u.indirect.indir_ents[0]) < 0)
@@ -3156,8 +3156,8 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
} /* end if */
else if (child_entry == end_entry) {
/* Sanity check */
- HDassert(sect->u.indirect.indir_nents > 0);
- HDassert(sect->u.indirect.indir_ents);
+ assert(sect->u.indirect.indir_nents > 0);
+ assert(sect->u.indirect.indir_ents);
/* Adjust span of blocks covered */
sect->u.indirect.num_entries--;
@@ -3180,8 +3180,8 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(sect->u.indirect.indir_nents > 0);
- HDassert(sect->u.indirect.indir_ents);
+ assert(sect->u.indirect.indir_nents > 0);
+ assert(sect->u.indirect.indir_ents);
/* Compute basic information about peer & current indirect sections */
peer_nentries = end_entry - child_entry;
@@ -3189,7 +3189,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
peer_start_col = (child_entry + 1) % hdr->man_dtable.cparam.width;
child_row = child_entry / hdr->man_dtable.cparam.width;
new_nentries = sect->u.indirect.num_entries - (peer_nentries + 1);
- HDassert(child_row >= hdr->man_dtable.max_direct_rows);
+ assert(child_row >= hdr->man_dtable.max_direct_rows);
/* Get indirect block information for peer */
if (sect->sect_info.state == H5FS_SECT_LIVE) {
@@ -3206,7 +3206,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
sect->u.indirect.num_entries = new_nentries;
sect->u.indirect.span_size = H5HF__dtable_span_size(&hdr->man_dtable, sect->u.indirect.row,
sect->u.indirect.col, new_nentries);
- HDassert(sect->u.indirect.span_size > 0);
+ assert(sect->u.indirect.span_size > 0);
/* Compute address of peer indirect section */
peer_sect_addr = sect->sect_info.addr;
@@ -3253,10 +3253,9 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
/* (Note modified on current section's ref. count, since we haven't
* detached the child section yet)
*/
- HDassert((sect->u.indirect.rc - 1) ==
- (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
- HDassert(peer_sect->u.indirect.rc ==
- (peer_sect->u.indirect.indir_nents + peer_sect->u.indirect.dir_nrows));
+ assert((sect->u.indirect.rc - 1) == (sect->u.indirect.indir_nents + sect->u.indirect.dir_nrows));
+ assert(peer_sect->u.indirect.rc ==
+ (peer_sect->u.indirect.indir_nents + peer_sect->u.indirect.dir_nrows));
/* Make new "first row" in peer section */
if (H5HF__sect_indirect_first(hdr, peer_sect->u.indirect.indir_ents[0]) < 0)
@@ -3272,7 +3271,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned
/* Decrement count of entries & indirect entries */
sect->u.indirect.num_entries--;
sect->u.indirect.indir_nents--;
- HDassert(sect->u.indirect.indir_nents == 0);
+ assert(sect->u.indirect.indir_nents == 0);
/* Eliminate indirect entries for this section */
sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.indir_ents);
@@ -3288,7 +3287,7 @@ done:
* into the main free space structures (via the direct blocks), and the reference count is updated. */
if (peer_sect) {
/* Sanity check - we should only be here if an error occurred */
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (H5HF__sect_indirect_free(peer_sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
@@ -3317,7 +3316,7 @@ H5HF__sect_indirect_is_first(H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(sect);
+ assert(sect);
/* Recurse to parent */
if (sect->u.indirect.parent) {
@@ -3350,16 +3349,16 @@ H5HF__sect_indirect_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(hdr);
- HDassert(sect);
+ assert(hdr);
+ assert(sect);
/* Check if this indirect section has direct block rows */
if (sect->u.indirect.dir_nrows > 0) {
/* Sanity checks */
- HDassert(sect->u.indirect.row == 0);
- HDassert(sect->u.indirect.col == 0);
- HDassert(sect->u.indirect.dir_rows);
- HDassert(sect->u.indirect.dir_rows[0]);
+ assert(sect->u.indirect.row == 0);
+ assert(sect->u.indirect.col == 0);
+ assert(sect->u.indirect.dir_rows);
+ assert(sect->u.indirect.dir_rows[0]);
/* Change first row section in indirect section to be the "first row" */
if (H5HF__sect_row_first(hdr, sect->u.indirect.dir_rows[0]) < 0)
@@ -3367,9 +3366,9 @@ H5HF__sect_indirect_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
} /* end if */
else {
/* Sanity checks */
- HDassert(sect->u.indirect.indir_nents > 0);
- HDassert(sect->u.indirect.indir_ents);
- HDassert(sect->u.indirect.indir_ents[0]);
+ assert(sect->u.indirect.indir_nents > 0);
+ assert(sect->u.indirect.indir_ents);
+ assert(sect->u.indirect.indir_ents[0]);
/* Forward to first child indirect section */
if (H5HF__sect_indirect_first(hdr, sect->u.indirect.indir_ents[0]) < 0)
@@ -3400,9 +3399,9 @@ H5HF__sect_indirect_get_iblock(H5HF_free_section_t *sect)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_INDIRECT);
- HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
+ assert(sect);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_INDIRECT);
+ assert(sect->sect_info.state == H5FS_SECT_LIVE);
FUNC_LEAVE_NOAPI(sect->u.indirect.u.iblock)
} /* end H5HF__sect_indirect_get_iblock() */
@@ -3439,22 +3438,22 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
FUNC_ENTER_PACKAGE
/* Sanity check parameters */
- HDassert(hdr);
- HDassert(row_sect1);
- HDassert(row_sect1->u.row.under);
- HDassert(row_sect2);
- HDassert(row_sect2->u.row.under);
- HDassert(row_sect2->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
+ assert(hdr);
+ assert(row_sect1);
+ assert(row_sect1->u.row.under);
+ assert(row_sect2);
+ assert(row_sect2->u.row.under);
+ assert(row_sect2->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
/* Set up indirect section information */
sect1 = H5HF__sect_indirect_top(row_sect1->u.row.under);
- HDassert(sect1);
+ assert(sect1);
sect2 = H5HF__sect_indirect_top(row_sect2->u.row.under);
- HDassert(sect2);
+ assert(sect2);
/* Sanity check some assumptions about the indirect sections */
- HDassert(sect1->u.indirect.span_size > 0);
- HDassert(sect2->u.indirect.span_size > 0);
+ assert(sect1->u.indirect.span_size > 0);
+ assert(sect2->u.indirect.span_size > 0);
/* Set up span information */
start_row1 = sect1->u.indirect.row;
@@ -3480,8 +3479,8 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
* has child row sections, first indirect section _must_ have
* them also)
*/
- HDassert(sect1->u.indirect.dir_nrows > 0);
- HDassert(sect1->u.indirect.dir_rows);
+ assert(sect1->u.indirect.dir_nrows > 0);
+ assert(sect1->u.indirect.dir_rows);
/* Get the offsets for the indirect blocks under the rows */
if (H5FS_SECT_LIVE == row_sect1->u.row.under->sect_info.state)
@@ -3502,11 +3501,11 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
last_row_sect1 = sect1->u.indirect.dir_rows[sect1->u.indirect.dir_nrows - 1];
else
last_row_sect1 = row_sect1;
- HDassert(last_row_sect1);
- HDassert(last_row_sect1->u.row.row == end_row1);
+ assert(last_row_sect1);
+ assert(last_row_sect1->u.row.row == end_row1);
/* Adjust info for first row section, to absorb second row section */
- HDassert((last_row_sect1->u.row.col + last_row_sect1->u.row.num_entries) == row_sect2->u.row.col);
+ assert((last_row_sect1->u.row.col + last_row_sect1->u.row.num_entries) == row_sect2->u.row.col);
last_row_sect1->u.row.num_entries += row_sect2->u.row.num_entries;
/* Set up parameters for transfer of rows */
@@ -3564,9 +3563,9 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
unsigned new_indir_nents1; /* New value for number of indirect entries in first section */
/* Some sanity checks on second indirect section */
- HDassert(sect2->u.indirect.rc > 0);
- HDassert(sect2->u.indirect.indir_nents > 0);
- HDassert(sect2->u.indirect.indir_ents);
+ assert(sect2->u.indirect.rc > 0);
+ assert(sect2->u.indirect.indir_nents > 0);
+ assert(sect2->u.indirect.indir_ents);
/* Set up parameters for transfer of entries */
new_indir_nents1 = sect1->u.indirect.indir_nents + sect2->u.indirect.indir_nents;
@@ -3608,7 +3607,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
sect1->u.indirect.span_size += sect2->u.indirect.span_size;
/* Make certain we've tracked the first section's dependents correctly */
- HDassert(sect1->u.indirect.rc == (sect1->u.indirect.indir_nents + sect1->u.indirect.dir_nrows));
+ assert(sect1->u.indirect.rc == (sect1->u.indirect.indir_nents + sect1->u.indirect.dir_nrows));
/* Wrap up, freeing or re-inserting second row section */
/* (want this to be after the first indirect section is consistent again) */
@@ -3617,13 +3616,13 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
/* (indirectly releases second indirect section, since all of it's
* other dependents are gone)
*/
- HDassert(sect2->u.indirect.rc == 1);
+ assert(sect2->u.indirect.rc == 1);
if (H5HF__sect_row_free((H5FS_section_info_t *)row_sect2) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free row section")
} /* end if */
else {
/* Decrement ref. count on second indirect section's parent */
- HDassert(sect2->u.indirect.rc == 0);
+ assert(sect2->u.indirect.rc == 0);
if (sect2->u.indirect.parent)
if (H5HF__sect_indirect_decr(sect2->u.indirect.parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL,
@@ -3646,7 +3645,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H
/* (i.e. merged indirect sections cover an entire indirect block) */
if (sect1->u.indirect.iblock_entries == sect1->u.indirect.num_entries) {
/* Build parent section for fully populated indirect section */
- HDassert(sect1->u.indirect.parent == NULL);
+ assert(sect1->u.indirect.parent == NULL);
if (H5HF__sect_indirect_build_parent(hdr, sect1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create parent for full indirect section")
} /* end if */
@@ -3681,14 +3680,14 @@ H5HF__sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
/* Sanity check parameters */
- HDassert(hdr);
- HDassert(sect);
- HDassert(H5FS_SECT_LIVE == sect->sect_info.state);
- HDassert(sect->u.indirect.span_size > 0);
- HDassert(sect->u.indirect.iblock_entries > 0);
- HDassert(sect->u.indirect.iblock_entries == sect->u.indirect.num_entries);
- HDassert(sect->u.indirect.u.iblock);
- HDassert(sect->u.indirect.parent == NULL);
+ assert(hdr);
+ assert(sect);
+ assert(H5FS_SECT_LIVE == sect->sect_info.state);
+ assert(sect->u.indirect.span_size > 0);
+ assert(sect->u.indirect.iblock_entries > 0);
+ assert(sect->u.indirect.iblock_entries == sect->u.indirect.num_entries);
+ assert(sect->u.indirect.u.iblock);
+ assert(sect->u.indirect.parent == NULL);
/* Get information for creating parent indirect section */
if (sect->u.indirect.u.iblock->parent) {
@@ -3706,7 +3705,7 @@ H5HF__sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
/* Compute row & column for block in parent */
par_row = par_entry / hdr->man_dtable.cparam.width;
par_col = par_entry % hdr->man_dtable.cparam.width;
- HDassert(par_row >= hdr->man_dtable.max_direct_rows);
+ assert(par_row >= hdr->man_dtable.max_direct_rows);
/* Create parent indirect section */
if (NULL == (par_sect = H5HF__sect_indirect_new(hdr, sect->sect_info.addr, sect->sect_info.size,
@@ -3759,17 +3758,17 @@ H5HF__sect_indirect_shrink(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
/* Sanity check parameters */
- HDassert(hdr);
- HDassert(sect);
+ assert(hdr);
+ assert(sect);
/* Sanity check some assumptions about the indirect section */
- HDassert(sect->u.indirect.dir_nrows > 0 || sect->u.indirect.indir_nents > 0);
+ assert(sect->u.indirect.dir_nrows > 0 || sect->u.indirect.indir_nents > 0);
/* Walk through direct rows, freeing them */
for (u = 0; u < sect->u.indirect.dir_nrows; u++) {
/* Remove the normal rows from free space manager */
if (sect->u.indirect.dir_rows[u]->sect_info.type != H5HF_FSPACE_SECT_FIRST_ROW) {
- HDassert(sect->u.indirect.dir_rows[u]->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ assert(sect->u.indirect.dir_rows[u]->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
if (H5HF__space_remove(hdr, sect->u.indirect.dir_rows[u]) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove section from heap free space")
} /* end if */
@@ -3814,9 +3813,9 @@ H5HF__sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(sect);
- HDassert(buf);
+ assert(hdr);
+ assert(sect);
+ assert(buf);
/* Check if this indirect section has a parent & forward if this section is first */
if (sect->u.indirect.parent) {
@@ -3828,7 +3827,7 @@ H5HF__sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
else {
/* Indirect range's indirect block's block offset */
if (sect->sect_info.state == H5FS_SECT_LIVE) {
- HDassert(sect->u.indirect.u.iblock);
+ assert(sect->u.indirect.u.iblock);
UINT64ENCODE_VAR(buf, sect->u.indirect.u.iblock->block_off, hdr->heap_off_size);
} /* end if */
else
@@ -3879,10 +3878,10 @@ H5HF__sect_indirect_deserialize(H5HF_hdr_t *hdr, const uint8_t *buf, haddr_t sec
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(hdr);
- HDassert(buf);
- HDassert(H5F_addr_defined(sect_addr));
- HDassert(sect_size);
+ assert(hdr);
+ assert(buf);
+ assert(H5F_addr_defined(sect_addr));
+ assert(sect_size);
/* Indirect range's indirect block's block offset */
UINT64DECODE_VAR(buf, iblock_off, hdr->heap_off_size);
@@ -3947,7 +3946,7 @@ H5HF__sect_indirect_free(H5HF_free_section_t *sect)
FUNC_ENTER_PACKAGE
- HDassert(sect);
+ assert(sect);
/* Release the memory for tracking direct rows */
sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.dir_rows);
@@ -3995,8 +3994,8 @@ H5HF__sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check arguments */
- HDassert(hdr);
- HDassert(sect);
+ assert(hdr);
+ assert(sect);
/* Compute starting entry, column & row */
start_row = sect->u.indirect.row;
@@ -4020,22 +4019,22 @@ H5HF__sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect
/* Iterate over direct rows, checking pointer references */
dir_nrows = (max_dir_row - start_row) + 1;
- HDassert(dir_nrows == sect->u.indirect.dir_nrows);
+ assert(dir_nrows == sect->u.indirect.dir_nrows);
for (u = 0; u < dir_nrows; u++) {
const H5HF_free_section_t H5_ATTR_NDEBUG_UNUSED *tmp_row_sect; /* Pointer to row section */
tmp_row_sect = sect->u.indirect.dir_rows[u];
- HDassert(tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
- tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
- HDassert(tmp_row_sect->u.row.under == sect);
- HDassert(tmp_row_sect->u.row.row == (start_row + u));
+ assert(tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ||
+ tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
+ assert(tmp_row_sect->u.row.under == sect);
+ assert(tmp_row_sect->u.row.row == (start_row + u));
if (u > 0) {
const H5HF_free_section_t H5_ATTR_NDEBUG_UNUSED *tmp_row_sect2; /* Pointer to row section */
tmp_row_sect2 = sect->u.indirect.dir_rows[u - 1];
- HDassert(tmp_row_sect2->u.row.row < tmp_row_sect->u.row.row);
- HDassert(H5F_addr_lt(tmp_row_sect2->sect_info.addr, tmp_row_sect->sect_info.addr));
- HDassert(tmp_row_sect2->sect_info.size <= tmp_row_sect->sect_info.size);
+ assert(tmp_row_sect2->u.row.row < tmp_row_sect->u.row.row);
+ assert(H5F_addr_lt(tmp_row_sect2->sect_info.addr, tmp_row_sect->sect_info.addr));
+ assert(tmp_row_sect2->sect_info.size <= tmp_row_sect->sect_info.size);
} /* end if */
} /* end for */
} /* end if */
@@ -4044,24 +4043,24 @@ H5HF__sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect
if (sect->u.indirect.indir_nents > 0) {
/* Basic sanity checks */
if (sect->sect_info.state == H5FS_SECT_LIVE) {
- HDassert(sect->u.indirect.iblock_entries);
- HDassert(sect->u.indirect.indir_nents <= sect->u.indirect.iblock_entries);
+ assert(sect->u.indirect.iblock_entries);
+ assert(sect->u.indirect.indir_nents <= sect->u.indirect.iblock_entries);
} /* end if */
- HDassert(sect->u.indirect.indir_ents);
+ assert(sect->u.indirect.indir_ents);
/* Sanity check each child indirect section */
for (u = 0; u < sect->u.indirect.indir_nents; u++) {
const H5HF_free_section_t *tmp_child_sect; /* Pointer to child indirect section */
tmp_child_sect = sect->u.indirect.indir_ents[u];
- HDassert(tmp_child_sect->sect_info.type == H5HF_FSPACE_SECT_INDIRECT);
- HDassert(tmp_child_sect->u.indirect.parent == sect);
+ assert(tmp_child_sect->sect_info.type == H5HF_FSPACE_SECT_INDIRECT);
+ assert(tmp_child_sect->u.indirect.parent == sect);
if (u > 0) {
const H5HF_free_section_t H5_ATTR_NDEBUG_UNUSED
*tmp_child_sect2; /* Pointer to child indirect section */
tmp_child_sect2 = sect->u.indirect.indir_ents[u - 1];
- HDassert(H5F_addr_lt(tmp_child_sect2->sect_info.addr, tmp_child_sect->sect_info.addr));
+ assert(H5F_addr_lt(tmp_child_sect2->sect_info.addr, tmp_child_sect->sect_info.addr));
} /* end if */
/* Recursively check child indirect section */
@@ -4092,12 +4091,12 @@ H5HF__sect_indirect_debug(const H5HF_free_section_t *sect, FILE *stream, int ind
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
/* Print indirect section information */
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.indirect.row);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.indirect.col);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.indirect.num_entries);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Row:", sect->u.indirect.row);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Column:", sect->u.indirect.col);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of entries:", sect->u.indirect.num_entries);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF__sect_indirect_debug() */
diff --git a/src/H5HFspace.c b/src/H5HFspace.c
index 53b4c49..1a5c001 100644
--- a/src/H5HFspace.c
+++ b/src/H5HFspace.c
@@ -96,7 +96,7 @@ H5HF__space_start(H5HF_hdr_t *hdr, hbool_t may_create)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Check for creating free space info for the heap */
if (H5F_addr_defined(hdr->fs_addr)) {
@@ -122,7 +122,7 @@ H5HF__space_start(H5HF_hdr_t *hdr, hbool_t may_create)
(hdr->fspace = H5FS_create(hdr->f, &hdr->fs_addr, &fs_create, NELMTS(classes), classes, hdr,
(hsize_t)H5HF_FSPACE_THRHD_DEF, (hsize_t)H5HF_FSPACE_ALIGN_DEF)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize free space info")
- HDassert(H5F_addr_defined(hdr->fs_addr));
+ assert(H5F_addr_defined(hdr->fs_addr));
} /* end if */
} /* end else */
@@ -155,8 +155,8 @@ H5HF__space_add(H5HF_hdr_t *hdr, H5HF_free_section_t *node, unsigned flags)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(node);
+ assert(hdr);
+ assert(node);
/* Check if the free space for the heap has been initialized */
if (!hdr->fspace)
@@ -198,9 +198,9 @@ H5HF__space_find(H5HF_hdr_t *hdr, hsize_t request, H5HF_free_section_t **node)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(request);
- HDassert(node);
+ assert(hdr);
+ assert(request);
+ assert(node);
/* Check if the free space for the heap has been initialized */
if (!hdr->fspace)
@@ -245,12 +245,12 @@ H5HF__space_revert_root_cb(H5FS_section_info_t *_sect, void H5_ATTR_UNUSED *_uda
/*
* Check arguments.
*/
- HDassert(sect);
+ assert(sect);
/* Only modify "live" single blocks... */
if (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE && sect->sect_info.state == H5FS_SECT_LIVE) {
/* Release hold on previous indirect block (we must have one) */
- HDassert(sect->u.single.parent);
+ assert(sect->u.single.parent);
if (H5HF__iblock_decr(sect->u.single.parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL,
"can't decrement reference count on section's indirect block")
@@ -288,7 +288,7 @@ H5HF__space_revert_root(const H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Only need to scan the sections if the free space has been initialized */
if (hdr->fspace)
@@ -327,13 +327,13 @@ H5HF__space_create_root_cb(H5FS_section_info_t *_sect, void *_udata)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(root_iblock);
+ assert(sect);
+ assert(root_iblock);
/* Sanity check sections */
/* (If we are switching from a direct block for the root block of the heap, */
/* there should only be 'single' type sections. -QAK) */
- HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
+ assert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
/* Increment ref. count on new root indirect block */
if (H5HF__iblock_incr(root_iblock) < 0)
@@ -344,7 +344,7 @@ H5HF__space_create_root_cb(H5FS_section_info_t *_sect, void *_udata)
if (sect->sect_info.state == H5FS_SECT_SERIALIZED)
sect->sect_info.state = H5FS_SECT_LIVE; /* Mark "live" now */
else
- HDassert(!sect->u.single.parent);
+ assert(!sect->u.single.parent);
sect->u.single.parent = root_iblock;
sect->u.single.par_entry = 0;
@@ -377,8 +377,8 @@ H5HF__space_create_root(const H5HF_hdr_t *hdr, H5HF_indirect_t *root_iblock)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(root_iblock);
+ assert(hdr);
+ assert(root_iblock);
/* Only need to scan the sections if the free space has been initialized */
if (hdr->fspace)
@@ -414,8 +414,8 @@ H5HF__space_size(H5HF_hdr_t *hdr, hsize_t *fs_size)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(fs_size);
+ assert(hdr);
+ assert(fs_size);
/* Check if the free space for the heap has been initialized */
if (!hdr->fspace)
@@ -457,9 +457,9 @@ H5HF__space_remove(H5HF_hdr_t *hdr, H5HF_free_section_t *node)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(hdr->fspace);
- HDassert(node);
+ assert(hdr);
+ assert(hdr->fspace);
+ assert(node);
/* Remove from the free space for the heap */
if (H5FS_sect_remove(hdr->f, hdr->fspace, (H5FS_section_info_t *)node) < 0)
@@ -493,7 +493,7 @@ H5HF__space_close(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Check if the free space was ever opened */
if (hdr->fspace) {
@@ -543,7 +543,7 @@ H5HF__space_delete(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Delete the free space manager */
if (H5FS_delete(hdr->f, hdr->fs_addr) < 0)
@@ -577,9 +577,9 @@ H5HF__space_sect_change_class(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, uint16
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(hdr->fspace);
- HDassert(sect);
+ assert(hdr);
+ assert(hdr->fspace);
+ assert(sect);
/* Notify the free space manager that a section has changed class */
if (H5FS_sect_change_class(hdr->f, hdr->fspace, (H5FS_section_info_t *)sect, new_class) < 0)
diff --git a/src/H5HFstat.c b/src/H5HFstat.c
index 79ce15f..900fbc7 100644
--- a/src/H5HFstat.c
+++ b/src/H5HFstat.c
@@ -78,8 +78,8 @@ H5HF_stat_info(const H5HF_t *fh, H5HF_stat_t *stats)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
- HDassert(stats);
+ assert(fh);
+ assert(stats);
/* Report statistics for fractal heap */
stats->man_size = fh->hdr->man_size;
@@ -124,8 +124,8 @@ H5HF_size(const H5HF_t *fh, hsize_t *heap_size)
/*
* Check arguments.
*/
- HDassert(fh);
- HDassert(heap_size);
+ assert(fh);
+ assert(heap_size);
/* Get "convenience" pointer to fractal heap header */
hdr = fh->hdr;
diff --git a/src/H5HFtest.c b/src/H5HFtest.c
index 14199ee..35d16b2 100644
--- a/src/H5HFtest.c
+++ b/src/H5HFtest.c
@@ -80,8 +80,8 @@ H5HF_get_cparam_test(const H5HF_t *fh, H5HF_create_t *cparam)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
- HDassert(cparam);
+ assert(fh);
+ assert(cparam);
/* Get fractal heap creation parameters */
if (fh->hdr->id_len == (unsigned)(1 + fh->hdr->heap_off_size + fh->hdr->heap_len_size))
@@ -118,8 +118,8 @@ H5HF_cmp_cparam_test(const H5HF_create_t *cparam1, const H5HF_create_t *cparam2)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(cparam1);
- HDassert(cparam2);
+ assert(cparam1);
+ assert(cparam2);
/* Compare doubling table parameters */
if (cparam1->managed.width < cparam2->managed.width)
@@ -234,7 +234,7 @@ H5HF_get_max_root_rows(const H5HF_t *fh)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
+ assert(fh);
/* Return max. # of rows in root indirect block */
ret_value = fh->hdr->man_dtable.max_root_rows;
@@ -264,7 +264,7 @@ H5HF_get_dtable_width_test(const H5HF_t *fh)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
+ assert(fh);
/* Return width of doubling table */
ret_value = fh->hdr->man_dtable.cparam.width;
@@ -294,7 +294,7 @@ H5HF_get_dtable_max_drows_test(const H5HF_t *fh)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
+ assert(fh);
/* Return max. # of direct blocks in any indirect block */
ret_value = fh->hdr->man_dtable.max_direct_rows;
@@ -328,8 +328,8 @@ H5HF_get_iblock_max_drows_test(const H5HF_t *fh, unsigned pos)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
- HDassert(pos);
+ assert(fh);
+ assert(pos);
/* Return max. # of direct blocks in this indirect block row */
ret_value = pos + (fh->hdr->man_dtable.max_direct_bits - fh->hdr->man_dtable.first_row_bits) + 1;
@@ -359,7 +359,7 @@ H5HF_get_dblock_size_test(const H5HF_t *fh, unsigned row)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
+ assert(fh);
/* Return direct block free space */
ret_value = fh->hdr->man_dtable.row_block_size[row];
@@ -390,7 +390,7 @@ H5HF_get_dblock_free_test(const H5HF_t *fh, unsigned row)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
+ assert(fh);
/* Return direct block free space */
ret_value = fh->hdr->man_dtable.row_tot_dblock_free[row];
@@ -420,10 +420,10 @@ H5HF_get_id_off_test(const H5HF_t *fh, const void *_id, hsize_t *obj_off)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
- HDassert(fh->hdr);
- HDassert(id);
- HDassert(obj_off);
+ assert(fh);
+ assert(fh->hdr);
+ assert(id);
+ assert(obj_off);
/* Get the offset for a 'normal' heap ID */
id++;
@@ -453,8 +453,8 @@ H5HF_get_id_type_test(const void *_id, unsigned char *obj_type)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(id);
- HDassert(obj_type);
+ assert(id);
+ assert(obj_type);
/* Get the type for a heap ID */
*obj_type = (uint8_t)(*id & H5HF_ID_TYPE_MASK);
@@ -481,10 +481,10 @@ H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len, hbool_t *len_extended
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
- HDassert(fh->hdr);
- HDassert(max_len);
- HDassert(len_extended);
+ assert(fh);
+ assert(fh->hdr);
+ assert(max_len);
+ assert(len_extended);
/* Retrieve information about tiny object's ID encoding in a heap */
*max_len = fh->hdr->tiny_max_len;
@@ -512,9 +512,9 @@ H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id, hbool_t *ids_direct)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
- HDassert(fh);
- HDassert(fh->hdr);
- HDassert(ids_direct);
+ assert(fh);
+ assert(fh->hdr);
+ assert(ids_direct);
/* Retrieve information about tiny object's ID encoding in a heap */
if (next_id)
diff --git a/src/H5HFtiny.c b/src/H5HFtiny.c
index 0a44640..5a0f0d7 100644
--- a/src/H5HFtiny.c
+++ b/src/H5HFtiny.c
@@ -91,7 +91,7 @@ H5HF__tiny_init(H5HF_hdr_t *hdr)
/*
* Check arguments.
*/
- HDassert(hdr);
+ assert(hdr);
/* Compute information about 'tiny' objects for the heap */
@@ -140,11 +140,11 @@ H5HF__tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(obj_size <= hdr->tiny_max_len);
- HDassert(obj_size <= (H5HF_TINY_MASK_EXT + 1));
- HDassert(obj);
- HDassert(id);
+ assert(hdr);
+ assert(obj_size <= hdr->tiny_max_len);
+ assert(obj_size <= (H5HF_TINY_MASK_EXT + 1));
+ assert(obj);
+ assert(id);
/* Adjust object's size for encoding it */
enc_obj_size = obj_size - 1;
@@ -160,7 +160,7 @@ H5HF__tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
} /* end else */
H5MM_memcpy(id, obj, obj_size);
- HDmemset(id + obj_size, 0, (hdr->id_len - ((size_t)1 + (size_t)hdr->tiny_len_extended + obj_size)));
+ memset(id + obj_size, 0, (hdr->id_len - ((size_t)1 + (size_t)hdr->tiny_len_extended + obj_size)));
/* Update statistics about heap */
hdr->tiny_size += obj_size;
@@ -196,9 +196,9 @@ H5HF__tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj_len_p);
+ assert(hdr);
+ assert(id);
+ assert(obj_len_p);
/* Check if 'tiny' object ID is in extended form, and retrieve encoded size */
if (!hdr->tiny_len_extended)
@@ -238,9 +238,9 @@ H5HF__tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(op);
+ assert(hdr);
+ assert(id);
+ assert(op);
/* Get the object's encoded length */
/* H5HF__tiny_obj_len can't fail */
@@ -287,9 +287,9 @@ H5HF__tiny_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(obj);
+ assert(hdr);
+ assert(id);
+ assert(obj);
/* Call the internal 'op' routine */
if (H5HF__tiny_op_real(hdr, id, H5HF__op_read, obj) < 0)
@@ -321,9 +321,9 @@ H5HF__tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_d
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
- HDassert(op);
+ assert(hdr);
+ assert(id);
+ assert(op);
/* Call the internal 'op' routine routine */
if (H5HF__tiny_op_real(hdr, id, op, op_data) < 0)
@@ -356,8 +356,8 @@ H5HF__tiny_remove(H5HF_hdr_t *hdr, const uint8_t *id)
/*
* Check arguments.
*/
- HDassert(hdr);
- HDassert(id);
+ assert(hdr);
+ assert(id);
/* Get the object's encoded length */
/* H5HF__tiny_obj_len can't fail */
diff --git a/src/H5HG.c b/src/H5HG.c
index e5800ff..f608489 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -131,7 +131,7 @@ H5HG__create(H5F_t *f, size_t size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
+ assert(f);
if (size < H5HG_MINSIZE)
size = H5HG_MINSIZE;
size = H5HG_ALIGN(size);
@@ -148,7 +148,7 @@ H5HG__create(H5F_t *f, size_t size)
if (NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
- HDmemset(heap->chunk, 0, size);
+ memset(heap->chunk, 0, size);
heap->nalloc = H5HG_NOBJS(f, size);
heap->nused = 1; /* account for index 0, which is used for the free object */
if (NULL == (heap->obj = H5FL_SEQ_MALLOC(H5HG_obj_t, heap->nalloc)))
@@ -171,13 +171,13 @@ H5HG__create(H5F_t *f, size_t size)
n = (size_t)H5HG_ALIGN(p - heap->chunk) - (size_t)(p - heap->chunk);
#ifdef OLD_WAY
/* Don't bother zeroing out the rest of the info in the heap -QAK */
- HDmemset(p, 0, n);
+ memset(p, 0, n);
#endif /* OLD_WAY */
p += n;
/* The freespace object */
heap->obj[0].size = size - H5HG_SIZEOF_HDR(f);
- HDassert(H5HG_ISALIGNED(heap->obj[0].size));
+ assert(H5HG_ISALIGNED(heap->obj[0].size));
heap->obj[0].nrefs = 0;
heap->obj[0].begin = p;
UINT16ENCODE(p, 0); /*object ID*/
@@ -186,7 +186,7 @@ H5HG__create(H5F_t *f, size_t size)
H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
#ifdef OLD_WAY
/* Don't bother zeroing out the rest of the info in the heap -QAK */
- HDmemset(p, 0, (size_t)((heap->chunk + heap->size) - p));
+ memset(p, 0, (size_t)((heap->chunk + heap->size) - p));
#endif /* OLD_WAY */
/* Add this heap to the beginning of the CWFS list */
@@ -241,11 +241,11 @@ H5HG__protect(H5F_t *f, haddr_t addr, unsigned flags)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* only H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Lock the heap into memory */
if (NULL == (heap = (H5HG_heap_t *)H5AC_protect(f, H5AC_GHEAP, addr, f, flags)))
@@ -290,9 +290,9 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(heap);
- HDassert(heap->obj[0].size >= need);
- HDassert(heap_flags_ptr);
+ assert(heap);
+ assert(heap->obj[0].size >= need);
+ assert(heap_flags_ptr);
/*
* Find an ID for the new object. ID zero is reserved for the free space
@@ -306,7 +306,7 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
break;
} /* end else */
- HDassert(idx < heap->nused);
+ assert(idx < heap->nused);
/* Check if we need more room to store heap objects */
if (idx >= heap->nalloc) {
@@ -316,19 +316,19 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
/* Determine the new number of objects to index */
/* nalloc is *not* guaranteed to be a power of 2! - NAF 10/26/09 */
new_alloc = MIN(MAX(heap->nalloc * 2, (idx + 1)), (H5HG_MAXIDX + 1));
- HDassert(idx < new_alloc);
+ assert(idx < new_alloc);
/* Reallocate array of objects */
if (NULL == (new_obj = H5FL_SEQ_REALLOC(H5HG_obj_t, heap->obj, new_alloc)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, 0, "memory allocation failed")
/* Clear newly allocated space */
- HDmemset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0]));
+ memset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0]));
/* Update heap information */
heap->nalloc = new_alloc;
heap->obj = new_obj;
- HDassert(heap->nalloc > heap->nused);
+ assert(heap->nalloc > heap->nused);
} /* end if */
/* Initialize the new object */
@@ -361,7 +361,7 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
UINT16ENCODE(p, 0); /*nrefs*/
UINT32ENCODE(p, 0); /*reserved*/
H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
- HDassert(H5HG_ISALIGNED(heap->obj[0].size));
+ assert(H5HG_ISALIGNED(heap->obj[0].size));
} /* end else-if */
else {
/*
@@ -370,7 +370,7 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
*/
heap->obj[0].size -= need;
heap->obj[0].begin += need;
- HDassert(H5HG_ISALIGNED(heap->obj[0].size));
+ assert(H5HG_ISALIGNED(heap->obj[0].size));
}
/* Mark the heap as dirty */
@@ -414,8 +414,8 @@ H5HG_extend(H5F_t *f, haddr_t addr, size_t need)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Protect the heap */
if (NULL == (heap = H5HG__protect(f, addr, H5AC__NO_FLAGS_SET)))
@@ -424,7 +424,7 @@ H5HG_extend(H5F_t *f, haddr_t addr, size_t need)
/* Re-allocate the heap information in memory */
if (NULL == (new_chunk = H5FL_BLK_REALLOC(gheap_chunk, heap->chunk, (heap->size + need))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "new heap allocation failed")
- HDmemset(new_chunk + heap->size, 0, need);
+ memset(new_chunk + heap->size, 0, need);
/* Adjust the size of the heap */
old_size = heap->size;
@@ -451,7 +451,7 @@ H5HG_extend(H5F_t *f, haddr_t addr, size_t need)
UINT16ENCODE(p, 0); /*nrefs*/
UINT32ENCODE(p, 0); /*reserved*/
H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
- HDassert(H5HG_ISALIGNED(heap->obj[0].size));
+ assert(H5HG_ISALIGNED(heap->obj[0].size));
/* Resize the heap in the cache */
if (H5AC_resize_entry(heap, heap->size) < 0)
@@ -502,9 +502,9 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/)
FUNC_ENTER_NOAPI_TAG(H5AC__GLOBALHEAP_TAG, FAIL)
/* Check args */
- HDassert(f);
- HDassert(0 == size || obj);
- HDassert(hobj);
+ assert(f);
+ assert(0 == size || obj);
+ assert(hobj);
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
@@ -527,7 +527,7 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/)
if (!H5F_addr_defined(addr))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to allocate a global heap collection")
} /* end if */
- HDassert(H5F_addr_defined(addr));
+ assert(H5F_addr_defined(addr));
if (NULL == (heap = H5HG__protect(f, addr, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
@@ -541,8 +541,7 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/)
H5MM_memcpy(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f), obj, size);
#ifdef OLD_WAY
/* Don't bother zeroing out the rest of the info in the heap -QAK */
- HDmemset(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f) + size, 0,
- need - (H5HG_SIZEOF_OBJHDR(f) + size));
+ memset(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f) + size, 0, need - (H5HG_SIZEOF_OBJHDR(f) + size));
#endif /* OLD_WAY */
} /* end if */
heap_flags |= H5AC__DIRTIED_FLAG;
@@ -587,15 +586,15 @@ H5HG_read(H5F_t *f, H5HG_t *hobj, void *object /*out*/, size_t *buf_size)
FUNC_ENTER_NOAPI_TAG(H5AC__GLOBALHEAP_TAG, NULL)
/* Check args */
- HDassert(f);
- HDassert(hobj);
+ assert(f);
+ assert(hobj);
/* Load the heap */
if (NULL == (heap = H5HG__protect(f, hobj->addr, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect global heap")
- HDassert(hobj->idx < heap->nused);
- HDassert(heap->obj[hobj->idx].begin);
+ assert(hobj->idx < heap->nused);
+ assert(heap->obj[hobj->idx].begin);
size = heap->obj[hobj->idx].size;
p = heap->obj[hobj->idx].begin + H5HG_SIZEOF_OBJHDR(f);
@@ -658,8 +657,8 @@ H5HG_link(H5F_t *f, const H5HG_t *hobj, int adjust)
FUNC_ENTER_NOAPI_TAG(H5AC__GLOBALHEAP_TAG, FAIL)
/* Check args */
- HDassert(f);
- HDassert(hobj);
+ assert(f);
+ assert(hobj);
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
@@ -668,8 +667,8 @@ H5HG_link(H5F_t *f, const H5HG_t *hobj, int adjust)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
if (adjust != 0) {
- HDassert(hobj->idx < heap->nused);
- HDassert(heap->obj[hobj->idx].begin);
+ assert(hobj->idx < heap->nused);
+ assert(heap->obj[hobj->idx].begin);
if ((heap->obj[hobj->idx].nrefs + adjust) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "new link count would be out of range")
if ((heap->obj[hobj->idx].nrefs + adjust) > H5HG_MAXLINK)
@@ -710,16 +709,16 @@ H5HG_get_obj_size(H5F_t *f, H5HG_t *hobj, size_t *obj_size)
FUNC_ENTER_NOAPI_TAG(H5AC__GLOBALHEAP_TAG, FAIL)
/* Check args */
- HDassert(f);
- HDassert(hobj);
- HDassert(obj_size);
+ assert(f);
+ assert(hobj);
+ assert(obj_size);
/* Load the heap */
if (NULL == (heap = H5HG__protect(f, hobj->addr, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
- HDassert(hobj->idx < heap->nused);
- HDassert(heap->obj[hobj->idx].begin);
+ assert(hobj->idx < heap->nused);
+ assert(heap->obj[hobj->idx].begin);
/* Set object size */
*obj_size = heap->obj[hobj->idx].size;
@@ -756,8 +755,8 @@ H5HG_remove(H5F_t *f, H5HG_t *hobj)
FUNC_ENTER_NOAPI_TAG(H5AC__GLOBALHEAP_TAG, FAIL)
/* Check args */
- HDassert(f);
- HDassert(hobj);
+ assert(f);
+ assert(hobj);
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
@@ -765,7 +764,7 @@ H5HG_remove(H5F_t *f, H5HG_t *hobj)
if (NULL == (heap = H5HG__protect(f, hobj->addr, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
- HDassert(hobj->idx < heap->nused);
+ assert(hobj->idx < heap->nused);
/* When the application selects the same location to rewrite the VL element by using H5Sselect_elements,
* it can happen that the entry has been removed by first rewrite. Here we simply skip the removal of
@@ -797,7 +796,7 @@ H5HG_remove(H5F_t *f, H5HG_t *hobj)
UINT32ENCODE(p, 0); /*reserved*/
H5F_ENCODE_LENGTH(f, p, heap->obj[0].size);
} /* end if */
- HDmemset(heap->obj + hobj->idx, 0, sizeof(H5HG_obj_t));
+ memset(heap->obj + hobj->idx, 0, sizeof(H5HG_obj_t));
flags |= H5AC__DIRTIED_FLAG;
if ((heap->obj[0].size + H5HG_SIZEOF_HDR(f)) == heap->size) {
@@ -846,7 +845,7 @@ H5HG__free(H5HG_heap_t *heap)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(heap);
+ assert(heap);
/* Remove the heap from the CWFS list */
if (H5F_cwfs_remove_heap(heap->shared, heap) < 0)
diff --git a/src/H5HGcache.c b/src/H5HGcache.c
index bbfae7c..1818900 100644
--- a/src/H5HGcache.c
+++ b/src/H5HGcache.c
@@ -109,14 +109,14 @@ H5HG__hdr_deserialize(H5HG_heap_t *heap, const uint8_t *image, size_t len, const
FUNC_ENTER_PACKAGE
- HDassert(heap);
- HDassert(image);
- HDassert(f);
+ assert(heap);
+ assert(image);
+ assert(f);
/* Magic number */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- if (HDmemcmp(image, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad global heap collection signature")
image += H5_SIZEOF_MAGIC;
@@ -159,7 +159,7 @@ H5HG__cache_heap_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *imag
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image_len);
+ assert(image_len);
*image_len = H5HG_MINSIZE;
@@ -183,11 +183,11 @@ H5HG__cache_heap_get_final_load_size(const void *image, size_t image_len, void *
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
- HDassert(image_len == H5HG_MINSIZE);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
+ assert(image_len == H5HG_MINSIZE);
/* Deserialize the heap's header */
if (H5HG__hdr_deserialize(&heap, (const uint8_t *)image, image_len, (const H5F_t *)udata) < 0)
@@ -225,10 +225,10 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool
FUNC_ENTER_PACKAGE
- HDassert(_image);
- HDassert(len >= (size_t)H5HG_MINSIZE);
- HDassert(f);
- HDassert(dirty);
+ assert(_image);
+ assert(len >= (size_t)H5HG_MINSIZE);
+ assert(f);
+ assert(dirty);
/* Allocate a new global heap */
if (NULL == (heap = H5FL_CALLOC(H5HG_heap_t)))
@@ -311,7 +311,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear newly allocated space */
- HDmemset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0]));
+ memset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0]));
/* Update heap information */
heap->nalloc = new_alloc;
@@ -410,11 +410,11 @@ H5HG__cache_heap_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(heap);
- HDassert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(heap->cache_info.type == H5AC_GHEAP);
- HDassert(heap->size >= H5HG_MINSIZE);
- HDassert(image_len);
+ assert(heap);
+ assert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(heap->cache_info.type == H5AC_GHEAP);
+ assert(heap->size >= H5HG_MINSIZE);
+ assert(image_len);
*image_len = heap->size;
@@ -439,13 +439,13 @@ H5HG__cache_heap_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image, si
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(image);
- HDassert(heap);
- HDassert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(heap->cache_info.type == H5AC_GHEAP);
- HDassert(heap->size == len);
- HDassert(heap->chunk);
+ assert(f);
+ assert(image);
+ assert(heap);
+ assert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(heap->cache_info.type == H5AC_GHEAP);
+ assert(heap->size == len);
+ assert(heap->chunk);
/* Copy the image into the buffer */
H5MM_memcpy(image, heap->chunk, len);
@@ -473,9 +473,9 @@ H5HG__cache_heap_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(heap);
- HDassert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(heap->cache_info.type == H5AC_GHEAP);
+ assert(heap);
+ assert(heap->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(heap->cache_info.type == H5AC_GHEAP);
/* Destroy global heap collection */
if (H5HG__free(heap) < 0)
diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c
index 6da4855..51810b8 100644
--- a/src/H5HGdbg.c
+++ b/src/H5HGdbg.c
@@ -83,19 +83,19 @@ H5HG_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
if (NULL == (h = H5HG__protect(f, addr, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap collection");
- HDfprintf(stream, "%*sGlobal Heap Collection...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Dirty:", (int)(h->cache_info.is_dirty));
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Total collection size in file:", (unsigned long)(h->size));
+ fprintf(stream, "%*sGlobal Heap Collection...\n", indent, "");
+ fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Dirty:", (int)(h->cache_info.is_dirty));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Total collection size in file:", (unsigned long)(h->size));
for (u = 1, nused = 0, maxobj = 0; u < h->nused; u++)
if (h->obj[u].begin) {
@@ -103,45 +103,45 @@ H5HG_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
if (u > maxobj)
maxobj = u;
}
- HDfprintf(stream, "%*s%-*s %u/%lu/", indent, "", fwidth, "Objects defined/allocated/max:", nused,
- (unsigned long)h->nalloc);
+ fprintf(stream, "%*s%-*s %u/%lu/", indent, "", fwidth, "Objects defined/allocated/max:", nused,
+ (unsigned long)h->nalloc);
if (nused)
- HDfprintf(stream, "%u\n", maxobj);
+ fprintf(stream, "%u\n", maxobj);
else
- HDfprintf(stream, "NA\n");
+ fprintf(stream, "NA\n");
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Free space:", (unsigned long)(h->obj[0].size));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Free space:", (unsigned long)(h->obj[0].size));
for (u = 1; u < h->nused; u++)
if (h->obj[u].begin) {
char buf[64];
HDsnprintf(buf, sizeof(buf), "Object %u", u);
- HDfprintf(stream, "%*s%s\n", indent, "", buf);
- HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MIN(fwidth - 3, 0),
- "Obffset in block:", (unsigned long)(h->obj[u].begin - h->chunk));
- HDfprintf(stream, "%*s%-*s %d\n", indent + 3, "", MIN(fwidth - 3, 0),
- "Reference count:", h->obj[u].nrefs);
- HDfprintf(stream, "%*s%-*s %lu/%lu\n", indent + 3, "", MIN(fwidth - 3, 0),
- "Size of object body:", (unsigned long)(h->obj[u].size),
- (unsigned long)H5HG_ALIGN(h->obj[u].size));
+ fprintf(stream, "%*s%s\n", indent, "", buf);
+ fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MIN(fwidth - 3, 0),
+ "Obffset in block:", (unsigned long)(h->obj[u].begin - h->chunk));
+ fprintf(stream, "%*s%-*s %d\n", indent + 3, "", MIN(fwidth - 3, 0),
+ "Reference count:", h->obj[u].nrefs);
+ fprintf(stream, "%*s%-*s %lu/%lu\n", indent + 3, "", MIN(fwidth - 3, 0),
+ "Size of object body:", (unsigned long)(h->obj[u].size),
+ (unsigned long)H5HG_ALIGN(h->obj[u].size));
p = h->obj[u].begin + H5HG_SIZEOF_OBJHDR(f);
for (j = 0; j < h->obj[u].size; j += 16) {
- HDfprintf(stream, "%*s%04u: ", indent + 6, "", j);
+ fprintf(stream, "%*s%04u: ", indent + 6, "", j);
for (k = 0; k < 16; k++) {
if (8 == k)
- HDfprintf(stream, " ");
+ fprintf(stream, " ");
if (j + k < h->obj[u].size)
- HDfprintf(stream, "%02x ", p[j + k]);
+ fprintf(stream, "%02x ", p[j + k]);
else
HDfputs(" ", stream);
}
for (k = 0; k < 16 && j + k < h->obj[u].size; k++) {
if (8 == k)
- HDfprintf(stream, " ");
+ fprintf(stream, " ");
HDfputc(p[j + k] > ' ' && p[j + k] <= '~' ? p[j + k] : '.', stream);
}
- HDfprintf(stream, "\n");
+ fprintf(stream, "\n");
}
}
diff --git a/src/H5HGquery.c b/src/H5HGquery.c
index 9e4c789..ac36f21 100644
--- a/src/H5HGquery.c
+++ b/src/H5HGquery.c
@@ -77,7 +77,7 @@ H5HG_get_addr(const H5HG_heap_t *heap)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(heap);
+ assert(heap);
FUNC_LEAVE_NOAPI(heap->addr)
} /* H5HG_get_addr() */
@@ -100,7 +100,7 @@ H5HG_get_size(const H5HG_heap_t *heap)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(heap);
+ assert(heap);
FUNC_LEAVE_NOAPI(heap->size)
} /* H5HG_get_size() */
@@ -123,7 +123,7 @@ H5HG_get_free_size(const H5HG_heap_t *heap)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(heap);
+ assert(heap);
FUNC_LEAVE_NOAPI(heap->obj[0].size)
} /* H5HG_get_free_size() */
diff --git a/src/H5HL.c b/src/H5HL.c
index 47dc651..13c47fa 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -105,8 +105,8 @@ H5HL_create(H5F_t *f, size_t size_hint, haddr_t *addr_p /*out*/)
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(f);
- HDassert(addr_p);
+ assert(f);
+ assert(addr_p);
/* Adjust size hint as necessary */
if (size_hint && size_hint < H5HL_SIZEOF_FREE(f))
@@ -197,8 +197,8 @@ H5HL__minimize_heap_space(H5F_t *f, H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(heap);
+ assert(f);
+ assert(heap);
/* Check to see if we can reduce the size of the heap in memory by
* eliminating free blocks at the tail of the buffer before flushing the
@@ -244,7 +244,7 @@ H5HL__minimize_heap_space(H5F_t *f, H5HL_t *heap)
/* Truncate the free block */
last_fl->size = H5HL_ALIGN(new_heap_size - last_fl->offset);
new_heap_size = last_fl->offset + last_fl->size;
- HDassert(last_fl->size >= H5HL_SIZEOF_FREE(f));
+ assert(last_fl->size >= H5HL_SIZEOF_FREE(f));
}
else {
/* Set the size of the memory buffer to the start
@@ -260,8 +260,8 @@ H5HL__minimize_heap_space(H5F_t *f, H5HL_t *heap)
/* Truncate the free block */
last_fl->size = H5HL_ALIGN(new_heap_size - last_fl->offset);
new_heap_size = last_fl->offset + last_fl->size;
- HDassert(last_fl->size >= H5HL_SIZEOF_FREE(f));
- HDassert(last_fl->size == H5HL_ALIGN(last_fl->size));
+ assert(last_fl->size >= H5HL_SIZEOF_FREE(f));
+ assert(last_fl->size == H5HL_ALIGN(last_fl->size));
}
}
}
@@ -272,7 +272,7 @@ H5HL__minimize_heap_space(H5F_t *f, H5HL_t *heap)
* storage.
*/
if (new_heap_size != heap->dblk_size) {
- HDassert(new_heap_size < heap->dblk_size);
+ assert(new_heap_size < heap->dblk_size);
/* Resize the memory buffer */
if (NULL == (heap->dblk_image = H5FL_BLK_REALLOC(lheap_chunk, heap->dblk_image, new_heap_size)))
@@ -314,11 +314,11 @@ H5HL_protect(H5F_t *f, haddr_t addr, unsigned flags)
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Only the H5AC__READ_ONLY_FLAG may appear in flags */
- HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Construct the user data for protect callback */
prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f);
@@ -391,7 +391,7 @@ H5HL_offset_into(const H5HL_t *heap, size_t offset)
FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
- HDassert(heap);
+ assert(heap);
if (offset >= heap->dblk_size)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, NULL, "unable to offset into local heap data block");
@@ -421,7 +421,7 @@ H5HL_unprotect(H5HL_t *heap)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(heap);
+ assert(heap);
/* Decrement # of times heap is protected */
heap->prots--;
@@ -436,7 +436,7 @@ H5HL_unprotect(H5HL_t *heap)
}
else {
/* Sanity check */
- HDassert(heap->dblk);
+ assert(heap->dblk);
/* Mark local heap data block as evictable again */
/* (data block still pins prefix) */
@@ -503,13 +503,13 @@ H5HL__dirty(H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(heap);
- HDassert(heap->prfx);
+ assert(heap);
+ assert(heap->prfx);
/* Mark heap data block as dirty, if there is one */
if (!heap->single_cache_obj) {
/* Sanity check */
- HDassert(heap->dblk);
+ assert(heap->dblk);
if (FAIL == H5AC_mark_entry_dirty(heap->dblk))
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap data block as dirty");
@@ -551,11 +551,11 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(heap);
- HDassert(buf_size > 0);
- HDassert(buf);
- HDassert(offset_out);
+ assert(f);
+ assert(heap);
+ assert(buf_size > 0);
+ assert(buf);
+ assert(offset_out);
/* Mark heap as dirty in cache */
/* (A bit early in the process, but it's difficult to determine in the
@@ -581,8 +581,8 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
offset = fl->offset;
fl->offset += need_size;
fl->size -= need_size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->offset == H5HL_ALIGN(fl->offset));
+ assert(fl->size == H5HL_ALIGN(fl->size));
found = TRUE;
break;
}
@@ -626,7 +626,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
need_more = need_size;
new_dblk_size = heap->dblk_size + need_more;
- HDassert(heap->dblk_size < new_dblk_size);
+ assert(heap->dblk_size < new_dblk_size);
old_dblk_size = heap->dblk_size;
H5_CHECK_OVERFLOW(heap->dblk_size, size_t, hsize_t);
H5_CHECK_OVERFLOW(new_dblk_size, size_t, hsize_t);
@@ -668,14 +668,14 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
offset = last_fl->offset;
last_fl->offset += need_size;
last_fl->size += need_more - need_size;
- HDassert(last_fl->offset == H5HL_ALIGN(last_fl->offset));
- HDassert(last_fl->size == H5HL_ALIGN(last_fl->size));
+ assert(last_fl->offset == H5HL_ALIGN(last_fl->offset));
+ assert(last_fl->size == H5HL_ALIGN(last_fl->size));
if (last_fl->size < H5HL_SIZEOF_FREE(f)) {
#ifdef H5HL_DEBUG
if (H5DEBUG(HL) && last_fl->size) {
- HDfprintf(H5DEBUG(HL), "H5HL: lost %lu bytes at line %d\n",
- (unsigned long)(last_fl->size), __LINE__);
+ fprintf(H5DEBUG(HL), "H5HL: lost %lu bytes at line %d\n", (unsigned long)(last_fl->size),
+ __LINE__);
}
#endif
last_fl = H5HL__remove_free(heap, last_fl);
@@ -691,8 +691,8 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed");
fl->offset = old_dblk_size + need_size;
fl->size = need_more - need_size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->offset == H5HL_ALIGN(fl->offset));
+ assert(fl->size == H5HL_ALIGN(fl->size));
fl->prev = NULL;
fl->next = heap->freelist;
if (heap->freelist)
@@ -701,16 +701,16 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
#ifdef H5HL_DEBUG
}
else if (H5DEBUG(HL) && need_more > need_size) {
- HDfprintf(H5DEBUG(HL), "H5HL_insert: lost %lu bytes at line %d\n",
- (unsigned long)(need_more - need_size), __LINE__);
+ fprintf(H5DEBUG(HL), "H5HL_insert: lost %lu bytes at line %d\n",
+ (unsigned long)(need_more - need_size), __LINE__);
#endif
}
}
#ifdef H5HL_DEBUG
if (H5DEBUG(HL)) {
- HDfprintf(H5DEBUG(HL), "H5HL: resize mem buf from %lu to %lu bytes\n",
- (unsigned long)(old_dblk_size), (unsigned long)(old_dblk_size + need_more));
+ fprintf(H5DEBUG(HL), "H5HL: resize mem buf from %lu to %lu bytes\n",
+ (unsigned long)(old_dblk_size), (unsigned long)(old_dblk_size + need_more));
}
#endif
if (NULL == (heap->dblk_image = H5FL_BLK_REALLOC(lheap_chunk, heap->dblk_image, heap->dblk_size)))
@@ -718,7 +718,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of
/* Clear new section so junk doesn't appear in the file */
/* (Avoid clearing section which will be overwritten with newly inserted data) */
- HDmemset(heap->dblk_image + offset + buf_size, 0, (new_dblk_size - (offset + buf_size)));
+ memset(heap->dblk_image + offset + buf_size, 0, (new_dblk_size - (offset + buf_size)));
}
/* Copy the data into the heap */
@@ -762,15 +762,15 @@ H5HL_remove(H5F_t *f, H5HL_t *heap, size_t offset, size_t size)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(heap);
- HDassert(size > 0);
- HDassert(offset == H5HL_ALIGN(offset));
+ assert(f);
+ assert(heap);
+ assert(size > 0);
+ assert(offset == H5HL_ALIGN(offset));
size = H5HL_ALIGN(size);
- HDassert(offset < heap->dblk_size);
- HDassert(offset + size <= heap->dblk_size);
+ assert(offset < heap->dblk_size);
+ assert(offset + size <= heap->dblk_size);
/* Mark heap as dirty in cache
*
@@ -793,15 +793,15 @@ H5HL_remove(H5F_t *f, H5HL_t *heap, size_t offset, size_t size)
if ((offset + size) == fl->offset) {
fl->offset = offset;
fl->size += size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->offset == H5HL_ALIGN(fl->offset));
+ assert(fl->size == H5HL_ALIGN(fl->size));
fl2 = fl->next;
while (fl2) {
if ((fl2->offset + fl2->size) == fl->offset) {
fl->offset = fl2->offset;
fl->size += fl2->size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->offset == H5HL_ALIGN(fl->offset));
+ assert(fl->size == H5HL_ALIGN(fl->size));
fl2 = H5HL__remove_free(heap, fl2);
if (((fl->offset + fl->size) == heap->dblk_size) && ((2 * fl->size) > heap->dblk_size)) {
if (FAIL == H5HL__minimize_heap_space(f, heap))
@@ -820,11 +820,11 @@ H5HL_remove(H5F_t *f, H5HL_t *heap, size_t offset, size_t size)
else if (fl->offset + fl->size == offset) {
fl->size += size;
fl2 = fl->next;
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->size == H5HL_ALIGN(fl->size));
while (fl2) {
if (fl->offset + fl->size == fl2->offset) {
fl->size += fl2->size;
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->size == H5HL_ALIGN(fl->size));
fl2 = H5HL__remove_free(heap, fl2);
if (((fl->offset + fl->size) == heap->dblk_size) && ((2 * fl->size) > heap->dblk_size)) {
if (FAIL == H5HL__minimize_heap_space(f, heap))
@@ -851,7 +851,7 @@ H5HL_remove(H5F_t *f, H5HL_t *heap, size_t offset, size_t size)
if (size < H5HL_SIZEOF_FREE(f)) {
#ifdef H5HL_DEBUG
if (H5DEBUG(HL)) {
- HDfprintf(H5DEBUG(HL), "H5HL: lost %lu bytes\n", (unsigned long)size);
+ fprintf(H5DEBUG(HL), "H5HL: lost %lu bytes\n", (unsigned long)size);
}
#endif
HGOTO_DONE(SUCCEED)
@@ -862,8 +862,8 @@ H5HL_remove(H5F_t *f, H5HL_t *heap, size_t offset, size_t size)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed");
fl->offset = offset;
fl->size = size;
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
- HDassert(fl->size == H5HL_ALIGN(fl->size));
+ assert(fl->offset == H5HL_ALIGN(fl->offset));
+ assert(fl->size == H5HL_ALIGN(fl->size));
fl->prev = NULL;
fl->next = heap->freelist;
if (heap->freelist)
@@ -903,8 +903,8 @@ H5HL_delete(H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Construct the user data for protect callback */
prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f);
@@ -965,9 +965,9 @@ H5HL_get_size(H5F_t *f, haddr_t addr, size_t *size)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(size);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(size);
/* Construct the user data for protect callback */
prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f);
@@ -1017,9 +1017,9 @@ H5HL_heapsize(H5F_t *f, haddr_t addr, hsize_t *heap_size)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(heap_size);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(heap_size);
/* Construct the user data for protect callback */
prfx_udata.sizeof_size = H5F_SIZEOF_SIZE(f);
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index c04efb6..64cdf84 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -149,14 +149,14 @@ H5HL__hdr_deserialize(H5HL_t *heap, const uint8_t *image, size_t len, H5HL_cache
FUNC_ENTER_PACKAGE
- HDassert(heap);
- HDassert(image);
- HDassert(udata);
+ assert(heap);
+ assert(image);
+ assert(udata);
/* Magic number */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- if (HDmemcmp(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad local heap signature")
image += H5_SIZEOF_MAGIC;
@@ -218,8 +218,8 @@ H5HL__fl_deserialize(H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(heap);
- HDassert(!heap->freelist);
+ assert(heap);
+ assert(!heap->freelist);
/* Build free list */
free_block = heap->free_block;
@@ -286,13 +286,13 @@ H5HL__fl_serialize(const H5HL_t *heap)
FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
- HDassert(heap);
+ assert(heap);
/* Serialize the free list into the heap data's image */
for (fl = heap->freelist; fl; fl = fl->next) {
uint8_t *image; /* Pointer into raw data buffer */
- HDassert(fl->offset == H5HL_ALIGN(fl->offset));
+ assert(fl->offset == H5HL_ALIGN(fl->offset));
image = heap->dblk_image + fl->offset;
if (fl->next)
@@ -327,7 +327,7 @@ H5HL__cache_prefix_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *im
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(image_len);
+ assert(image_len);
/* Set the image length size */
*image_len = H5HL_SPEC_READ_SIZE;
@@ -360,12 +360,12 @@ H5HL__cache_prefix_get_final_load_size(const void *_image, size_t image_len, voi
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
- HDmemset(&heap, 0, sizeof(H5HL_t));
+ memset(&heap, 0, sizeof(H5HL_t));
/* Deserialize the heap's header */
if (H5HL__hdr_deserialize(&heap, (const uint8_t *)image, image_len, udata) < 0)
@@ -410,14 +410,14 @@ H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata, hbo
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(udata->sizeof_size > 0);
- HDassert(udata->sizeof_addr > 0);
- HDassert(udata->sizeof_prfx > 0);
- HDassert(H5F_addr_defined(udata->prfx_addr));
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(udata->sizeof_size > 0);
+ assert(udata->sizeof_addr > 0);
+ assert(udata->sizeof_prfx > 0);
+ assert(H5F_addr_defined(udata->prfx_addr));
+ assert(dirty);
/* Allocate space in memory for the heap */
if (NULL == (heap = H5HL__new(udata->sizeof_size, udata->sizeof_addr, udata->sizeof_prfx)))
@@ -504,10 +504,10 @@ H5HL__cache_prefix_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(prfx);
- HDassert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(prfx->cache_info.type == H5AC_LHEAP_PRFX);
- HDassert(image_len);
+ assert(prfx);
+ assert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(prfx->cache_info.type == H5AC_LHEAP_PRFX);
+ assert(image_len);
/* Set the prefix's size */
*image_len = prfx->heap->prfx_size;
@@ -548,24 +548,24 @@ H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image,
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(prfx);
- HDassert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(prfx->cache_info.type == H5AC_LHEAP_PRFX);
- HDassert(H5F_addr_eq(prfx->cache_info.addr, prfx->heap->prfx_addr));
- HDassert(prfx->heap);
+ assert(f);
+ assert(image);
+ assert(prfx);
+ assert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(prfx->cache_info.type == H5AC_LHEAP_PRFX);
+ assert(H5F_addr_eq(prfx->cache_info.addr, prfx->heap->prfx_addr));
+ assert(prfx->heap);
/* Get the pointer to the heap */
heap = prfx->heap;
- HDassert(heap);
+ assert(heap);
#ifndef NDEBUG
/* Compute the buffer size */
size_t buf_size = heap->prfx_size; /* expected size of the image buffer */
if (heap->single_cache_obj)
buf_size += heap->dblk_size;
- HDassert(len == buf_size);
+ assert(len == buf_size);
#endif
/* Update the free block value from the free list */
@@ -592,7 +592,7 @@ H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image,
* the prefix and the data block due to alignment constraints.
*/
gap = heap->prfx_size - (size_t)(image - (uint8_t *)_image);
- HDmemset(image, 0, gap);
+ memset(image, 0, gap);
image += gap;
}
@@ -603,14 +603,14 @@ H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image,
H5MM_memcpy(image, heap->dblk_image, heap->dblk_size);
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) + heap->dblk_size == len);
+ assert((size_t)(image - (uint8_t *)_image) + heap->dblk_size == len);
}
else {
/* Sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) <= len);
+ assert((size_t)(image - (uint8_t *)_image) <= len);
/* Clear rest of local heap */
- HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
+ memset(image, 0, len - (size_t)(image - (uint8_t *)_image));
}
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -647,10 +647,10 @@ H5HL__cache_prefix_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(prfx);
- HDassert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(prfx->cache_info.type == H5AC_LHEAP_PRFX);
- HDassert(H5F_addr_eq(prfx->cache_info.addr, prfx->heap->prfx_addr));
+ assert(prfx);
+ assert(prfx->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(prfx->cache_info.type == H5AC_LHEAP_PRFX);
+ assert(H5F_addr_eq(prfx->cache_info.addr, prfx->heap->prfx_addr));
/* Destroy local heap prefix */
if (H5HL__prfx_dest(prfx) < 0)
@@ -683,9 +683,9 @@ H5HL__cache_datablock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(heap);
- HDassert(heap->dblk_size > 0);
- HDassert(image_len);
+ assert(heap);
+ assert(heap->dblk_size > 0);
+ assert(image_len);
/* Set the image length size */
*image_len = heap->dblk_size;
@@ -718,13 +718,13 @@ H5HL__cache_datablock_deserialize(const void *image, size_t len, void *_udata, h
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(len > 0);
- HDassert(heap);
- HDassert(heap->dblk_size == len);
- HDassert(!heap->single_cache_obj);
- HDassert(NULL == heap->dblk);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(heap);
+ assert(heap->dblk_size == len);
+ assert(!heap->single_cache_obj);
+ assert(NULL == heap->dblk);
+ assert(dirty);
/* Allocate space in memory for the heap data block */
if (NULL == (dblk = H5HL__dblk_new(heap)))
@@ -777,12 +777,12 @@ H5HL__cache_datablock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(dblk);
- HDassert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblk->cache_info.type == H5AC_LHEAP_DBLK);
- HDassert(dblk->heap);
- HDassert(dblk->heap->dblk_size > 0);
- HDassert(image_len);
+ assert(dblk);
+ assert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblk->cache_info.type == H5AC_LHEAP_DBLK);
+ assert(dblk->heap);
+ assert(dblk->heap->dblk_size > 0);
+ assert(image_len);
*image_len = dblk->heap->dblk_size;
@@ -813,15 +813,15 @@ H5HL__cache_datablock_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *imag
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(dblk);
- HDassert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(dblk->cache_info.type == H5AC_LHEAP_DBLK);
- HDassert(dblk->heap);
+ assert(f);
+ assert(image);
+ assert(dblk);
+ assert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(dblk->cache_info.type == H5AC_LHEAP_DBLK);
+ assert(dblk->heap);
heap = dblk->heap;
- HDassert(heap->dblk_size == len);
- HDassert(!heap->single_cache_obj);
+ assert(heap->dblk_size == len);
+ assert(!heap->single_cache_obj);
/* Update the free block value from the free list */
heap->free_block = heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL;
@@ -858,7 +858,7 @@ H5HL__cache_datablock_notify(H5C_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dblk);
+ assert(dblk);
switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
@@ -867,8 +867,8 @@ H5HL__cache_datablock_notify(H5C_notify_action_t action, void *_thing)
case H5AC_NOTIFY_ACTION_AFTER_LOAD:
/* Sanity checks */
- HDassert(dblk->heap);
- HDassert(dblk->heap->prfx);
+ assert(dblk->heap);
+ assert(dblk->heap->prfx);
/* Pin the heap's prefix */
if (FAIL == H5AC_pin_protected_entry(dblk->heap->prfx))
@@ -887,8 +887,8 @@ H5HL__cache_datablock_notify(H5C_notify_action_t action, void *_thing)
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
/* Sanity checks */
- HDassert(dblk->heap);
- HDassert(dblk->heap->prfx);
+ assert(dblk->heap);
+ assert(dblk->heap->prfx);
/* Unpin the local heap prefix */
if (FAIL == H5AC_unpin_entry(dblk->heap->prfx))
@@ -930,9 +930,9 @@ H5HL__cache_datablock_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(dblk);
- HDassert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(dblk->cache_info.type == H5AC_LHEAP_DBLK);
+ assert(dblk);
+ assert(dblk->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(dblk->cache_info.type == H5AC_LHEAP_DBLK);
/* Destroy the data block */
if (H5HL__dblk_dest(dblk) < 0)
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index 6e5ad39..68a2c5f 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -56,19 +56,19 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
if (NULL == (h = (H5HL_t *)H5HL_protect(f, addr, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load/protect local heap")
- HDfprintf(stream, "%*sLocal Heap...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size (in bytes):", h->prfx_size);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of heap data:", h->dblk_addr);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data bytes allocated for heap:", h->dblk_size);
+ fprintf(stream, "%*sLocal Heap...\n", indent, "");
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size (in bytes):", h->prfx_size);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of heap data:", h->dblk_addr);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data bytes allocated for heap:", h->dblk_size);
/* Traverse the free list and check that all free blocks fall within
* the heap and that no two free blocks point to the same region of
@@ -77,15 +77,15 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
if (NULL == (marker = (uint8_t *)H5MM_calloc(h->dblk_size)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
- HDfprintf(stream, "%*sFree Blocks (offset, size):\n", indent, "");
+ fprintf(stream, "%*sFree Blocks (offset, size):\n", indent, "");
for (free_block = 0, freelist = h->freelist; freelist; freelist = freelist->next, free_block++) {
char temp_str[32];
HDsnprintf(temp_str, sizeof(temp_str), "Block #%d:", free_block);
- HDfprintf(stream, "%*s%-*s %8zu, %8zu\n", indent + 3, "", MAX(0, fwidth - 9), temp_str,
- freelist->offset, freelist->size);
+ fprintf(stream, "%*s%-*s %8zu, %8zu\n", indent + 3, "", MAX(0, fwidth - 9), temp_str,
+ freelist->offset, freelist->size);
if ((freelist->offset + freelist->size) > h->dblk_size)
- HDfprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n");
+ fprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n");
else {
int overlap = 0;
size_t i;
@@ -96,15 +96,15 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
marker[freelist->offset + i] = 1;
}
if (overlap)
- HDfprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
+ fprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
else
amount_free += freelist->size;
}
}
if (h->dblk_size)
- HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of heap used:",
- (100.0 * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
+ fprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of heap used:",
+ (100.0 * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
/* Print the data in a VMS-style octal dump */
H5_buffer_dump(stream, indent, h->dblk_image, marker, (size_t)0, h->dblk_size);
diff --git a/src/H5HLdblk.c b/src/H5HLdblk.c
index 6b80897..7ab1bc4 100644
--- a/src/H5HLdblk.c
+++ b/src/H5HLdblk.c
@@ -89,7 +89,7 @@ H5HL__dblk_new(H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(heap);
+ assert(heap);
/* Allocate new local heap data block */
if (NULL == (dblk = H5FL_CALLOC(H5HL_dblk_t)))
@@ -135,7 +135,7 @@ H5HL__dblk_dest(H5HL_dblk_t *dblk)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(dblk);
+ assert(dblk);
/* Check if data block was initialized */
if (dblk->heap) {
@@ -182,8 +182,8 @@ H5HL__dblk_realloc(H5F_t *f, H5HL_t *heap, size_t new_heap_size)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(heap);
- HDassert(new_heap_size > 0);
+ assert(heap);
+ assert(new_heap_size > 0);
/* Release old space on disk */
old_addr = heap->dblk_addr;
@@ -206,8 +206,8 @@ H5HL__dblk_realloc(H5F_t *f, H5HL_t *heap, size_t new_heap_size)
/* Check if heap data block is contiguous w/prefix */
if (heap->single_cache_obj) {
/* Sanity check */
- HDassert(H5F_addr_eq(heap->prfx_addr + heap->prfx_size, old_addr));
- HDassert(heap->prfx);
+ assert(H5F_addr_eq(heap->prfx_addr + heap->prfx_size, old_addr));
+ assert(heap->prfx);
/* Resize the heap prefix in the cache */
if (FAIL == H5AC_resize_entry(heap->prfx, (size_t)(heap->prfx_size + new_heap_size)))
@@ -215,8 +215,8 @@ H5HL__dblk_realloc(H5F_t *f, H5HL_t *heap, size_t new_heap_size)
}
else {
/* Sanity check */
- HDassert(H5F_addr_ne(heap->prfx_addr + heap->prfx_size, old_addr));
- HDassert(heap->dblk);
+ assert(H5F_addr_ne(heap->prfx_addr + heap->prfx_size, old_addr));
+ assert(heap->dblk);
/* Resize the heap data block in the cache */
if (H5AC_resize_entry(heap->dblk, (size_t)new_heap_size) < 0)
diff --git a/src/H5HLint.c b/src/H5HLint.c
index fa879fa..9e7f04c 100644
--- a/src/H5HLint.c
+++ b/src/H5HLint.c
@@ -88,9 +88,9 @@ H5HL__new(size_t sizeof_size, size_t sizeof_addr, size_t prfx_size)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(sizeof_size > 0);
- HDassert(sizeof_addr > 0);
- HDassert(prfx_size > 0);
+ assert(sizeof_size > 0);
+ assert(sizeof_addr > 0);
+ assert(prfx_size > 0);
/* Allocate new local heap structure */
if (NULL == (heap = H5FL_CALLOC(H5HL_t)))
@@ -130,7 +130,7 @@ H5HL__inc_rc(H5HL_t *heap)
FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
- HDassert(heap);
+ assert(heap);
/* Increment heap's ref. count */
heap->rc++;
@@ -158,7 +158,7 @@ H5HL__dec_rc(H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(heap);
+ assert(heap);
/* Decrement heap's ref. count */
heap->rc--;
@@ -191,13 +191,13 @@ H5HL__dest(H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(heap);
+ assert(heap);
/* Verify that node is unused */
- HDassert(heap->prots == 0);
- HDassert(heap->rc == 0);
- HDassert(heap->prfx == NULL);
- HDassert(heap->dblk == NULL);
+ assert(heap->prots == 0);
+ assert(heap->rc == 0);
+ assert(heap->prfx == NULL);
+ assert(heap->dblk == NULL);
/* Use DONE errors here to try to free as much as possible */
if (heap->dblk_image)
diff --git a/src/H5HLprfx.c b/src/H5HLprfx.c
index f81381c..558bdce 100644
--- a/src/H5HLprfx.c
+++ b/src/H5HLprfx.c
@@ -88,7 +88,7 @@ H5HL__prfx_new(H5HL_t *heap)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(heap);
+ assert(heap);
/* Allocate new local heap prefix */
if (NULL == (prfx = H5FL_CALLOC(H5HL_prfx_t)))
@@ -134,7 +134,7 @@ H5HL__prfx_dest(H5HL_prfx_t *prfx)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(prfx);
+ assert(prfx);
/* Check if prefix was initialized */
if (prfx->heap) {
diff --git a/src/H5Idbg.c b/src/H5Idbg.c
index 5fbe29b..4c7d1ec 100644
--- a/src/H5Idbg.c
+++ b/src/H5Idbg.c
@@ -81,10 +81,10 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
- HDfprintf(stderr, " id = %" PRIdHID "\n", info->id);
- HDfprintf(stderr, " count = %u\n", info->count);
- HDfprintf(stderr, " obj = 0x%8p\n", info->object);
- HDfprintf(stderr, " marked = %d\n", info->marked);
+ fprintf(stderr, " id = %" PRIdHID "\n", info->id);
+ fprintf(stderr, " count = %u\n", info->count);
+ fprintf(stderr, " obj = 0x%8p\n", info->object);
+ fprintf(stderr, " marked = %d\n", info->marked);
/* Get the group location, so we get get the name */
switch (type) {
@@ -143,9 +143,9 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
if (path) {
if (path->user_path_r)
- HDfprintf(stderr, " user_path = %s\n", H5RS_get_str(path->user_path_r));
+ fprintf(stderr, " user_path = %s\n", H5RS_get_str(path->user_path_r));
if (path->full_path_r)
- HDfprintf(stderr, " full_path = %s\n", H5RS_get_str(path->full_path_r));
+ fprintf(stderr, " full_path = %s\n", H5RS_get_str(path->full_path_r));
}
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
@@ -167,7 +167,7 @@ H5I_dump_ids_for_type(H5I_type_t type)
FUNC_ENTER_NOAPI_NOERR
- HDfprintf(stderr, "Dumping ID type %d\n", (int)type);
+ fprintf(stderr, "Dumping ID type %d\n", (int)type);
type_info = H5I_type_info_array_g[type];
if (type_info) {
@@ -176,21 +176,21 @@ H5I_dump_ids_for_type(H5I_type_t type)
H5I_id_info_t *tmp = NULL;
/* Header */
- HDfprintf(stderr, " init_count = %u\n", type_info->init_count);
- HDfprintf(stderr, " reserved = %u\n", type_info->cls->reserved);
- HDfprintf(stderr, " id_count = %llu\n", (unsigned long long)type_info->id_count);
- HDfprintf(stderr, " nextid = %llu\n", (unsigned long long)type_info->nextid);
+ fprintf(stderr, " init_count = %u\n", type_info->init_count);
+ fprintf(stderr, " reserved = %u\n", type_info->cls->reserved);
+ fprintf(stderr, " id_count = %llu\n", (unsigned long long)type_info->id_count);
+ fprintf(stderr, " nextid = %llu\n", (unsigned long long)type_info->nextid);
/* List */
if (type_info->id_count > 0) {
- HDfprintf(stderr, " List:\n");
+ fprintf(stderr, " List:\n");
/* Normally we care about the callback's return value
* (H5I_ITER_CONT, etc.), but this is an iteration over all
* the IDs so we don't care.
*
* XXX: Update this to emit an error message on errors?
*/
- HDfprintf(stderr, " (HASH TABLE)\n");
+ fprintf(stderr, " (HASH TABLE)\n");
HASH_ITER(hh, type_info->hash_table, item, tmp)
{
H5I__id_dump_cb((void *)item, NULL, (void *)&type);
@@ -198,7 +198,7 @@ H5I_dump_ids_for_type(H5I_type_t type)
}
}
else
- HDfprintf(stderr, "Global type info/tracking pointer for that type is NULL\n");
+ fprintf(stderr, "Global type info/tracking pointer for that type is NULL\n");
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5I_dump_ids_for_type() */
diff --git a/src/H5Iint.c b/src/H5Iint.c
index 8a6b7ae..5715583 100644
--- a/src/H5Iint.c
+++ b/src/H5Iint.c
@@ -136,7 +136,7 @@ H5I_term_package(void)
for (i = 0; i < H5I_next_type_g; i++) {
type_info = H5I_type_info_array_g[i];
if (type_info) {
- HDassert(NULL == type_info->hash_table);
+ assert(NULL == type_info->hash_table);
type_info = H5MM_xfree(type_info);
H5I_type_info_array_g[i] = NULL;
in_use++;
@@ -167,8 +167,8 @@ H5I_register_type(const H5I_class_t *cls)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(cls);
- HDassert(cls->type > 0 && (int)cls->type < H5I_MAX_NUM_TYPES);
+ assert(cls);
+ assert(cls->type > 0 && (int)cls->type < H5I_MAX_NUM_TYPES);
/* Initialize the type */
if (NULL == H5I_type_info_array_g[cls->type]) {
@@ -260,7 +260,7 @@ H5I__unwrap(void *object, H5I_type_t type)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(object);
+ assert(object);
/* The stored object pointer might be an H5VL_object_t, in which
* case we'll need to get the wrapped object struct (H5F_t *, etc.).
@@ -372,9 +372,9 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(info);
- HDassert(udata);
- HDassert(udata->type_info);
+ assert(info);
+ assert(udata);
+ assert(udata->type_info);
/* Do nothing to the object if the reference count is larger than
* one and forcing is off.
@@ -388,10 +388,10 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata)
if (udata->force) {
#ifdef H5I_DEBUG
if (H5DEBUG(I)) {
- HDfprintf(H5DEBUG(I),
- "H5I: discard type=%d obj=%p "
- "failure ignored\n",
- (int)udata->type_info->cls->type, info->object);
+ fprintf(H5DEBUG(I),
+ "H5I: discard type=%d obj=%p "
+ "failure ignored\n",
+ (int)udata->type_info->cls->type, info->object);
}
#endif /* H5I_DEBUG */
@@ -411,10 +411,10 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata)
if (udata->force) {
#ifdef H5I_DEBUG
if (H5DEBUG(I)) {
- HDfprintf(H5DEBUG(I),
- "H5I: free type=%d obj=%p "
- "failure ignored\n",
- (int)udata->type_info->cls->type, info->object);
+ fprintf(H5DEBUG(I),
+ "H5I: free type=%d obj=%p "
+ "failure ignored\n",
+ (int)udata->type_info->cls->type, info->object);
}
#endif /* H5I_DEBUG */
@@ -551,7 +551,7 @@ H5I__register(H5I_type_t type, const void *object, hbool_t app_ref, H5I_future_r
type_info->nextid++;
/* Sanity check for the 'nextid' getting too large and wrapping around */
- HDassert(type_info->nextid <= ID_MASK);
+ assert(type_info->nextid <= ID_MASK);
/* Set the most recent ID to this object */
type_info->last_id_info = info;
@@ -581,8 +581,8 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Sanity checks */
- HDassert(type >= H5I_FILE && type < H5I_NTYPES);
- HDassert(object);
+ assert(type >= H5I_FILE && type < H5I_NTYPES);
+ assert(object);
/* Retrieve ID for object */
if (H5I_INVALID_HID == (ret_value = H5I__register(type, object, app_ref, NULL, NULL)))
@@ -620,7 +620,7 @@ H5I_register_using_existing_id(H5I_type_t type, void *object, hbool_t app_ref, h
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(object);
+ assert(object);
/* Make sure ID is not already in use */
if (NULL != (info = H5I__find_id(existing_id)))
@@ -760,7 +760,7 @@ H5I_object_verify(hid_t id, H5I_type_t type)
FUNC_ENTER_NOAPI_NOERR
- HDassert(type >= 1 && (int)type < H5I_next_type_g);
+ assert(type >= 1 && (int)type < H5I_next_type_g);
/* Verify that the type of the ID is correct & lookup the ID */
if (type == H5I_TYPE(id) && NULL != (info = H5I__find_id(id))) {
@@ -801,7 +801,7 @@ H5I_get_type(hid_t id)
if (id > 0)
ret_value = H5I_TYPE(id);
- HDassert(ret_value >= H5I_BADID && (int)ret_value < H5I_next_type_g);
+ assert(ret_value >= H5I_BADID && (int)ret_value < H5I_next_type_g);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_type() */
@@ -910,12 +910,12 @@ H5I__remove_common(H5I_type_info_t *type_info, hid_t id)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(type_info);
+ assert(type_info);
/* Delete or mark the node */
HASH_FIND(hh, type_info->hash_table, &id, sizeof(hid_t), info);
if (info) {
- HDassert(!info->marked);
+ assert(!info->marked);
if (!H5I_marking_g)
HASH_DELETE(hh, type_info->hash_table, info);
else
@@ -1004,7 +1004,7 @@ H5I__dec_ref(hid_t id, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* General lookup of the ID */
if (NULL == (info = H5I__find_id(id)))
@@ -1068,7 +1068,7 @@ H5I_dec_ref(hid_t id)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* Synchronously decrement refcount on ID */
if ((ret_value = H5I__dec_ref(id, H5_REQUEST_NULL)) < 0)
@@ -1100,7 +1100,7 @@ H5I__dec_app_ref(hid_t id, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* Call regular decrement reference count routine */
if ((ret_value = H5I__dec_ref(id, request)) < 0)
@@ -1116,7 +1116,7 @@ H5I__dec_app_ref(hid_t id, void **request)
/* Adjust app_ref */
--(info->app_count);
- HDassert(info->count >= info->app_count);
+ assert(info->count >= info->app_count);
/* Set return value */
ret_value = (int)info->app_count;
@@ -1148,7 +1148,7 @@ H5I_dec_app_ref(hid_t id)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* Synchronously decrement refcount on ID */
if ((ret_value = H5I__dec_app_ref(id, H5_REQUEST_NULL)) < 0)
@@ -1183,7 +1183,7 @@ H5I_dec_app_ref_async(hid_t id, void **token)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* [Possibly] aynchronously decrement refcount on ID */
if ((ret_value = H5I__dec_app_ref(id, token)) < 0)
@@ -1215,7 +1215,7 @@ H5I__dec_app_ref_always_close(hid_t id, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* Call application decrement reference count routine */
ret_value = H5I__dec_app_ref(id, request);
@@ -1256,7 +1256,7 @@ H5I_dec_app_ref_always_close(hid_t id)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* Synchronously decrement refcount on ID */
if ((ret_value = H5I__dec_app_ref_always_close(id, H5_REQUEST_NULL)) < 0)
@@ -1288,7 +1288,7 @@ H5I_dec_app_ref_always_close_async(hid_t id, void **token)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* [Possibly] aynchronously decrement refcount on ID */
if ((ret_value = H5I__dec_app_ref_always_close(id, token)) < 0)
@@ -1317,7 +1317,7 @@ H5I_inc_ref(hid_t id, hbool_t app_ref)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* General lookup of the ID */
if (NULL == (info = H5I__find_id(id)))
@@ -1354,7 +1354,7 @@ H5I_get_ref(hid_t id, hbool_t app_ref)
FUNC_ENTER_NOAPI((-1))
/* Sanity check */
- HDassert(id >= 0);
+ assert(id >= 0);
/* General lookup of the ID */
if (NULL == (info = H5I__find_id(id)))
@@ -1386,7 +1386,7 @@ H5I__inc_type_ref(H5I_type_t type)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(type > 0 && (int)type < H5I_next_type_g);
+ assert(type > 0 && (int)type < H5I_next_type_g);
/* Check arguments */
type_info = H5I_type_info_array_g[type];
@@ -1472,7 +1472,7 @@ H5I__get_type_ref(H5I_type_t type)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(type >= 0);
+ assert(type >= 0);
/* Check arguments */
type_info = H5I_type_info_array_g[type];
@@ -1662,7 +1662,7 @@ H5I__find_id(hid_t id)
/* Swap the actual object in for the future object */
future_object = (void *)id_info->object;
actual_object = H5I__remove_common(type_info, actual_id);
- HDassert(actual_object);
+ assert(actual_object);
id_info->object = actual_object;
/* Discard the future object */
@@ -1706,8 +1706,8 @@ H5I__find_id_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(info);
- HDassert(udata);
+ assert(info);
+ assert(udata);
/* Get a pointer to the VOL connector's data */
H5_GCC_CLANG_DIAG_OFF("cast-qual")
@@ -1742,7 +1742,7 @@ H5I_find_id(const void *object, H5I_type_t type, hid_t *id)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(id);
+ assert(id);
*id = H5I_INVALID_HID;
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index facd7de..9155418 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -124,7 +124,7 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(p);
+ assert(p);
/* Check external link version & flags */
if (((*p >> 4) & 0x0F) > H5L_EXT_VERSION)
diff --git a/src/H5Lint.c b/src/H5Lint.c
index 24d05fd..18d62c9 100644
--- a/src/H5Lint.c
+++ b/src/H5Lint.c
@@ -332,8 +332,8 @@ H5L_register(const H5L_class_t *cls)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cls);
- HDassert(cls->id >= 0 && cls->id <= H5L_TYPE_MAX);
+ assert(cls);
+ assert(cls->id >= 0 && cls->id <= H5L_TYPE_MAX);
/* Is the link type already registered? */
for (i = 0; i < H5L_table_used_g; i++)
@@ -384,7 +384,7 @@ H5L_unregister(H5L_type_t id)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(id >= 0 && id <= H5L_TYPE_MAX);
+ assert(id >= 0 && id <= H5L_TYPE_MAX);
/* Is the filter already registered? */
for (i = 0; i < H5L_table_used_g; i++)
@@ -422,7 +422,7 @@ H5L_is_registered(H5L_type_t id, hbool_t *is_registered)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(is_registered);
+ assert(is_registered);
/* Is the link class already registered? */
*is_registered = FALSE;
@@ -457,9 +457,9 @@ H5L_link(const H5G_loc_t *new_loc, const char *new_name, H5G_loc_t *obj_loc, hid
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(new_loc);
- HDassert(obj_loc);
- HDassert(new_name && *new_name);
+ assert(new_loc);
+ assert(obj_loc);
+ assert(new_name && *new_name);
/* The link callback will check that the object isn't being hard linked
* into a different file, so we don't need to do it here (there could be
@@ -499,9 +499,9 @@ H5L_link_object(const H5G_loc_t *new_loc, const char *new_name, H5O_obj_create_t
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(new_loc);
- HDassert(new_name && *new_name);
- HDassert(ocrt_info);
+ assert(new_loc);
+ assert(new_name && *new_name);
+ assert(ocrt_info);
/* The link callback will check that the object isn't being hard linked
* into a different file, so we don't need to do it here (there could be
@@ -651,7 +651,7 @@ done:
H5O_loc_t oloc; /* Object location for created object */
/* Set up object location */
- HDmemset(&oloc, 0, sizeof(oloc));
+ memset(&oloc, 0, sizeof(oloc));
oloc.file = grp_loc->oloc->file;
oloc.addr = udata->lnk->u.hard.addr;
@@ -711,10 +711,10 @@ H5L__create_real(const H5G_loc_t *link_loc, const char *link_name, H5G_name_t *o
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(link_loc);
- HDassert(link_name && *link_name);
- HDassert(lnk);
- HDassert(lnk->type >= H5L_TYPE_HARD && lnk->type <= H5L_TYPE_MAX);
+ assert(link_loc);
+ assert(link_name && *link_name);
+ assert(lnk);
+ assert(lnk->type >= H5L_TYPE_HARD && lnk->type <= H5L_TYPE_MAX);
/* Get normalized link name */
if ((norm_link_name = H5G_normalize(link_name)) == NULL)
@@ -794,10 +794,10 @@ H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name, const H5G_loc_t *link
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(cur_loc);
- HDassert(cur_name && *cur_name);
- HDassert(link_loc);
- HDassert(link_name && *link_name);
+ assert(cur_loc);
+ assert(cur_name && *cur_name);
+ assert(link_loc);
+ assert(link_name && *link_name);
/* Get normalized copy of the current name */
if ((norm_cur_name = H5G_normalize(cur_name)) == NULL)
@@ -860,9 +860,9 @@ H5L__create_soft(const char *target_path, const H5G_loc_t *link_loc, const char
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(link_loc);
- HDassert(target_path && *target_path);
- HDassert(link_name && *link_name);
+ assert(link_loc);
+ assert(target_path && *target_path);
+ assert(link_name && *link_name);
/* Get normalized copy of the link target */
if ((norm_target = H5G_normalize(target_path)) == NULL)
@@ -907,10 +907,10 @@ H5L__create_ud(const H5G_loc_t *link_loc, const char *link_name, const void *ud_
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(type >= H5L_TYPE_UD_MIN && type <= H5L_TYPE_MAX);
- HDassert(link_loc);
- HDassert(link_name && *link_name);
- HDassert(ud_data_size == 0 || ud_data);
+ assert(type >= H5L_TYPE_UD_MIN && type <= H5L_TYPE_MAX);
+ assert(link_loc);
+ assert(link_name && *link_name);
+ assert(ud_data_size == 0 || ud_data);
/* Initialize the link struct's pointer to its udata buffer */
lnk.u.ud.udata = NULL;
@@ -961,7 +961,7 @@ H5L__get_val_real(const H5O_link_t *lnk, void *buf, size_t size)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(lnk);
+ assert(lnk);
/* Check for soft link */
if (H5L_TYPE_SOFT == lnk->type) {
@@ -1061,8 +1061,8 @@ H5L__get_val(const H5G_loc_t *loc, const char *name, void *buf /*out*/, size_t s
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up user data for retrieving information */
udata.size = size;
@@ -1149,8 +1149,8 @@ H5L__get_val_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up user data for retrieving information */
udata.idx_type = idx_type;
@@ -1237,8 +1237,8 @@ H5L__delete(const H5G_loc_t *loc, const char *name)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Get normalized copy of the name */
if ((norm_name = H5G_normalize(name)) == NULL)
@@ -1319,8 +1319,8 @@ H5L__delete_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up user data for unlink operation */
udata.idx_type = idx_type;
@@ -1374,7 +1374,7 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "moving a link across files is not allowed")
/* Give the object its new name */
- HDassert(udata->lnk->name == NULL);
+ assert(udata->lnk->name == NULL);
H5_GCC_CLANG_DIAG_OFF("cast-qual")
udata->lnk->name = (char *)name;
H5_GCC_CLANG_DIAG_ON("cast-qual")
@@ -1517,7 +1517,7 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
/* Make certain that the destination name is a full (not relative) path */
if (*(udata->dst_name) != '/') {
- HDassert(udata->dst_loc->path->full_path_r);
+ assert(udata->dst_loc->path->full_path_r);
/* Create reference counted string for full dst path */
if ((dst_name_r = H5G_build_fullpath_refstr_str(udata->dst_loc->path->full_path_r,
@@ -1526,7 +1526,7 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
} /* end if */
else
dst_name_r = H5RS_wrap(udata->dst_name);
- HDassert(dst_name_r);
+ assert(dst_name_r);
/* Fix names up */
if (H5G_name_replace(lnk, H5G_NAME_MOVE, obj_loc->oloc->file, obj_loc->path->full_path_r,
@@ -1596,10 +1596,10 @@ H5L__move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_l
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(src_loc);
- HDassert(dst_loc);
- HDassert(src_name && *src_name);
- HDassert(dst_name && *dst_name);
+ assert(src_loc);
+ assert(dst_loc);
+ assert(src_name && *src_name);
+ assert(dst_name && *dst_name);
/* Check for flags present in creation property list */
if (lcpl_id != H5P_DEFAULT) {
@@ -1761,9 +1761,9 @@ H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, hbool_t *exists)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(loc);
- HDassert(name);
- HDassert(exists);
+ assert(loc);
+ assert(name);
+ assert(exists);
/* Copy the name and skip leading '/'s */
name_trav = name_copy = H5MM_strdup(name);
@@ -1823,9 +1823,9 @@ H5L__exists(const H5G_loc_t *loc, const char *name, hbool_t *exists)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(loc);
- HDassert(name);
- HDassert(exists);
+ assert(loc);
+ assert(name);
+ assert(exists);
/* A path of "/" will always exist in a file */
if (0 == HDstrcmp(name, "/"))
@@ -1978,9 +1978,9 @@ H5L__get_info_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(linfo);
+ assert(loc);
+ assert(name && *name);
+ assert(linfo);
/* Set up user data for callback */
udata.idx_type = idx_type;
@@ -2056,9 +2056,9 @@ H5L__get_name_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(group_name && *group_name);
- HDassert(link_name_len);
+ assert(loc);
+ assert(group_name && *group_name);
+ assert(link_name_len);
/* Set up user data for callback */
udata.idx_type = idx_type;
@@ -2109,10 +2109,10 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(dst_file);
- HDassert(src_lnk);
- HDassert(dst_lnk);
- HDassert(cpy_info);
+ assert(dst_file);
+ assert(src_lnk);
+ assert(dst_lnk);
+ assert(cpy_info);
/* Expand soft or external link, if requested */
if ((H5L_TYPE_SOFT == src_lnk->type && cpy_info->expand_soft_link) ||
@@ -2180,7 +2180,7 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
tmp_src_oloc.file = src_oloc->file;
tmp_src_oloc.addr = src_lnk->u.hard.addr;
} /* end if */
- HDassert(H5F_addr_defined(tmp_src_oloc.addr));
+ assert(H5F_addr_defined(tmp_src_oloc.addr));
/* Copy the shared object from source to destination */
/* Don't care about obj_type or udata because those are only important
@@ -2195,7 +2195,7 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
done:
/* Check if we used a temporary src link */
if (src_lnk != _src_lnk) {
- HDassert(src_lnk == &tmp_src_lnk);
+ assert(src_lnk == &tmp_src_lnk);
H5O_msg_reset(H5O_LINK_ID, &tmp_src_lnk);
} /* end if */
if (ret_value < 0)
@@ -2230,9 +2230,9 @@ H5L_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
- HDassert(loc);
- HDassert(group_name);
- HDassert(op);
+ assert(loc);
+ assert(group_name);
+ assert(op);
/* Set up iteration beginning/end info */
idx = (idx_p == NULL ? 0 : *idx_p);
diff --git a/src/H5M.c b/src/H5M.c
index 2469145..1afd540 100644
--- a/src/H5M.c
+++ b/src/H5M.c
@@ -144,7 +144,7 @@ H5M_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(0 == H5I_nmembers(H5I_MAP));
+ assert(0 == H5I_nmembers(H5I_MAP));
/* Destroy the dataset object id group */
n += (H5I_dec_type_ref(H5I_MAP) > 0);
@@ -170,7 +170,7 @@ H5M__close_cb(H5VL_object_t *map_vol_obj, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(map_vol_obj);
+ assert(map_vol_obj);
/* Set up VOL callback arguments */
vol_cb_args.op_type = H5VL_MAP_CLOSE;
diff --git a/src/H5MF.c b/src/H5MF.c
index 9f430c9..5080247 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -49,7 +49,7 @@
#define H5MF_CHECK_FSM(FSM, CF) \
do { \
- HDassert(*CF == FALSE); \
+ assert(*CF == FALSE); \
if (!H5F_addr_defined(FSM->addr) || !H5F_addr_defined(FSM->sect_addr)) \
*CF = TRUE; \
} while (0)
@@ -146,8 +146,8 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f_sh);
- HDassert(f_sh->lf);
+ assert(f_sh);
+ assert(f_sh->lf);
/* Iterate over all the free space types to determine if sections of that type
* can merge with the metadata or small 'raw' data aggregator
@@ -200,7 +200,7 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
switch (mapping_type) {
case H5MF_AGGR_MERGE_SEPARATE:
/* Don't merge any metadata together */
- HDmemset(f_sh->fs_aggr_merge, 0, sizeof(f_sh->fs_aggr_merge));
+ memset(f_sh->fs_aggr_merge, 0, sizeof(f_sh->fs_aggr_merge));
/* Check if merging raw data should be allowed */
/* (treat global heaps as raw data) */
@@ -213,7 +213,7 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
case H5MF_AGGR_MERGE_DICHOTOMY:
/* Merge all metadata together (but not raw data) */
- HDmemset(f_sh->fs_aggr_merge, H5F_FS_MERGE_METADATA, sizeof(f_sh->fs_aggr_merge));
+ memset(f_sh->fs_aggr_merge, H5F_FS_MERGE_METADATA, sizeof(f_sh->fs_aggr_merge));
/* Allow merging raw data allocations together */
/* (treat global heaps as raw data) */
@@ -223,8 +223,8 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh)
case H5MF_AGGR_MERGE_TOGETHER:
/* Merge all allocation types together */
- HDmemset(f_sh->fs_aggr_merge, (H5F_FS_MERGE_METADATA | H5F_FS_MERGE_RAWDATA),
- sizeof(f_sh->fs_aggr_merge));
+ memset(f_sh->fs_aggr_merge, (H5F_FS_MERGE_METADATA | H5F_FS_MERGE_RAWDATA),
+ sizeof(f_sh->fs_aggr_merge));
break;
default:
@@ -253,8 +253,8 @@ H5MF__alloc_to_fs_type(H5F_shared_t *f_sh, H5FD_mem_t alloc_type, hsize_t size,
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f_sh);
- HDassert(fs_type);
+ assert(f_sh);
+ assert(fs_type);
if (H5F_SHARED_PAGED_AGGR(f_sh)) { /* paged aggregation */
if (size >= f_sh->fs_page_size) {
@@ -311,16 +311,16 @@ H5MF__open_fstype(H5F_t *f, H5F_mem_page_t type)
/*
* Check arguments.
*/
- HDassert(f);
+ assert(f);
if (H5F_PAGED_AGGR(f))
- HDassert(type < H5F_MEM_PAGE_NTYPES);
+ assert(type < H5F_MEM_PAGE_NTYPES);
else {
- HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
- HDassert((H5FD_mem_t)type != H5FD_MEM_NOLIST);
+ assert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
+ assert((H5FD_mem_t)type != H5FD_MEM_NOLIST);
} /* end else */
- HDassert(f->shared);
- HDassert(H5F_addr_defined(f->shared->fs_addr[type]));
- HDassert(f->shared->fs_state[type] == H5F_FS_STATE_CLOSED);
+ assert(f->shared);
+ assert(H5F_addr_defined(f->shared->fs_addr[type]));
+ assert(f->shared->fs_state[type] == H5F_FS_STATE_CLOSED);
/* Set up the alignment and threshold to use depending on the manager type */
if (H5F_PAGED_AGGR(f)) {
@@ -389,16 +389,16 @@ H5MF__create_fstype(H5F_t *f, H5F_mem_page_t type)
/*
* Check arguments.
*/
- HDassert(f);
+ assert(f);
if (H5F_PAGED_AGGR(f))
- HDassert(type < H5F_MEM_PAGE_NTYPES);
+ assert(type < H5F_MEM_PAGE_NTYPES);
else {
- HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
- HDassert((H5FD_mem_t)type != H5FD_MEM_NOLIST);
+ assert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
+ assert((H5FD_mem_t)type != H5FD_MEM_NOLIST);
} /* end else */
- HDassert(f->shared);
- HDassert(!H5F_addr_defined(f->shared->fs_addr[type]));
- HDassert(f->shared->fs_state[type] == H5F_FS_STATE_CLOSED);
+ assert(f->shared);
+ assert(!H5F_addr_defined(f->shared->fs_addr[type]));
+ assert(f->shared->fs_state[type] == H5F_FS_STATE_CLOSED);
/* Set the free space creation parameters */
fs_create.client = H5FS_CLIENT_FILE_ID;
@@ -464,13 +464,13 @@ H5MF__start_fstype(H5F_t *f, H5F_mem_page_t type)
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
if (H5F_PAGED_AGGR(f))
- HDassert(type < H5F_MEM_PAGE_NTYPES);
+ assert(type < H5F_MEM_PAGE_NTYPES);
else {
- HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
- HDassert((H5FD_mem_t)type != H5FD_MEM_NOLIST);
+ assert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
+ assert((H5FD_mem_t)type != H5FD_MEM_NOLIST);
} /* end else */
/* Check if the free space manager exists already */
@@ -513,12 +513,12 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
+ assert(f);
if (H5F_PAGED_AGGR(f))
- HDassert(type < H5F_MEM_PAGE_NTYPES);
+ assert(type < H5F_MEM_PAGE_NTYPES);
else
- HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
- HDassert(H5F_addr_defined(f->shared->fs_addr[type]));
+ assert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
+ assert(H5F_addr_defined(f->shared->fs_addr[type]));
/* Put address into temporary variable and reset it */
/* (Avoids loopback in file space freeing routine) */
@@ -538,7 +538,7 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type)
H5AC_set_ring(fsm_ring, &orig_ring);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Before deleting free space manager\n", __func__);
+ fprintf(stderr, "%s: Before deleting free space manager\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Delete free space manager for this type */
@@ -546,11 +546,11 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't delete free space manager")
/* Shift [back] to closed state */
- HDassert(f->shared->fs_state[type] == H5F_FS_STATE_DELETING);
+ assert(f->shared->fs_state[type] == H5F_FS_STATE_DELETING);
f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
/* Sanity check that the free space manager for this type wasn't started up again */
- HDassert(!H5F_addr_defined(f->shared->fs_addr[type]));
+ assert(!H5F_addr_defined(f->shared->fs_addr[type]));
done:
/* Reset the ring in the API context */
@@ -583,17 +583,17 @@ H5MF__close_fstype(H5F_t *f, H5F_mem_page_t type)
/*
* Check arguments.
*/
- HDassert(f);
+ assert(f);
if (H5F_PAGED_AGGR(f))
- HDassert(type < H5F_MEM_PAGE_NTYPES);
+ assert(type < H5F_MEM_PAGE_NTYPES);
else
- HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
- HDassert(f->shared);
- HDassert(f->shared->fs_man[type]);
- HDassert(f->shared->fs_state[type] != H5F_FS_STATE_CLOSED);
+ assert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
+ assert(f->shared);
+ assert(f->shared->fs_man[type]);
+ assert(f->shared->fs_state[type] != H5F_FS_STATE_CLOSED);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Before closing free space manager\n", __func__);
+ fprintf(stderr, "%s: Before closing free space manager\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Close an existing free space structure for the file */
@@ -629,9 +629,9 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(fspace);
- HDassert(node);
+ assert(f);
+ assert(fspace);
+ assert(node);
H5MF__alloc_to_fs_type(f->shared, alloc_type, node->sect_info.size, &fs_type);
@@ -649,10 +649,9 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio
H5AC_set_ring(fsm_ring, &orig_ring);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr,
- "%s: adding node, node->sect_info.addr = %" PRIuHADDR ", node->sect_info.size = %" PRIuHSIZE
- "\n",
- __func__, node->sect_info.addr, node->sect_info.size);
+ fprintf(stderr,
+ "%s: adding node, node->sect_info.addr = %" PRIuHADDR ", node->sect_info.size = %" PRIuHSIZE "\n",
+ __func__, node->sect_info.addr, node->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Add the section */
if (H5FS_sect_add(f, fspace, (H5FS_section_info_t *)node, H5FS_ADD_RETURNED_SPACE, &udata) < 0)
@@ -689,8 +688,8 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(fspace);
+ assert(f);
+ assert(fspace);
/* Set the ring type in the API context */
if (H5MF__fsm_is_self_referential(f->shared, fspace))
@@ -704,13 +703,13 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "error locating free space in file")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section found = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: section found = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Check for actually finding section */
if (ret_value) {
/* Sanity check */
- HDassert(node);
+ assert(node);
/* Retrieve return value */
if (addr)
@@ -719,7 +718,7 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h
/* Check for eliminating the section */
if (node->sect_info.size == size) {
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: freeing node\n", __func__);
+ fprintf(stderr, "%s: freeing node\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Free section node */
@@ -732,8 +731,8 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h
node->sect_info.size -= size;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: re-adding node, node->sect_info.size = %" PRIuHSIZE "\n", __func__,
- node->sect_info.size);
+ fprintf(stderr, "%s: re-adding node, node->sect_info.size = %" PRIuHSIZE "\n", __func__,
+ node->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Re-add the section to the free-space manager */
@@ -776,19 +775,19 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
+ fprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(size > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(size > 0);
H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &fs_type);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 1.0\n", __func__);
+ fprintf(stderr, "%s: Check 1.0\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Set the ring type in the API context */
@@ -813,7 +812,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
/* Open the free-space manager */
if (H5MF__open_fstype(f, fs_type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTOPENOBJ, HADDR_UNDEF, "can't initialize file free space")
- HDassert(f->shared->fs_man[fs_type]);
+ assert(f->shared->fs_man[fs_type]);
} /* end if */
/* Search for large enough space in the free space manager */
@@ -825,10 +824,10 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
/* If no space is found from the free-space manager, continue further action */
if (!H5F_addr_defined(ret_value)) {
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 2.0\n", __func__);
+ fprintf(stderr, "%s: Check 2.0\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
if (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE) {
- HDassert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
+ assert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN);
if (HADDR_UNDEF == (ret_value = H5MF__alloc_pagefs(f, alloc_type, size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF,
"allocation failed from paged aggregation")
@@ -838,9 +837,9 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "allocation failed from aggr/vfd")
} /* end else */
} /* end if */
- HDassert(H5F_addr_defined(ret_value));
+ assert(H5F_addr_defined(ret_value));
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 3.0\n", __func__);
+ fprintf(stderr, "%s: Check 3.0\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
done:
@@ -849,8 +848,8 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
- size);
+ fprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
+ size);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
@@ -890,7 +889,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
+ fprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */
H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &ptype);
@@ -908,7 +907,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
/* Get the EOA for the file */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, alloc_type)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "Unable to get eoa")
- HDassert(!(eoa % f->shared->fs_page_size));
+ assert(!(eoa % f->shared->fs_page_size));
H5MF_EOA_MISALIGN(f, (eoa + size), f->shared->fs_page_size, frag_size);
@@ -955,7 +954,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
if (!(f->shared->fs_man[ptype]))
if (H5MF__start_fstype(f, ptype) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, HADDR_UNDEF, "can't initialize file free space")
- HDassert(f->shared->fs_man[ptype]);
+ assert(f->shared->fs_man[ptype]);
if (NULL == (node = H5MF__sect_new(H5MF_FSPACE_SECT_SMALL, (new_page + size),
(f->shared->fs_page_size - size))))
@@ -987,8 +986,8 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
done:
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
- size);
+ fprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
+ size);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
@@ -1034,14 +1033,14 @@ H5MF_alloc_tmp(H5F_t *f, hsize_t size)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: size = %" PRIuHSIZE "\n", __func__, size);
+ fprintf(stderr, "%s: size = %" PRIuHSIZE "\n", __func__, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(size > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(size > 0);
/* Retrieve the 'eoa' for the file */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_DEFAULT)))
@@ -1086,15 +1085,15 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
- __func__, (unsigned)alloc_type, addr, size);
+ fprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
+ __func__, (unsigned)alloc_type, addr, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
- HDassert(f);
+ assert(f);
if (!H5F_addr_defined(addr) || 0 == size)
HGOTO_DONE(SUCCEED)
- HDassert(addr != 0); /* Can't deallocate the superblock :-) */
+ assert(addr != 0); /* Can't deallocate the superblock :-) */
H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &fs_type);
@@ -1136,13 +1135,13 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
* space is at the end of the file
*/
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: fs_addr = %" PRIuHADDR "\n", __func__, f->shared->fs_addr[fs_type]);
+ fprintf(stderr, "%s: fs_addr = %" PRIuHADDR "\n", __func__, f->shared->fs_addr[fs_type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
if (!H5F_addr_defined(f->shared->fs_addr[fs_type])) {
htri_t status; /* "can absorb" status for section into */
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Trying to avoid starting up free space manager\n", __func__);
+ fprintf(stderr, "%s: Trying to avoid starting up free space manager\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Try to shrink the file or absorb the block into a block aggregator */
if ((status = H5MF_try_shrink(f, alloc_type, addr, size)) < 0)
@@ -1152,9 +1151,8 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
HGOTO_DONE(SUCCEED)
else if (size < f->shared->fs_threshold) {
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr,
- "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n",
- __func__, addr, size);
+ fprintf(stderr, "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n",
+ __func__, addr, size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
HGOTO_DONE(SUCCEED)
} /* end else-if */
@@ -1171,8 +1169,8 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
*/
if (f->shared->fs_state[fs_type] == H5F_FS_STATE_DELETING || !H5F_HAVE_FREE_SPACE_MANAGER(f)) {
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n",
- __func__, addr, size);
+ fprintf(stderr, "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n",
+ __func__, addr, size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
HGOTO_DONE(SUCCEED)
} /* end if */
@@ -1192,10 +1190,10 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
/* If size of the freed section is larger than threshold, add it to the free space manager */
if (size >= f->shared->fs_threshold) {
- HDassert(f->shared->fs_man[fs_type]);
+ assert(f->shared->fs_man[fs_type]);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Before H5FS_sect_add()\n", __func__);
+ fprintf(stderr, "%s: Before H5FS_sect_add()\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Add to the free space for the file */
@@ -1204,7 +1202,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
node = NULL;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: After H5FS_sect_add()\n", __func__);
+ fprintf(stderr, "%s: After H5FS_sect_add()\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
else {
@@ -1237,7 +1235,7 @@ done:
HDONE_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node")
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
@@ -1281,15 +1279,15 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr,
- "%s: Entering: alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE
- ", extra_requested = %" PRIuHSIZE "\n",
- __func__, (unsigned)alloc_type, addr, size, extra_requested);
+ fprintf(stderr,
+ "%s: Entering: alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE
+ ", extra_requested = %" PRIuHSIZE "\n",
+ __func__, (unsigned)alloc_type, addr, size, extra_requested);
#endif /* H5MF_ALLOC_DEBUG */
/* Sanity check */
- HDassert(f);
- HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
+ assert(f);
+ assert(H5F_INTENT(f) & H5F_ACC_RDWR);
/* Set mapped type, treating global heap as raw data */
map_type = (alloc_type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : alloc_type;
@@ -1315,7 +1313,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
* page boundary if extended */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, alloc_type)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa")
- HDassert(!(eoa % f->shared->fs_page_size));
+ assert(!(eoa % f->shared->fs_page_size));
H5MF_EOA_MISALIGN(f, (eoa + extra_requested), f->shared->fs_page_size, frag_size);
} /* end else */
@@ -1336,7 +1334,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
if ((ret_value = H5F__try_extend(f, map_type, end, extra_requested + frag_size)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending file")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: extended = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: extended = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* If extending at EOA succeeds: */
@@ -1345,7 +1343,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
H5MF_free_section_t *node = NULL; /* Free space section pointer */
/* Should be large-sized block */
- HDassert(size >= f->shared->fs_page_size);
+ assert(size >= f->shared->fs_page_size);
/* Start up the free-space manager */
if (!(f->shared->fs_man[fs_type]))
@@ -1374,7 +1372,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending aggregation block")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: H5MF__aggr_try_extend = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: H5MF__aggr_try_extend = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
@@ -1400,7 +1398,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL,
"error extending block in free space manager")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Try to H5FS_sect_try_extend = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Try to H5FS_sect_try_extend = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
@@ -1411,8 +1409,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
if (frag_size <= H5F_PGEND_META_THRES(f) && extra_requested <= frag_size)
ret_value = TRUE;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Try to extend into the page end threshold = %d\n", __func__,
- ret_value);
+ fprintf(stderr, "%s: Try to extend into the page end threshold = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
} /* end if */
@@ -1424,7 +1421,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
@@ -1459,20 +1456,20 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
- __func__, (unsigned)alloc_type, addr, size);
+ fprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
+ __func__, (unsigned)alloc_type, addr, size);
#endif /* H5MF_ALLOC_DEBUG */
/* check arguments */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(H5F_addr_defined(addr));
- HDassert(size > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(H5F_addr_defined(addr));
+ assert(size > 0);
/* Set up free-space section class information */
sect_cls = H5MF_SECT_CLS_TYPE(f, size);
- HDassert(sect_cls);
+ assert(sect_cls);
/* Get free space type from allocation type */
H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &fs_type);
@@ -1499,7 +1496,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
if ((ret_value = (*sect_cls->can_shrink)((const H5FS_section_info_t *)node, &udata)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, "can't check if section can shrink container")
if (ret_value > 0) {
- HDassert(sect_cls->shrink);
+ assert(sect_cls->shrink);
if ((*sect_cls->shrink)((H5FS_section_info_t **)&node, &udata) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink container")
@@ -1516,7 +1513,7 @@ done:
HDONE_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node")
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving, ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5MF_try_shrink() */
@@ -1540,12 +1537,12 @@ H5MF_close(H5F_t *f)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", __func__);
+ fprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
if (H5F_PAGED_AGGR(f)) {
if ((ret_value = H5MF__close_pagefs(f)) < 0)
@@ -1558,7 +1555,7 @@ H5MF_close(H5F_t *f)
done:
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", __func__);
+ fprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5MF_close() */
@@ -1584,21 +1581,21 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", __func__);
+ fprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
if (H5F_PAGED_AGGR(f))
- HDassert(type < H5F_MEM_PAGE_NTYPES);
+ assert(type < H5F_MEM_PAGE_NTYPES);
else
- HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
+ assert((H5FD_mem_t)type < H5FD_MEM_NTYPES);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n",
- __func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type,
- f->shared->fs_addr[type]);
+ fprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n",
+ __func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type,
+ f->shared->fs_addr[type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* If the free space manager for this type is open, close it */
@@ -1607,9 +1604,9 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager")
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n",
- __func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type,
- f->shared->fs_addr[type]);
+ fprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n",
+ __func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type,
+ f->shared->fs_addr[type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* If there is free space manager info for this type, delete it */
@@ -1619,7 +1616,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
done:
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", __func__);
+ fprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MF__close_delete() */
@@ -1648,11 +1645,11 @@ H5MF_try_close(H5F_t *f)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", __func__);
+ fprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
- HDassert(f);
+ assert(f);
/* If there have been no file space allocations / deallocation so
* far, must call H5MF_tidy_self_referential_fsm_hack() to float
@@ -1727,7 +1724,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", __func__);
+ fprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* H5MF_try_close() */
@@ -1755,14 +1752,14 @@ H5MF__close_aggrfs(H5F_t *f)
FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", __func__);
+ fprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(f->shared->sblock);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(f->shared->sblock);
/* Set the ring type in the API context. In most cases, we will
* need H5AC_RING_RDFSM, so initially set the ring in
@@ -1789,7 +1786,7 @@ H5MF__close_aggrfs(H5F_t *f)
/* superblock extension and free space manager message should
* exist at this point -- verify at least the former.
*/
- HDassert(H5F_addr_defined(f->shared->sblock->ext_addr));
+ assert(H5F_addr_defined(f->shared->sblock->ext_addr));
/* file space for all non-empty free space managers should be
* allocated at this point, and these free space managers should
@@ -1832,7 +1829,7 @@ H5MF__close_aggrfs(H5F_t *f)
curr_ring = needed_ring;
} /* end if */
- HDassert(f->shared->fs_state[type] == H5F_FS_STATE_OPEN);
+ assert(f->shared->fs_state[type] == H5F_FS_STATE_OPEN);
if (H5FS_close(f, f->shared->fs_man[type]) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close free space manager")
@@ -1845,16 +1842,16 @@ H5MF__close_aggrfs(H5F_t *f)
/* verify that we haven't dirtied any metadata cache entries
* from the metadata free space manager ring out.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
/* verify that the aggregators are still shutdown. */
- HDassert(f->shared->sdata_aggr.tot_size == 0);
- HDassert(f->shared->sdata_aggr.addr == 0);
- HDassert(f->shared->sdata_aggr.size == 0);
+ assert(f->shared->sdata_aggr.tot_size == 0);
+ assert(f->shared->sdata_aggr.addr == 0);
+ assert(f->shared->sdata_aggr.size == 0);
- HDassert(f->shared->meta_aggr.tot_size == 0);
- HDassert(f->shared->meta_aggr.addr == 0);
- HDassert(f->shared->meta_aggr.size == 0);
+ assert(f->shared->meta_aggr.tot_size == 0);
+ assert(f->shared->meta_aggr.addr == 0);
+ assert(f->shared->meta_aggr.size == 0);
/* Trying shrinking the EOA for the file */
/* (in case any free space is now at the EOA) */
@@ -1869,7 +1866,7 @@ H5MF__close_aggrfs(H5F_t *f)
* been no file space allocation or deallocation since file
* open.
*/
- HDassert(H5F_NULL_FSM_ADDR(f) || final_eoa == f->shared->eoa_fsm_fsalloc);
+ assert(H5F_NULL_FSM_ADDR(f) || final_eoa == f->shared->eoa_fsm_fsalloc);
} /* end if */
else { /* super_vers can be 0, 1, 2 */
for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; type++)
@@ -1893,7 +1890,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", __func__);
+ fprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF__close_aggrfs() */
@@ -1921,16 +1918,16 @@ H5MF__close_pagefs(H5F_t *f)
FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Entering\n", __func__);
+ fprintf(stderr, "%s: Entering\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(f->shared->sblock);
- HDassert(f->shared->fs_page_size);
- HDassert(f->shared->sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(f->shared->sblock);
+ assert(f->shared->fs_page_size);
+ assert(f->shared->sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2);
/* Set the ring type in the API context. In most cases, we will
* need H5AC_RING_RDFSM, so initially set the ring in
@@ -1961,7 +1958,7 @@ H5MF__close_pagefs(H5F_t *f)
/* superblock extension and free space manager message should
* exist at this point -- verify at least the former.
*/
- HDassert(H5F_addr_defined(f->shared->sblock->ext_addr));
+ assert(H5F_addr_defined(f->shared->sblock->ext_addr));
/* file space for all non-empty free space managers should be
* allocated at this point, and these free space managers should
@@ -1998,7 +1995,7 @@ H5MF__close_pagefs(H5F_t *f)
curr_ring = needed_ring;
} /* end if */
- HDassert(f->shared->fs_state[ptype] == H5F_FS_STATE_OPEN);
+ assert(f->shared->fs_state[ptype] == H5F_FS_STATE_OPEN);
if (H5FS_close(f, f->shared->fs_man[ptype]) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close free space manager")
@@ -2011,7 +2008,7 @@ H5MF__close_pagefs(H5F_t *f)
/* verify that we haven't dirtied any metadata cache entries
* from the metadata free space manager ring out.
*/
- HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
+ assert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM));
/* Trying shrinking the EOA for the file */
/* (in case any free space is now at the EOA) */
@@ -2038,9 +2035,9 @@ H5MF__close_pagefs(H5F_t *f)
* the file driver layer. However, as this possibility seems remote,
* it is ignored in the following assert.
*/
- HDassert((H5F_NULL_FSM_ADDR(f)) || (final_eoa == f->shared->eoa_fsm_fsalloc) ||
- ((H5F_addr_defined(f->shared->eoa_post_mdci_fsalloc)) &&
- (final_eoa == f->shared->eoa_post_mdci_fsalloc)));
+ assert((H5F_NULL_FSM_ADDR(f)) || (final_eoa == f->shared->eoa_fsm_fsalloc) ||
+ ((H5F_addr_defined(f->shared->eoa_post_mdci_fsalloc)) &&
+ (final_eoa == f->shared->eoa_post_mdci_fsalloc)));
} /* end if */
else {
/* Iterate over all the free space types that have managers
@@ -2068,7 +2065,7 @@ done:
H5AC_set_ring(orig_ring, NULL);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Leaving\n", __func__);
+ fprintf(stderr, "%s: Leaving\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF__close_pagefs() */
@@ -2101,8 +2098,8 @@ H5MF__close_shrink_eoa(H5F_t *f)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
/* Construct user data for callbacks */
udata.f = f;
@@ -2219,9 +2216,9 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
/* Set the ring type in the API context. In most cases, we will
* need H5AC_RING_RDFSM, so initially set the ring in
@@ -2262,7 +2259,7 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size)
if (!f->shared->fs_man[type] && H5F_addr_defined(f->shared->fs_addr[type])) {
if (H5MF__open_fstype(f, type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space")
- HDassert(f->shared->fs_man[type]);
+ assert(f->shared->fs_man[type]);
fs_started[type] = TRUE;
} /* end if */
@@ -2355,9 +2352,9 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
/* check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
/* H5MF_tidy_self_referential_fsm_hack() will fail if any self
* referential FSM is opened prior to the call to it. Thus call
@@ -2415,7 +2412,7 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t
if (!f->shared->fs_man[ty] && H5F_addr_defined(f->shared->fs_addr[ty])) {
if (H5MF__open_fstype(f, ty) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't open the free space manager")
- HDassert(f->shared->fs_man[ty]);
+ assert(f->shared->fs_man[ty]);
fs_started = TRUE;
} /* end if */
@@ -2498,10 +2495,10 @@ H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(sect_udata);
- HDassert(nums);
- HDassert(fspace);
+ assert(f);
+ assert(sect_udata);
+ assert(nums);
+ assert(fspace);
/* Query how many sections of this type */
if (H5FS_sect_stats(fspace, NULL, &hnums) < 0)
@@ -2636,13 +2633,13 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(fsm_settled);
+ assert(f);
+ assert(f->shared);
+ assert(fsm_settled);
/* Initialize structs */
- HDmemset(&fsinfo, 0, sizeof(fsinfo));
- HDmemset(&fs_stat, 0, sizeof(fs_stat));
+ memset(&fsinfo, 0, sizeof(fsinfo));
+ memset(&fs_stat, 0, sizeof(fs_stat));
/*
* Only need to settle things if we are persisting free space and
@@ -2653,19 +2650,19 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
hbool_t fsm_visited[H5F_MEM_PAGE_NTYPES]; /* State of FSM */
/* Sanity check */
- HDassert(f->shared->sblock);
+ assert(f->shared->sblock);
/* should only be called if file is opened R/W */
- HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
+ assert(H5F_INTENT(f) & H5F_ACC_RDWR);
/* shouldn't be called unless we have a superblock supporting the
* superblock extension.
*/
- HDassert(f->shared->sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2);
+ assert(f->shared->sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2);
/* Initialize fsm_opened and fsm_visited */
- HDmemset(fsm_opened, 0, sizeof(fsm_opened));
- HDmemset(fsm_visited, 0, sizeof(fsm_visited));
+ memset(fsm_opened, 0, sizeof(fsm_opened));
+ memset(fsm_visited, 0, sizeof(fsm_visited));
/* 1) Reduce the EOA to the extent possible. */
@@ -2733,15 +2730,15 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
H5MF__alloc_to_fs_type(f->shared, mem_type, alloc_size, &fsm_type);
if (pass_count == 0) { /* this is the first pass */
- HDassert(fsm_type > H5F_MEM_PAGE_DEFAULT);
- HDassert(fsm_type < H5F_MEM_PAGE_LARGE_SUPER);
+ assert(fsm_type > H5F_MEM_PAGE_DEFAULT);
+ assert(fsm_type < H5F_MEM_PAGE_LARGE_SUPER);
} /* end if */
else if (H5F_PAGED_AGGR(f)) { /* page alloc active */
- HDassert(fsm_type >= H5F_MEM_PAGE_LARGE_SUPER);
- HDassert(fsm_type < H5F_MEM_PAGE_NTYPES);
+ assert(fsm_type >= H5F_MEM_PAGE_LARGE_SUPER);
+ assert(fsm_type < H5F_MEM_PAGE_NTYPES);
} /* end else-if */
else /* paged allocation disabled -- should be unreachable */
- HDassert(FALSE);
+ assert(FALSE);
if (!fsm_visited[fsm_type]) {
fsm_visited[fsm_type] = TRUE;
@@ -2753,7 +2750,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
if (NULL == f->shared->fs_man[fsm_type]) {
if (H5F_addr_defined(f->shared->fs_addr[fsm_type])) {
/* Sanity check */
- HDassert(fsm_opened[fsm_type] == FALSE);
+ assert(fsm_opened[fsm_type] == FALSE);
if (H5MF__open_fstype(f, fsm_type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL,
@@ -2879,15 +2876,15 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
H5MF__alloc_to_fs_type(f->shared, mem_type, alloc_size, &fsm_type);
if (pass_count == 0) { /* this is the first pass */
- HDassert(fsm_type > H5F_MEM_PAGE_DEFAULT);
- HDassert(fsm_type < H5F_MEM_PAGE_LARGE_SUPER);
+ assert(fsm_type > H5F_MEM_PAGE_DEFAULT);
+ assert(fsm_type < H5F_MEM_PAGE_LARGE_SUPER);
} /* end if */
else if (H5F_PAGED_AGGR(f)) { /* page alloc active */
- HDassert(fsm_type >= H5F_MEM_PAGE_LARGE_SUPER);
- HDassert(fsm_type < H5F_MEM_PAGE_NTYPES);
+ assert(fsm_type >= H5F_MEM_PAGE_LARGE_SUPER);
+ assert(fsm_type < H5F_MEM_PAGE_NTYPES);
} /* end else-if */
else /* paged allocation disabled -- should be unreachable */
- HDassert(FALSE);
+ assert(FALSE);
/* Test to see if we need to switch rings -- do so if required */
if (H5MF__fsm_type_is_self_referential(f->shared, fsm_type))
@@ -2915,7 +2912,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
*/
if (!H5MF__fsm_type_is_self_referential(f->shared, fsm_type)) {
/* The current ring should be H5AC_RING_RDFSM */
- HDassert(curr_ring == H5AC_RING_RDFSM);
+ assert(curr_ring == H5AC_RING_RDFSM);
/* Query free space manager info for this type */
if (H5FS_stat_info(f, f->shared->fs_man[fsm_type], &fs_stat) < 0)
@@ -2928,7 +2925,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
*/
if (fs_stat.serial_sect_count > 0) {
/* Sanity check */
- HDassert(!H5F_addr_defined(fs_stat.addr));
+ assert(!H5F_addr_defined(fs_stat.addr));
/* Allocate FSM header */
if (H5FS_alloc_hdr(f, f->shared->fs_man[fsm_type],
@@ -2937,8 +2934,8 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
"can't allocated free-space header")
/* Allocate FSM section info */
- HDassert(!H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.alloc_sect_size == 0);
+ assert(!H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.alloc_sect_size == 0);
if (H5FS_alloc_sect(f, f->shared->fs_man[fsm_type]) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
"can't allocate free-space section info")
@@ -2949,18 +2946,18 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
"can't get free-space info")
- HDassert(H5F_addr_defined(fs_stat.addr));
- HDassert(H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.serial_sect_count > 0);
- HDassert(fs_stat.alloc_sect_size > 0);
- HDassert(fs_stat.alloc_sect_size == fs_stat.sect_size);
+ assert(H5F_addr_defined(fs_stat.addr));
+ assert(H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.serial_sect_count > 0);
+ assert(fs_stat.alloc_sect_size > 0);
+ assert(fs_stat.alloc_sect_size == fs_stat.sect_size);
#endif /* NDEBUG */
} /* end if */
else {
- HDassert(!H5F_addr_defined(fs_stat.addr));
- HDassert(!H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.serial_sect_count == 0);
- HDassert(fs_stat.alloc_sect_size == 0);
+ assert(!H5F_addr_defined(fs_stat.addr));
+ assert(!H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.serial_sect_count == 0);
+ assert(fs_stat.alloc_sect_size == 0);
} /* end else */
} /* end if */
} /* end if */
@@ -2978,7 +2975,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
/* verify that all opened FSMs were closed */
for (fsm_type = H5F_MEM_PAGE_SUPER; fsm_type < H5F_MEM_PAGE_NTYPES; fsm_type++)
- HDassert(!fsm_opened[fsm_type]);
+ assert(!fsm_opened[fsm_type]);
/* Indicate that the FSM was settled successfully */
*fsm_settled = TRUE;
@@ -3108,9 +3105,9 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(fsm_settled);
+ assert(f);
+ assert(f->shared);
+ assert(fsm_settled);
/*
* Only need to settle things if we are persisting free space and
@@ -3118,22 +3115,22 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
*/
if (f->shared->fs_persist && !H5F_NULL_FSM_ADDR(f)) {
/* Sanity check */
- HDassert(f->shared->lf);
+ assert(f->shared->lf);
/* should only be called if file is opened R/W */
- HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
+ assert(H5F_INTENT(f) & H5F_ACC_RDWR);
H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_FSPACE_HDR, (size_t)1, &sm_fshdr_fs_type);
H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_FSPACE_SINFO, (size_t)1, &sm_fssinfo_fs_type);
- HDassert(sm_fshdr_fs_type > H5F_MEM_PAGE_DEFAULT);
- HDassert(sm_fshdr_fs_type < H5F_MEM_PAGE_LARGE_SUPER);
+ assert(sm_fshdr_fs_type > H5F_MEM_PAGE_DEFAULT);
+ assert(sm_fshdr_fs_type < H5F_MEM_PAGE_LARGE_SUPER);
- HDassert(sm_fssinfo_fs_type > H5F_MEM_PAGE_DEFAULT);
- HDassert(sm_fssinfo_fs_type < H5F_MEM_PAGE_LARGE_SUPER);
+ assert(sm_fssinfo_fs_type > H5F_MEM_PAGE_DEFAULT);
+ assert(sm_fssinfo_fs_type < H5F_MEM_PAGE_LARGE_SUPER);
- HDassert(!H5F_addr_defined(f->shared->fs_addr[sm_fshdr_fs_type]));
- HDassert(!H5F_addr_defined(f->shared->fs_addr[sm_fssinfo_fs_type]));
+ assert(!H5F_addr_defined(f->shared->fs_addr[sm_fshdr_fs_type]));
+ assert(!H5F_addr_defined(f->shared->fs_addr[sm_fssinfo_fs_type]));
/* Note that in most cases, sm_hdr_fspace will equal sm_sinfo_fspace. */
sm_hdr_fspace = f->shared->fs_man[sm_fshdr_fs_type];
@@ -3145,14 +3142,14 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_FSPACE_SINFO, f->shared->fs_page_size + 1,
&lg_fssinfo_fs_type);
- HDassert(lg_fshdr_fs_type >= H5F_MEM_PAGE_LARGE_SUPER);
- HDassert(lg_fshdr_fs_type < H5F_MEM_PAGE_NTYPES);
+ assert(lg_fshdr_fs_type >= H5F_MEM_PAGE_LARGE_SUPER);
+ assert(lg_fshdr_fs_type < H5F_MEM_PAGE_NTYPES);
- HDassert(lg_fssinfo_fs_type >= H5F_MEM_PAGE_LARGE_SUPER);
- HDassert(lg_fssinfo_fs_type < H5F_MEM_PAGE_NTYPES);
+ assert(lg_fssinfo_fs_type >= H5F_MEM_PAGE_LARGE_SUPER);
+ assert(lg_fssinfo_fs_type < H5F_MEM_PAGE_NTYPES);
- HDassert(!H5F_addr_defined(f->shared->fs_addr[lg_fshdr_fs_type]));
- HDassert(!H5F_addr_defined(f->shared->fs_addr[lg_fssinfo_fs_type]));
+ assert(!H5F_addr_defined(f->shared->fs_addr[lg_fshdr_fs_type]));
+ assert(!H5F_addr_defined(f->shared->fs_addr[lg_fssinfo_fs_type]));
/* Note that in most cases, lg_hdr_fspace will equal lg_sinfo_fspace. */
lg_hdr_fspace = f->shared->fs_man[lg_fshdr_fs_type];
@@ -3171,9 +3168,9 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
if (H5FS_stat_info(f, sm_hdr_fspace, &fs_stat) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info")
- HDassert(!H5F_addr_defined(fs_stat.addr));
- HDassert(!H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.alloc_sect_size == 0);
+ assert(!H5F_addr_defined(fs_stat.addr));
+ assert(!H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.alloc_sect_size == 0);
} /* end if */
/* Verify that sm_sinfo_fspace is floating if it exists and is distinct */
@@ -3182,9 +3179,9 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
if (H5FS_stat_info(f, sm_sinfo_fspace, &fs_stat) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info")
- HDassert(!H5F_addr_defined(fs_stat.addr));
- HDassert(!H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.alloc_sect_size == 0);
+ assert(!H5F_addr_defined(fs_stat.addr));
+ assert(!H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.alloc_sect_size == 0);
} /* end if */
if (H5F_PAGED_AGGR(f)) {
@@ -3194,9 +3191,9 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
if (H5FS_stat_info(f, lg_hdr_fspace, &fs_stat) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info (3)")
- HDassert(!H5F_addr_defined(fs_stat.addr));
- HDassert(!H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.alloc_sect_size == 0);
+ assert(!H5F_addr_defined(fs_stat.addr));
+ assert(!H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.alloc_sect_size == 0);
} /* end if */
/* Verify that lg_sinfo_fspace is floating if it
@@ -3207,9 +3204,9 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled)
if (H5FS_stat_info(f, lg_sinfo_fspace, &fs_stat) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info (4)")
- HDassert(!H5F_addr_defined(fs_stat.addr));
- HDassert(!H5F_addr_defined(fs_stat.sect_addr));
- HDassert(fs_stat.alloc_sect_size == 0);
+ assert(!H5F_addr_defined(fs_stat.addr));
+ assert(!H5F_addr_defined(fs_stat.sect_addr));
+ assert(fs_stat.alloc_sect_size == 0);
} /* end if */
} /* end if */
}
@@ -3343,8 +3340,8 @@ H5MF__continue_alloc_fsm(H5F_shared_t *f_sh, H5FS_t *sm_hdr_fspace, H5FS_t *sm_s
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(f_sh);
- HDassert(continue_alloc_fsm);
+ assert(f_sh);
+ assert(continue_alloc_fsm);
/* Check sm_hdr_fspace */
if (sm_hdr_fspace && sm_hdr_fspace->serial_sect_count > 0 && sm_hdr_fspace->sinfo)
@@ -3395,9 +3392,9 @@ H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f_sh);
- HDassert(fsm_type >= H5F_MEM_PAGE_DEFAULT);
- HDassert(fsm_type < H5F_MEM_PAGE_NTYPES);
+ assert(f_sh);
+ assert(fsm_type >= H5F_MEM_PAGE_DEFAULT);
+ assert(fsm_type < H5F_MEM_PAGE_NTYPES);
H5MF__alloc_to_fs_type(f_sh, H5FD_MEM_FSPACE_HDR, (size_t)1, &sm_fshdr_fsm);
H5MF__alloc_to_fs_type(f_sh, H5FD_MEM_FSPACE_SINFO, (size_t)1, &sm_fssinfo_fsm);
@@ -3448,8 +3445,8 @@ H5MF__fsm_is_self_referential(H5F_shared_t *f_sh, H5FS_t *fspace)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f_sh);
- HDassert(fspace);
+ assert(f_sh);
+ assert(fspace);
H5MF__alloc_to_fs_type(f_sh, H5FD_MEM_FSPACE_HDR, (size_t)1, &sm_fshdr_fsm);
H5MF__alloc_to_fs_type(f_sh, H5FD_MEM_FSPACE_SINFO, (size_t)1, &sm_fssinfo_fsm);
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c
index e8a5299..f5e4b34 100644
--- a/src/H5MFaggr.c
+++ b/src/H5MFaggr.c
@@ -91,14 +91,14 @@ H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
+ fprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
#endif /* H5MF_AGGR_DEBUG */
/* check arguments */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
- HDassert(size > 0);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
+ assert(size > 0);
/* Couldn't find anything from the free space manager, go allocate some */
if (alloc_type != H5FD_MEM_DRAW && alloc_type != H5FD_MEM_GHEAP) {
@@ -115,12 +115,12 @@ H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
} /* end else */
/* Sanity check for overlapping into file's temporary allocation space */
- HDassert(H5F_addr_le((ret_value + size), f->shared->tmp_addr));
+ assert(H5F_addr_le((ret_value + size), f->shared->tmp_addr));
done:
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
- size);
+ fprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
+ size);
#endif /* H5MF_AGGR_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
@@ -150,20 +150,20 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
FUNC_ENTER_PACKAGE
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size);
+ fprintf(stderr, "%s: type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)type, size);
#endif /* H5MF_AGGR_DEBUG */
/* check args */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
- HDassert(other_aggr);
- HDassert(other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
- HDassert(other_aggr->feature_flag != aggr->feature_flag);
- HDassert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
- HDassert(size > 0);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(other_aggr);
+ assert(other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ other_aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(other_aggr->feature_flag != aggr->feature_flag);
+ assert(type >= H5FD_MEM_DEFAULT && type < H5FD_MEM_NTYPES);
+ assert(size > 0);
/* Get the EOA for the file */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, type)))
@@ -199,8 +199,8 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
H5FD_mem_t alloc_type, other_alloc_type; /* Current aggregator & 'other' aggregator types */
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: aggr = {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", __func__,
- aggr->addr, aggr->tot_size, aggr->size);
+ fprintf(stderr, "%s: aggr = {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", __func__,
+ aggr->addr, aggr->tot_size, aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Turn off alignment if allocation < threshold */
@@ -268,7 +268,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
/* Allocate another block */
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: Allocating block\n", __func__);
+ fprintf(stderr, "%s: Allocating block\n", __func__);
#endif /* H5MF_AGGR_DEBUG */
if (aggr_frag_size > (ext_size - size))
@@ -320,7 +320,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
* been allocated in an aligned manner if the aggregator
* block is larger than the threshold */
if (eoa_frag_size && !alignment) {
- HDassert(eoa_frag_addr + eoa_frag_size == new_space);
+ assert(eoa_frag_addr + eoa_frag_size == new_space);
aggr->addr = eoa_frag_addr;
aggr->size = aggr->alloc_size + eoa_frag_size;
aggr->tot_size = aggr->size;
@@ -380,15 +380,15 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F
} /* end else */
/* Sanity check for overlapping into file's temporary allocation space */
- HDassert(H5F_addr_le((ret_value + size), f->shared->tmp_addr));
+ assert(H5F_addr_le((ret_value + size), f->shared->tmp_addr));
/* Post-condition sanity check */
if (H5F_ALIGNMENT(f) && size >= H5F_THRESHOLD(f))
- HDassert(!((ret_value + H5FD_get_base_addr(f->shared->lf)) % H5F_ALIGNMENT(f)));
+ assert(!((ret_value + H5FD_get_base_addr(f->shared->lf)) % H5F_ALIGNMENT(f)));
done:
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", __func__, ret_value);
+ fprintf(stderr, "%s: ret_value = %" PRIuHADDR "\n", __func__, ret_value);
#endif /* H5MF_AGGR_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF__aggr_alloc() */
@@ -426,10 +426,10 @@ done:
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
/* Check if this aggregator is active */
if (f->shared->feature_flags & aggr->feature_flag) {
@@ -524,12 +524,12 @@ done:
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
- HDassert(sect);
- HDassert(shrink);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(sect);
+ assert(shrink);
/* Check if this aggregator is active */
if (f->shared->feature_flags & aggr->feature_flag) {
@@ -537,11 +537,11 @@ done:
if (H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr) ||
H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr)) {
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins aggr = {%" PRIuHADDR
- ", %" PRIuHSIZE "}\n",
- "H5MF__aggr_can_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr,
- aggr->size);
+ fprintf(stderr,
+ "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins aggr = {%" PRIuHADDR
+ ", %" PRIuHSIZE "}\n",
+ "H5MF__aggr_can_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr,
+ aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Check if aggregator would get too large and should be absorbed into section */
if ((aggr->size + sect->sect_info.size) >= aggr->alloc_size)
@@ -578,37 +578,37 @@ done:
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
- HDassert(f->shared->feature_flags & aggr->feature_flag);
- HDassert(sect);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(f->shared->feature_flags & aggr->feature_flag);
+ assert(sect);
/* Check if aggregator would get too large and should be absorbed into section */
if ((aggr->size + sect->sect_info.size) >= aggr->alloc_size && allow_sect_absorb) {
/* Check if the section adjoins the beginning or end of the aggregator */
if (H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)) {
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr,
- "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of section = {%" PRIuHADDR
- ", %" PRIuHSIZE "}\n",
- "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr,
- sect->sect_info.size);
+ fprintf(stderr,
+ "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of section = {%" PRIuHADDR
+ ", %" PRIuHSIZE "}\n",
+ "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr,
+ sect->sect_info.size);
#endif /* H5MF_AGGR_DEBUG */
/* Absorb aggregator onto end of section */
sect->sect_info.size += aggr->size;
} /* end if */
else {
/* Sanity check */
- HDassert(H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr));
+ assert(H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr));
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr,
- "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of section = {%" PRIuHADDR
- ", %" PRIuHSIZE "}\n",
- "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr,
- sect->sect_info.size);
+ fprintf(stderr,
+ "%s: aggr {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of section = {%" PRIuHADDR
+ ", %" PRIuHSIZE "}\n",
+ "H5MF__aggr_absorb", aggr->addr, aggr->size, sect->sect_info.addr,
+ sect->sect_info.size);
#endif /* H5MF_AGGR_DEBUG */
/* Absorb aggregator onto beginning of section */
sect->sect_info.addr -= aggr->size;
@@ -624,11 +624,11 @@ done:
/* Check if the section adjoins the beginning or end of the aggregator */
if (H5F_addr_eq((sect->sect_info.addr + sect->sect_info.size), aggr->addr)) {
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of aggr = {%" PRIuHADDR
- ", %" PRIuHSIZE "}\n",
- "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr,
- aggr->size);
+ fprintf(stderr,
+ "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins front of aggr = {%" PRIuHADDR
+ ", %" PRIuHSIZE "}\n",
+ "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr,
+ aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Absorb section onto front of aggregator */
aggr->addr -= sect->sect_info.size;
@@ -641,20 +641,20 @@ done:
} /* end if */
else {
/* Sanity check */
- HDassert(H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr));
+ assert(H5F_addr_eq((aggr->addr + aggr->size), sect->sect_info.addr));
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of aggr = {%" PRIuHADDR
- ", %" PRIuHSIZE "}\n",
- "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr,
- aggr->size);
+ fprintf(stderr,
+ "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "} adjoins end of aggr = {%" PRIuHADDR
+ ", %" PRIuHSIZE "}\n",
+ "H5MF__aggr_absorb", sect->sect_info.addr, sect->sect_info.size, aggr->addr,
+ aggr->size);
#endif /* H5MF_AGGR_DEBUG */
/* Absorb section onto end of aggregator */
aggr->size += sect->sect_info.size;
} /* end if */
/* Sanity check */
- HDassert(!allow_sect_absorb || (aggr->size < aggr->alloc_size));
+ assert(!allow_sect_absorb || (aggr->size < aggr->alloc_size));
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -678,10 +678,10 @@ done:
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
/* Check if this aggregator is active */
if (f->shared->feature_flags & aggr->feature_flag) {
@@ -715,10 +715,10 @@ done:
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
/* Set the type of memory in the file */
alloc_type = (aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA
@@ -734,8 +734,8 @@ done:
tmp_addr = aggr->addr;
tmp_size = aggr->size;
#ifdef H5MF_AGGR_DEBUG
- HDfprintf(stderr, "%s: tmp_addr = %" PRIuHADDR ", tmp_size = %" PRIuHSIZE "\n", __func__,
- tmp_addr, tmp_size);
+ fprintf(stderr, "%s: tmp_addr = %" PRIuHADDR ", tmp_size = %" PRIuHSIZE "\n", __func__, tmp_addr,
+ tmp_size);
#endif /* H5MF_AGGR_DEBUG */
/* Reset aggregator block information */
@@ -780,9 +780,9 @@ done:
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(f);
- HDassert(f->shared);
- HDassert(f->shared->lf);
+ assert(f);
+ assert(f->shared);
+ assert(f->shared->lf);
/* Retrieve metadata aggregator info, if available */
if (H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size) < 0)
@@ -840,10 +840,10 @@ done:
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(aggr);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(f);
+ assert(aggr);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
/* Get the EOA for the file */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, type)))
@@ -878,15 +878,15 @@ done:
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(f->shared->lf);
- HDassert(aggr);
- HDassert(H5F_addr_defined(aggr->addr));
- HDassert(aggr->size > 0);
- HDassert(H5F_INTENT(f) & H5F_ACC_RDWR);
- HDassert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
- aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
- HDassert(f->shared->feature_flags & aggr->feature_flag);
+ assert(f);
+ assert(f->shared->lf);
+ assert(aggr);
+ assert(H5F_addr_defined(aggr->addr));
+ assert(aggr->size > 0);
+ assert(H5F_INTENT(f) & H5F_ACC_RDWR);
+ assert(aggr->feature_flag == H5FD_FEAT_AGGREGATE_METADATA ||
+ aggr->feature_flag == H5FD_FEAT_AGGREGATE_SMALLDATA);
+ assert(f->shared->feature_flags & aggr->feature_flag);
/* Free the remaining space at EOA in the aggregator */
if (H5F__free(f, type, aggr->addr, aggr->size) < 0)
@@ -923,8 +923,8 @@ done:
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(f->shared);
+ assert(f);
+ assert(f->shared);
if ((ma_status = H5MF__aggr_can_shrink_eoa(f, H5FD_MEM_DEFAULT, &(f->shared->meta_aggr))) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query metadata aggregator stats")
diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c
index 09bf086..a8775f3 100644
--- a/src/H5MFdbg.c
+++ b/src/H5MFdbg.c
@@ -99,24 +99,24 @@ H5MF__sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/*
* Check arguments.
*/
- HDassert(sect);
- HDassert(udata);
+ assert(sect);
+ assert(udata);
/* Print generic section information */
- HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:",
- (sect->sect_info.type == H5MF_FSPACE_SECT_SIMPLE
- ? "simple"
- : (sect->sect_info.type == H5MF_FSPACE_SECT_SMALL
- ? "small"
- : (sect->sect_info.type == H5MF_FSPACE_SECT_LARGE ? "large" : "unknown"))));
- HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
- "Section address:", sect->sect_info.addr);
- HDfprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth,
- "Section size:", sect->sect_info.size);
- HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
- "End of section:", (haddr_t)((sect->sect_info.addr + sect->sect_info.size) - 1));
- HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
- "Section state:", (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized"));
+ fprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section type:",
+ (sect->sect_info.type == H5MF_FSPACE_SECT_SIMPLE
+ ? "simple"
+ : (sect->sect_info.type == H5MF_FSPACE_SECT_SMALL
+ ? "small"
+ : (sect->sect_info.type == H5MF_FSPACE_SECT_LARGE ? "large" : "unknown"))));
+ fprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
+ "Section address:", sect->sect_info.addr);
+ fprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth,
+ "Section size:", sect->sect_info.size);
+ fprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth,
+ "End of section:", (haddr_t)((sect->sect_info.addr + sect->sect_info.size) - 1));
+ fprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
+ "Section state:", (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized"));
/* Dump section-specific debugging information */
if (H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) <
@@ -150,10 +150,10 @@ H5MF_sects_debug(H5F_t *f, haddr_t fs_addr, FILE *stream, int indent, int fwidth
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
for (type = H5F_MEM_PAGE_DEFAULT; type < H5F_MEM_PAGE_NTYPES; type++)
if (H5F_addr_eq(f->shared->fs_addr[type], fs_addr)) {
@@ -209,20 +209,20 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
FUNC_ENTER_PACKAGE_TAG(H5AC__FREESPACE_TAG)
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: Dumping file free space sections\n", __func__);
+ fprintf(stderr, "%s: Dumping file free space sections\n", __func__);
#endif /* H5MF_ALLOC_DEBUG */
/*
* Check arguments.
*/
- HDassert(f);
- HDassert(stream);
+ assert(f);
+ assert(stream);
/* Retrieve the 'eoa' for the file */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %" PRIuHADDR "\n", __func__, eoa);
+ fprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %" PRIuHADDR "\n", __func__, eoa);
#endif /* H5MF_ALLOC_DEBUG */
if (H5F_PAGED_AGGR(f)) { /* File space paging */
@@ -230,10 +230,10 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
for (ptype = H5F_MEM_PAGE_META; ptype < H5F_MEM_PAGE_NTYPES; ptype++) {
/* Print header for type */
- HDfprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)ptype);
+ fprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)ptype);
/* Print header for sections */
- HDfprintf(stream, "%*sSections:\n", indent + 3, "");
+ fprintf(stream, "%*sSections:\n", indent + 3, "");
/* If there is a free space manager for this type, iterate over them */
if (f->shared->fs_man[ptype]) {
@@ -251,7 +251,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
} /* end if */
else
/* No sections of this type */
- HDfprintf(stream, "%*s<none>\n", indent + 6, "");
+ fprintf(stream, "%*s<none>\n", indent + 6, "");
} /* end for */
} /* end if */
else { /* not file space paging */
@@ -264,34 +264,33 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
/* Retrieve metadata aggregator info, if available */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr,
- "%s: ma_addr = %" PRIuHADDR ", ma_size = %" PRIuHSIZE ", end of ma = %" PRIuHADDR "\n",
- __func__, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1));
+ fprintf(stderr,
+ "%s: ma_addr = %" PRIuHADDR ", ma_size = %" PRIuHSIZE ", end of ma = %" PRIuHADDR "\n",
+ __func__, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1));
#endif /* H5MF_ALLOC_DEBUG */
/* Retrieve 'small data' aggregator info, if available */
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size);
#ifdef H5MF_ALLOC_DEBUG
- HDfprintf(stderr,
- "%s: sda_addr = %" PRIuHADDR ", sda_size = %" PRIuHSIZE ", end of sda = %" PRIuHADDR "\n",
- __func__, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1));
+ fprintf(stderr,
+ "%s: sda_addr = %" PRIuHADDR ", sda_size = %" PRIuHSIZE ", end of sda = %" PRIuHADDR "\n",
+ __func__, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1));
#endif /* H5MF_ALLOC_DEBUG */
/* Iterate over all the free space types that have managers and dump each free list's space */
for (atype = H5FD_MEM_DEFAULT; atype < H5FD_MEM_NTYPES; atype++) {
/* Print header for type */
- HDfprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)atype);
+ fprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)atype);
/* Check for this type being mapped to another type */
if (H5FD_MEM_DEFAULT == f->shared->fs_type_map[atype] || atype == f->shared->fs_type_map[atype]) {
/* Retrieve the 'eoa' for this file memory type */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, atype)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3),
- "eoa:", eoa);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3), "eoa:", eoa);
/* Print header for sections */
- HDfprintf(stream, "%*sSections:\n", indent + 3, "");
+ fprintf(stream, "%*sSections:\n", indent + 3, "");
/* If there is a free space manager for this type, iterate over them */
if (f->shared->fs_man[atype]) {
@@ -308,16 +307,16 @@ H5MF__sects_dump(H5F_t *f, FILE *stream)
HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space")
} /* end if */
else /* No sections of this type */
- HDfprintf(stream, "%*s<none>\n", indent + 6, "");
+ fprintf(stream, "%*s<none>\n", indent + 6, "");
} /* end if */
else
- HDfprintf(stream, "%*sMapped to type = %u\n", indent, "",
- (unsigned)f->shared->fs_type_map[atype]);
+ fprintf(stream, "%*sMapped to type = %u\n", indent, "",
+ (unsigned)f->shared->fs_type_map[atype]);
} /* end for */
} /* end else */
done:
- HDfprintf(stderr, "%s: Done dumping file free space sections\n", __func__);
+ fprintf(stderr, "%s: Done dumping file free space sections\n", __func__);
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5MF__sects_dump() */
#endif /* H5MF_ALLOC_DEBUG_DUMP */
diff --git a/src/H5MFsection.c b/src/H5MFsection.c
index 1e30fbc..c1210e9 100644
--- a/src/H5MFsection.c
+++ b/src/H5MFsection.c
@@ -193,7 +193,7 @@ H5MF__sect_new(unsigned ctype, haddr_t sect_off, hsize_t sect_size)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect_size);
+ assert(sect_size);
/* Create free space section node */
if (NULL == (sect = H5FL_MALLOC(H5MF_free_section_t)))
@@ -236,7 +236,7 @@ H5MF__sect_free(H5FS_section_info_t *_sect)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
/* Release the section */
sect = H5FL_FREE(H5MF_free_section_t, sect);
@@ -267,9 +267,9 @@ H5MF__sect_deserialize(const H5FS_section_class_t *cls, const uint8_t H5_ATTR_UN
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(cls);
- HDassert(H5F_addr_defined(sect_addr));
- HDassert(sect_size);
+ assert(cls);
+ assert(H5F_addr_defined(sect_addr));
+ assert(sect_size);
/* Create free space section for block */
if (NULL == (sect = H5MF__sect_new(cls->type, sect_addr, sect_size)))
@@ -309,7 +309,7 @@ H5MF__sect_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5FS_sect
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect);
+ assert(sect);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5MF__sect_valid() */
@@ -376,10 +376,10 @@ H5MF__sect_simple_can_merge(const H5FS_section_info_t *_sect1, const H5FS_sectio
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect1);
- HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ assert(sect1);
+ assert(sect2);
+ assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ assert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Check if second section adjoins first section */
ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
@@ -413,11 +413,11 @@ H5MF__sect_simple_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect1);
- HDassert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SIMPLE);
- HDassert(sect2);
- HDassert(sect2->sect_info.type == H5MF_FSPACE_SECT_SIMPLE);
- HDassert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
+ assert(sect1);
+ assert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SIMPLE);
+ assert(sect2);
+ assert(sect2->sect_info.type == H5MF_FSPACE_SECT_SIMPLE);
+ assert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
/* Add second section's size to first section */
(*sect1)->sect_info.size += sect2->sect_info.size;
@@ -455,9 +455,9 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(udata);
- HDassert(udata->f);
+ assert(sect);
+ assert(udata);
+ assert(udata->f);
/* Retrieve the end of the file's address space */
if (HADDR_UNDEF == (eoa = H5F_get_eoa(udata->f, udata->alloc_type)))
@@ -471,9 +471,8 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the shrinking type */
udata->shrink = H5MF_SHRINK_EOA;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n",
- __func__, sect->sect_info.addr, sect->sect_info.size, eoa);
+ fprintf(stderr, "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n",
+ __func__, sect->sect_info.addr, sect->sect_info.size, eoa);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
@@ -496,9 +495,8 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the aggregator to operate on */
udata->aggr = &(udata->f->shared->meta_aggr);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins metadata aggregator\n",
- __func__, sect->sect_info.addr, sect->sect_info.size);
+ fprintf(stderr, "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins metadata aggregator\n",
+ __func__, sect->sect_info.addr, sect->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
@@ -518,9 +516,9 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the aggregator to operate on */
udata->aggr = &(udata->f->shared->sdata_aggr);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins small data aggregator\n",
- __func__, sect->sect_info.addr, sect->sect_info.size);
+ fprintf(stderr,
+ "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, adjoins small data aggregator\n",
+ __func__, sect->sect_info.addr, sect->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
@@ -559,14 +557,14 @@ H5MF__sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(udata);
- HDassert(udata->f);
+ assert(sect);
+ assert(udata);
+ assert(udata->f);
/* Check for shrinking file */
if (H5MF_SHRINK_EOA == udata->shrink) {
/* Sanity check */
- HDassert(H5F_INTENT(udata->f) & H5F_ACC_RDWR);
+ assert(H5F_INTENT(udata->f) & H5F_ACC_RDWR);
/* Release section's space at EOA */
if (H5F__free(udata->f, udata->alloc_type, (*sect)->sect_info.addr, (*sect)->sect_info.size) < 0)
@@ -574,7 +572,7 @@ H5MF__sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata)
} /* end if */
else {
/* Sanity check */
- HDassert(udata->aggr);
+ assert(udata->aggr);
/* Absorb the section into the aggregator or vice versa */
if (H5MF__aggr_absorb(udata->f, udata->aggr, *sect, udata->allow_sect_absorb) < 0)
@@ -627,8 +625,8 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata)
FUNC_ENTER_PACKAGE
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Entering, section {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__,
- (*sect)->sect_info.addr, (*sect)->sect_info.size);
+ fprintf(stderr, "%s: Entering, section {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__,
+ (*sect)->sect_info.addr, (*sect)->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Do not adjust the section raw data or global heap data */
@@ -648,15 +646,15 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata)
*flags &= (unsigned)~H5FS_ADD_RETURNED_SPACE;
*flags |= H5FS_PAGE_END_NO_ADD;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section is dropped\n", __func__);
+ fprintf(stderr, "%s: section is dropped\n", __func__);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
/* Adjust the section if it is not at page end but its size + prem is at page end */
else if (prem <= H5F_PGEND_META_THRES(udata->f)) {
(*sect)->sect_info.size += prem;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: section is adjusted {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__,
- (*sect)->sect_info.addr, (*sect)->sect_info.size);
+ fprintf(stderr, "%s: section is adjusted {%" PRIuHADDR ", %" PRIuHSIZE "}\n", __func__,
+ (*sect)->sect_info.addr, (*sect)->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
} /* end if */
@@ -690,10 +688,10 @@ H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect1);
- HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ assert(sect1);
+ assert(sect2);
+ assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ assert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Check if second section adjoins first section */
ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
@@ -704,7 +702,7 @@ H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
ret_value = FALSE;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
FUNC_LEAVE_NOAPI(ret_value)
@@ -737,11 +735,11 @@ H5MF__sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect1);
- HDassert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SMALL);
- HDassert(sect2);
- HDassert(sect2->sect_info.type == H5MF_FSPACE_SECT_SMALL);
- HDassert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
+ assert(sect1);
+ assert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SMALL);
+ assert(sect2);
+ assert(sect2->sect_info.type == H5MF_FSPACE_SECT_SMALL);
+ assert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
/* Add second section's size to first section */
(*sect1)->sect_info.size += sect2->sect_info.size;
@@ -800,15 +798,15 @@ H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
- HDassert(sect1);
- HDassert(sect2);
- HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ assert(sect1);
+ assert(sect2);
+ assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
+ assert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
+ fprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
#endif /* H5MF_ALLOC_DEBUG_MORE */
FUNC_LEAVE_NOAPI(ret_value)
@@ -838,11 +836,11 @@ H5MF__sect_large_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect1);
- HDassert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_LARGE);
- HDassert(sect2);
- HDassert(sect2->sect_info.type == H5MF_FSPACE_SECT_LARGE);
- HDassert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
+ assert(sect1);
+ assert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_LARGE);
+ assert(sect2);
+ assert(sect2->sect_info.type == H5MF_FSPACE_SECT_LARGE);
+ assert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
/* Add second section's size to first section */
(*sect1)->sect_info.size += sect2->sect_info.size;
@@ -879,10 +877,10 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert(sect->sect_info.type == H5MF_FSPACE_SECT_LARGE);
- HDassert(udata);
- HDassert(udata->f);
+ assert(sect);
+ assert(sect->sect_info.type == H5MF_FSPACE_SECT_LARGE);
+ assert(udata);
+ assert(udata->f);
/* Retrieve the end of the file's address space */
if (HADDR_UNDEF == (eoa = H5FD_get_eoa(udata->f->shared->lf, udata->alloc_type)))
@@ -896,9 +894,8 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
/* Set the shrinking type */
udata->shrink = H5MF_SHRINK_EOA;
#ifdef H5MF_ALLOC_DEBUG_MORE
- HDfprintf(stderr,
- "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n",
- __func__, sect->sect_info.addr, sect->sect_info.size, eoa);
+ fprintf(stderr, "%s: section {%" PRIuHADDR ", %" PRIuHSIZE "}, shrinks file, eoa = %" PRIuHADDR "\n",
+ __func__, sect->sect_info.addr, sect->sect_info.size, eoa);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Indicate shrinking can occur */
@@ -932,13 +929,13 @@ H5MF__sect_large_shrink(H5FS_section_info_t **_sect, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(sect);
- HDassert((*sect)->sect_info.type == H5MF_FSPACE_SECT_LARGE);
- HDassert(udata);
- HDassert(udata->f);
- HDassert(udata->shrink == H5MF_SHRINK_EOA);
- HDassert(H5F_INTENT(udata->f) & H5F_ACC_RDWR);
- HDassert(H5F_PAGED_AGGR(udata->f));
+ assert(sect);
+ assert((*sect)->sect_info.type == H5MF_FSPACE_SECT_LARGE);
+ assert(udata);
+ assert(udata->f);
+ assert(udata->shrink == H5MF_SHRINK_EOA);
+ assert(H5F_INTENT(udata->f) & H5F_ACC_RDWR);
+ assert(H5F_PAGED_AGGR(udata->f));
/* Calculate possible mis-aligned fragment */
H5MF_EOA_MISALIGN(udata->f, (*sect)->sect_info.addr, udata->f->shared->fs_page_size, frag_size);
diff --git a/src/H5MM.c b/src/H5MM.c
index aa4c6ce..d45c1c3 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -77,7 +77,7 @@ H5MM_malloc(size_t size)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- ret_value = HDmalloc(size);
+ ret_value = malloc(size);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MM_malloc() */
@@ -106,7 +106,7 @@ H5MM_calloc(size_t size)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- ret_value = HDcalloc(1, size);
+ ret_value = calloc(1, size);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MM_calloc() */
@@ -141,7 +141,7 @@ H5MM_realloc(void *mem, size_t size)
/* Not defined in the standard, return NULL */
ret_value = NULL;
else {
- ret_value = HDrealloc(mem, size);
+ ret_value = realloc(mem, size);
/* Some platforms do not return NULL if size is zero. */
if (0 == size)
@@ -255,7 +255,7 @@ H5MM_xfree(void *mem)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDfree(mem);
+ free(mem);
FUNC_LEAVE_NOAPI(NULL)
} /* end H5MM_xfree() */
@@ -301,14 +301,14 @@ H5MM_memcpy(void *dest, const void *src, size_t n)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(dest);
- HDassert(src);
+ assert(dest);
+ assert(src);
/* Check for buffer overlap */
- HDassert((char *)dest >= (const char *)src + n || (const char *)src >= (char *)dest + n);
+ assert((char *)dest >= (const char *)src + n || (const char *)src >= (char *)dest + n);
/* Copy */
- ret = HDmemcpy(dest, src, n);
+ ret = memcpy(dest, src, n);
FUNC_LEAVE_NOAPI(ret)
diff --git a/src/H5O.c b/src/H5O.c
index c92f4ae..b3b869d 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -2235,7 +2235,7 @@ H5O__are_mdc_flushes_disabled(const H5O_loc_t *oloc, hbool_t *are_disabled)
FUNC_ENTER_PACKAGE
- HDassert(are_disabled);
+ assert(are_disabled);
if (H5AC_cork(oloc->file, oloc->addr, H5AC__GET_CORKED, are_disabled) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve object's cork status");
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index f2ce582..178bfc8 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -100,8 +100,8 @@ H5O__ainfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
sizeof_addr = H5F_sizeof_addr(f);
@@ -186,9 +186,9 @@ H5O__ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(ainfo);
+ assert(f);
+ assert(p);
+ assert(ainfo);
/* Message version */
*p++ = H5O_AINFO_VERSION;
@@ -212,7 +212,7 @@ H5O__ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
if (ainfo->index_corder)
H5F_addr_encode(f, &p, ainfo->corder_bt2_addr);
else
- HDassert(!H5F_addr_defined(ainfo->corder_bt2_addr));
+ assert(!H5F_addr_defined(ainfo->corder_bt2_addr));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__ainfo_encode() */
@@ -241,7 +241,7 @@ H5O__ainfo_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(ainfo);
+ assert(ainfo);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_ainfo_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -309,7 +309,7 @@ H5O__ainfo_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_ainfo_t, mesg);
@@ -339,9 +339,9 @@ H5O__ainfo_delete(H5F_t *f, H5O_t H5_ATTR_NDEBUG_UNUSED *open_oh, void *_mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(ainfo);
- HDassert(open_oh);
+ assert(f);
+ assert(ainfo);
+ assert(open_oh);
/* If the object is using "dense" attribute storage, delete it */
if (H5F_addr_defined(ainfo->fheap_addr))
@@ -374,8 +374,8 @@ H5O__ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUS
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(deleted);
- HDassert(cpy_info);
+ assert(deleted);
+ assert(cpy_info);
/* If we are not copying attributes into the destination file, indicate
* that this message should be deleted.
@@ -411,11 +411,11 @@ H5O__ainfo_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, void *mesg_src, H5F_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file_src);
- HDassert(ainfo_src);
- HDassert(file_dst);
- HDassert(cpy_info);
- HDassert(!cpy_info->copy_without_attr);
+ assert(file_src);
+ assert(ainfo_src);
+ assert(file_dst);
+ assert(cpy_info);
+ assert(!cpy_info->copy_without_attr);
/* Allocate space for the destination message */
if (NULL == (ainfo_dst = H5FL_MALLOC(H5O_ainfo_t)))
@@ -473,7 +473,7 @@ H5O__ainfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_l
FUNC_ENTER_PACKAGE
- HDassert(ainfo_src);
+ assert(ainfo_src);
if (H5F_addr_defined(ainfo_src->fheap_addr))
if (H5A__dense_post_copy_file_all(src_oloc, ainfo_src, dst_oloc, (H5O_ainfo_t *)mesg_dst, cpy_info) <
@@ -504,25 +504,25 @@ H5O__ainfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(ainfo);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of attributes:", ainfo->nattrs);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Track creation order of attributes:", ainfo->track_corder ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Index creation order of attributes:", ainfo->index_corder ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. creation index value:", (unsigned)ainfo->max_crt_idx);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "'Dense' attribute storage fractal heap address:", ainfo->fheap_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "'Dense' attribute storage name index v2 B-tree address:", ainfo->name_bt2_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "'Dense' attribute storage creation order index v2 B-tree address:", ainfo->corder_bt2_addr);
+ assert(f);
+ assert(ainfo);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of attributes:", ainfo->nattrs);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Track creation order of attributes:", ainfo->track_corder ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Index creation order of attributes:", ainfo->index_corder ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Max. creation index value:", (unsigned)ainfo->max_crt_idx);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "'Dense' attribute storage fractal heap address:", ainfo->fheap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "'Dense' attribute storage name index v2 B-tree address:", ainfo->name_bt2_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "'Dense' attribute storage creation order index v2 B-tree address:", ainfo->corder_bt2_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__ainfo_debug() */
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 8484678..8b15ee1 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -108,11 +108,11 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(oh->version > H5O_VERSION_1);
- HDassert(chk_dirtied);
- HDassert(new_gap_loc);
- HDassert(new_gap_size);
+ assert(oh);
+ assert(oh->version > H5O_VERSION_1);
+ assert(chk_dirtied);
+ assert(new_gap_loc);
+ assert(new_gap_size);
#ifndef NDEBUG
if (chunkno > 0) {
@@ -124,7 +124,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
"unable to check metadata cache status for object header chunk proxy")
/* Make certain that object header is protected */
- HDassert(chk_proxy_status & H5AC_ES__IS_PROTECTED);
+ assert(chk_proxy_status & H5AC_ES__IS_PROTECTED);
} /* end if */
#endif /* NDEBUG */
@@ -135,7 +135,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
/* (a null message that's not the one we are eliminating) */
if (H5O_NULL_ID == oh->mesg[u].type->id && oh->mesg[u].chunkno == chunkno && u != idx) {
/* Sanity check - chunks with null messages shouldn't have a gap */
- HDassert(oh->chunk[chunkno].gap == 0);
+ assert(oh->chunk[chunkno].gap == 0);
/* Eliminate the gap in the chunk */
if (H5O__eliminate_gap(oh, chk_dirtied, &oh->mesg[u], new_gap_loc, new_gap_size) < 0)
@@ -184,7 +184,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_
/* Zero out new null message's raw data */
if (null_msg->raw_size)
- HDmemset(null_msg->raw, 0, null_msg->raw_size);
+ memset(null_msg->raw, 0, null_msg->raw_size);
/* Mark message as dirty */
null_msg->dirty = TRUE;
@@ -231,12 +231,12 @@ H5O__eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *g
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(oh);
- HDassert(oh->version > H5O_VERSION_1);
- HDassert(chk_dirtied);
- HDassert(mesg);
- HDassert(gap_loc);
- HDassert(gap_size);
+ assert(oh);
+ assert(oh->version > H5O_VERSION_1);
+ assert(chk_dirtied);
+ assert(mesg);
+ assert(gap_loc);
+ assert(gap_size);
/* Check if the null message is before or after the gap produced */
null_before_gap = (hbool_t)(mesg->raw < gap_loc);
@@ -291,7 +291,7 @@ H5O__eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg, uint8_t *g
} /* end if */
/* Zero out addition to null message */
- HDmemset(mesg->raw + mesg->raw_size, 0, gap_size);
+ memset(mesg->raw + mesg->raw_size, 0, gap_size);
/* Adjust size of null message */
mesg->raw_size += gap_size;
@@ -331,9 +331,9 @@ H5O__alloc_null(H5F_t *f, H5O_t *oh, size_t null_idx, const H5O_msg_class_t *new
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(new_type);
- HDassert(new_size);
+ assert(oh);
+ assert(new_type);
+ assert(new_size);
/* Point to null message to allocate out of */
alloc_msg = &oh->mesg[null_idx];
@@ -439,7 +439,7 @@ H5O__alloc_msgs(H5O_t *oh, size_t min_alloc)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
+ assert(oh);
/* Initialize number of messages information */
old_alloc = oh->alloc_nmesgs;
@@ -454,7 +454,7 @@ H5O__alloc_msgs(H5O_t *oh, size_t min_alloc)
oh->mesg = new_mesg;
/* Set new object header info to zeros */
- HDmemset(&oh->mesg[old_alloc], 0, (oh->alloc_nmesgs - old_alloc) * sizeof(H5O_mesg_t));
+ memset(&oh->mesg[old_alloc], 0, (oh->alloc_nmesgs - old_alloc) * sizeof(H5O_mesg_t));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -509,12 +509,12 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f != NULL);
- HDassert(oh != NULL);
- HDassert(chunkno < oh->nchunks);
- HDassert(size > 0);
- HDassert(msg_idx != NULL);
- HDassert(H5F_addr_defined(oh->chunk[chunkno].addr));
+ assert(f != NULL);
+ assert(oh != NULL);
+ assert(chunkno < oh->nchunks);
+ assert(size > 0);
+ assert(msg_idx != NULL);
+ assert(H5F_addr_defined(oh->chunk[chunkno].addr));
/* Test to see if the specified chunk ends with a null messages.
* If successful, set the index of the null message in extend_msg.
@@ -535,7 +535,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
/* If we can extend an existing null message, adjust the delta appropriately */
if (extended_msg) {
- HDassert(oh->chunk[chunkno].gap == 0);
+ assert(oh->chunk[chunkno].gap == 0);
delta = aligned_size - oh->mesg[extend_msg].raw_size;
} /* end if */
else
@@ -547,7 +547,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
uint64_t chunk0_size; /* Size of chunk 0's data */
size_t orig_prfx_size = (size_t)1 << (oh->flags & H5O_HDR_CHUNK0_SIZE); /* Original prefix size */
- HDassert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh));
+ assert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh));
chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
/* Check for moving to a 8-byte size encoding */
@@ -631,7 +631,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
oh->chunk[chunkno].gap = 0;
/* Wipe new space for chunk */
- HDmemset(oh->chunk[chunkno].image + old_size, 0, oh->chunk[chunkno].size - old_size);
+ memset(oh->chunk[chunkno].image + old_size, 0, oh->chunk[chunkno].size - old_size);
/* Move chunk 0 data up if the size flags changed */
if (adjust_size_flags)
@@ -659,7 +659,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
/* Adjust size in continuation message */
- HDassert(((H5O_cont_t *)(oh->mesg[u].native))->size == old_size);
+ assert(((H5O_cont_t *)(oh->mesg[u].native))->size == old_size);
((H5O_cont_t *)(oh->mesg[u].native))->size = oh->chunk[chunkno].size;
/* Flag continuation message as dirty */
@@ -725,11 +725,11 @@ H5O__alloc_find_best_nonnull(const H5F_t *f, const H5O_t *oh, size_t *size, H5O_
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(f);
- HDassert(oh);
- HDassert(size);
- HDassert(*size > 0);
- HDassert(found_msg);
+ assert(f);
+ assert(oh);
+ assert(size);
+ assert(*size > 0);
+ assert(found_msg);
/*
* Find the smallest message that could be moved to make room for the
@@ -881,10 +881,10 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(found_msg);
- HDassert(new_idx);
+ assert(f);
+ assert(oh);
+ assert(found_msg);
+ assert(new_idx);
/*
* The total chunk size must include the requested space plus enough
@@ -892,7 +892,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
* aligned properly.
*/
size = MAX(H5O_MIN_SIZE, size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
- HDassert(size == H5O_ALIGN_OH(oh, size));
+ assert(size == H5O_ALIGN_OH(oh, size));
/*
* The total chunk size must include enough space for the checksum
@@ -966,7 +966,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
oh->nmesgs--;
} /* end if */
else {
- HDassert(curr_msg->type->id != H5O_CONT_ID);
+ assert(curr_msg->type->id != H5O_CONT_ID);
/* Copy the raw data */
H5MM_memcpy(p, curr_msg->raw - (size_t)H5O_SIZEOF_MSGHDR_OH(oh),
@@ -997,7 +997,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
(size_t)H5O_SIZEOF_MSGHDR_OH(oh);
null_msg->chunkno = chunkno - 1;
- HDassert(null_msg->raw_size >= cont_size);
+ assert(null_msg->raw_size >= cont_size);
/* Remove any gap in the chunk */
oh->chunk[chunkno - 1].gap = 0;
@@ -1040,7 +1040,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
/* Add any available space after the message to move to the new null message */
if (found_msg->gap_size > 0) {
/* Absorb a gap after the moved message */
- HDassert(oh->chunk[null_msg->chunkno].gap == found_msg->gap_size);
+ assert(oh->chunk[null_msg->chunkno].gap == found_msg->gap_size);
null_msg->raw_size += found_msg->gap_size;
oh->chunk[null_msg->chunkno].gap = 0;
} /* end if */
@@ -1049,8 +1049,8 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_
&oh->mesg[found_msg->null_msgno]; /* Pointer to NULL message to eliminate */
/* Absorb a null message after the moved message */
- HDassert((null_msg->raw + null_msg->raw_size) ==
- (old_null_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)));
+ assert((null_msg->raw + null_msg->raw_size) ==
+ (old_null_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)));
null_msg->raw_size += found_msg->null_size;
/* Release any information/memory for message */
@@ -1155,8 +1155,8 @@ H5O__alloc_new_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t *new_idx)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(size > 0);
+ assert(oh);
+ assert(size > 0);
size = H5O_ALIGN_OH(oh, size);
/* Find the smallest null message that could hold a continuation message */
@@ -1202,9 +1202,9 @@ H5O__alloc_find_best_null(const H5O_t *oh, size_t size, size_t *mesg_idx)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(oh);
- HDassert(size > 0);
- HDassert(mesg_idx);
+ assert(oh);
+ assert(size > 0);
+ assert(mesg_idx);
/* Find the smallest null message that could hold the new object header message */
found_null = -1;
@@ -1277,10 +1277,10 @@ H5O__alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg, s
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(type);
- HDassert(mesg);
- HDassert(mesg_idx);
+ assert(oh);
+ assert(type);
+ assert(mesg);
+ assert(mesg_idx);
/* Compute the size needed to store the message in the object header */
raw_size = (type->raw_size)(f, FALSE, mesg);
@@ -1319,7 +1319,7 @@ H5O__alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg, s
if (H5O__alloc_new_chunk(f, oh, raw_size, &idx) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "unable to create a new object header data chunk")
} /* end if */
- HDassert(idx < oh->nmesgs);
+ assert(idx < oh->nmesgs);
/* Split the null message and point at continuation message */
if (H5O__alloc_null(f, oh, idx, type, NULL, aligned_size) < 0)
@@ -1359,9 +1359,9 @@ H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(mesg);
+ assert(f);
+ assert(oh);
+ assert(mesg);
/* Check if we should operate on the message */
if (adj_link)
@@ -1379,9 +1379,9 @@ H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link)
/* Change message type to nil and zero it */
mesg->type = H5O_MSG_NULL;
- HDassert(mesg->raw + mesg->raw_size <= (oh->chunk[mesg->chunkno].image + oh->chunk[mesg->chunkno].size) -
- (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[mesg->chunkno].gap));
- HDmemset(mesg->raw, 0, mesg->raw_size);
+ assert(mesg->raw + mesg->raw_size <= (oh->chunk[mesg->chunkno].image + oh->chunk[mesg->chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[mesg->chunkno].gap));
+ memset(mesg->raw, 0, mesg->raw_size);
/* Clear message flags */
mesg->flags = 0;
@@ -1433,8 +1433,8 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
FUNC_ENTER_PACKAGE
/* Check arguments. */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Get initial information */
cont_msg = &oh->mesg[cont_u];
@@ -1454,7 +1454,7 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
if (curr_msg->chunkno == deleted_chunkno) {
/* Find size of all non-null messages in the chunk pointed to by the continuation message */
if (curr_msg->type->id != H5O_NULL_ID) {
- HDassert(curr_msg->type->id != H5O_CONT_ID);
+ assert(curr_msg->type->id != H5O_CONT_ID);
nonnull_size += curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
} /* end if */
} /* end if */
@@ -1512,7 +1512,7 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
if (H5O__chunk_delete(f, oh, deleted_chunkno) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove chunk from cache")
- HDassert(move_start <= (move_end + gap_size));
+ assert(move_start <= (move_end + gap_size));
/* Check if there is space remaining in the continuation message */
/* (The remaining space can be gap or a null message) */
@@ -1605,7 +1605,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
+ assert(oh);
/* Loop until no messages packed */
/* (Double loop is not very efficient, but it would be some extra work to
@@ -1679,7 +1679,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
} /* end if */
} /* end for */
/* Should have been message after null message */
- HDassert(v < oh->nmesgs);
+ assert(v < oh->nmesgs);
} /* end if */
} /* end if */
else {
@@ -1729,8 +1729,8 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
/* The other chunks involved should never be
* chunk 0 */
- HDassert(curr_msg->chunkno > 0);
- HDassert(((H5O_cont_t *)(curr_msg->native))->chunkno > 0);
+ assert(curr_msg->chunkno > 0);
+ assert(((H5O_cont_t *)(curr_msg->native))->chunkno > 0);
/* Protect continuation message target chunk */
if (NULL == (cont_targ_chk_proxy = H5O__chunk_protect(
@@ -1743,9 +1743,9 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
if (cont_targ_chk_proxy->fd_parent) {
/* Remove flush dependency on old continuation
* message chunk */
- HDassert(cont_targ_chk_proxy);
- HDassert(curr_chk_proxy);
- HDassert((void *)curr_chk_proxy == cont_targ_chk_proxy->fd_parent);
+ assert(cont_targ_chk_proxy);
+ assert(curr_chk_proxy);
+ assert((void *)curr_chk_proxy == cont_targ_chk_proxy->fd_parent);
if (H5AC_destroy_flush_dependency(curr_chk_proxy, cont_targ_chk_proxy) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNDEPEND, FAIL,
@@ -1757,12 +1757,11 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
/* Avoid (another) flush dependency on chunk 0 */
if (0 != null_msg->chunkno) {
/* Sanity checks */
- HDassert(null_chk_mdc_obj);
- HDassert(((H5C_cache_entry_t *)null_chk_mdc_obj)->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(((H5C_cache_entry_t *)null_chk_mdc_obj)->type);
- HDassert(((H5C_cache_entry_t *)null_chk_mdc_obj)->type->id ==
- H5AC_OHDR_CHK_ID);
+ assert(null_chk_mdc_obj);
+ assert(((H5C_cache_entry_t *)null_chk_mdc_obj)->magic ==
+ H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(((H5C_cache_entry_t *)null_chk_mdc_obj)->type);
+ assert(((H5C_cache_entry_t *)null_chk_mdc_obj)->type->id == H5AC_OHDR_CHK_ID);
/* Create flush dependency on new continuation
* message chunk */
@@ -1950,7 +1949,7 @@ done:
"unable to unprotect continuation message target object header chunk")
} /* end if */
else
- HDassert(!null_chk_proxy && !curr_chk_proxy && !cont_targ_chk_proxy);
+ assert(!null_chk_proxy && !curr_chk_proxy && !cont_targ_chk_proxy);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O__move_msgs_forward() */
@@ -1978,7 +1977,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh != NULL);
+ assert(oh != NULL);
/* Loop until no messages merged */
/* (Double loop is not very efficient, but it would be some extra work to add
@@ -1998,7 +1997,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh)
unsigned v; /* Local index variable */
/* Should be no gaps in chunk with null message */
- HDassert(oh->chunk[curr_msg->chunkno].gap == 0);
+ assert(oh->chunk[curr_msg->chunkno].gap == 0);
/* Loop over messages again, looking for null message in same chunk */
for (v = 0, curr_msg2 = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg2++) {
@@ -2126,7 +2125,7 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh != NULL);
+ assert(oh != NULL);
/* Loop until no chunks are freed */
do {
@@ -2166,7 +2165,7 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
((H5O_cont_t *)(cont_msg->native))->chunkno = w;
break;
} /* end if */
- HDassert(((H5O_cont_t *)(cont_msg->native))->chunkno > 0);
+ assert(((H5O_cont_t *)(cont_msg->native))->chunkno > 0);
} /* end if */
/* Check for correct chunk to delete */
@@ -2175,9 +2174,9 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
} /* end if */
} /* end for */
/* Must be a continuation message that points to chunk containing null message */
- HDassert(v < oh->nmesgs);
- HDassert(cont_msg);
- HDassert(((H5O_cont_t *)(cont_msg->native))->chunkno == null_msg->chunkno);
+ assert(v < oh->nmesgs);
+ assert(cont_msg);
+ assert(((H5O_cont_t *)(cont_msg->native))->chunkno == null_msg->chunkno);
/* Initialize information about null message */
null_msg_no = u;
@@ -2241,7 +2240,7 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
/* Adjust chunk # for messages in chunks after deleted chunk */
for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
/* Sanity check - there should be no messages in deleted chunk */
- HDassert(curr_msg->chunkno != deleted_chunkno);
+ assert(curr_msg->chunkno != deleted_chunkno);
/* Adjust chunk index for messages in later chunks */
if (curr_msg->chunkno > deleted_chunkno)
@@ -2263,7 +2262,7 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh)
((H5O_cont_t *)(curr_msg->native))->chunkno = w;
break;
} /* end if */
- HDassert(((H5O_cont_t *)(curr_msg->native))->chunkno > 0);
+ assert(((H5O_cont_t *)(curr_msg->native))->chunkno > 0);
} /* end if */
else {
/* Check for pointer to chunk after deleted chunk */
@@ -2314,7 +2313,7 @@ H5O__condense_header(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh != NULL);
+ assert(oh != NULL);
/* Loop until no changed to the object header messages & chunks */
do {
@@ -2385,8 +2384,8 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Protect chunk */
if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, chunkno)))
@@ -2437,7 +2436,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
/* Check if the chunk is too small, extend if necessary */
total_msg_size = new_size - (size_t)(chunkno == 0 ? H5O_SIZEOF_HDR(oh) : H5O_SIZEOF_CHKHDR_OH(oh));
if (total_msg_size < min_chunk_size) {
- HDassert(oh->alloc_nmesgs > oh->nmesgs);
+ assert(oh->alloc_nmesgs > oh->nmesgs);
oh->nmesgs++;
/* Initialize new null message to make the chunk large enough */
@@ -2519,7 +2518,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk")
/* Adjust size of continuation message */
- HDassert(((H5O_cont_t *)(curr_msg->native))->size == old_size);
+ assert(((H5O_cont_t *)(curr_msg->native))->size == old_size);
((H5O_cont_t *)(curr_msg->native))->size = chunk->size;
/* Flag continuation message as dirty */
@@ -2531,7 +2530,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno)
} /* end if */
} /* end for */
- HDassert(new_size <= old_size);
+ assert(new_size <= old_size);
/* Resize the chunk in the cache */
if (H5O__chunk_resize(oh, chk_proxy) < 0)
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 1d48a78..f8ab53b 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -132,8 +132,8 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (attr = H5FL_CALLOC(H5A_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -332,9 +332,9 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(attr);
+ assert(f);
+ assert(p);
+ assert(attr);
/* Check whether datatype and dataspace are shared */
if ((is_type_shared = H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt)) < 0)
@@ -373,7 +373,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
H5MM_memcpy(p, attr->shared->name, name_len);
if (attr->shared->version < H5O_ATTR_VERSION_2) {
/* Pad to the correct number of bytes */
- HDmemset(p + name_len, 0, H5O_ALIGN_OLD(name_len) - name_len);
+ memset(p + name_len, 0, H5O_ALIGN_OLD(name_len) - name_len);
p += H5O_ALIGN_OLD(name_len);
} /* end if */
else
@@ -384,7 +384,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute datatype")
if (attr->shared->version < H5O_ATTR_VERSION_2) {
- HDmemset(p + attr->shared->dt_size, 0, H5O_ALIGN_OLD(attr->shared->dt_size) - attr->shared->dt_size);
+ memset(p + attr->shared->dt_size, 0, H5O_ALIGN_OLD(attr->shared->dt_size) - attr->shared->dt_size);
p += H5O_ALIGN_OLD(attr->shared->dt_size);
} /* end if */
else
@@ -395,7 +395,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute dataspace")
if (attr->shared->version < H5O_ATTR_VERSION_2) {
- HDmemset(p + attr->shared->ds_size, 0, H5O_ALIGN_OLD(attr->shared->ds_size) - attr->shared->ds_size);
+ memset(p + attr->shared->ds_size, 0, H5O_ALIGN_OLD(attr->shared->ds_size) - attr->shared->ds_size);
p += H5O_ALIGN_OLD(attr->shared->ds_size);
} /* end if */
else
@@ -405,7 +405,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
if (attr->shared->data)
H5MM_memcpy(p, attr->shared->data, attr->shared->data_size);
else
- HDmemset(p, 0, attr->shared->data_size);
+ memset(p, 0, attr->shared->data_size);
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -434,7 +434,7 @@ H5O__attr_copy(const void *_src, void *_dst)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(_src);
+ assert(_src);
/* copy */
if (NULL == (ret_value = (H5A_t *)H5A__copy((H5A_t *)_dst, (const H5A_t *)_src)))
@@ -469,7 +469,7 @@ H5O__attr_size(const H5F_t H5_ATTR_UNUSED *f, const void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(attr);
+ assert(attr);
/* Common size information */
ret_value = 1 + /*version */
@@ -499,7 +499,7 @@ H5O__attr_size(const H5F_t H5_ATTR_UNUSED *f, const void *_mesg)
attr->shared->ds_size + /*dataspace */
attr->shared->data_size; /*the data itself */
else
- HDassert(0 && "Bad attribute version");
+ assert(0 && "Bad attribute version");
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__attr_size() */
@@ -545,7 +545,7 @@ H5O__attr_free(void *mesg)
FUNC_ENTER_PACKAGE
- HDassert(mesg);
+ assert(mesg);
if (H5A__close(attr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "unable to close attribute object")
@@ -575,8 +575,8 @@ H5O__attr_delete(H5F_t *f, H5O_t *oh, void *_mesg)
FUNC_ENTER_NOAPI_NOINIT
/* check args */
- HDassert(f);
- HDassert(attr);
+ assert(f);
+ assert(attr);
/* Decrement reference count on datatype in file */
if ((H5O_MSG_DTYPE->del)(f, oh, attr->shared->dt) < 0)
@@ -612,8 +612,8 @@ H5O__attr_link(H5F_t *f, H5O_t *oh, void *_mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(attr);
+ assert(f);
+ assert(attr);
/* Re-share attribute's datatype and dataspace to increment their
* reference count if they're shared.
@@ -653,9 +653,9 @@ H5O__attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(deleted);
- HDassert(cpy_info);
- HDassert(cpy_info->file_dst);
+ assert(deleted);
+ assert(cpy_info);
+ assert(cpy_info->file_dst);
/* Check to ensure that the version of the message to be copied does not exceed
* the message version allowed by the destination file's high bound.
@@ -696,10 +696,10 @@ H5O__attr_copy_file(H5F_t *file_src, const H5O_msg_class_t H5_ATTR_UNUSED *mesg_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(native_src);
- HDassert(file_dst);
- HDassert(cpy_info);
- HDassert(!cpy_info->copy_without_attr);
+ assert(native_src);
+ assert(file_dst);
+ assert(cpy_info);
+ assert(!cpy_info->copy_without_attr);
/* Mark datatype as being on disk now. This step used to be done in a lower level
* by H5O_dtype_decode. But it has been moved up. Not an ideal place, but no better
@@ -765,8 +765,8 @@ H5O__attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx /*out*/)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(attr);
- HDassert(crt_idx);
+ assert(attr);
+ assert(crt_idx);
/* Get the attribute's creation index */
*crt_idx = attr->shared->crt_idx;
@@ -793,7 +793,7 @@ H5O__attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(attr);
+ assert(attr);
/* Set the creation index */
attr->shared->crt_idx = crt_idx;
@@ -830,12 +830,12 @@ H5O__attr_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidt
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Name:", mesg->shared->name);
+ fprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Name:", mesg->shared->name);
switch (mesg->shared->encoding) {
case H5T_CSET_ASCII:
s = "ASCII";
@@ -869,25 +869,25 @@ H5O__attr_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set of Name:", s);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Object opened:", mesg->obj_opened ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object:", mesg->oloc.addr);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set of Name:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Object opened:", mesg->obj_opened ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object:", mesg->oloc.addr);
/* Check for attribute creation order index on the attribute */
if (mesg->shared->crt_idx != H5O_MAX_CRT_ORDER_IDX)
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Creation Index:", (unsigned)mesg->shared->crt_idx);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Creation Index:", (unsigned)mesg->shared->crt_idx);
- HDfprintf(stream, "%*sDatatype...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Encoded Size:", (unsigned long)(mesg->shared->dt_size));
+ fprintf(stream, "%*sDatatype...\n", indent, "");
+ fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Encoded Size:", (unsigned long)(mesg->shared->dt_size));
if ((H5O_MSG_DTYPE->debug)(f, mesg->shared->dt, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display datatype message info")
- HDfprintf(stream, "%*sDataspace...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Encoded Size:", (unsigned long)(mesg->shared->ds_size));
+ fprintf(stream, "%*sDataspace...\n", indent, "");
+ fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Encoded Size:", (unsigned long)(mesg->shared->ds_size));
if (H5S_debug(f, mesg->shared->ds, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display dataspace message info")
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index e4f1c42..541fd05 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -164,12 +164,12 @@ H5O__attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_U
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(mesg);
- HDassert(udata);
- HDassert(udata->f);
- HDassert(udata->ainfo);
- HDassert(attr);
+ assert(oh);
+ assert(mesg);
+ assert(udata);
+ assert(udata->f);
+ assert(udata->ainfo);
+ assert(attr);
/* Insert attribute into dense storage */
if (H5A__dense_insert(udata->f, udata->ainfo, attr) < 0)
@@ -210,8 +210,8 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
- HDassert(loc);
- HDassert(attr);
+ assert(loc);
+ assert(attr);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -240,9 +240,9 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr)
} /* end if */
else {
/* Sanity check attribute info read in */
- HDassert(ainfo.nattrs > 0);
- HDassert(ainfo.track_corder == ((oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) > 0));
- HDassert(ainfo.index_corder == ((oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) > 0));
+ assert(ainfo.nattrs > 0);
+ assert(ainfo.track_corder == ((oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) > 0));
+ assert(ainfo.index_corder == ((oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) > 0));
} /* end else */
/* Check if switching to "dense" attribute storage is possible */
@@ -404,9 +404,9 @@ H5O__attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(mesg);
- HDassert(!udata->attr);
+ assert(oh);
+ assert(mesg);
+ assert(!udata->attr);
/* Check for correct attribute message to modify */
if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
@@ -452,8 +452,8 @@ H5O__attr_open_by_name(const H5O_loc_t *loc, const char *name)
FUNC_ENTER_PACKAGE_TAG(loc->addr)
/* Check arguments */
- HDassert(loc);
- HDassert(name);
+ assert(loc);
+ assert(name);
/* Protect the object header to iterate over */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -502,7 +502,7 @@ H5O__attr_open_by_name(const H5O_loc_t *loc, const char *name)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute: '%s'", name)
/* Get attribute opened from object header */
- HDassert(udata.attr);
+ assert(udata.attr);
opened_attr = udata.attr;
} /* end else */
@@ -547,8 +547,8 @@ H5O__attr_open_by_idx_cb(const H5A_t *attr, void *_ret_attr)
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(attr);
- HDassert(ret_attr);
+ assert(attr);
+ assert(ret_attr);
/* Copy attribute information. Shared some attribute information. */
if (NULL == (*ret_attr = H5A__copy(NULL, attr)))
@@ -583,7 +583,7 @@ H5O__attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order_t
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
+ assert(loc);
/* Build attribute operator info */
attr_op.op_type = H5A_ATTR_OP_LIB;
@@ -731,8 +731,8 @@ H5O__attr_update_shared(H5F_t *f, H5O_t *oh, H5A_t *attr, H5O_shared_t *update_s
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(attr);
+ assert(f);
+ assert(attr);
/* Extract shared message info from current attribute (for later use) */
if (H5O_set_shared(&sh_mesg, &(attr->sh_loc)) < 0)
@@ -805,9 +805,9 @@ H5O__attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUS
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(mesg);
- HDassert(!udata->found);
+ assert(oh);
+ assert(mesg);
+ assert(!udata->found);
/* Check for correct attribute message to modify */
if (0 == HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->attr->shared->name)) {
@@ -820,9 +820,9 @@ H5O__attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUS
* The shared attribute structure will be different in that situation. SLU-2010/7/29 */
if (((H5A_t *)mesg->native)->shared != udata->attr->shared) {
/* Sanity check */
- HDassert(((H5A_t *)mesg->native)->shared->data);
- HDassert(udata->attr->shared->data);
- HDassert(((H5A_t *)mesg->native)->shared->data != udata->attr->shared->data);
+ assert(((H5A_t *)mesg->native)->shared->data);
+ assert(udata->attr->shared->data);
+ assert(((H5A_t *)mesg->native)->shared->data != udata->attr->shared->data);
/* (Needs to occur before updating the shared message, or the hash
* value on the old & new messages will be the same) */
@@ -885,8 +885,8 @@ H5O__attr_write(const H5O_loc_t *loc, H5A_t *attr)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(attr);
+ assert(loc);
+ assert(attr);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -961,9 +961,9 @@ H5O__attr_rename_chk_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/,
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(oh);
- HDassert(mesg);
- HDassert(!udata->found);
+ assert(oh);
+ assert(mesg);
+ assert(!udata->found);
/* Check for existing attribute with new name */
if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->new_name) == 0) {
@@ -1007,9 +1007,9 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(mesg);
- HDassert(!udata->found);
+ assert(oh);
+ assert(mesg);
+ assert(!udata->found);
/* Find correct attribute message to rename */
if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->old_name) == 0) {
@@ -1045,7 +1045,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
} /* end if */
else {
/* Sanity check */
- HDassert(H5O_msg_is_shared(H5O_ATTR_ID, (H5A_t *)mesg->native) == FALSE);
+ assert(H5O_msg_is_shared(H5O_ATTR_ID, (H5A_t *)mesg->native) == FALSE);
/* Check for attribute message changing size */
if (HDstrlen(udata->new_name) != HDstrlen(udata->old_name) ||
@@ -1083,7 +1083,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR
"unable to relocate renamed attribute in header")
/* Sanity check */
- HDassert(H5O_msg_is_shared(H5O_ATTR_ID, attr) == FALSE);
+ assert(H5O_msg_is_shared(H5O_ATTR_ID, attr) == FALSE);
/* Close the local copy of the attribute */
H5A__close(attr);
@@ -1130,9 +1130,9 @@ H5O__attr_rename(const H5O_loc_t *loc, const char *old_name, const char *new_nam
FUNC_ENTER_PACKAGE_TAG(loc->addr)
/* Check arguments */
- HDassert(loc);
- HDassert(old_name);
- HDassert(new_name);
+ assert(loc);
+ assert(old_name);
+ assert(new_name);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -1218,10 +1218,10 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, H5_index_t idx_type, H
FUNC_ENTER_NOAPI_NOINIT_TAG(loc->addr)
/* Check arguments */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(attr_op);
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(attr_op);
/* Protect the object header to iterate over */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -1302,7 +1302,7 @@ H5O__attr_iterate(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, hsiz
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(attr_op);
+ assert(attr_op);
/* Look up location for location ID */
if (H5G_loc(loc_id, &loc) < 0)
@@ -1346,9 +1346,9 @@ H5O__attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(oh);
- HDassert(ainfo);
+ assert(loc);
+ assert(oh);
+ assert(ainfo);
/* Decrement the number of attributes on the object */
ainfo->nattrs--;
@@ -1466,9 +1466,9 @@ H5O__attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNU
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(mesg);
- HDassert(!udata->found);
+ assert(oh);
+ assert(mesg);
+ assert(!udata->found);
/* Check for correct attribute message to modify */
if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
@@ -1513,8 +1513,8 @@ H5O__attr_remove(const H5O_loc_t *loc, const char *name)
FUNC_ENTER_PACKAGE_TAG(loc->addr)
/* Check arguments */
- HDassert(loc);
- HDassert(name);
+ assert(loc);
+ assert(name);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -1595,7 +1595,7 @@ H5O__attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order
FUNC_ENTER_PACKAGE_TAG(loc->addr)
/* Check arguments */
- HDassert(loc);
+ assert(loc);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -1681,9 +1681,9 @@ H5O__attr_count_real(H5F_t *f, H5O_t *oh, hsize_t *nattrs)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(oh);
- HDassert(nattrs);
+ assert(f);
+ assert(oh);
+ assert(nattrs);
/* Check for attributes stored densely */
if (oh->version > H5O_VERSION_1) {
@@ -1737,8 +1737,8 @@ H5O__attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/, unsig
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(mesg);
- HDassert(udata->exists && !*udata->exists);
+ assert(mesg);
+ assert(udata->exists && !*udata->exists);
/* Check for correct attribute message */
if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
@@ -1774,9 +1774,9 @@ H5O__attr_exists(const H5O_loc_t *loc, const char *name, hbool_t *attr_exists)
FUNC_ENTER_PACKAGE_TAG(loc->addr)
/* Check arguments */
- HDassert(loc);
- HDassert(name);
- HDassert(attr_exists);
+ assert(loc);
+ assert(name);
+ assert(attr_exists);
/* Protect the object header to iterate over */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -1840,9 +1840,9 @@ H5O__attr_bh_info(H5F_t *f, H5O_t *oh, H5_ih_info_t *bh_info)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(oh);
- HDassert(bh_info);
+ assert(f);
+ assert(oh);
+ assert(bh_info);
/* Attributes are only stored in fractal heap & indexed w/v2 B-tree in later versions */
if (oh->version > H5O_VERSION_1) {
diff --git a/src/H5Obogus.c b/src/H5Obogus.c
index 1b83ed1..20beaef 100644
--- a/src/H5Obogus.c
+++ b/src/H5Obogus.c
@@ -107,8 +107,8 @@ H5O__bogus_decode(H5F_t *f, H5O_t H5_ATTR_NDEBUG_UNUSED *open_oh, unsigned H5_AT
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Allocate the bogus message */
if (NULL == (mesg = (H5O_bogus_t *)H5MM_calloc(sizeof(H5O_bogus_t))))
@@ -151,9 +151,9 @@ H5O__bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* encode */
UINT32ENCODE(p, H5O_BOGUS_VALUE);
@@ -207,13 +207,13 @@ H5O__bogus_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s `%u'\n", indent, "", fwidth, "Bogus Value:", mesg->u);
+ fprintf(stream, "%*s%-*s `%u'\n", indent, "", fwidth, "Bogus Value:", mesg->u);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__bogus_debug() */
diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c
index c21b3b9..7b80de8 100644
--- a/src/H5Obtreek.c
+++ b/src/H5Obtreek.c
@@ -79,8 +79,8 @@ H5O__btreek_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Version of message */
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
@@ -133,9 +133,9 @@ H5O__btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_share
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* Store version and non-default v1 B-tree 'K' values */
*p++ = H5O_BTREEK_VERSION;
@@ -170,7 +170,7 @@ H5O__btreek_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = (H5O_btreek_t *)H5MM_malloc(sizeof(H5O_btreek_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
@@ -209,7 +209,7 @@ H5O__btreek_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_s
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
+ assert(f);
ret_value = 1 + /* Version number */
2 + /* Chunked storage internal B-tree 'K' value */
@@ -239,18 +239,18 @@ H5O__btreek_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Chunked storage internal B-tree 'K' value:", mesg->btree_k[H5B_CHUNK_ID]);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table node internal B-tree 'K' value:", mesg->btree_k[H5B_SNODE_ID]);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table node leaf 'K' value:", mesg->sym_leaf_k);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Chunked storage internal B-tree 'K' value:", mesg->btree_k[H5B_CHUNK_ID]);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Symbol table node internal B-tree 'K' value:", mesg->btree_k[H5B_SNODE_ID]);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Symbol table node leaf 'K' value:", mesg->sym_leaf_k);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__btreek_debug() */
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 66b092a..c893f04 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -153,7 +153,7 @@ H5O__cache_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *image_len)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image_len);
+ assert(image_len);
/* Set the image length size */
*image_len = H5O_SPEC_READ_SIZE;
@@ -177,17 +177,17 @@ H5O__cache_get_final_load_size(const void *image, size_t image_len, void *_udata
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
/* Deserialize the object header prefix */
if (H5O__prefix_deserialize((const uint8_t *)image, image_len, udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "can't deserialize object header prefix")
/* Sanity check */
- HDassert(udata->oh);
+ assert(udata->oh);
/* Set the final size for the cache image */
*actual_len = udata->chunk0_size + (size_t)H5O_SIZEOF_HDR(udata->oh);
@@ -215,9 +215,9 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image);
- HDassert(udata);
- HDassert(udata->oh);
+ assert(image);
+ assert(udata);
+ assert(udata->oh);
/* There is no checksum for version 1 */
if (udata->oh->version != H5O_VERSION_1) {
@@ -229,9 +229,9 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
if (stored_chksum != computed_chksum) {
/* These fields are not deserialized yet in H5O__prefix_deserialize() */
- HDassert(udata->oh->chunk == NULL);
- HDassert(udata->oh->mesg == NULL);
- HDassert(udata->oh->proxy == NULL);
+ assert(udata->oh->chunk == NULL);
+ assert(udata->oh->mesg == NULL);
+ assert(udata->oh->proxy == NULL);
/* Indicate that udata->oh is to be freed later
in H5O__prefix_deserialize() */
@@ -240,7 +240,7 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
}
}
else
- HDassert(!(udata->common.file_intent & H5F_ACC_SWMR_WRITE));
+ assert(!(udata->common.file_intent & H5F_ACC_SWMR_WRITE));
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__cache_verify_chksum() */
@@ -271,12 +271,12 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(udata->common.f);
- HDassert(udata->common.cont_msg_info);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(udata->common.f);
+ assert(udata->common.cont_msg_info);
+ assert(dirty);
/* Check for partially deserialized object header
*
@@ -288,7 +288,7 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir
/* Deserialize the object header prefix */
if (H5O__prefix_deserialize((const uint8_t *)image, len, udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't deserialize object header prefix")
- HDassert(udata->oh);
+ assert(udata->oh);
}
/* Retrieve partially deserialized object header from user data */
@@ -343,10 +343,10 @@ H5O__cache_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(oh);
- HDassert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(oh->cache_info.type == H5AC_OHDR);
- HDassert(image_len);
+ assert(oh);
+ assert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(oh->cache_info.type == H5AC_OHDR);
+ assert(image_len);
/* Report the object header's prefix+first chunk length */
*image_len = oh->chunk[0].size;
@@ -372,12 +372,12 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(image);
- HDassert(oh);
- HDassert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(oh->cache_info.type == H5AC_OHDR);
- HDassert(oh->chunk[0].size == len);
+ assert(f);
+ assert(image);
+ assert(oh);
+ assert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(oh->cache_info.type == H5AC_OHDR);
+ assert(oh->chunk[0].size == len);
#ifdef H5O_DEBUG
H5O__assert(oh);
#endif /* H5O_DEBUG */
@@ -395,11 +395,11 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
if (oh->version > H5O_VERSION_1) {
uint64_t chunk0_size; /* Size of chunk 0's data */
- HDassert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh));
+ assert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh));
chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
/* Verify magic number */
- HDassert(!HDmemcmp(chunk_image, H5O_HDR_MAGIC, H5_SIZEOF_MAGIC));
+ assert(!memcmp(chunk_image, H5O_HDR_MAGIC, H5_SIZEOF_MAGIC));
chunk_image += H5_SIZEOF_MAGIC;
/* Version */
@@ -425,18 +425,18 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
/* First chunk size */
switch (oh->flags & H5O_HDR_CHUNK0_SIZE) {
case 0: /* 1 byte size */
- HDassert(chunk0_size < 256);
+ assert(chunk0_size < 256);
*chunk_image++ = (uint8_t)chunk0_size;
break;
case 1: /* 2 byte size */
- HDassert(chunk0_size < 65536);
+ assert(chunk0_size < 65536);
UINT16ENCODE(chunk_image, chunk0_size);
break;
case 2: /* 4 byte size */
/* use <= 2**32 -1 to stay within 4 bytes integer range */
- HDassert(chunk0_size <= 4294967295UL);
+ assert(chunk0_size <= 4294967295UL);
UINT32ENCODE(chunk_image, chunk0_size);
break;
@@ -470,12 +470,12 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
UINT32ENCODE(chunk_image, (oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh)));
/* Zero to alignment */
- HDmemset(chunk_image, 0, (size_t)(H5O_SIZEOF_HDR(oh) - 12));
+ memset(chunk_image, 0, (size_t)(H5O_SIZEOF_HDR(oh) - 12));
chunk_image += (size_t)(H5O_SIZEOF_HDR(oh) - 12);
}
- HDassert((size_t)(chunk_image - oh->chunk[0].image) ==
- (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
+ assert((size_t)(chunk_image - oh->chunk[0].image) ==
+ (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
/* Serialize messages for this chunk */
if (H5O__chunk_serialize(f, oh, (unsigned)0) < 0)
@@ -507,14 +507,14 @@ H5O__cache_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(oh);
+ assert(oh);
switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
case H5AC_NOTIFY_ACTION_AFTER_LOAD:
if (oh->swmr_write) {
/* Sanity check */
- HDassert(oh->proxy);
+ assert(oh->proxy);
/* Register the object header as a parent of the virtual entry */
if (H5AC_proxy_entry_add_parent(oh->proxy, oh) < 0)
@@ -583,9 +583,9 @@ H5O__cache_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(oh);
- HDassert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(oh->cache_info.type == H5AC_OHDR);
+ assert(oh);
+ assert(oh->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(oh->cache_info.type == H5AC_OHDR);
/* Destroy object header */
if (H5O__free(oh, FALSE) < 0)
@@ -612,9 +612,9 @@ H5O__cache_chk_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(udata);
- HDassert(udata->oh);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->oh);
+ assert(image_len);
/* Set the image length size */
*image_len = udata->size;
@@ -641,7 +641,7 @@ H5O__cache_chk_verify_chksum(const void *_image, size_t len, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(image);
+ assert(image);
/* There is no checksum for version 1 */
if (udata->oh->version != H5O_VERSION_1) {
@@ -678,11 +678,11 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(udata->oh);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(udata->oh);
+ assert(dirty);
/* Allocate space for the object header data structure */
if (NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t)))
@@ -691,8 +691,8 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t
/* Check if we are still decoding the object header */
/* (as opposed to bringing a piece of it back from the file) */
if (udata->decoding) {
- HDassert(udata->common.f);
- HDassert(udata->common.cont_msg_info);
+ assert(udata->common.f);
+ assert(udata->common.cont_msg_info);
/* Parse the chunk */
if (H5O__chunk_deserialize(udata->oh, udata->common.addr, udata->size, (const uint8_t *)image, len,
@@ -704,7 +704,7 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t
}
else {
/* Sanity check */
- HDassert(udata->chunkno < udata->oh->nchunks);
+ assert(udata->chunkno < udata->oh->nchunks);
/* Set the chunk number for the chunk proxy */
chk_proxy->chunkno = udata->chunkno;
@@ -712,8 +712,8 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t
/* Sanity check that the chunk representation we have in memory is
* the same as the one being brought in from disk.
*/
- HDassert(0 == HDmemcmp(image, udata->oh->chunk[chk_proxy->chunkno].image,
- udata->oh->chunk[chk_proxy->chunkno].size));
+ assert(0 == memcmp(image, udata->oh->chunk[chk_proxy->chunkno].image,
+ udata->oh->chunk[chk_proxy->chunkno].size));
}
/* Increment reference count of object header */
@@ -748,11 +748,11 @@ H5O__cache_chk_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(chk_proxy);
- HDassert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(chk_proxy->cache_info.type == H5AC_OHDR_CHK);
- HDassert(chk_proxy->oh);
- HDassert(image_len);
+ assert(chk_proxy);
+ assert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(chk_proxy->cache_info.type == H5AC_OHDR_CHK);
+ assert(chk_proxy->oh);
+ assert(image_len);
*image_len = chk_proxy->oh->chunk[chk_proxy->chunkno].size;
@@ -778,13 +778,13 @@ H5O__cache_chk_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(image);
- HDassert(chk_proxy);
- HDassert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(chk_proxy->cache_info.type == H5AC_OHDR_CHK);
- HDassert(chk_proxy->oh);
- HDassert(chk_proxy->oh->chunk[chk_proxy->chunkno].size == len);
+ assert(f);
+ assert(image);
+ assert(chk_proxy);
+ assert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(chk_proxy->cache_info.type == H5AC_OHDR_CHK);
+ assert(chk_proxy->oh);
+ assert(chk_proxy->oh->chunk[chk_proxy->chunkno].size == len);
/* Serialize messages for this chunk */
if (H5O__chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0)
@@ -815,8 +815,8 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(chk_proxy);
- HDassert(chk_proxy->oh);
+ assert(chk_proxy);
+ assert(chk_proxy->oh);
switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
@@ -825,11 +825,11 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
/* Add flush dependency on chunk with continuation, if one exists */
if (chk_proxy->fd_parent) {
/* Sanity checks */
- HDassert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type);
- HDassert((((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_ID) ||
- (((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_CHK_ID));
+ assert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->magic ==
+ H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type);
+ assert((((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_ID) ||
+ (((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_CHK_ID));
/* Add flush dependency from chunk containing the continuation message
* that points to this chunk (either oh or another chunk proxy object)
@@ -847,7 +847,7 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
/* Add flush dependency on object header proxy, if proxy exists */
{
/* Sanity check */
- HDassert(chk_proxy->oh->proxy);
+ assert(chk_proxy->oh->proxy);
/* Register the object header chunk as a parent of the virtual entry */
if (H5AC_proxy_entry_add_parent(chk_proxy->oh->proxy, chk_proxy) < 0)
@@ -883,11 +883,11 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
/* Remove flush dependency on parent object header chunk, if one is set */
if (chk_proxy->fd_parent) {
/* Sanity checks */
- HDassert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type);
- HDassert((((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_ID) ||
- (((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_CHK_ID));
+ assert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->magic ==
+ H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type);
+ assert((((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_ID) ||
+ (((H5C_cache_entry_t *)(chk_proxy->fd_parent))->type->id == H5AC_OHDR_CHK_ID));
if (H5AC_destroy_flush_dependency(chk_proxy->fd_parent, chk_proxy) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency")
@@ -934,9 +934,9 @@ H5O__cache_chk_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
- HDassert(chk_proxy);
- HDassert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(chk_proxy->cache_info.type == H5AC_OHDR_CHK);
+ assert(chk_proxy);
+ assert(chk_proxy->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(chk_proxy->cache_info.type == H5AC_OHDR_CHK);
/* Destroy object header chunk proxy */
if (H5O__chunk_dest(chk_proxy) < 0)
@@ -963,8 +963,8 @@ H5O__add_cont_msg(H5O_cont_msgs_t *cont_msg_info, const H5O_cont_t *cont)
FUNC_ENTER_PACKAGE
- HDassert(cont_msg_info);
- HDassert(cont);
+ assert(cont_msg_info);
+ assert(cont);
/* Increase chunk array size, if necessary */
if (cont_msg_info->nmsgs >= cont_msg_info->alloc_nmsgs) {
@@ -1005,8 +1005,8 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata
FUNC_ENTER_PACKAGE
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Allocate space for the new object header data structure */
if (NULL == (oh = H5FL_CALLOC(H5O_t)))
@@ -1020,7 +1020,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata
/* (indicates version 2 or later) */
if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- if (!HDmemcmp(image, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ if (!memcmp(image, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/* Magic number (bounds checked above) */
image += H5_SIZEOF_MAGIC;
@@ -1165,7 +1165,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata
*/
if (udata->free_oh) {
H5O_t *saved_oh = udata->oh;
- HDassert(udata->oh);
+ assert(udata->oh);
/* Save the object header for later use in 'deserialize' callback */
udata->oh = oh;
@@ -1212,12 +1212,12 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
FUNC_ENTER_PACKAGE
- HDassert(oh);
- HDassert(H5F_addr_defined(addr));
- HDassert(image);
- HDassert(len);
- HDassert(udata->f);
- HDassert(udata->cont_msg_info);
+ assert(oh);
+ assert(H5F_addr_defined(addr));
+ assert(image);
+ assert(len);
+ assert(udata->f);
+ assert(udata->cont_msg_info);
/* Increase chunk array size, if necessary */
if (oh->nchunks >= oh->alloc_nchunks) {
@@ -1266,7 +1266,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
/* Magic number */
if (H5_IS_BUFFER_OVERFLOW(chunk_image, H5_SIZEOF_MAGIC, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- if (HDmemcmp(chunk_image, H5O_CHK_MAGIC, H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(chunk_image, H5O_CHK_MAGIC, H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "wrong object header chunk signature")
chunk_image += H5_SIZEOF_MAGIC;
}
@@ -1576,8 +1576,8 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Encode any dirty messages in this chunk */
for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++)
@@ -1591,11 +1591,11 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
/* Sanity checks */
if (oh->version > H5O_VERSION_1)
/* Make certain the magic # is present */
- HDassert(!HDmemcmp(oh->chunk[chunkno].image, (chunkno == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC),
- H5_SIZEOF_MAGIC));
+ assert(!memcmp(oh->chunk[chunkno].image, (chunkno == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC),
+ H5_SIZEOF_MAGIC));
else
/* Gaps should never occur in version 1 of the format */
- HDassert(oh->chunk[chunkno].gap == 0);
+ assert(oh->chunk[chunkno].gap == 0);
/* Extra work, for later versions of the format */
if (oh->version > H5O_VERSION_1) {
@@ -1604,9 +1604,9 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
/* Check for gap in chunk & zero it out */
if (oh->chunk[chunkno].gap)
- HDmemset((oh->chunk[chunkno].image + oh->chunk[chunkno].size) -
- (H5O_SIZEOF_CHKSUM + oh->chunk[chunkno].gap),
- 0, oh->chunk[chunkno].gap);
+ memset((oh->chunk[chunkno].image + oh->chunk[chunkno].size) -
+ (H5O_SIZEOF_CHKSUM + oh->chunk[chunkno].gap),
+ 0, oh->chunk[chunkno].gap);
/* Compute metadata checksum */
metadata_chksum =
diff --git a/src/H5Ocache_image.c b/src/H5Ocache_image.c
index a06bebc..acc1bfc 100644
--- a/src/H5Ocache_image.c
+++ b/src/H5Ocache_image.c
@@ -93,8 +93,8 @@ H5O__mdci_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Version of message */
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
@@ -145,9 +145,9 @@ H5O__mdci_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* encode */
*p++ = H5O_MDCI_VERSION_0;
@@ -181,7 +181,7 @@ H5O__mdci_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_mdci_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -245,7 +245,7 @@ H5O__mdci_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_mdci_t, mesg);
@@ -274,8 +274,8 @@ H5O__mdci_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
/* Free file space for cache image */
if (H5F_addr_defined(mesg->addr)) {
@@ -289,7 +289,7 @@ H5O__mdci_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
if (HADDR_UNDEF == (final_eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "unable to get file size")
- HDassert(H5F_addr_eq(final_eoa, mesg->addr + mesg->size));
+ assert(H5F_addr_eq(final_eoa, mesg->addr + mesg->size));
if (H5FD_free(f->shared->lf, H5FD_MEM_SUPER, f, mesg->addr, mesg->size) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't free MDC image")
@@ -322,17 +322,17 @@ H5O__mdci_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mdci);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(mdci);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Metadata Cache Image Block address:", mdci->addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Metadata Cache Image Block address:", mdci->addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Metadata Cache Image Block size in bytes:", mdci->size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Metadata Cache Image Block size in bytes:", mdci->size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__mdci_debug() */
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c
index c37a2a6..d3b0ca2 100644
--- a/src/H5Ochunk.c
+++ b/src/H5Ochunk.c
@@ -88,10 +88,10 @@ H5O__chunk_add(H5F_t *f, H5O_t *oh, unsigned idx, unsigned cont_chunkno)
FUNC_ENTER_PACKAGE_TAG(oh->cache_info.addr)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(idx < oh->nchunks);
- HDassert(idx > 0);
+ assert(f);
+ assert(oh);
+ assert(idx < oh->nchunks);
+ assert(idx > 0);
/* Allocate space for the object header data structure */
if (NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t)))
@@ -154,9 +154,9 @@ H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx)
FUNC_ENTER_PACKAGE_TAG(oh->cache_info.addr)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(idx < oh->nchunks);
+ assert(f);
+ assert(oh);
+ assert(idx < oh->nchunks);
/* Check for protecting first chunk */
if (0 == idx) {
@@ -179,7 +179,7 @@ H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx)
/* Construct the user data for protecting chunk proxy */
/* (and _not_ decoding it) */
- HDmemset(&chk_udata, 0, sizeof(chk_udata));
+ memset(&chk_udata, 0, sizeof(chk_udata));
chk_udata.oh = oh;
chk_udata.chunkno = idx;
chk_udata.size = oh->chunk[idx].size;
@@ -190,8 +190,8 @@ H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk")
/* Sanity check */
- HDassert(chk_proxy->oh == oh);
- HDassert(chk_proxy->chunkno == idx);
+ assert(chk_proxy->oh == oh);
+ assert(chk_proxy->chunkno == idx);
} /* end else */
/* Set return value */
@@ -226,8 +226,8 @@ H5O__chunk_unprotect(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t dirtied)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(chk_proxy);
+ assert(f);
+ assert(chk_proxy);
/* Check for releasing first chunk */
if (0 == chk_proxy->chunkno) {
@@ -276,8 +276,8 @@ H5O__chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(chk_proxy);
+ assert(oh);
+ assert(chk_proxy);
/* Check for resizing first chunk */
if (0 == chk_proxy->chunkno) {
@@ -317,14 +317,14 @@ H5O__chunk_update_idx(H5F_t *f, H5O_t *oh, unsigned idx)
FUNC_ENTER_PACKAGE_TAG(oh->cache_info.addr)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(idx < oh->nchunks);
- HDassert(idx > 0);
+ assert(f);
+ assert(oh);
+ assert(idx < oh->nchunks);
+ assert(idx > 0);
/* Construct the user data for protecting chunk proxy */
/* (and _not_ decoding it) */
- HDmemset(&chk_udata, 0, sizeof(chk_udata));
+ memset(&chk_udata, 0, sizeof(chk_udata));
chk_udata.oh = oh;
chk_udata.chunkno = idx;
chk_udata.size = oh->chunk[idx].size;
@@ -367,10 +367,10 @@ H5O__chunk_delete(H5F_t *f, H5O_t *oh, unsigned idx)
FUNC_ENTER_PACKAGE_TAG(oh->cache_info.addr)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(idx < oh->nchunks);
- HDassert(idx > 0);
+ assert(f);
+ assert(oh);
+ assert(idx < oh->nchunks);
+ assert(idx > 0);
/* Get the chunk proxy */
if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, idx)))
@@ -408,7 +408,7 @@ H5O__chunk_dest(H5O_chunk_proxy_t *chk_proxy)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(chk_proxy);
+ assert(chk_proxy);
/* Decrement reference count of object header */
if (H5O__dec_rc(chk_proxy->oh) < 0)
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index bbf233d..fe72709 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -87,8 +87,8 @@ H5O__cont_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Allocate space for the message */
if (NULL == (cont = H5FL_MALLOC(H5O_cont_t)))
@@ -134,11 +134,11 @@ H5O__cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(cont);
- HDassert(H5F_addr_defined(cont->addr));
- HDassert(cont->size > 0);
+ assert(f);
+ assert(p);
+ assert(cont);
+ assert(H5F_addr_defined(cont->addr));
+ assert(cont->size > 0);
/* encode */
H5F_addr_encode(f, &p, cont->addr);
@@ -194,7 +194,7 @@ H5O__cont_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_cont_t, mesg);
@@ -222,8 +222,8 @@ H5O__cont_delete(H5F_t *f, H5O_t *open_oh, void *_mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
/* Notify the cache that the chunk has been deleted */
/* (releases the space for the chunk) */
@@ -254,17 +254,17 @@ H5O__cont_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(cont);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(cont);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Continuation address:", cont->addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Continuation address:", cont->addr);
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Continuation size in bytes:", (unsigned long)(cont->size));
- HDfprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Points to chunk number:", (int)(cont->chunkno));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Continuation size in bytes:", (unsigned long)(cont->size));
+ fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth, "Points to chunk number:", (int)(cont->chunkno));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__cont_debug() */
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 9852d1f..02e3845 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -136,10 +136,10 @@ H5O__copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc, const
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
- HDassert(src_name && *src_name);
- HDassert(dst_loc);
- HDassert(dst_name && *dst_name);
+ assert(loc);
+ assert(src_name && *src_name);
+ assert(dst_loc);
+ assert(dst_name && *dst_name);
/* Check if destination name already exists */
dst_exists = FALSE;
@@ -223,11 +223,11 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
FUNC_ENTER_PACKAGE_TAG(oloc_src->addr)
- HDassert(oloc_src);
- HDassert(oloc_src->file);
- HDassert(H5F_addr_defined(oloc_src->addr));
- HDassert(oloc_dst->file);
- HDassert(cpy_info);
+ assert(oloc_src);
+ assert(oloc_src->file);
+ assert(H5F_addr_defined(oloc_src->addr));
+ assert(oloc_dst->file);
+ assert(cpy_info);
/* Get pointer to object class for this object */
if (NULL == (obj_class = H5O__obj_class(oloc_src)))
@@ -350,7 +350,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
*/
if (NULL == (deleted = (hbool_t *)H5MM_malloc(sizeof(hbool_t) * oh_src->nmesgs)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- HDmemset(deleted, FALSE, sizeof(hbool_t) * oh_src->nmesgs);
+ memset(deleted, FALSE, sizeof(hbool_t) * oh_src->nmesgs);
/* "pre copy" pass over messages, to gather information for actual message copy operation
* (for messages which depend on information from other messages)
@@ -362,7 +362,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
mesg_src = &(oh_src->mesg[mesgno]);
/* Sanity check */
- HDassert(!mesg_src->dirty); /* Should be cleared by earlier call to flush messages */
+ assert(!mesg_src->dirty); /* Should be cleared by earlier call to flush messages */
/* Get message class to operate on */
copy_type = mesg_src->type;
@@ -375,7 +375,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
++null_msgs;
copy_type = H5O_MSG_NULL;
} /* end if */
- HDassert(copy_type);
+ assert(copy_type);
if (copy_type->pre_copy_file) {
/* Decode the message if necessary. */
@@ -421,7 +421,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
if (FALSE == cpy_info->preserve_null) {
while (deleted[mesgno + null_msgs]) {
++null_msgs;
- HDassert(mesgno + null_msgs < oh_src->nmesgs);
+ assert(mesgno + null_msgs < oh_src->nmesgs);
} /* end while */
} /* end if */
@@ -449,7 +449,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
* converted to a nil message) in the destination -QAK)
*/
copy_type = mesg_dst->type;
- HDassert(copy_type);
+ assert(copy_type);
/* copy this message into destination file */
if (copy_type->copy_file) {
@@ -529,7 +529,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
size_t delta = (size_t)(H5O_MIN_SIZE - dst_oh_size); /* Delta in chunk size needed */
/* Sanity check */
- HDassert((oh_dst->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
+ assert((oh_dst->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
/* Determine whether to create gap or NULL message */
if ((oh_dst->version > H5O_VERSION_1) && (delta < H5O_SIZEOF_MSGHDR_OH(oh_dst)))
@@ -546,7 +546,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
dst_oh_size += delta;
/* Sanity check */
- HDassert(dst_oh_size <= 255);
+ assert(dst_oh_size <= 255);
} /* end if */
/* Add in destination's object header size now */
@@ -581,7 +581,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
* treatment. This has to happen after the destination header has been
* allocated.
*/
- HDassert(H5O_SIZEOF_MSGHDR_OH(oh_src) == H5O_SIZEOF_MSGHDR_OH(oh_dst));
+ assert(H5O_SIZEOF_MSGHDR_OH(oh_src) == H5O_SIZEOF_MSGHDR_OH(oh_dst));
msghdr_size = H5O_SIZEOF_MSGHDR_OH(oh_dst);
current_pos = oh_dst->chunk[0].image;
@@ -602,7 +602,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
if (FALSE == cpy_info->preserve_null) {
while (deleted[mesgno + null_msgs]) {
++null_msgs;
- HDassert(mesgno + null_msgs < oh_src->nmesgs);
+ assert(mesgno + null_msgs < oh_src->nmesgs);
} /* end while */
} /* end if */
@@ -646,11 +646,11 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
} /* end if */
/* Make sure we filled the chunk, except for room at the end for a checksum */
- HDassert(current_pos + dst_oh_gap + dst_oh_null + H5O_SIZEOF_CHKSUM_OH(oh_dst) ==
- (size_t)dst_oh_size + oh_dst->chunk[0].image);
+ assert(current_pos + dst_oh_gap + dst_oh_null + H5O_SIZEOF_CHKSUM_OH(oh_dst) ==
+ (size_t)dst_oh_size + oh_dst->chunk[0].image);
/* Set the dest. object location to the first chunk address */
- HDassert(H5F_addr_defined(addr_new));
+ assert(H5F_addr_defined(addr_new));
oloc_dst->addr = addr_new;
/* If we are merging committed datatypes and this is a committed datatype, insert
@@ -691,7 +691,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
if (FALSE == cpy_info->preserve_null) {
while (deleted[mesgno + null_msgs]) {
++null_msgs;
- HDassert(mesgno + null_msgs < oh_src->nmesgs);
+ assert(mesgno + null_msgs < oh_src->nmesgs);
} /* end while */
} /* end if */
@@ -704,14 +704,14 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
* converted to a nil message) in the destination -QAK)
*/
copy_type = mesg_dst->type;
- HDassert(copy_type);
+ assert(copy_type);
if (copy_type->post_copy_file && mesg_src->native) {
unsigned mesg_flags; /* Message flags */
/* Sanity check destination message */
- HDassert(mesg_dst->type == mesg_src->type);
- HDassert(mesg_dst->native);
+ assert(mesg_dst->type == mesg_src->type);
+ assert(mesg_dst->native);
/* Get destination message flags. mesg_dst->flags will contain the
* original flags for now. */
@@ -727,7 +727,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
"unable to perform 'post copy' operation on message")
/* Verify that the flags did not change */
- HDassert(mesg_flags == (unsigned)mesg_dst->flags);
+ assert(mesg_flags == (unsigned)mesg_dst->flags);
} /* end if */
} /* end for */
@@ -758,7 +758,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
/* Set obj_type and udata, if requested */
if (obj_type) {
- HDassert(udata);
+ assert(udata);
*obj_type = obj_class->type;
*udata = cpy_udata;
} /* end if */
@@ -815,11 +815,11 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5O_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(oloc_src);
- HDassert(oloc_src->file);
- HDassert(oloc_dst);
- HDassert(oloc_dst->file);
- HDassert(cpy_info);
+ assert(oloc_src);
+ assert(oloc_src->file);
+ assert(oloc_dst);
+ assert(oloc_dst->file);
+ assert(cpy_info);
/* Create object "position" struct */
H5F_GET_FILENO(oloc_src->file, src_obj_pos.fileno);
@@ -857,7 +857,7 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5O_
/* Return saved obj_type and udata, if requested */
if (obj_type) {
- HDassert(udata);
+ assert(udata);
*obj_type = addr_map->obj_class->type;
*udata = addr_map->udata;
} /* end if */
@@ -910,12 +910,12 @@ H5O__copy_free_addrmap_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
- HDassert(item);
+ assert(item);
/* Release user data for particular type of object */
if (item->udata) {
- HDassert(item->obj_class);
- HDassert(item->obj_class->free_copy_file_udata);
+ assert(item->obj_class);
+ assert(item->obj_class->free_copy_file_udata);
(item->obj_class->free_copy_file_udata)(item->udata);
} /* end if */
@@ -950,13 +950,13 @@ H5O__copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, hid_t
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oloc_src);
- HDassert(oloc_src->file);
- HDassert(H5F_addr_defined(oloc_src->addr));
- HDassert(oloc_dst->file);
+ assert(oloc_src);
+ assert(oloc_src->file);
+ assert(H5F_addr_defined(oloc_src->addr));
+ assert(oloc_dst->file);
/* Initialize copy info before errors can be thrown */
- HDmemset(&cpy_info, 0, sizeof(H5O_copy_t));
+ memset(&cpy_info, 0, sizeof(H5O_copy_t));
/* Get the copy property list */
if (NULL == (ocpy_plist = (H5P_genplist_t *)H5I_object(ocpypl_id)))
@@ -1046,11 +1046,11 @@ H5O__copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, hid_
FUNC_ENTER_PACKAGE
- HDassert(src_loc);
- HDassert(src_loc->oloc->file);
- HDassert(dst_loc);
- HDassert(dst_loc->oloc->file);
- HDassert(dst_name);
+ assert(src_loc);
+ assert(src_loc->oloc->file);
+ assert(dst_loc);
+ assert(dst_loc->oloc->file);
+ assert(dst_name);
/* Set up copied object location to fill in */
new_loc.oloc = &new_oloc;
@@ -1104,9 +1104,9 @@ H5O__copy_free_comm_dt_cb(void *item, void *_key, void H5_ATTR_UNUSED *_op_data)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(addr);
- HDassert(key);
- HDassert(key->dt);
+ assert(addr);
+ assert(key);
+ assert(key->dt);
key->dt = (H5T_t *)H5O_msg_free(H5O_DTYPE_ID, key->dt);
key = H5FL_FREE(H5O_copy_search_comm_dt_key_t, key);
@@ -1183,10 +1183,10 @@ H5O__copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(attr);
- HDassert(udata);
- HDassert(udata->dst_dt_list);
- HDassert(H5F_addr_defined(udata->obj_oloc.addr));
+ assert(attr);
+ assert(udata);
+ assert(udata->dst_dt_list);
+ assert(H5F_addr_defined(udata->obj_oloc.addr));
/* Get attribute datatype */
if (NULL == (dt = H5A_type(attr)))
@@ -1227,7 +1227,7 @@ done:
key = H5FL_FREE(H5O_copy_search_comm_dt_key_t, key);
} /* end if */
if (addr) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
addr = H5FL_FREE(haddr_t, addr);
} /* end if */
} /* end if */
@@ -1263,10 +1263,10 @@ H5O__copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(obj_oloc);
- HDassert(udata);
- HDassert(udata->dst_dt_list);
- HDassert(udata->dst_root_loc);
+ assert(obj_oloc);
+ assert(udata);
+ assert(udata->dst_dt_list);
+ assert(udata->dst_root_loc);
/* Get pointer to object class for this object */
if ((obj_class = H5O__obj_class(obj_oloc)) == NULL)
@@ -1345,7 +1345,7 @@ done:
key = H5FL_FREE(H5O_copy_search_comm_dt_key_t, key);
} /* end if */
if (addr) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
addr = H5FL_FREE(haddr_t, addr);
} /* end if */
} /* end if */
@@ -1382,11 +1382,11 @@ H5O__copy_search_comm_dt_cb(hid_t H5_ATTR_UNUSED group, const char *name, const
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(name);
- HDassert(linfo);
- HDassert(udata);
- HDassert(udata->dst_dt_list);
- HDassert(udata->dst_root_loc);
+ assert(name);
+ assert(linfo);
+ assert(udata);
+ assert(udata->dst_dt_list);
+ assert(udata->dst_root_loc);
/* Check if this is a hard link */
if (linfo->type == H5L_TYPE_HARD) {
@@ -1443,11 +1443,11 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(oh_src);
- HDassert(oloc_dst);
- HDassert(oloc_dst->file);
- HDassert(H5F_ID_EXISTS(oloc_dst->file));
- HDassert(cpy_info);
+ assert(oh_src);
+ assert(oloc_dst);
+ assert(oloc_dst->file);
+ assert(H5F_ID_EXISTS(oloc_dst->file));
+ assert(cpy_info);
/* Allocate key */
if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
@@ -1536,7 +1536,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i
/* Build the complete dst dt list */
/* Set up the root group in the destination file, if necessary */
if (!dst_root_loc.oloc) {
- HDassert(!dst_root_loc.path);
+ assert(!dst_root_loc.path);
if (NULL == (dst_root_loc.oloc = H5G_oloc(H5G_rootof(oloc_dst->file))))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
"unable to get object location for root group")
@@ -1544,7 +1544,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group")
} /* end if */
else
- HDassert(dst_root_loc.path);
+ assert(dst_root_loc.path);
/* Build udata. Note that this may be done twice in some cases, but
* it should be rare and should be cheaper on average than trying to
@@ -1608,12 +1608,12 @@ H5O__copy_insert_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst, H5
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(oh_src);
- HDassert(oloc_dst);
- HDassert(oloc_dst->file);
- HDassert(oloc_dst->addr != HADDR_UNDEF);
- HDassert(cpy_info);
- HDassert(cpy_info->dst_dt_list);
+ assert(oh_src);
+ assert(oloc_dst);
+ assert(oloc_dst->file);
+ assert(oloc_dst->addr != HADDR_UNDEF);
+ assert(cpy_info);
+ assert(cpy_info->dst_dt_list);
/* Allocate key */
if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t)))
diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c
index 7ba2dc5..100bea5 100644
--- a/src/H5Ocopy_ref.c
+++ b/src/H5Ocopy_ref.c
@@ -99,8 +99,8 @@ H5O__copy_obj_by_ref(H5O_loc_t *src_oloc, H5O_loc_t *dst_oloc, H5G_loc_t *dst_ro
FUNC_ENTER_PACKAGE
- HDassert(src_oloc);
- HDassert(dst_oloc);
+ assert(src_oloc);
+ assert(dst_oloc);
/* Perform the copy, or look up existing copy */
if ((ret_value = H5O_copy_header_map(src_oloc, dst_oloc, cpy_info, FALSE, NULL, NULL)) < 0)
@@ -170,8 +170,8 @@ H5O__copy_expand_ref_object1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t
H5O_token_t tmp_token = {0};
/* If data is not initialized, copy zeros and skip */
- if (0 == HDmemcmp(src_buf, zeros, buf_size))
- HDmemset(dst_buf, 0, buf_size);
+ if (0 == memcmp(src_buf, zeros, buf_size))
+ memset(dst_buf, 0, buf_size);
else {
/* Set up for the object copy for the reference */
if (H5R__decode_token_obj_compat(src_buf, &buf_size, &tmp_token, token_size) < 0)
@@ -233,8 +233,8 @@ H5O__copy_expand_ref_region1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t
uint8_t *q;
/* If data is not initialized, copy zeros and skip */
- if (0 == HDmemcmp(src_buf, zeros, buf_size))
- HDmemset(dst_buf, 0, buf_size);
+ if (0 == memcmp(src_buf, zeros, buf_size))
+ memset(dst_buf, 0, buf_size);
else {
/* Read from heap */
if (H5R__decode_heap(src_oloc->file, src_buf, &buf_size, &data, &data_size) < 0)
@@ -358,7 +358,7 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt
H5R_ref_priv_t *ref = (H5R_ref_priv_t *)&ref_ptr[i];
/* Check for null reference - only expand reference if it is not null */
- if (HDmemcmp(ref, zeros, H5R_REF_BUF_SIZE)) {
+ if (memcmp(ref, zeros, H5R_REF_BUF_SIZE)) {
H5O_token_t tmp_token = {0};
/* Get src object address */
@@ -441,12 +441,12 @@ H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, const H5T_t *dt_src, void *b
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file_src);
- HDassert(buf_src);
- HDassert(file_dst);
- HDassert(buf_dst);
- HDassert(nbytes_src);
- HDassert(cpy_info);
+ assert(file_src);
+ assert(buf_src);
+ assert(file_dst);
+ assert(buf_dst);
+ assert(nbytes_src);
+ assert(cpy_info);
/* Initialize object locations */
H5O_loc_reset(&src_oloc);
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index 203d411..594bcf8 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -108,24 +108,23 @@ H5O__assert(const H5O_t *oh)
free_space += oh->chunk[u].gap;
/* Check for valid raw data image */
- HDassert(oh->chunk[u].image);
- HDassert(oh->chunk[u].size > (size_t)H5O_SIZEOF_CHKHDR_OH(oh));
+ assert(oh->chunk[u].image);
+ assert(oh->chunk[u].size > (size_t)H5O_SIZEOF_CHKHDR_OH(oh));
/* All chunks must be allocated on disk */
- HDassert(H5F_addr_defined(oh->chunk[u].addr));
+ assert(H5F_addr_defined(oh->chunk[u].addr));
/* Version specific checks */
if (oh->version > H5O_VERSION_1) {
/* Make certain that the magic number is correct for each chunk */
- HDassert(
- !HDmemcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC));
+ assert(!memcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC));
/* Check for valid gap size */
- HDassert(oh->chunk[u].gap < (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
+ assert(oh->chunk[u].gap < (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
} /* end if */
else
/* Gaps should never occur in version 1 of the format */
- HDassert(oh->chunk[u].gap == 0);
+ assert(oh->chunk[u].gap == 0);
} /* end for */
/* Check for correct chunk #0 size flags */
@@ -133,13 +132,13 @@ H5O__assert(const H5O_t *oh)
uint64_t chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
if (chunk0_size <= 255)
- HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
+ assert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
else if (chunk0_size <= 65535)
- HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_2);
+ assert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_2);
else if (chunk0_size <= 4294967295)
- HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_4);
+ assert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_4);
else
- HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_8);
+ assert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_8);
} /* end if */
/* Loop over all messages in object header */
@@ -157,7 +156,7 @@ H5O__assert(const H5O_t *oh)
H5O_cont_t *cont = (H5O_cont_t *)curr_msg->native;
hbool_t H5_ATTR_NDEBUG_UNUSED found_chunk = FALSE; /* Found a chunk that matches */
- HDassert(cont);
+ assert(cont);
/* Increment # of continuation messages found */
cont_msgs_found++;
@@ -166,12 +165,12 @@ H5O__assert(const H5O_t *oh)
/* (and only one) */
for (v = 0; v < oh->nchunks; v++) {
if (H5F_addr_eq(cont->addr, oh->chunk[v].addr) && cont->size == oh->chunk[v].size) {
- HDassert(cont->chunkno == v);
- HDassert(!found_chunk);
+ assert(cont->chunkno == v);
+ assert(!found_chunk);
found_chunk = TRUE;
} /* end if */
} /* end for */
- HDassert(found_chunk);
+ assert(found_chunk);
meta_space += curr_tot_size;
} /* end if */
@@ -180,42 +179,42 @@ H5O__assert(const H5O_t *oh)
mesg_space += curr_msg->raw_size;
/* Make sure the message has a native form if it is marked dirty */
- HDassert(curr_msg->native || !curr_msg->dirty);
+ assert(curr_msg->native || !curr_msg->dirty);
} /* end else */
/* Make certain that the message is in a valid chunk */
- HDassert(curr_msg->chunkno < oh->nchunks);
+ assert(curr_msg->chunkno < oh->nchunks);
/* Make certain null messages aren't in chunks with gaps */
if (H5O_NULL_ID == curr_msg->type->id)
- HDassert(oh->chunk[curr_msg->chunkno].gap == 0);
+ assert(oh->chunk[curr_msg->chunkno].gap == 0);
/* Make certain that the message is completely in a chunk message area */
- HDassert(curr_tot_size <= (oh->chunk[curr_msg->chunkno].size) -
- (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
+ assert(curr_tot_size <= (oh->chunk[curr_msg->chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
if (curr_msg->chunkno == 0)
- HDassert(curr_hdr >=
- oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
+ assert(curr_hdr >=
+ oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
else
- HDassert(curr_hdr >= oh->chunk[curr_msg->chunkno].image +
- (H5O_SIZEOF_CHKHDR_OH(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
- HDassert(curr_msg->raw + curr_msg->raw_size <=
- (oh->chunk[curr_msg->chunkno].image + oh->chunk[curr_msg->chunkno].size) -
- (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
+ assert(curr_hdr >= oh->chunk[curr_msg->chunkno].image +
+ (H5O_SIZEOF_CHKHDR_OH(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
+ assert(curr_msg->raw + curr_msg->raw_size <=
+ (oh->chunk[curr_msg->chunkno].image + oh->chunk[curr_msg->chunkno].size) -
+ (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
/* Make certain that no other messages overlap this message */
for (v = 0, tmp_msg = &oh->mesg[0]; v < oh->nmesgs; v++, tmp_msg++) {
if (u != v)
- HDassert(!((tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) >= curr_hdr &&
- (tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) < (curr_hdr + curr_tot_size)));
+ assert(!((tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) >= curr_hdr &&
+ (tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) < (curr_hdr + curr_tot_size)));
} /* end for */
} /* end for */
/* Sanity check that the # of cont. messages is correct for the # of chunks */
- HDassert(oh->nchunks == (cont_msgs_found + 1));
+ assert(oh->nchunks == (cont_msgs_found + 1));
/* Sanity check that all the bytes are accounted for */
- HDassert(hdr_size == (free_space + meta_space + mesg_space));
+ assert(hdr_size == (free_space + meta_space + mesg_space));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__assert() */
@@ -243,15 +242,15 @@ H5O_debug_id(unsigned type_id, H5F_t *f, const void *mesg, FILE *stream, int ind
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->debug);
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(type);
+ assert(type->debug);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Call the debug method in the class */
if ((ret_value = (type->debug)(f, mesg, stream, indent, fwidth)) < 0)
@@ -284,36 +283,35 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(oh);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* debug */
- HDfprintf(stream, "%*sObject Header...\n", indent, "");
+ fprintf(stream, "%*sObject Header...\n", indent, "");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty:", oh->cache_info.is_dirty ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", oh->version);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Header size (in bytes):", (unsigned)H5O_SIZEOF_HDR(oh));
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", oh->nlink);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Dirty:", oh->cache_info.is_dirty ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", oh->version);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Header size (in bytes):", (unsigned)H5O_SIZEOF_HDR(oh));
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", oh->nlink);
/* Extra information for later versions */
if (oh->version > H5O_VERSION_1) {
/* Display object's status flags */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order tracked:",
- (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? "Yes" : "No");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order indexed:",
- (oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? "Yes" : "No");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute storage phase change values:",
- (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? "Non-default" : "Default");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Timestamps:", (oh->flags & H5O_HDR_STORE_TIMES) ? "Enabled" : "Disabled");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order tracked:",
+ (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? "Yes" : "No");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute creation order indexed:",
+ (oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? "Yes" : "No");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Attribute storage phase change values:",
+ (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? "Non-default" : "Default");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Timestamps:", (oh->flags & H5O_HDR_STORE_TIMES) ? "Enabled" : "Disabled");
if (oh->flags & ~H5O_HDR_ALL_FLAGS)
- HDfprintf(stream, "*** UNKNOWN OBJECT HEADER STATUS FLAG: %02x!\n", (unsigned)oh->flags);
+ fprintf(stream, "*** UNKNOWN OBJECT HEADER STATUS FLAG: %02x!\n", (unsigned)oh->flags);
/* Only dump times, if they are tracked */
if (oh->flags & H5O_HDR_STORE_TIMES) {
@@ -323,45 +321,45 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
/* Time fields */
tm = HDlocaltime(&oh->atime);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Access Time:", buf);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Access Time:", buf);
tm = HDlocaltime(&oh->mtime);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Modification Time:", buf);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Modification Time:", buf);
tm = HDlocaltime(&oh->ctime);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Change Time:", buf);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Change Time:", buf);
tm = HDlocaltime(&oh->btime);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Birth Time:", buf);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Birth Time:", buf);
} /* end if */
/* Attribute tracking fields */
if (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) {
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. compact attributes:", (unsigned)oh->max_compact);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Min. dense attributes:", (unsigned)oh->min_dense);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Max. compact attributes:", (unsigned)oh->max_compact);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Min. dense attributes:", (unsigned)oh->min_dense);
} /* end if */
} /* end if */
- HDfprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth,
- "Number of messages (allocated):", oh->nmesgs, oh->alloc_nmesgs);
- HDfprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth, "Number of chunks (allocated):", oh->nchunks,
- oh->alloc_nchunks);
+ fprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth, "Number of messages (allocated):", oh->nmesgs,
+ oh->alloc_nmesgs);
+ fprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth, "Number of chunks (allocated):", oh->nchunks,
+ oh->alloc_nchunks);
/* debug each chunk */
for (i = 0, chunk_total = 0; i < oh->nchunks; i++) {
size_t chunk_size;
- HDfprintf(stream, "%*sChunk %d...\n", indent, "", i);
+ fprintf(stream, "%*sChunk %d...\n", indent, "", i);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3),
- "Address:", oh->chunk[i].addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Address:", oh->chunk[i].addr);
/* Decrement chunk 0's size by the object header prefix size */
if (0 == i) {
if (H5F_addr_ne(oh->chunk[i].addr, addr))
- HDfprintf(stream, "*** WRONG ADDRESS FOR CHUNK #0!\n");
+ fprintf(stream, "*** WRONG ADDRESS FOR CHUNK #0!\n");
chunk_size = oh->chunk[i].size - (size_t)H5O_SIZEOF_HDR(oh);
} /* end if */
else
@@ -371,9 +369,9 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
chunk_total += chunk_size;
gap_total += oh->chunk[i].gap;
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Size in bytes:", chunk_size);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Size in bytes:", chunk_size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Gap:", oh->chunk[i].gap);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Gap:", oh->chunk[i].gap);
} /* end for */
/* debug each message */
@@ -390,21 +388,21 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
if (oh->mesg[i].type->id == H5O_CONT_ID)
mesg_total += H5O_SIZEOF_CHKHDR_OH(oh);
- HDfprintf(stream, "%*sMessage %d...\n", indent, "", i);
+ fprintf(stream, "%*sMessage %d...\n", indent, "", i);
/* check for bad message id */
if (oh->mesg[i].type->id >= (int)NELMTS(H5O_msg_class_g)) {
- HDfprintf(stream, "*** BAD MESSAGE ID 0x%04x\n", oh->mesg[i].type->id);
+ fprintf(stream, "*** BAD MESSAGE ID 0x%04x\n", oh->mesg[i].type->id);
continue;
} /* end if */
/* message name and size */
- HDfprintf(stream, "%*s%-*s 0x%04x `%s' (%d)\n", indent + 3, "", MAX(0, fwidth - 3),
- "Message ID (sequence number):", (unsigned)(oh->mesg[i].type->id), oh->mesg[i].type->name,
- sequence[oh->mesg[i].type->id]++);
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", MAX(0, fwidth - 3),
- "Dirty:", oh->mesg[i].dirty ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s ", indent + 3, "", MAX(0, fwidth - 3), "Message flags:");
+ fprintf(stream, "%*s%-*s 0x%04x `%s' (%d)\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Message ID (sequence number):", (unsigned)(oh->mesg[i].type->id), oh->mesg[i].type->name,
+ sequence[oh->mesg[i].type->id]++);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Dirty:", oh->mesg[i].dirty ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s ", indent + 3, "", MAX(0, fwidth - 3), "Message flags:");
if (oh->mesg[i].flags) {
hbool_t flag_printed = FALSE;
@@ -416,61 +414,61 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS));
if (oh->mesg[i].flags & H5O_MSG_FLAG_CONSTANT) {
- HDfprintf(stream, "%sC", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sC", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_SHARED) {
- HDfprintf(stream, "%sS", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sS", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_DONTSHARE) {
- HDfprintf(stream, "%sDS", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sDS", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE) {
- HDfprintf(stream, "%sFIUW", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sFIUW", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) {
- HDfprintf(stream, "%sMIU", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sMIU", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_WAS_UNKNOWN) {
- HDassert(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN);
- HDfprintf(stream, "%sWU", (flag_printed ? ", " : "<"));
+ assert(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN);
+ fprintf(stream, "%sWU", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_SHAREABLE) {
- HDfprintf(stream, "%sSA", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sSA", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS) {
- HDfprintf(stream, "%sFIUA", (flag_printed ? ", " : "<"));
+ fprintf(stream, "%sFIUA", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if (!flag_printed)
- HDfprintf(stream, "-");
- HDfprintf(stream, ">\n");
+ fprintf(stream, "-");
+ fprintf(stream, ">\n");
if (oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS)
- HDfprintf(stream, "%*s%-*s 0x%02x\n", indent + 3, "", MAX(0, fwidth - 3),
- "*** ADDITIONAL UNKNOWN FLAGS --->", oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS);
+ fprintf(stream, "%*s%-*s 0x%02x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "*** ADDITIONAL UNKNOWN FLAGS --->", oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS);
} /* end if */
else
- HDfprintf(stream, "<none>\n");
+ fprintf(stream, "<none>\n");
- HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", MAX(0, fwidth - 3),
- "Chunk number:", oh->mesg[i].chunkno);
+ fprintf(stream, "%*s%-*s %u\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Chunk number:", oh->mesg[i].chunkno);
chunkno = oh->mesg[i].chunkno;
if (chunkno >= oh->nchunks)
- HDfprintf(stream, "*** BAD CHUNK NUMBER\n");
- HDfprintf(stream, "%*s%-*s (%zu, %zu) bytes\n", indent + 3, "", MAX(0, fwidth - 3),
- "Raw message data (offset, size) in chunk:",
- (size_t)(oh->mesg[i].raw - oh->chunk[chunkno].image), oh->mesg[i].raw_size);
+ fprintf(stream, "*** BAD CHUNK NUMBER\n");
+ fprintf(stream, "%*s%-*s (%zu, %zu) bytes\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Raw message data (offset, size) in chunk:",
+ (size_t)(oh->mesg[i].raw - oh->chunk[chunkno].image), oh->mesg[i].raw_size);
/* check the size */
if ((oh->mesg[i].raw + oh->mesg[i].raw_size > oh->chunk[chunkno].image + oh->chunk[chunkno].size) ||
(oh->mesg[i].raw < oh->chunk[chunkno].image))
- HDfprintf(stream, "*** BAD MESSAGE RAW ADDRESS\n");
+ fprintf(stream, "*** BAD MESSAGE RAW ADDRESS\n");
/* decode the message */
debug_type = oh->mesg[i].type;
@@ -478,15 +476,15 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int
H5O_LOAD_NATIVE(f, H5O_DECODEIO_NOCHANGE, oh, &oh->mesg[i], FAIL)
/* print the message */
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Message Information:");
+ fprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Message Information:");
if (debug_type->debug && oh->mesg[i].native != NULL)
(debug_type->debug)(f, oh->mesg[i].native, stream, indent + 6, MAX(0, fwidth - 6));
else
- HDfprintf(stream, "%*s<No info for this message>\n", indent + 6, "");
+ fprintf(stream, "%*s<No info for this message>\n", indent + 6, "");
} /* end for */
if ((mesg_total + gap_total) != chunk_total)
- HDfprintf(stream, "*** TOTAL SIZE DOES NOT MATCH ALLOCATED SIZE!\n");
+ fprintf(stream, "*** TOTAL SIZE DOES NOT MATCH ALLOCATED SIZE!\n");
done:
/* Release resources */
@@ -518,11 +516,11 @@ H5O_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(H5F_addr_defined(addr));
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Set up the object location */
loc.file = f;
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c
index a25b1a9..aa9c47b 100644
--- a/src/H5Odeprec.c
+++ b/src/H5Odeprec.c
@@ -93,7 +93,7 @@ H5O__reset_info1(H5O_info1_t *oinfo)
FUNC_ENTER_PACKAGE_NOERR;
/* Reset the passed-in info struct */
- HDmemset(oinfo, 0, sizeof(H5O_info1_t));
+ memset(oinfo, 0, sizeof(H5O_info1_t));
oinfo->type = H5O_TYPE_UNKNOWN;
oinfo->addr = HADDR_UNDEF;
@@ -126,8 +126,8 @@ H5O__iterate1_adapter(hid_t obj_id, const char *name, const H5O_info2_t *oinfo2,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oinfo2);
- HDassert(op_data);
+ assert(oinfo2);
+ assert(op_data);
/* Reset the legacy info struct */
if (H5O__reset_info1(&oinfo) < 0)
@@ -225,8 +225,8 @@ H5O__get_info_old(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, H5O_inf
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Reset the passed-in info struct */
if (H5O__reset_info1(oinfo) < 0)
diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c
index 53de66d..4c0ca93 100644
--- a/src/H5Odrvinfo.c
+++ b/src/H5Odrvinfo.c
@@ -80,8 +80,8 @@ H5O__drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Version of message */
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
@@ -149,15 +149,15 @@ H5O__drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* Store version, driver name, buffer length, & encoded buffer */
*p++ = H5O_DRVINFO_VERSION;
H5MM_memcpy(p, mesg->name, 8);
p += 8;
- HDassert(mesg->len <= 65535);
+ assert(mesg->len <= 65535);
UINT16ENCODE(p, mesg->len);
H5MM_memcpy(p, mesg->buf, mesg->len);
@@ -188,7 +188,7 @@ H5O__drvinfo_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = (H5O_drvinfo_t *)H5MM_malloc(sizeof(H5O_drvinfo_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
@@ -235,8 +235,8 @@ H5O__drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
ret_value = 1 + /* Version number */
8 + /* Driver name */
@@ -267,7 +267,7 @@ H5O__drvinfo_reset(void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* reset */
mesg->buf = (uint8_t *)H5MM_xfree(mesg->buf);
@@ -295,14 +295,14 @@ H5O__drvinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Driver name:", mesg->name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Buffer size:", mesg->len);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Driver name:", mesg->name);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Buffer size:", mesg->len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__drvinfo_debug() */
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index cab2eb2..9a1e3dc 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -128,8 +128,8 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
FUNC_ENTER_PACKAGE
- HDassert(pp && *pp);
- HDassert(dt && dt->shared);
+ assert(pp && *pp);
+ assert(dt && dt->shared);
/* XXX NOTE!
*
@@ -810,8 +810,8 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(pp && *pp);
- HDassert(dt);
+ assert(pp && *pp);
+ assert(dt);
/* skip the type and class bit-field for now */
*pp += 4;
@@ -904,7 +904,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
case H5T_ORDER_VAX: /*turn on 1st and 6th (reserved before adding VAX) bits*/
flags |= 0x41;
- HDassert(dt->shared->version >= H5O_DTYPE_VERSION_3);
+ assert(dt->shared->version >= H5O_DTYPE_VERSION_3);
break;
case H5T_ORDER_MIXED:
@@ -984,13 +984,13 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
flags = (unsigned)(flags | ((dt->shared->u.atomic.u.f.sign << 8) & 0xff00));
UINT16ENCODE(*pp, dt->shared->u.atomic.offset);
UINT16ENCODE(*pp, dt->shared->u.atomic.prec);
- HDassert(dt->shared->u.atomic.u.f.epos <= 255);
+ assert(dt->shared->u.atomic.u.f.epos <= 255);
*(*pp)++ = (uint8_t)(dt->shared->u.atomic.u.f.epos);
- HDassert(dt->shared->u.atomic.u.f.esize <= 255);
+ assert(dt->shared->u.atomic.u.f.esize <= 255);
*(*pp)++ = (uint8_t)(dt->shared->u.atomic.u.f.esize);
- HDassert(dt->shared->u.atomic.u.f.mpos <= 255);
+ assert(dt->shared->u.atomic.u.f.mpos <= 255);
*(*pp)++ = (uint8_t)(dt->shared->u.atomic.u.f.mpos);
- HDassert(dt->shared->u.atomic.u.f.msize <= 255);
+ assert(dt->shared->u.atomic.u.f.msize <= 255);
*(*pp)++ = (uint8_t)(dt->shared->u.atomic.u.f.msize);
UINT32ENCODE(*pp, dt->shared->u.atomic.u.f.ebias);
break;
@@ -1019,11 +1019,11 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
/*
* Character string types... (not fully implemented)
*/
- HDassert(dt->shared->u.atomic.order == H5T_ORDER_NONE);
- HDassert(dt->shared->u.atomic.prec == 8 * dt->shared->size);
- HDassert(dt->shared->u.atomic.offset == 0);
- HDassert(dt->shared->u.atomic.lsb_pad == H5T_PAD_ZERO);
- HDassert(dt->shared->u.atomic.msb_pad == H5T_PAD_ZERO);
+ assert(dt->shared->u.atomic.order == H5T_ORDER_NONE);
+ assert(dt->shared->u.atomic.prec == 8 * dt->shared->size);
+ assert(dt->shared->u.atomic.offset == 0);
+ assert(dt->shared->u.atomic.lsb_pad == H5T_PAD_ZERO);
+ assert(dt->shared->u.atomic.msb_pad == H5T_PAD_ZERO);
flags = (unsigned)(flags | (dt->shared->u.atomic.u.s.pad & 0x0f));
flags = (unsigned)(flags | ((((unsigned)dt->shared->u.atomic.u.s.cset) & 0x0f) << 4));
@@ -1118,11 +1118,11 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
for (i = 0; i < dt->shared->u.compnd.nmembs; i++) {
/* Sanity check */
/* (compound datatypes w/array members must be encoded w/version >= 2) */
- HDassert(dt->shared->u.compnd.memb[i].type->shared->type != H5T_ARRAY ||
- dt->shared->version >= H5O_DTYPE_VERSION_2);
+ assert(dt->shared->u.compnd.memb[i].type->shared->type != H5T_ARRAY ||
+ dt->shared->version >= H5O_DTYPE_VERSION_2);
/* Check that the version is at least as great as the member */
- HDassert(dt->shared->version >= dt->shared->u.compnd.memb[i].type->shared->version);
+ assert(dt->shared->version >= dt->shared->u.compnd.memb[i].type->shared->version);
/* Name */
HDstrcpy((char *)(*pp), dt->shared->u.compnd.memb[i].name);
@@ -1185,7 +1185,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
case H5T_ENUM:
/* Check that the version is at least as great as the parent */
- HDassert(dt->shared->version >= dt->shared->parent->shared->version);
+ assert(dt->shared->version >= dt->shared->parent->shared->version);
/*
* Enumeration datatypes...
@@ -1221,7 +1221,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
case H5T_VLEN: /* Variable length datatypes... */
/* Check that the version is at least as great as the parent */
- HDassert(dt->shared->version >= dt->shared->parent->shared->version);
+ assert(dt->shared->version >= dt->shared->parent->shared->version);
flags |= (dt->shared->u.vlen.type & 0x0f);
if (dt->shared->u.vlen.type == H5T_VLEN_STRING) {
@@ -1236,16 +1236,16 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
case H5T_ARRAY: /* Array datatypes */
/* Double-check the number of dimensions */
- HDassert(dt->shared->u.array.ndims <= H5S_MAX_RANK);
+ assert(dt->shared->u.array.ndims <= H5S_MAX_RANK);
/* Check that the version is valid */
- HDassert(dt->shared->version >= H5O_DTYPE_VERSION_2);
+ assert(dt->shared->version >= H5O_DTYPE_VERSION_2);
/* Check that the version is at least as great as the parent */
- HDassert(dt->shared->version >= dt->shared->parent->shared->version);
+ assert(dt->shared->version >= dt->shared->parent->shared->version);
/* Encode the number of dimensions */
- HDassert(dt->shared->u.array.ndims <= UCHAR_MAX);
+ assert(dt->shared->u.array.ndims <= UCHAR_MAX);
*(*pp)++ = (uint8_t)dt->shared->u.array.ndims;
/* Drop this information for Version 3 of the format */
@@ -1321,8 +1321,8 @@ H5O__dtype_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Allocate datatype message */
if (NULL == (dt = H5T__alloc()))
@@ -1378,9 +1378,9 @@ H5O__dtype_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(dt);
+ assert(f);
+ assert(p);
+ assert(dt);
/* encode */
if (H5O__dtype_encode_helper(&p, dt) < 0)
@@ -1417,7 +1417,7 @@ H5O__dtype_copy(const void *_src, void *_dst)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(src);
+ assert(src);
/* Copy */
if (NULL == (dst = H5T_copy(src, H5T_COPY_ALL)))
@@ -1462,8 +1462,8 @@ H5O__dtype_size(const H5F_t *f, const void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(dt);
+ assert(f);
+ assert(dt);
/* Set the common size information */
ret_value = 4 + /* Type, class & flags */
@@ -1616,7 +1616,7 @@ H5O__dtype_free(void *mesg)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(mesg);
+ assert(mesg);
/* Release the datatype */
if (H5T_close_real((H5T_t *)mesg) < 0)
@@ -1646,17 +1646,17 @@ H5O__dtype_set_share(void *_mesg /*in,out*/, const H5O_shared_t *sh)
FUNC_ENTER_PACKAGE
- HDassert(dt);
- HDassert(sh);
+ assert(dt);
+ assert(sh);
/* Make sure the shared message location is initialized, so that it
* either has valid sharing information or is set to 0.
*/
- HDassert(sh->type <= H5O_SHARE_TYPE_HERE);
+ assert(sh->type <= H5O_SHARE_TYPE_HERE);
/* Make sure we're not sharing a committed type in the heap */
- HDassert(sh->type == H5O_SHARE_TYPE_COMMITTED ||
- (dt->shared->state != H5T_STATE_OPEN && dt->shared->state != H5T_STATE_NAMED));
+ assert(sh->type == H5O_SHARE_TYPE_COMMITTED ||
+ (dt->shared->state != H5T_STATE_OPEN && dt->shared->state != H5T_STATE_NAMED));
/* Copy the shared information */
if (H5O_set_shared(&(dt->sh_loc), sh) < 0)
@@ -1702,7 +1702,7 @@ H5O__dtype_can_share(const void *_mesg)
FUNC_ENTER_PACKAGE
- HDassert(mesg);
+ assert(mesg);
/* Don't share immutable datatypes */
if ((tri_ret = H5T_is_immutable(mesg)) > 0)
@@ -1746,10 +1746,10 @@ H5O__dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t H5_ATTR_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file_src);
- HDassert(dt_src);
- HDassert(cpy_info);
- HDassert(cpy_info->file_dst);
+ assert(file_src);
+ assert(dt_src);
+ assert(cpy_info);
+ assert(cpy_info->file_dst);
/* Check to ensure that the version of the message to be copied does not exceed
the message version as indicated by the destination file's high bound */
@@ -1841,14 +1841,14 @@ H5O__dtype_shared_post_copy_upd(const H5O_loc_t H5_ATTR_UNUSED *src_oloc, const
FUNC_ENTER_PACKAGE
if (dt_dst->sh_loc.type == H5O_SHARE_TYPE_COMMITTED) {
- HDassert(H5T_is_named(dt_dst));
+ assert(H5T_is_named(dt_dst));
if (H5O_loc_reset(&(dt_dst->oloc)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to reset location")
dt_dst->oloc.file = dt_dst->sh_loc.file;
dt_dst->oloc.addr = dt_dst->sh_loc.u.loc.oh_addr;
} /* end if */
else
- HDassert(!H5T_is_named(dt_dst));
+ assert(!H5T_is_named(dt_dst));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1885,11 +1885,11 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(dt);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(dt);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
switch (dt->shared->type) {
case H5T_INTEGER:
@@ -1943,45 +1943,45 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type class:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type class:", s);
- HDfprintf(stream, "%*s%-*s %lu byte%s\n", indent, "", fwidth, "Size:", (unsigned long)(dt->shared->size),
- 1 == dt->shared->size ? "" : "s");
+ fprintf(stream, "%*s%-*s %lu byte%s\n", indent, "", fwidth, "Size:", (unsigned long)(dt->shared->size),
+ 1 == dt->shared->size ? "" : "s");
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", dt->shared->version);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", dt->shared->version);
if (H5T_COMPOUND == dt->shared->type) {
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of members:", dt->shared->u.compnd.nmembs);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Number of members:", dt->shared->u.compnd.nmembs);
for (i = 0; i < dt->shared->u.compnd.nmembs; i++) {
HDsnprintf(buf, sizeof(buf), "Member %u:", i);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.compnd.memb[i].name);
- HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Byte offset:", (unsigned long)(dt->shared->u.compnd.memb[i].offset));
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.compnd.memb[i].name);
+ fprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Byte offset:", (unsigned long)(dt->shared->u.compnd.memb[i].offset));
H5O__dtype_debug(f, dt->shared->u.compnd.memb[i].type, stream, indent + 3, MAX(0, fwidth - 3));
} /* end for */
} /* end if */
else if (H5T_ENUM == dt->shared->type) {
- HDfprintf(stream, "%*s%s\n", indent, "", "Base type:");
+ fprintf(stream, "%*s%s\n", indent, "", "Base type:");
H5O__dtype_debug(f, dt->shared->parent, stream, indent + 3, MAX(0, fwidth - 3));
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of members:", dt->shared->u.enumer.nmembs);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Number of members:", dt->shared->u.enumer.nmembs);
for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
HDsnprintf(buf, sizeof(buf), "Member %u:", i);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.enumer.name[i]);
- HDfprintf(stream, "%*s%-*s 0x", indent, "", fwidth, "Raw bytes of value:");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, buf, dt->shared->u.enumer.name[i]);
+ fprintf(stream, "%*s%-*s 0x", indent, "", fwidth, "Raw bytes of value:");
for (k = 0; k < dt->shared->parent->shared->size; k++)
- HDfprintf(stream, "%02x",
- (unsigned)*((uint8_t *)dt->shared->u.enumer.value +
- (i * dt->shared->parent->shared->size) + k));
- HDfprintf(stream, "\n");
+ fprintf(stream, "%02x",
+ (unsigned)*((uint8_t *)dt->shared->u.enumer.value +
+ (i * dt->shared->parent->shared->size) + k));
+ fprintf(stream, "\n");
} /* end for */
} /* end else if */
else if (H5T_OPAQUE == dt->shared->type) {
- HDfprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Tag:", dt->shared->u.opaque.tag);
+ fprintf(stream, "%*s%-*s \"%s\"\n", indent, "", fwidth, "Tag:", dt->shared->u.opaque.tag);
} /* end else if */
else if (H5T_REFERENCE == dt->shared->type) {
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Fix dumping reference types!");
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Fix dumping reference types!");
} /* end else if */
else if (H5T_STRING == dt->shared->type) {
switch (dt->shared->u.atomic.u.s.cset) {
@@ -2018,7 +2018,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s);
switch (dt->shared->u.atomic.u.s.pad) {
case H5T_STR_NULLTERM:
@@ -2057,7 +2057,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s);
} /* end else if */
else if (H5T_VLEN == dt->shared->type) {
switch (dt->shared->u.vlen.type) {
@@ -2076,7 +2076,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Vlen type:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Vlen type:", s);
switch (dt->shared->u.vlen.loc) {
case H5T_LOC_MEMORY:
@@ -2094,7 +2094,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Location:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Location:", s);
/* Extra information for VL-strings */
if (dt->shared->u.vlen.type == H5T_VLEN_STRING) {
@@ -2131,7 +2131,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set:", s);
switch (dt->shared->u.vlen.pad) {
case H5T_STR_NULLTERM:
@@ -2169,16 +2169,16 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "String Padding:", s);
} /* end if */
} /* end else if */
else if (H5T_ARRAY == dt->shared->type) {
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Rank:", dt->shared->u.array.ndims);
- HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:");
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Rank:", dt->shared->u.array.ndims);
+ fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:");
for (i = 0; i < dt->shared->u.array.ndims; i++)
- HDfprintf(stream, "%s%u", (i ? ", " : ""), (unsigned)dt->shared->u.array.dim[i]);
- HDfprintf(stream, "}\n");
- HDfprintf(stream, "%*s%s\n", indent, "", "Base type:");
+ fprintf(stream, "%s%u", (i ? ", " : ""), (unsigned)dt->shared->u.array.dim[i]);
+ fprintf(stream, "}\n");
+ fprintf(stream, "%*s%s\n", indent, "", "Base type:");
H5O__dtype_debug(f, dt->shared->parent, stream, indent + 3, MAX(0, fwidth - 3));
} /* end else if */
else {
@@ -2209,15 +2209,15 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Byte order:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Byte order:", s);
- HDfprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth,
- "Precision:", (unsigned long)(dt->shared->u.atomic.prec),
- 1 == dt->shared->u.atomic.prec ? "" : "s");
+ fprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth,
+ "Precision:", (unsigned long)(dt->shared->u.atomic.prec),
+ 1 == dt->shared->u.atomic.prec ? "" : "s");
- HDfprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth,
- "Offset:", (unsigned long)(dt->shared->u.atomic.offset),
- 1 == dt->shared->u.atomic.offset ? "" : "s");
+ fprintf(stream, "%*s%-*s %lu bit%s\n", indent, "", fwidth,
+ "Offset:", (unsigned long)(dt->shared->u.atomic.offset),
+ 1 == dt->shared->u.atomic.offset ? "" : "s");
switch (dt->shared->u.atomic.lsb_pad) {
case H5T_PAD_ZERO:
@@ -2238,7 +2238,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = "pad?";
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Low pad type:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Low pad type:", s);
switch (dt->shared->u.atomic.msb_pad) {
case H5T_PAD_ZERO:
@@ -2259,7 +2259,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = "pad?";
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "High pad type:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "High pad type:", s);
if (H5T_FLOAT == dt->shared->type) {
switch (dt->shared->u.atomic.u.f.pad) {
@@ -2285,7 +2285,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Internal pad type:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Internal pad type:", s);
switch (dt->shared->u.atomic.u.f.norm) {
case H5T_NORM_IMPLIED:
@@ -2305,25 +2305,25 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
HDsnprintf(buf, sizeof(buf), "H5T_NORM_%d", (int)(dt->shared->u.atomic.u.f.norm));
s = buf;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Normalization:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Normalization:", s);
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Sign bit location:", (unsigned long)(dt->shared->u.atomic.u.f.sign));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Sign bit location:", (unsigned long)(dt->shared->u.atomic.u.f.sign));
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Exponent location:", (unsigned long)(dt->shared->u.atomic.u.f.epos));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Exponent location:", (unsigned long)(dt->shared->u.atomic.u.f.epos));
- HDfprintf(stream, "%*s%-*s 0x%08lx\n", indent, "", fwidth,
- "Exponent bias:", (unsigned long)(dt->shared->u.atomic.u.f.ebias));
+ fprintf(stream, "%*s%-*s 0x%08lx\n", indent, "", fwidth,
+ "Exponent bias:", (unsigned long)(dt->shared->u.atomic.u.f.ebias));
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Exponent size:", (unsigned long)(dt->shared->u.atomic.u.f.esize));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Exponent size:", (unsigned long)(dt->shared->u.atomic.u.f.esize));
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Mantissa location:", (unsigned long)(dt->shared->u.atomic.u.f.mpos));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Mantissa location:", (unsigned long)(dt->shared->u.atomic.u.f.mpos));
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Mantissa size:", (unsigned long)(dt->shared->u.atomic.u.f.msize));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Mantissa size:", (unsigned long)(dt->shared->u.atomic.u.f.msize));
} /* end if */
else if (H5T_INTEGER == dt->shared->type) {
@@ -2343,7 +2343,7 @@ H5O__dtype_debug(H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidt
s = buf;
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Sign scheme:", s);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Sign scheme:", s);
} /* end else if */
} /* end else */
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 824590f..8d5b48e 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -83,9 +83,9 @@ H5O__efl_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(p);
- HDassert(p_size > 0);
+ assert(f);
+ assert(p);
+ assert(p_size > 0);
if (NULL == (mesg = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))))
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -209,9 +209,9 @@ H5O__efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(p);
+ assert(f);
+ assert(mesg);
+ assert(p);
/* Version */
*p++ = H5O_EFL_VERSION;
@@ -222,13 +222,13 @@ H5O__efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
*p++ = 0;
/* Number of slots */
- HDassert(mesg->nalloc > 0);
+ assert(mesg->nalloc > 0);
UINT16ENCODE(p, mesg->nused); /*yes, twice*/
- HDassert(mesg->nused > 0 && mesg->nused <= mesg->nalloc);
+ assert(mesg->nused > 0 && mesg->nused <= mesg->nalloc);
UINT16ENCODE(p, mesg->nused);
/* Heap address */
- HDassert(H5F_addr_defined(mesg->heap_addr));
+ assert(H5F_addr_defined(mesg->heap_addr));
H5F_addr_encode(f, &p, mesg->heap_addr);
/* Encode file list */
@@ -237,7 +237,7 @@ H5O__efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
* The name should have been added to the heap when the dataset was
* created.
*/
- HDassert(mesg->slot[u].name_offset);
+ assert(mesg->slot[u].name_offset);
H5F_ENCODE_LENGTH(f, p, mesg->slot[u].name_offset);
H5F_ENCODE_LENGTH(f, p, (hsize_t)mesg->slot[u].offset);
H5F_ENCODE_LENGTH(f, p, mesg->slot[u].size);
@@ -273,7 +273,7 @@ H5O__efl_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* Allocate destination message, if necessary */
if (!dest && NULL == (dest = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))))
@@ -338,8 +338,8 @@ H5O__efl_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
ret_value = (size_t)H5F_SIZEOF_ADDR(f) + /*heap address */
2 + /*slots allocated*/
@@ -374,7 +374,7 @@ H5O__efl_reset(void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* reset */
if (mesg->slot) {
@@ -456,8 +456,8 @@ H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_d
FUNC_ENTER_PACKAGE_TAG(H5AC__COPIED_TAG)
/* check args */
- HDassert(efl_src);
- HDassert(file_dst);
+ assert(efl_src);
+ assert(file_dst);
/* Allocate space for the destination efl */
if (NULL == (efl_dst = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t))))
@@ -482,7 +482,7 @@ H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_d
/* Insert "empty" name first */
if (H5HL_insert(file_dst, heap, (size_t)1, "", &name_offset) < 0)
HGOTO_ERROR(H5E_EFL, H5E_CANTINSERT, NULL, "can't insert file name into heap")
- HDassert(0 == name_offset);
+ assert(0 == name_offset);
/* allocate array of external file entries */
if (efl_src->nalloc > 0) {
@@ -537,34 +537,33 @@ H5O__efl_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int ind
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Heap address:", mesg->heap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Heap address:", mesg->heap_addr);
- HDfprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Slots used/allocated:", mesg->nused,
- mesg->nalloc);
+ fprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Slots used/allocated:", mesg->nused,
+ mesg->nalloc);
for (u = 0; u < mesg->nused; u++) {
char buf[64];
HDsnprintf(buf, sizeof(buf), "File %zu", u);
- HDfprintf(stream, "%*s%s:\n", indent, "", buf);
+ fprintf(stream, "%*s%s:\n", indent, "", buf);
- HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(fwidth - 3, 0),
- "Name:", mesg->slot[u].name);
+ fprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(fwidth - 3, 0), "Name:", mesg->slot[u].name);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(fwidth - 3, 0),
- "Name offset:", mesg->slot[u].name_offset);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(fwidth - 3, 0),
+ "Name offset:", mesg->slot[u].name_offset);
- HDfprintf(stream, "%*s%-*s %" PRIdMAX "\n", indent + 3, "", MAX(fwidth - 3, 0),
- "Offset of data in file:", (intmax_t)(mesg->slot[u].offset));
+ fprintf(stream, "%*s%-*s %" PRIdMAX "\n", indent + 3, "", MAX(fwidth - 3, 0),
+ "Offset of data in file:", (intmax_t)(mesg->slot[u].offset));
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", MAX(fwidth - 3, 0),
- "Bytes reserved for data:", (mesg->slot[u].size));
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", MAX(fwidth - 3, 0),
+ "Bytes reserved for data:", (mesg->slot[u].size));
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index 99c8950..49cdd71 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -195,8 +195,8 @@ H5O__fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (fill = H5FL_CALLOC(H5O_fill_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message")
@@ -335,8 +335,8 @@ H5O__fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flag
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (fill = H5FL_CALLOC(H5O_fill_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message")
@@ -414,9 +414,9 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(p);
- HDassert(fill && NULL == fill->type);
+ assert(f);
+ assert(p);
+ assert(fill && NULL == fill->type);
/* Version */
*p++ = (uint8_t)fill->version;
@@ -445,12 +445,12 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
uint8_t flags = 0; /* Fill value setting flags */
/* Encode space allocation time */
- HDassert(fill->alloc_time == (H5O_FILL_MASK_ALLOC_TIME & fill->alloc_time));
+ assert(fill->alloc_time == (H5O_FILL_MASK_ALLOC_TIME & fill->alloc_time));
flags =
(uint8_t)(flags | ((H5O_FILL_MASK_ALLOC_TIME & fill->alloc_time) << H5O_FILL_SHIFT_ALLOC_TIME));
/* Encode fill value writing time */
- HDassert(fill->fill_time == (H5O_FILL_MASK_FILL_TIME & fill->fill_time));
+ assert(fill->fill_time == (H5O_FILL_MASK_FILL_TIME & fill->fill_time));
flags = (uint8_t)(flags | ((H5O_FILL_MASK_FILL_TIME & fill->fill_time) << H5O_FILL_SHIFT_FILL_TIME));
/* Check if we need to encode a fill value size */
@@ -462,7 +462,7 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
*p++ = (uint8_t)flags;
/* Sanity check */
- HDassert(!fill->buf);
+ assert(!fill->buf);
} /* end if */
else if (fill->size > 0) {
/* Indicate that a fill value size is present */
@@ -475,7 +475,7 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
INT32ENCODE(p, fill->size);
/* Encode the fill value */
- HDassert(fill->buf);
+ assert(fill->buf);
H5_CHECK_OVERFLOW(fill->size, ssize_t, size_t);
H5MM_memcpy(p, fill->buf, (size_t)fill->size);
} /* end if */
@@ -484,7 +484,7 @@ H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
*p++ = (uint8_t)flags;
/* Sanity check */
- HDassert(!fill->buf);
+ assert(!fill->buf);
} /* end else */
} /* end else */
@@ -510,9 +510,9 @@ H5O__fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(p);
- HDassert(fill && NULL == fill->type);
+ assert(f);
+ assert(p);
+ assert(fill && NULL == fill->type);
UINT32ENCODE(p, fill->size);
if (fill->buf)
@@ -546,7 +546,7 @@ H5O__fill_copy(const void *_src, void *_dst)
FUNC_ENTER_PACKAGE
- HDassert(src);
+ assert(src);
if (!dst && NULL == (dst = H5FL_MALLOC(H5O_fill_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill message")
@@ -664,8 +664,8 @@ H5O__fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(fill);
+ assert(f);
+ assert(fill);
/* Determine size for different versions */
if (fill->version < H5O_FILL_VERSION_3) {
@@ -710,7 +710,7 @@ H5O__fill_old_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(fill);
+ assert(fill);
FUNC_LEAVE_NOAPI(4 + (size_t)fill->size)
} /* end H5O__fill_old_size() */
@@ -735,7 +735,7 @@ H5O_fill_reset_dyn(H5O_fill_t *fill)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(fill);
+ assert(fill);
if (fill->buf) {
if (fill->type && H5T_detect_class(fill->type, H5T_VLEN, FALSE) > 0) {
@@ -799,7 +799,7 @@ H5O__fill_reset(void *_fill)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(fill);
+ assert(fill);
/* Reset dynamic fields */
H5O_fill_reset_dyn(fill);
@@ -829,7 +829,7 @@ H5O__fill_free(void *fill)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(fill);
+ assert(fill);
fill = H5FL_FREE(H5O_fill_t, fill);
@@ -859,8 +859,8 @@ H5O__fill_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, hb
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(cpy_info);
- HDassert(cpy_info->file_dst);
+ assert(cpy_info);
+ assert(cpy_info->file_dst);
/* Check to ensure that the version of the message to be copied does not exceed
the message version allowed by the destination file's high bound */
@@ -891,81 +891,81 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream, int in
FUNC_ENTER_PACKAGE_NOERR
- HDassert(f);
- HDassert(fill);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(fill);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Space Allocation Time:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Space Allocation Time:");
switch (fill->alloc_time) {
case H5D_ALLOC_TIME_EARLY:
- HDfprintf(stream, "Early\n");
+ fprintf(stream, "Early\n");
break;
case H5D_ALLOC_TIME_LATE:
- HDfprintf(stream, "Late\n");
+ fprintf(stream, "Late\n");
break;
case H5D_ALLOC_TIME_INCR:
- HDfprintf(stream, "Incremental\n");
+ fprintf(stream, "Incremental\n");
break;
case H5D_ALLOC_TIME_DEFAULT:
case H5D_ALLOC_TIME_ERROR:
default:
- HDfprintf(stream, "Unknown!\n");
+ fprintf(stream, "Unknown!\n");
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Time:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Time:");
switch (fill->fill_time) {
case H5D_FILL_TIME_ALLOC:
- HDfprintf(stream, "On Allocation\n");
+ fprintf(stream, "On Allocation\n");
break;
case H5D_FILL_TIME_NEVER:
- HDfprintf(stream, "Never\n");
+ fprintf(stream, "Never\n");
break;
case H5D_FILL_TIME_IFSET:
- HDfprintf(stream, "If Set\n");
+ fprintf(stream, "If Set\n");
break;
case H5D_FILL_TIME_ERROR:
default:
- HDfprintf(stream, "Unknown!\n");
+ fprintf(stream, "Unknown!\n");
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Value Defined:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Value Defined:");
H5P_is_fill_value_defined((const H5O_fill_t *)fill, &fill_status);
switch (fill_status) {
case H5D_FILL_VALUE_UNDEFINED:
- HDfprintf(stream, "Undefined\n");
+ fprintf(stream, "Undefined\n");
break;
case H5D_FILL_VALUE_DEFAULT:
- HDfprintf(stream, "Default\n");
+ fprintf(stream, "Default\n");
break;
case H5D_FILL_VALUE_USER_DEFINED:
- HDfprintf(stream, "User Defined\n");
+ fprintf(stream, "User Defined\n");
break;
case H5D_FILL_VALUE_ERROR:
default:
- HDfprintf(stream, "Unknown!\n");
+ fprintf(stream, "Unknown!\n");
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %zd\n", indent, "", fwidth, "Size:", fill->size);
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:");
+ fprintf(stream, "%*s%-*s %zd\n", indent, "", fwidth, "Size:", fill->size);
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:");
if (fill->type) {
H5T_debug(fill->type, stream);
- HDfprintf(stream, "\n");
+ fprintf(stream, "\n");
} /* end if */
else
- HDfprintf(stream, "<dataset type>\n");
+ fprintf(stream, "<dataset type>\n");
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fill_debug() */
@@ -995,9 +995,9 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(fill);
- HDassert(dset_type);
- HDassert(fill_changed);
+ assert(fill);
+ assert(dset_type);
+ assert(fill_changed);
/* No-op cases */
if (!fill->buf || !fill->type || 0 == H5T_cmp(fill->type, dset_type, FALSE)) {
@@ -1089,8 +1089,8 @@ H5O_fill_set_version(H5F_t *f, H5O_fill_t *fill)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(fill);
+ assert(f);
+ assert(fill);
/* Upgrade to the version indicated by the file's low bound if higher */
version = MAX(fill->version, H5O_fill_ver_bounds[H5F_LOW_BOUND(f)]);
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index 2348673..9716abb 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -157,7 +157,7 @@ H5O__oh_tag(const H5O_loc_t *oloc, haddr_t *tag)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(oloc);
+ assert(oloc);
/* Get object header for object */
if (NULL == (oh = H5O_protect(oloc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -372,8 +372,8 @@ H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *obj_loc, H5VL_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(obj_loc);
- HDassert(vol_connector);
+ assert(obj_loc);
+ assert(vol_connector);
/* Get object's type */
type = H5I_get_type(oid);
diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c
index 01cf3c3..94c20ee 100644
--- a/src/H5Ofsinfo.c
+++ b/src/H5Ofsinfo.c
@@ -95,8 +95,8 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Allocate space for message */
if (NULL == (fsinfo = H5FL_CALLOC(H5O_fsinfo_t)))
@@ -231,9 +231,9 @@ H5O__fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(fsinfo);
+ assert(f);
+ assert(p);
+ assert(fsinfo);
*p++ = (uint8_t)fsinfo->version; /* message version */
*p++ = (uint8_t)fsinfo->strategy; /* File space strategy */
@@ -276,7 +276,7 @@ H5O__fsinfo_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(fsinfo);
+ assert(fsinfo);
if (!dest && NULL == (dest = H5FL_CALLOC(H5O_fsinfo_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -341,7 +341,7 @@ H5O__fsinfo_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_fsinfo_t, mesg);
@@ -368,54 +368,54 @@ H5O__fsinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(fsinfo);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(fsinfo);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "File space strategy:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "File space strategy:");
switch (fsinfo->strategy) {
case H5F_FSPACE_STRATEGY_FSM_AGGR:
- HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_FSM_AGGR");
+ fprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_FSM_AGGR");
break;
case H5F_FSPACE_STRATEGY_PAGE:
- HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_PAGE");
+ fprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_PAGE");
break;
case H5F_FSPACE_STRATEGY_AGGR:
- HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_AGGR");
+ fprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_AGGR");
break;
case H5F_FSPACE_STRATEGY_NONE:
- HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_NONE");
+ fprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_NONE");
break;
case H5F_FSPACE_STRATEGY_NTYPES:
default:
- HDfprintf(stream, "%s\n", "unknown");
+ fprintf(stream, "%s\n", "unknown");
} /* end switch */
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Free-space persist:", fsinfo->persist ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Free-space persist:", fsinfo->persist ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Free-space section threshold:", fsinfo->threshold);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Free-space section threshold:", fsinfo->threshold);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "File space page size:", fsinfo->page_size);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "File space page size:", fsinfo->page_size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Page end metadata threshold:", fsinfo->pgend_meta_thres);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Page end metadata threshold:", fsinfo->pgend_meta_thres);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "eoa_pre_fsm_fsalloc:", fsinfo->eoa_pre_fsm_fsalloc);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "eoa_pre_fsm_fsalloc:", fsinfo->eoa_pre_fsm_fsalloc);
if (fsinfo->persist) {
for (ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++)
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Free space manager address:", fsinfo->fs_addr[ptype - 1]);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Free space manager address:", fsinfo->fs_addr[ptype - 1]);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -442,7 +442,7 @@ H5O_fsinfo_set_version(H5F_libver_t low, H5F_libver_t high, H5O_fsinfo_t *fsinfo
/* Sanity check */
HDcompile_assert(N_FSINFO_VERSION_BOUNDS == H5F_LIBVER_NBOUNDS);
- HDassert(fsinfo);
+ assert(fsinfo);
version = H5O_FSINFO_VERSION_1;
@@ -482,7 +482,7 @@ H5O_fsinfo_check_version(H5F_libver_t high, H5O_fsinfo_t *fsinfo)
/* Sanity check */
HDcompile_assert(N_FSINFO_VERSION_BOUNDS == H5F_LIBVER_NBOUNDS);
- HDassert(fsinfo);
+ assert(fsinfo);
/* Check the version */
if (H5O_fsinfo_ver_bounds[high] == H5O_INVALID_VERSION || fsinfo->version > H5O_fsinfo_ver_bounds[high])
diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c
index df45e53..78a74ea 100644
--- a/src/H5Oginfo.c
+++ b/src/H5Oginfo.c
@@ -91,8 +91,8 @@ H5O__ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Version of message */
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
@@ -170,8 +170,8 @@ H5O__ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(p);
- HDassert(ginfo);
+ assert(p);
+ assert(ginfo);
/* Message version */
*p++ = H5O_GINFO_VERSION;
@@ -221,7 +221,7 @@ H5O__ginfo_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(ginfo);
+ assert(ginfo);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_ginfo_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -291,7 +291,7 @@ H5O__ginfo_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_ginfo_t, mesg);
@@ -318,18 +318,18 @@ H5O__ginfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(ginfo);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. compact links:", ginfo->max_compact);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Min. dense links:", ginfo->min_dense);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Estimated # of objects in group:", ginfo->est_num_entries);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Estimated length of object in group's name:", ginfo->est_name_len);
+ assert(f);
+ assert(ginfo);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. compact links:", ginfo->max_compact);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Min. dense links:", ginfo->min_dense);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Estimated # of objects in group:", ginfo->est_num_entries);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Estimated length of object in group's name:", ginfo->est_name_len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__ginfo_debug() */
diff --git a/src/H5Oint.c b/src/H5Oint.c
index f2f106b..590cfa2 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -221,8 +221,8 @@ H5O__set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_id
FUNC_ENTER_PACKAGE
/* check arguments */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Set the correct version to encode object header with */
if (store_msg_crt_idx || (oh_flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED))
@@ -271,9 +271,9 @@ H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(loc);
- HDassert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
+ assert(f);
+ assert(loc);
+ assert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
/* create object header in freelist
* header version is set internally
@@ -317,8 +317,8 @@ H5O_create_ohdr(H5F_t *f, hid_t ocpl_id)
FUNC_ENTER_NOAPI(NULL)
- HDassert(f);
- HDassert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
+ assert(f);
+ assert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
/* Check for invalid access request */
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
@@ -383,10 +383,10 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(loc_out);
- HDassert(oh);
- HDassert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
+ assert(f);
+ assert(loc_out);
+ assert(oh);
+ assert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
/* Allocate at least a reasonable size for the object header */
size_hint = H5O_ALIGN_F(f, MAX(H5O_MIN_SIZE, size_hint));
@@ -565,12 +565,12 @@ H5O_open(H5O_loc_t *loc)
FUNC_ENTER_NOAPI_NOERR
/* Check args */
- HDassert(loc);
- HDassert(loc->file);
+ assert(loc);
+ assert(loc->file);
#ifdef H5O_DEBUG
if (H5DEBUG(O))
- HDfprintf(H5DEBUG(O), "> %" PRIuHADDR "\n", loc->addr);
+ fprintf(H5DEBUG(O), "> %" PRIuHADDR "\n", loc->addr);
#endif
/* Turn off the variable for holding file or increment open-lock counters */
@@ -607,8 +607,8 @@ H5O_open_name(const H5G_loc_t *loc, const char *name, H5I_type_t *opened_type)
FUNC_ENTER_NOAPI(NULL)
/* Check args */
- HDassert(loc);
- HDassert(name && *name);
+ assert(loc);
+ assert(name && *name);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -658,7 +658,7 @@ H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
+ assert(loc);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -707,7 +707,7 @@ H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(loc);
+ assert(loc);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -746,14 +746,14 @@ H5O_open_by_loc(const H5G_loc_t *obj_loc, H5I_type_t *opened_type)
FUNC_ENTER_NOAPI(NULL)
- HDassert(obj_loc);
+ assert(obj_loc);
/* Get the object class for this location */
if (NULL == (obj_class = H5O__obj_class(obj_loc->oloc)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to determine object class")
/* Call the object class's 'open' routine */
- HDassert(obj_class->open);
+ assert(obj_class->open);
if (NULL == (ret_value = obj_class->open(obj_loc, opened_type)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object")
@@ -781,9 +781,9 @@ H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_NOPEN_OBJS(loc->file) > 0);
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_NOPEN_OBJS(loc->file) > 0);
/* Set the file_closed flag to the default value.
* This flag lets downstream code know if the file struct is
@@ -800,10 +800,10 @@ H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/)
#ifdef H5O_DEBUG
if (H5DEBUG(O)) {
if (FALSE == H5F_ID_EXISTS(loc->file) && 1 == H5F_NREFS(loc->file))
- HDfprintf(H5DEBUG(O), "< %" PRIuHADDR " auto %lu remaining\n", loc->addr,
- (unsigned long)H5F_NOPEN_OBJS(loc->file));
+ fprintf(H5DEBUG(O), "< %" PRIuHADDR " auto %lu remaining\n", loc->addr,
+ (unsigned long)H5F_NOPEN_OBJS(loc->file));
else
- HDfprintf(H5DEBUG(O), "< %" PRIuHADDR "\n", loc->addr);
+ fprintf(H5DEBUG(O), "< %" PRIuHADDR "\n", loc->addr);
}
#endif
@@ -848,9 +848,9 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(deleted);
+ assert(f);
+ assert(oh);
+ assert(deleted);
/* Check for adjusting link count */
if (adjust) {
@@ -964,9 +964,9 @@ H5O_link(const H5O_loc_t *loc, int adjust)
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -1013,11 +1013,11 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
FUNC_ENTER_NOAPI_TAG(loc->addr, NULL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
+ assert(loc);
+ assert(loc->file);
/* prot_flags may only contain the H5AC__READ_ONLY_FLAG */
- HDassert((prot_flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+ assert((prot_flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Check for valid address */
if (!H5F_addr_defined(loc->addr))
@@ -1037,7 +1037,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
udata.common.f = loc->file;
udata.common.file_intent = file_intent;
udata.common.merged_null_msgs = 0;
- HDmemset(&cont_msg_info, 0, sizeof(cont_msg_info));
+ memset(&cont_msg_info, 0, sizeof(cont_msg_info));
udata.common.cont_msg_info = &cont_msg_info;
udata.common.addr = loc->addr;
@@ -1053,8 +1053,8 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
/* Sanity check - we should only have continuation messages to process
* when the object header is actually loaded from the file.
*/
- HDassert(udata.made_attempt == TRUE);
- HDassert(cont_msg_info.msgs);
+ assert(udata.made_attempt == TRUE);
+ assert(cont_msg_info.msgs);
/* Construct the user data for protecting chunks */
chk_udata.decoding = TRUE;
@@ -1086,9 +1086,9 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk")
/* Sanity check */
- HDassert(chk_proxy->oh == oh);
- HDassert(chk_proxy->chunkno == chkcnt);
- HDassert(oh->nchunks == (chkcnt + 1));
+ assert(chk_proxy->oh == oh);
+ assert(chk_proxy->chunkno == chkcnt);
+ assert(oh->nchunks == (chkcnt + 1));
/* Release the chunk from the cache */
if (H5AC_unprotect(loc->file, H5AC_OHDR_CHK, cont_msg_info.msgs[curr_msg].addr, chk_proxy,
@@ -1135,7 +1135,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks)
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(oh->swmr_write);
+ assert(oh->swmr_write);
/* Iterate over chunks > 0 */
for (u = 1; u < oh->nchunks; u++) {
@@ -1202,7 +1202,7 @@ H5O_pin(const H5O_loc_t *loc)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(loc);
+ assert(loc);
/* Get header */
if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE)))
@@ -1246,7 +1246,7 @@ H5O_unpin(H5O_t *oh)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(oh);
+ assert(oh);
/* Decrement the reference count on the object header */
/* (which will unpin it, if appropriate) */
@@ -1280,15 +1280,15 @@ H5O_unprotect(const H5O_loc_t *loc, H5O_t *oh, unsigned oh_flags)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(oh);
+ assert(loc);
+ assert(oh);
/* Unpin the other chunks */
if (oh->chunks_pinned && oh->nchunks > 1) {
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(oh->swmr_write);
+ assert(oh->swmr_write);
/* Iterate over chunks > 0 */
for (u = 1; u < oh->nchunks; u++) {
@@ -1336,8 +1336,8 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Check if this object header is tracking times */
if (oh->flags & H5O_HDR_STORE_TIMES) {
@@ -1433,7 +1433,7 @@ H5O_touch(const H5O_loc_t *loc, hbool_t force)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
+ assert(loc);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE)))
@@ -1476,8 +1476,8 @@ H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned bogus_id, unsigned mesg_flags)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Look for existing message */
for (idx = 0; idx < oh->nmesgs; idx++)
@@ -1549,8 +1549,8 @@ H5O_delete(H5F_t *f, haddr_t addr)
FUNC_ENTER_NOAPI_TAG(addr, FAIL)
/* Check args */
- HDassert(f);
- HDassert(H5F_addr_defined(addr));
+ assert(f);
+ assert(H5F_addr_defined(addr));
/* Set up the object location */
loc.file = f;
@@ -1608,8 +1608,8 @@ H5O__delete_oh(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Walk through the list of object header messages, asking each one to
* delete any file space used
@@ -1682,8 +1682,8 @@ H5O__obj_type_real(const H5O_t *oh, H5O_type_t *obj_type)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(oh);
- HDassert(obj_type);
+ assert(oh);
+ assert(obj_type);
/* Look up class for object header */
if (NULL == (obj_class = H5O__obj_class_real(oh))) {
@@ -1758,7 +1758,7 @@ H5O__obj_class_real(const H5O_t *oh)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(oh);
+ assert(oh);
/* Test whether entry qualifies as a particular type of object */
/* (Note: loop is in reverse order, to test specific objects first) */
@@ -1859,10 +1859,10 @@ H5O_loc_reset(H5O_loc_t *loc)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(loc);
+ assert(loc);
/* Clear the object location to an empty state */
- HDmemset(loc, 0, sizeof(H5O_loc_t));
+ memset(loc, 0, sizeof(H5O_loc_t));
loc->addr = HADDR_UNDEF;
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1887,9 +1887,9 @@ H5O_loc_copy(H5O_loc_t *dst, H5O_loc_t *src, H5_copy_depth_t depth)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(src);
- HDassert(dst);
- HDassert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
+ assert(src);
+ assert(dst);
+ assert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
/* Invoke correct routine */
if (depth == H5_COPY_SHALLOW)
@@ -1922,8 +1922,8 @@ H5O_loc_copy_shallow(H5O_loc_t *dst, H5O_loc_t *src)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
/* Copy the top level information */
H5MM_memcpy(dst, src, sizeof(H5O_loc_t));
@@ -1955,8 +1955,8 @@ H5O_loc_copy_deep(H5O_loc_t *dst, const H5O_loc_t *src)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
/* Copy the top level information */
H5MM_memcpy(dst, src, sizeof(H5O_loc_t));
@@ -1990,8 +1990,8 @@ H5O_loc_hold_file(H5O_loc_t *loc)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
- HDassert(loc);
- HDassert(loc->file);
+ assert(loc);
+ assert(loc->file);
/* If this location is not already holding its file open, do so. */
if (!loc->holding_file) {
@@ -2025,7 +2025,7 @@ H5O_loc_free(H5O_loc_t *loc)
FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
- HDassert(loc);
+ assert(loc);
/* If this location is holding its file open try to close the file. */
if (loc->holding_file) {
@@ -2063,11 +2063,11 @@ H5O_get_hdr_info(const H5O_loc_t *loc, H5O_hdr_info_t *hdr)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
- HDassert(hdr);
+ assert(loc);
+ assert(hdr);
/* Reset the object header info structure */
- HDmemset(hdr, 0, sizeof(*hdr));
+ memset(hdr, 0, sizeof(*hdr));
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2107,8 +2107,8 @@ H5O__get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(oh);
- HDassert(hdr);
+ assert(oh);
+ assert(hdr);
/* Set the version for the object header */
hdr->version = oh->version;
@@ -2159,7 +2159,7 @@ H5O__get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
} /* end for */
/* Sanity check that all the bytes are accounted for */
- HDassert(hdr->space.total == (hdr->space.free + hdr->space.meta + hdr->space.mesg));
+ assert(hdr->space.total == (hdr->space.free + hdr->space.meta + hdr->space.mesg));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__get_hdr_info_real() */
@@ -2187,8 +2187,8 @@ H5O_get_info(const H5O_loc_t *loc, H5O_info2_t *oinfo, unsigned fields)
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
/* Check args */
- HDassert(loc);
- HDassert(oinfo);
+ assert(loc);
+ assert(oinfo);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2296,8 +2296,8 @@ H5O_get_native_info(const H5O_loc_t *loc, H5O_native_info_t *oinfo, unsigned fie
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
/* Check args */
- HDassert(loc);
- HDassert(oinfo);
+ assert(loc);
+ assert(oinfo);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2308,7 +2308,7 @@ H5O_get_native_info(const H5O_loc_t *loc, H5O_native_info_t *oinfo, unsigned fie
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class")
/* Reset the object info structure */
- HDmemset(oinfo, 0, sizeof(*oinfo));
+ memset(oinfo, 0, sizeof(*oinfo));
/* Get the information for the object header, if requested */
if (fields & H5O_NATIVE_INFO_HDR)
@@ -2357,8 +2357,8 @@ H5O_get_create_plist(const H5O_loc_t *loc, H5P_genplist_t *oc_plist)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
- HDassert(oc_plist);
+ assert(loc);
+ assert(oc_plist);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2415,8 +2415,8 @@ H5O_get_nlinks(const H5O_loc_t *loc, hsize_t *nlinks)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
- HDassert(nlinks);
+ assert(loc);
+ assert(nlinks);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2454,17 +2454,17 @@ H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc
FUNC_ENTER_NOAPI(NULL)
/* Sanity checks */
- HDassert(f);
- HDassert(obj_type >= H5O_TYPE_GROUP && obj_type <= H5O_TYPE_NAMED_DATATYPE);
- HDassert(crt_info);
- HDassert(obj_loc);
+ assert(f);
+ assert(obj_type >= H5O_TYPE_GROUP && obj_type <= H5O_TYPE_NAMED_DATATYPE);
+ assert(crt_info);
+ assert(obj_loc);
/* Iterate through the object classes */
for (u = 0; u < NELMTS(H5O_obj_class_g); u++) {
/* Check for correct type of object to create */
if (H5O_obj_class_g[u]->type == obj_type) {
/* Call the object class's 'create' routine */
- HDassert(H5O_obj_class_g[u]->create);
+ assert(H5O_obj_class_g[u]->create);
if (NULL == (ret_value = H5O_obj_class_g[u]->create(f, crt_info, obj_loc)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object")
@@ -2472,7 +2472,7 @@ H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc
break;
} /* end if */
} /* end for */
- HDassert(ret_value);
+ assert(ret_value);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2501,8 +2501,8 @@ H5O_get_oh_addr(const H5O_t *oh)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(oh);
- HDassert(oh->chunk);
+ assert(oh);
+ assert(oh->chunk);
FUNC_LEAVE_NOAPI(oh->chunk[0].addr)
} /* end H5O_get_oh_addr() */
@@ -2519,7 +2519,7 @@ uint8_t
H5O_get_oh_flags(const H5O_t *oh)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(oh);
+ assert(oh);
FUNC_LEAVE_NOAPI(oh->flags); /* flags can be 0 */
} /* H5O_get_oh_flags() */
@@ -2539,8 +2539,8 @@ time_t
H5O_get_oh_mtime(const H5O_t *oh)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(oh);
- HDassert(oh->mtime);
+ assert(oh);
+ assert(oh->mtime);
FUNC_LEAVE_NOAPI(oh->mtime);
} /* H5O_get_oh_mtime() */
@@ -2556,8 +2556,8 @@ uint8_t
H5O_get_oh_version(const H5O_t *oh)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(oh);
- HDassert(oh->version);
+ assert(oh);
+ assert(oh->version);
FUNC_LEAVE_NOAPI(oh->version);
} /* H5O_get_oh_version() */
@@ -2583,7 +2583,7 @@ H5O_get_rc_and_type(const H5O_loc_t *loc, unsigned *rc, H5O_type_t *otype)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
+ assert(loc);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -2653,9 +2653,9 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(name);
- HDassert(linfo);
- HDassert(udata);
+ assert(name);
+ assert(linfo);
+ assert(udata);
/* Check if this is a hard link */
if (linfo->type == H5L_TYPE_HARD) {
@@ -2770,10 +2770,10 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or
FUNC_ENTER_PACKAGE
/* Portably initialize user data struct to zeros */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
/* Check args */
- HDassert(loc);
+ assert(loc);
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -2892,7 +2892,7 @@ H5O__inc_rc(H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
+ assert(oh);
/* Pin the object header when the reference count goes above 0 */
if (oh->rc == 0)
@@ -2963,7 +2963,7 @@ H5O_dec_rc_by_loc(const H5O_loc_t *loc)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
+ assert(loc);
/* Get header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -3000,7 +3000,7 @@ H5O_get_proxy(const H5O_t *oh)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(oh);
+ assert(oh);
FUNC_LEAVE_NOAPI(oh->proxy)
} /* end H5O_get_proxy() */
@@ -3026,8 +3026,8 @@ H5O__free(H5O_t *oh, hbool_t H5_ATTR_NDEBUG_UNUSED force)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
- HDassert(0 == oh->rc);
+ assert(oh);
+ assert(0 == oh->rc);
/* Destroy chunks */
if (oh->chunk) {
@@ -3048,14 +3048,14 @@ H5O__free(H5O_t *oh, hbool_t H5_ATTR_NDEBUG_UNUSED force)
if (oh->ndecode_dirtied && oh->mesg[u].dirty)
oh->ndecode_dirtied--;
else if (!force)
- HDassert(oh->mesg[u].dirty == 0);
+ assert(oh->mesg[u].dirty == 0);
#endif /* NDEBUG */
H5O__msg_free_mesg(&oh->mesg[u]);
} /* end for */
/* Make sure we accounted for all the messages dirtied by decoding */
- HDassert(!oh->ndecode_dirtied);
+ assert(!oh->ndecode_dirtied);
oh->mesg = (H5O_mesg_t *)H5FL_SEQ_FREE(H5O_mesg_t, oh->mesg);
} /* end if */
@@ -3087,7 +3087,7 @@ H5O__reset_info2(H5O_info2_t *oinfo)
FUNC_ENTER_PACKAGE_NOERR;
/* Reset the passed-in info struct */
- HDmemset(oinfo, 0, sizeof(H5O_info2_t));
+ memset(oinfo, 0, sizeof(H5O_info2_t));
oinfo->type = H5O_TYPE_UNKNOWN;
oinfo->token = H5O_TOKEN_UNDEF;
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 645ad73..6a9e624 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -91,8 +91,8 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (mesg = H5FL_CALLOC(H5O_layout_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "memory allocation failed")
@@ -798,9 +798,9 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(p);
+ assert(f);
+ assert(mesg);
+ assert(p);
/* Message version */
*p++ = (uint8_t)((mesg->version < H5O_LAYOUT_VERSION_3) ? H5O_LAYOUT_VERSION_3 : mesg->version);
@@ -819,7 +819,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
if (mesg->storage.u.compact.buf)
H5MM_memcpy(p, mesg->storage.u.compact.buf, mesg->storage.u.compact.size);
else
- HDmemset(p, 0, mesg->storage.u.compact.size);
+ memset(p, 0, mesg->storage.u.compact.size);
p += mesg->storage.u.compact.size;
} /* end if */
break;
@@ -835,7 +835,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
case H5D_CHUNKED:
if (mesg->version < H5O_LAYOUT_VERSION_4) {
/* Number of dimensions */
- HDassert(mesg->u.chunk.ndims > 0 && mesg->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(mesg->u.chunk.ndims > 0 && mesg->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
*p++ = (uint8_t)mesg->u.chunk.ndims;
/* B-tree address */
@@ -850,11 +850,11 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
*p++ = mesg->u.chunk.flags;
/* Number of dimensions */
- HDassert(mesg->u.chunk.ndims > 0 && mesg->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ assert(mesg->u.chunk.ndims > 0 && mesg->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
*p++ = (uint8_t)mesg->u.chunk.ndims;
/* Encoded # of bytes for each chunk dimension */
- HDassert(mesg->u.chunk.enc_bytes_per_dim > 0 && mesg->u.chunk.enc_bytes_per_dim <= 8);
+ assert(mesg->u.chunk.enc_bytes_per_dim > 0 && mesg->u.chunk.enc_bytes_per_dim <= 8);
*p++ = (uint8_t)mesg->u.chunk.enc_bytes_per_dim;
/* Dimension sizes */
@@ -956,7 +956,7 @@ H5O__layout_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* Allocate destination message, if necessary */
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_layout_t)))
@@ -971,7 +971,7 @@ H5O__layout_copy(const void *_mesg, void *_dest)
/* Deep copy the buffer for compact datasets also */
if (mesg->storage.u.compact.size > 0) {
/* Sanity check */
- HDassert(mesg->storage.u.compact.buf);
+ assert(mesg->storage.u.compact.buf);
/* Allocate memory for the raw data */
if (NULL == (dest->storage.u.compact.buf = H5MM_malloc(dest->storage.u.compact.size)))
@@ -982,7 +982,7 @@ H5O__layout_copy(const void *_mesg, void *_dest)
dest->storage.u.compact.size);
} /* end if */
else
- HDassert(dest->storage.u.compact.buf == NULL);
+ assert(dest->storage.u.compact.buf == NULL);
break;
case H5D_CONTIGUOUS:
@@ -1042,8 +1042,8 @@ H5O__layout_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const vo
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
/* Compute serialized size */
/* (including possibly compact data) */
@@ -1110,7 +1110,7 @@ H5O__layout_free(void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
/* Free resources within the message */
H5O__layout_reset(mesg);
@@ -1141,9 +1141,9 @@ H5O__layout_delete(H5F_t *f, H5O_t *open_oh, void *_mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(open_oh);
- HDassert(mesg);
+ assert(f);
+ assert(open_oh);
+ assert(mesg);
/* Perform different actions, depending on the type of storage */
switch (mesg->type) {
@@ -1203,8 +1203,8 @@ H5O__layout_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(cpy_info);
- HDassert(cpy_info->file_dst);
+ assert(cpy_info);
+ assert(cpy_info->file_dst);
/* Check to ensure that the version of the message to be copied does not exceed
the message version allowed by the destination file's high bound */
@@ -1243,9 +1243,9 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file_src);
- HDassert(layout_src);
- HDassert(file_dst);
+ assert(file_src);
+ assert(layout_src);
+ assert(file_dst);
/* Copy the layout information */
if (NULL == (layout_dst = (H5O_layout_t *)H5O__layout_copy(layout_src, NULL)))
@@ -1345,102 +1345,101 @@ H5O__layout_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version);
switch (mesg->type) {
case H5D_CHUNKED:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Chunked");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Chunked");
/* Chunk # of dims & size */
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Number of dimensions:", (unsigned long)(mesg->u.chunk.ndims));
- HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Size:");
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
+ "Number of dimensions:", (unsigned long)(mesg->u.chunk.ndims));
+ fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Size:");
for (u = 0; u < (size_t)mesg->u.chunk.ndims; u++)
- HDfprintf(stream, "%s%lu", u ? ", " : "", (unsigned long)(mesg->u.chunk.dim[u]));
- HDfprintf(stream, "}\n");
+ fprintf(stream, "%s%lu", u ? ", " : "", (unsigned long)(mesg->u.chunk.dim[u]));
+ fprintf(stream, "}\n");
/* Index information */
switch (mesg->u.chunk.idx_type) {
case H5D_CHUNK_IDX_BTREE:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v1 B-tree");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v1 B-tree");
break;
case H5D_CHUNK_IDX_NONE:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Implicit");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Implicit");
break;
case H5D_CHUNK_IDX_SINGLE:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Single Chunk");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Single Chunk");
break;
case H5D_CHUNK_IDX_FARRAY:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Fixed Array");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Fixed Array");
/* (Should print the fixed array creation parameters) */
break;
case H5D_CHUNK_IDX_EARRAY:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Extensible Array");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "Extensible Array");
/* (Should print the extensible array creation parameters) */
break;
case H5D_CHUNK_IDX_BT2:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v2 B-tree");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Index Type:", "v2 B-tree");
/* (Should print the v2-Btree creation parameters) */
break;
case H5D_CHUNK_IDX_NTYPES:
default:
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Index Type:", "Unknown",
- (unsigned)mesg->u.chunk.idx_type);
+ fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Index Type:", "Unknown",
+ (unsigned)mesg->u.chunk.idx_type);
break;
} /* end switch */
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Index address:", mesg->storage.u.chunk.idx_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Index address:", mesg->storage.u.chunk.idx_addr);
break;
case H5D_CONTIGUOUS:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Contiguous");
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Data address:", mesg->storage.u.contig.addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
- "Data Size:", mesg->storage.u.contig.size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Contiguous");
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Data address:", mesg->storage.u.contig.addr);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth,
+ "Data Size:", mesg->storage.u.contig.size);
break;
case H5D_COMPACT:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Compact");
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Data Size:", mesg->storage.u.compact.size);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Compact");
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data Size:", mesg->storage.u.compact.size);
break;
case H5D_VIRTUAL:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Virtual");
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Global heap address:", mesg->storage.u.virt.serial_list_hobjid.addr);
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "Global heap index:", mesg->storage.u.virt.serial_list_hobjid.idx);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Virtual");
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Global heap address:", mesg->storage.u.virt.serial_list_hobjid.addr);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "Global heap index:", mesg->storage.u.virt.serial_list_hobjid.idx);
for (u = 0; u < mesg->storage.u.virt.list_nused; u++) {
- HDfprintf(stream, "%*sMapping %zu:\n", indent, "", u);
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
- "Virtual selection:", "<Not yet implemented>");
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
- "Source file name:", mesg->storage.u.virt.list[u].source_file_name);
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
- "Source dataset name:", mesg->storage.u.virt.list[u].source_dset_name);
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
- "Source selection:", "<Not yet implemented>");
+ fprintf(stream, "%*sMapping %zu:\n", indent, "", u);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
+ "Virtual selection:", "<Not yet implemented>");
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
+ "Source file name:", mesg->storage.u.virt.list[u].source_file_name);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
+ "Source dataset name:", mesg->storage.u.virt.list[u].source_dset_name);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3,
+ "Source selection:", "<Not yet implemented>");
} /* end for */
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Type:", "Unknown",
- (unsigned)mesg->type);
+ fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Type:", "Unknown",
+ (unsigned)mesg->type);
break;
} /* end switch */
diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c
index a82be72..ce5de17 100644
--- a/src/H5Olinfo.c
+++ b/src/H5Olinfo.c
@@ -109,8 +109,8 @@ H5O__linfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Check input buffer before decoding version and index flags */
if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end))
@@ -194,9 +194,9 @@ H5O__linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(linfo);
+ assert(f);
+ assert(p);
+ assert(linfo);
/* Message version */
*p++ = H5O_LINFO_VERSION;
@@ -220,7 +220,7 @@ H5O__linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
if (linfo->index_corder)
H5F_addr_encode(f, &p, linfo->corder_bt2_addr);
else
- HDassert(!H5F_addr_defined(linfo->corder_bt2_addr));
+ assert(!H5F_addr_defined(linfo->corder_bt2_addr));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__linfo_encode() */
@@ -249,7 +249,7 @@ H5O__linfo_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(linfo);
+ assert(linfo);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_linfo_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -316,7 +316,7 @@ H5O__linfo_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_linfo_t, mesg);
@@ -344,8 +344,8 @@ H5O__linfo_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(linfo);
+ assert(f);
+ assert(linfo);
/* If the group is using "dense" link storage, delete it */
if (H5F_addr_defined(linfo->fheap_addr))
@@ -383,8 +383,8 @@ H5O__linfo_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t *fi
FUNC_ENTER_PACKAGE_TAG(H5AC__COPIED_TAG)
/* check args */
- HDassert(linfo_src);
- HDassert(cpy_info);
+ assert(linfo_src);
+ assert(cpy_info);
/* Copy the source message */
if (NULL == (linfo_dst = (H5O_linfo_t *)H5O__linfo_copy(linfo_src, NULL)))
@@ -449,8 +449,8 @@ H5O__linfo_post_copy_file_cb(const H5O_link_t *src_lnk, void *_udata)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(src_lnk);
- HDassert(udata);
+ assert(src_lnk);
+ assert(udata);
/* Copy the link (and the object it points to) */
if (H5L__link_copy_file(udata->dst_oloc->file, src_lnk, udata->src_oloc, &dst_lnk, udata->cpy_info) < 0)
@@ -499,12 +499,12 @@ H5O__linfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_l
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(src_oloc && src_oloc->file);
- HDassert(linfo_src);
- HDassert(dst_oloc && dst_oloc->file);
- HDassert(H5F_addr_defined(dst_oloc->addr));
- HDassert(linfo_dst);
- HDassert(cpy_info);
+ assert(src_oloc && src_oloc->file);
+ assert(linfo_src);
+ assert(dst_oloc && dst_oloc->file);
+ assert(H5F_addr_defined(dst_oloc->addr));
+ assert(linfo_dst);
+ assert(cpy_info);
/* If we are performing a 'shallow hierarchy' copy, get out now */
if (cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth)
@@ -550,25 +550,25 @@ H5O__linfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(linfo);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Track creation order of links:", linfo->track_corder ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Index creation order of links:", linfo->index_corder ? "TRUE" : "FALSE");
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of links:", linfo->nlinks);
- HDfprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth,
- "Max. creation order value:", linfo->max_corder);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "'Dense' link storage fractal heap address:", linfo->fheap_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "'Dense' link storage name index v2 B-tree address:", linfo->name_bt2_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "'Dense' link storage creation order index v2 B-tree address:", linfo->corder_bt2_addr);
+ assert(f);
+ assert(linfo);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Track creation order of links:", linfo->track_corder ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "Index creation order of links:", linfo->index_corder ? "TRUE" : "FALSE");
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of links:", linfo->nlinks);
+ fprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth,
+ "Max. creation order value:", linfo->max_corder);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "'Dense' link storage fractal heap address:", linfo->fheap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "'Dense' link storage name index v2 B-tree address:", linfo->name_bt2_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "'Dense' link storage creation order index v2 B-tree address:", linfo->corder_bt2_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__linfo_debug() */
diff --git a/src/H5Olink.c b/src/H5Olink.c
index 160b1d0..9c0a0bb 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -114,8 +114,8 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding")
@@ -301,13 +301,13 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(lnk);
+ assert(f);
+ assert(p);
+ assert(lnk);
/* Get length of link's name */
len = (uint64_t)HDstrlen(lnk->name);
- HDassert(len > 0);
+ assert(len > 0);
/* encode */
*p++ = H5O_LINK_VERSION;
@@ -357,7 +357,7 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
break;
default:
- HDassert(0 && "bad size for name");
+ assert(0 && "bad size for name");
} /* end switch */
/* Store the link's name */
@@ -374,7 +374,7 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
case H5L_TYPE_SOFT:
/* Store the link value */
len = (uint16_t)HDstrlen(lnk->u.soft.name);
- HDassert(len > 0);
+ assert(len > 0);
UINT16ENCODE(p, len)
H5MM_memcpy(p, lnk->u.soft.name, (size_t)len);
p += len;
@@ -385,7 +385,7 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
case H5L_TYPE_ERROR:
case H5L_TYPE_MAX:
default:
- HDassert(lnk->type >= H5L_TYPE_UD_MIN && lnk->type <= H5L_TYPE_MAX);
+ assert(lnk->type >= H5L_TYPE_UD_MIN && lnk->type <= H5L_TYPE_MAX);
/* Store the user-supplied data, however long it is */
len = (uint16_t)lnk->u.ud.size;
@@ -425,7 +425,7 @@ H5O__link_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(lnk);
+ assert(lnk);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_link_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -433,7 +433,7 @@ H5O__link_copy(const void *_mesg, void *_dest)
*dest = *lnk;
/* Duplicate the link's name */
- HDassert(lnk->name);
+ assert(lnk->name);
if (NULL == (dest->name = H5MM_xstrdup(lnk->name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't duplicate link name")
@@ -531,7 +531,7 @@ H5O__link_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
case H5L_TYPE_EXTERNAL:
case H5L_TYPE_MAX:
default: /* Default is user-defined link type */
- HDassert(lnk->type >= H5L_TYPE_UD_MIN);
+ assert(lnk->type >= H5L_TYPE_UD_MIN);
ret_value += 2 + /* User-defined data size */
lnk->u.ud.size; /* User-defined data */
break;
@@ -593,7 +593,7 @@ H5O__link_free(void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(lnk);
+ assert(lnk);
lnk = H5FL_FREE(H5O_link_t, lnk);
@@ -622,8 +622,8 @@ H5O_link_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(lnk);
+ assert(f);
+ assert(lnk);
/* Check for adjusting the link count when the link is removed */
/* Adjust the reference count of the object when a hard link is removed */
@@ -633,7 +633,7 @@ H5O_link_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
/* Construct object location for object, in order to decrement it's ref count */
H5O_loc_reset(&oloc);
oloc.file = f;
- HDassert(H5F_addr_defined(lnk->u.hard.addr));
+ assert(H5F_addr_defined(lnk->u.hard.addr));
oloc.addr = lnk->u.hard.addr;
/* Decrement the ref count for the object */
@@ -690,8 +690,8 @@ H5O__link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(deleted);
- HDassert(cpy_info);
+ assert(deleted);
+ assert(cpy_info);
/* If we are performing a 'shallow hierarchy' copy, and this link won't
* be included in the final group, indicate that it should be deleted
@@ -729,9 +729,9 @@ H5O__link_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t H5_A
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(link_src);
- HDassert(cpy_info);
- HDassert(cpy_info->max_depth < 0 || cpy_info->curr_depth < cpy_info->max_depth);
+ assert(link_src);
+ assert(cpy_info);
+ assert(cpy_info->max_depth < 0 || cpy_info->curr_depth < cpy_info->max_depth);
/* Sanity check source link type */
if (link_src->type > H5L_TYPE_SOFT && link_src->type < H5L_TYPE_UD_MIN)
@@ -769,13 +769,13 @@ H5O__link_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_lo
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(link_src);
- HDassert(dst_oloc);
- HDassert(H5F_addr_defined(dst_oloc->addr));
- HDassert(dst_oloc->file);
- HDassert(link_dst);
- HDassert(cpy_info);
- HDassert(cpy_info->max_depth < 0 || cpy_info->curr_depth < cpy_info->max_depth);
+ assert(link_src);
+ assert(dst_oloc);
+ assert(H5F_addr_defined(dst_oloc->addr));
+ assert(dst_oloc->file);
+ assert(link_dst);
+ assert(cpy_info);
+ assert(cpy_info->max_depth < 0 || cpy_info->curr_depth < cpy_info->max_depth);
/* Copy the link (and the object it points to) */
if (H5L__link_copy_file(dst_oloc->file, link_src, src_oloc, link_dst, cpy_info) < 0)
@@ -806,37 +806,37 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(lnk);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Type:",
- (lnk->type == H5L_TYPE_HARD
- ? "Hard"
- : (lnk->type == H5L_TYPE_SOFT
- ? "Soft"
- : (lnk->type == H5L_TYPE_EXTERNAL
- ? "External"
- : (lnk->type >= H5L_TYPE_UD_MIN ? "User-defined" : "Unknown")))));
+ assert(f);
+ assert(lnk);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Type:",
+ (lnk->type == H5L_TYPE_HARD
+ ? "Hard"
+ : (lnk->type == H5L_TYPE_SOFT
+ ? "Soft"
+ : (lnk->type == H5L_TYPE_EXTERNAL
+ ? "External"
+ : (lnk->type >= H5L_TYPE_UD_MIN ? "User-defined" : "Unknown")))));
if (lnk->corder_valid)
- HDfprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth, "Creation Order:", lnk->corder);
+ fprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth, "Creation Order:", lnk->corder);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Name Character Set:",
- (lnk->cset == H5T_CSET_ASCII ? "ASCII" : (lnk->cset == H5T_CSET_UTF8 ? "UTF-8" : "Unknown")));
- HDfprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth, "Link Name:", lnk->name);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Name Character Set:",
+ (lnk->cset == H5T_CSET_ASCII ? "ASCII" : (lnk->cset == H5T_CSET_UTF8 ? "UTF-8" : "Unknown")));
+ fprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth, "Link Name:", lnk->name);
/* Display link-specific information */
switch (lnk->type) {
case H5L_TYPE_HARD:
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Object address:", lnk->u.hard.addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Object address:", lnk->u.hard.addr);
break;
case H5L_TYPE_SOFT:
- HDfprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth, "Link Value:", lnk->u.soft.name);
+ fprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth, "Link Value:", lnk->u.soft.name);
break;
case H5L_TYPE_ERROR:
@@ -848,13 +848,13 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
const char *objname =
(const char *)lnk->u.ud.udata + (HDstrlen((const char *)lnk->u.ud.udata) + 1);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "External File Name:", (const char *)lnk->u.ud.udata);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "External Object Name:", objname);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ "External File Name:", (const char *)lnk->u.ud.udata);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "External Object Name:", objname);
} /* end if */
else {
- HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
- "User-Defined Link Size:", lnk->u.ud.size);
+ fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth,
+ "User-Defined Link Size:", lnk->u.ud.size);
} /* end else */
} /* end if */
else
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index e0a0654..1474e90 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -106,10 +106,10 @@ H5O_msg_create(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags, unsi
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
- HDassert(mesg);
+ assert(loc);
+ assert(type_id < NELMTS(H5O_msg_class_g));
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(mesg);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -152,14 +152,14 @@ H5O_msg_append_oh(H5F_t *f, H5O_t *oh, unsigned type_id, unsigned mesg_flags, un
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(oh);
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
- HDassert(mesg);
+ assert(type);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(mesg);
/* Append new message to object header */
if (H5O__msg_append_real(f, oh, type, mesg_flags, update_flags, mesg) < 0)
@@ -193,11 +193,11 @@ H5O__msg_append_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
- HDassert(mesg);
+ assert(f);
+ assert(oh);
+ assert(type);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(mesg);
/* Allocate space for a new message */
if (H5O__msg_alloc(f, oh, type, &mesg_flags, mesg, &idx) < 0)
@@ -243,15 +243,15 @@ H5O_msg_write(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags, unsig
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(type);
+ assert(mesg);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -296,14 +296,14 @@ H5O_msg_write_oh(H5F_t *f, H5O_t *oh, unsigned type_id, unsigned mesg_flags, uns
FUNC_ENTER_NOAPI_TAG(oh->cache_info.addr, FAIL)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(oh);
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(type);
+ assert(mesg);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
/* Call the "real" modify routine */
if (H5O__msg_write_real(f, oh, type, mesg_flags, update_flags, mesg) < 0)
@@ -343,12 +343,12 @@ H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned m
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
- HDassert(type != H5O_MSG_ATTR);
- HDassert(mesg);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(f);
+ assert(oh);
+ assert(type);
+ assert(type != H5O_MSG_ATTR);
+ assert(mesg);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
/* Locate message of correct type */
for (idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
@@ -367,13 +367,13 @@ H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned m
/* First, sanity check to make sure it's not a committed message;
* these can't ever be modified.
*/
- HDassert(((H5O_shared_t *)idx_msg->native)->type != H5O_SHARE_TYPE_COMMITTED);
+ assert(((H5O_shared_t *)idx_msg->native)->type != H5O_SHARE_TYPE_COMMITTED);
/* Also, sanity check that a message doesn't switch status from being
* shared (or shareable) to being unshareable. (Which could cause
* a message to increase in size in the object header)
*/
- HDassert(!(mesg_flags & H5O_MSG_FLAG_DONTSHARE));
+ assert(!(mesg_flags & H5O_MSG_FLAG_DONTSHARE));
/* Remove the old message from the SOHM index */
/* (It would be more efficient to try to share the message first, then
@@ -441,10 +441,10 @@ H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg)
FUNC_ENTER_NOAPI_TAG(loc->addr, NULL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(type_id < NELMTS(H5O_msg_class_g));
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -493,11 +493,11 @@ H5O_msg_read_oh(H5F_t *f, H5O_t *oh, unsigned type_id, void *mesg)
FUNC_ENTER_NOAPI_NOINIT
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(oh);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Scan through the messages looking for the right one */
for (idx = 0; idx < oh->nmesgs; idx++)
@@ -547,9 +547,9 @@ H5O_msg_reset(unsigned type_id, void *native)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Call the "real" reset routine */
if (H5O__msg_reset_real(type, native) < 0)
@@ -581,7 +581,7 @@ H5O__msg_reset_real(const H5O_msg_class_t *type, void *native)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(type);
+ assert(type);
if (native) {
if (type->reset) {
@@ -589,7 +589,7 @@ H5O__msg_reset_real(const H5O_msg_class_t *type, void *native)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "reset method failed")
} /* end if */
else
- HDmemset(native, 0, type->native_size);
+ memset(native, 0, type->native_size);
} /* end if */
done:
@@ -620,9 +620,9 @@ H5O_msg_free(unsigned type_id, void *mesg)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Call the "real" free routine */
ret_value = H5O_msg_free_real(type, mesg);
@@ -648,7 +648,7 @@ H5O__msg_free_mesg(H5O_mesg_t *mesg)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* Free any native information */
mesg->native = H5O_msg_free_real(mesg->type, mesg->native);
@@ -676,7 +676,7 @@ H5O_msg_free_real(const H5O_msg_class_t *type, void *msg_native)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(type);
+ assert(type);
if (msg_native) {
H5O__msg_reset_real(type, msg_native);
@@ -713,10 +713,10 @@ H5O_msg_copy(unsigned type_id, const void *mesg, void *dst)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(mesg);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(mesg);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Call the message class's copy routine */
if (NULL == (ret_value = (type->copy)(mesg, dst)))
@@ -752,12 +752,12 @@ H5O_msg_count(const H5O_loc_t *loc, unsigned type_id)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Load the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -798,8 +798,8 @@ H5O__msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(oh);
- HDassert(type);
+ assert(oh);
+ assert(type);
/* Loop over all messages, counting the ones of the type looked for */
for (u = ret_value = 0; u < oh->nmesgs; u++)
@@ -835,9 +835,9 @@ H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id)
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
- HDassert(loc);
- HDassert(loc->file);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(type_id < NELMTS(H5O_msg_class_g));
/* Load the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -881,10 +881,10 @@ H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(oh);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(oh);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Scan through the messages looking for the right one */
for (u = 0; u < oh->nmesgs; u++)
@@ -924,13 +924,13 @@ H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -974,13 +974,13 @@ H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence, H5O_oper
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -1022,7 +1022,7 @@ H5O__msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, un
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* Check for callback routine */
if (udata->op) {
@@ -1087,9 +1087,9 @@ H5O__msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, int seque
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
+ assert(f);
+ assert(oh);
+ assert(type);
/* Make certain we are allowed to modify the file */
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
@@ -1157,13 +1157,13 @@ H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id, const H5O_mesg_operator_
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(op);
+ assert(type);
+ assert(op);
/* Protect the object header to iterate over */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -1223,11 +1223,11 @@ H5O__msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const H5
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
- HDassert(op);
- HDassert(op->u.app_op);
+ assert(f);
+ assert(oh);
+ assert(type);
+ assert(op);
+ assert(op->u.app_op);
/* Iterate over messages */
for (sequence = 0, idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs && !ret_value; idx++, idx_msg++) {
@@ -1300,12 +1300,12 @@ H5O_msg_raw_size(const H5F_t *f, unsigned type_id, hbool_t disable_shared, const
FUNC_ENTER_NOAPI(0)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->raw_size);
- HDassert(f);
- HDassert(mesg);
+ assert(type);
+ assert(type->raw_size);
+ assert(f);
+ assert(mesg);
/* Compute the raw data size for the mesg */
if (0 == (ret_value = (type->raw_size)(f, disable_shared, mesg)))
@@ -1342,12 +1342,12 @@ H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id, const void *mesg
FUNC_ENTER_NOAPI(0)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->raw_size);
- HDassert(f);
- HDassert(mesg);
+ assert(type);
+ assert(type->raw_size);
+ assert(f);
+ assert(mesg);
/* Get the property list */
if (NULL == (ocpl = (H5P_genplist_t *)H5I_object(ocpl_id)))
@@ -1400,12 +1400,12 @@ H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id, const void *m
FUNC_ENTER_NOAPI(0)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->raw_size);
- HDassert(f);
- HDassert(mesg);
+ assert(type);
+ assert(type->raw_size);
+ assert(f);
+ assert(mesg);
/* Compute the raw data size for the mesg */
if ((ret_value = (type->raw_size)(f, FALSE, mesg)) == 0)
@@ -1450,10 +1450,10 @@ H5O_msg_can_share(unsigned type_id, const void *mesg)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
+ assert(type);
+ assert(mesg);
/* If there is a can_share callback, use it */
if (type->can_share)
@@ -1468,7 +1468,7 @@ H5O_msg_can_share(unsigned type_id, const void *mesg)
/* If the message is shareable, both copy_file and post_copy_file must be
* defined */
- HDassert((type->post_copy_file && type->copy_file) || ret_value == FALSE);
+ assert((type->post_copy_file && type->copy_file) || ret_value == FALSE);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_can_share() */
@@ -1496,9 +1496,9 @@ H5O_msg_can_share_in_ohdr(unsigned type_id)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Otherwise, the message can be shared if messages of this type are
* shareable in general; i.e., if they have the "is_sharable" flag
@@ -1538,10 +1538,10 @@ H5O_msg_is_shared(unsigned type_id, const void *mesg)
else
#endif /* H5O_ENABLE_BOGUS */
{
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
+ assert(type);
+ assert(mesg);
/* If messages in a class aren't shareable, then obviously this message isn't shared! :-) */
if (type->share_flags & H5O_SHARE_IS_SHARABLE)
@@ -1575,13 +1575,13 @@ H5O_msg_set_share(unsigned type_id, const H5O_shared_t *share, void *mesg)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->share_flags & H5O_SHARE_IS_SHARABLE);
- HDassert(mesg);
- HDassert(share);
- HDassert(share->type != H5O_SHARE_TYPE_UNSHARED);
+ assert(type);
+ assert(type->share_flags & H5O_SHARE_IS_SHARABLE);
+ assert(mesg);
+ assert(share);
+ assert(share->type != H5O_SHARE_TYPE_UNSHARED);
/* If there's a special action for this class that needs to be performed
* when setting the shared component, do that
@@ -1621,13 +1621,13 @@ H5O_msg_reset_share(unsigned H5_ATTR_NDEBUG_UNUSED type_id, void *mesg)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
- HDassert(H5O_msg_class_g[type_id]); /* map the type ID to the actual type object */
- HDassert(H5O_msg_class_g[type_id]->share_flags & H5O_SHARE_IS_SHARABLE);
- HDassert(mesg);
+ assert(type_id < NELMTS(H5O_msg_class_g));
+ assert(H5O_msg_class_g[type_id]); /* map the type ID to the actual type object */
+ assert(H5O_msg_class_g[type_id]->share_flags & H5O_SHARE_IS_SHARABLE);
+ assert(mesg);
/* Reset the shared component in the message to zero. */
- HDmemset((H5O_shared_t *)mesg, 0, sizeof(H5O_shared_t));
+ memset((H5O_shared_t *)mesg, 0, sizeof(H5O_shared_t));
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_msg_reset_share() */
@@ -1654,11 +1654,11 @@ H5O_msg_get_crt_index(unsigned type_id, const void *mesg, H5O_msg_crt_idx_t *crt
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
- HDassert(crt_idx);
+ assert(type);
+ assert(mesg);
+ assert(crt_idx);
/* If there is a "get_crt_index callback, use it */
if (type->get_crt_index) {
@@ -1697,10 +1697,10 @@ H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared, unsigned char
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Encode */
if ((type->encode)(f, disable_shared, buf, mesg) < 0)
@@ -1735,10 +1735,10 @@ H5O_msg_decode(H5F_t *f, H5O_t *open_oh, unsigned type_id, size_t buf_size, cons
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(f);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* decode */
if (NULL == (ret_value = (type->decode)(f, open_oh, 0, &ioflags, buf_size, buf)))
@@ -1775,13 +1775,13 @@ H5O__msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src, void *native_sr
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(type);
- HDassert(type->copy_file);
- HDassert(file_src);
- HDassert(native_src);
- HDassert(file_dst);
- HDassert(recompute_size);
- HDassert(cpy_info);
+ assert(type);
+ assert(type->copy_file);
+ assert(file_src);
+ assert(native_src);
+ assert(file_dst);
+ assert(recompute_size);
+ assert(cpy_info);
/* The copy_file callback will return an H5O_shared_t only if the message
* to be copied is a committed datatype.
@@ -1818,13 +1818,13 @@ H5O__msg_alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned *mesg_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(mesg_flags);
- HDassert(!(*mesg_flags & H5O_MSG_FLAG_SHARED));
- HDassert(type);
- HDassert(native);
- HDassert(mesg_idx);
+ assert(f);
+ assert(oh);
+ assert(mesg_flags);
+ assert(!(*mesg_flags & H5O_MSG_FLAG_SHARED));
+ assert(type);
+ assert(native);
+ assert(mesg_idx);
/* Check if message is already shared */
if ((shared_mesg = H5O_msg_is_shared(type->id, native)) < 0)
@@ -1884,11 +1884,11 @@ H5O__copy_mesg(H5F_t *f, H5O_t *oh, size_t idx, const H5O_msg_class_t *type, con
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
- HDassert(type->copy);
- HDassert(mesg);
+ assert(f);
+ assert(oh);
+ assert(type);
+ assert(type->copy);
+ assert(mesg);
/* Protect chunk */
if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, idx_msg->chunkno)))
@@ -1957,10 +1957,10 @@ H5O_msg_delete(H5F_t *f, H5O_t *open_oh, unsigned type_id, void *mesg)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* delete */
if ((type->del) && (type->del)(f, open_oh, mesg) < 0)
@@ -1993,9 +1993,9 @@ H5O__delete_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(oh);
+ assert(f);
+ assert(mesg);
+ assert(oh);
/* Check if there is a file space deletion callback for this type of message */
if (type->del) {
@@ -2033,8 +2033,8 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Point into message's chunk's image */
p = mesg->raw - H5O_SIZEOF_MSGHDR_OH(oh);
@@ -2050,7 +2050,7 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
UINT16ENCODE(p, msg_id)
else
*p++ = (uint8_t)msg_id;
- HDassert(mesg->raw_size < H5O_MESG_MAX_SIZE);
+ assert(mesg->raw_size < H5O_MESG_MAX_SIZE);
UINT16ENCODE(p, mesg->raw_size);
*p++ = mesg->flags;
@@ -2066,15 +2066,15 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
if (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)
UINT16ENCODE(p, mesg->crt_idx);
} /* end else */
- HDassert(p == mesg->raw);
+ assert(p == mesg->raw);
#ifndef NDEBUG
/* Make certain that null messages aren't in chunks w/gaps */
if (H5O_NULL_ID == msg_id)
- HDassert(oh->chunk[mesg->chunkno].gap == 0);
+ assert(oh->chunk[mesg->chunkno].gap == 0);
else
/* Non-null messages should always have a native pointer */
- HDassert(mesg->native);
+ assert(mesg->native);
#endif /* NDEBUG */
/* Encode the message itself, if it's not an "unknown" message */
@@ -2084,10 +2084,10 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
* encode a Shared Object message instead of the object
* which is being shared.
*/
- HDassert(mesg->raw >= oh->chunk[mesg->chunkno].image);
- HDassert(mesg->raw_size == H5O_ALIGN_OH(oh, mesg->raw_size));
- HDassert(mesg->raw + mesg->raw_size <=
- oh->chunk[mesg->chunkno].image + (oh->chunk[mesg->chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh)));
+ assert(mesg->raw >= oh->chunk[mesg->chunkno].image);
+ assert(mesg->raw_size == H5O_ALIGN_OH(oh, mesg->raw_size));
+ assert(mesg->raw + mesg->raw_size <=
+ oh->chunk[mesg->chunkno].image + (oh->chunk[mesg->chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh)));
#ifndef NDEBUG
/* Sanity check that the message won't overwrite past it's allocated space */
{
@@ -2095,10 +2095,10 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
msg_size = mesg->type->raw_size(f, FALSE, mesg->native);
msg_size = H5O_ALIGN_OH(oh, msg_size);
- HDassert(msg_size <= mesg->raw_size);
+ assert(msg_size <= mesg->raw_size);
}
#endif /* NDEBUG */
- HDassert(mesg->type->encode);
+ assert(mesg->type->encode);
if ((mesg->type->encode)(f, FALSE, mesg->raw, mesg->native) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message")
} /* end if */
@@ -2132,8 +2132,8 @@ H5O__flush_msgs(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Encode any dirty messages */
for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++)
@@ -2178,12 +2178,12 @@ H5O_msg_get_flags(const H5O_loc_t *loc, unsigned type_id, uint8_t *flags)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5F_addr_defined(loc->addr));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 8205a01..f89b670 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -118,8 +118,8 @@ H5O__mtime_new_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
@@ -177,8 +177,8 @@ H5O__mtime_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Buffer should have 14 message bytes and 2 reserved bytes */
if (H5_IS_BUFFER_OVERFLOW(p, 16, p_end))
@@ -188,7 +188,7 @@ H5O__mtime_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message")
/* Convert YYYYMMDDhhmmss UTC to a time_t. */
- HDmemset(&tm, 0, sizeof tm);
+ memset(&tm, 0, sizeof tm);
tm.tm_year = (p[0] - '0') * 1000 + (p[1] - '0') * 100 + (p[2] - '0') * 10 + (p[3] - '0') - 1900;
tm.tm_mon = (p[4] - '0') * 10 + (p[5] - '0') - 1;
tm.tm_mday = (p[6] - '0') * 10 + (p[7] - '0');
@@ -232,9 +232,9 @@ H5O__mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sh
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* Version */
*p++ = H5O_MTIME_VERSION;
@@ -272,9 +272,9 @@ H5O__mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* encode */
tm = HDgmtime(mesg);
@@ -309,7 +309,7 @@ H5O__mtime_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = H5FL_MALLOC(time_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
@@ -347,8 +347,8 @@ H5O__mtime_new_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disabl
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
FUNC_LEAVE_NOAPI(8)
} /* end H5O__mtime_new_size() */
@@ -377,8 +377,8 @@ H5O__mtime_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sh
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
FUNC_LEAVE_NOAPI(16)
} /* end H5O__mtime_size() */
@@ -400,7 +400,7 @@ H5O__mtime_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(time_t, mesg);
@@ -429,17 +429,17 @@ H5O__mtime_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* debug */
tm = HDlocaltime(mesg);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Time:", buf);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Time:", buf);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__mtime_debug() */
diff --git a/src/H5Oname.c b/src/H5Oname.c
index 10ea365..f364b5a 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -79,8 +79,8 @@ H5O__name_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (mesg = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -121,9 +121,9 @@ H5O__name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(mesg && mesg->s);
+ assert(f);
+ assert(p);
+ assert(mesg && mesg->s);
/* encode */
HDstrcpy((char *)p, mesg->s);
@@ -156,7 +156,7 @@ H5O__name_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -203,8 +203,8 @@ H5O__name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
ret_value = mesg->s ? HDstrlen(mesg->s) + 1 : 0;
@@ -232,7 +232,7 @@ H5O__name_reset(void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* reset */
mesg->s = (char *)H5MM_xfree(mesg->s);
@@ -260,13 +260,13 @@ H5O__name_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", mesg->s);
+ fprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth, "Name:", mesg->s);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__name_debug() */
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index d0e3c26..2ef2e38 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -166,7 +166,7 @@
unsigned ioflags = (IOF); \
\
/* Decode the message */ \
- HDassert(msg_type->decode); \
+ assert(msg_type->decode); \
if (NULL == ((MSG)->native = (msg_type->decode)((F), (OH), (MSG)->flags, &ioflags, (MSG)->raw_size, \
(MSG)->raw))) \
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, ERR, "unable to decode message") \
@@ -181,7 +181,7 @@
\
/* 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); \
+ assert(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) \
} /* end if */ \
diff --git a/src/H5Opline.c b/src/H5Opline.c
index bc66165..1aa7cf1 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -117,8 +117,8 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Allocate space for I/O pipeline message */
if (NULL == (pline = H5FL_CALLOC(H5O_pline_t)))
@@ -275,8 +275,8 @@ H5O__pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p /*out*/, const void *mesg)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(p);
- HDassert(mesg);
+ assert(p);
+ assert(mesg);
/* Message header */
*p++ = (uint8_t)pline->version;
@@ -533,18 +533,18 @@ H5O__pline_reset(void *mesg)
* other API calls so DO NOT ASSUME THAT ANY VALUES ARE SANE.
*/
- HDassert(pline);
+ assert(pline);
/* Free the filter information and array */
if (pline->filter) {
/* Free information for each filter */
for (i = 0; i < pline->nused; i++) {
if (pline->filter[i].name && pline->filter[i].name != pline->filter[i]._name)
- HDassert((HDstrlen(pline->filter[i].name) + 1) > H5Z_COMMON_NAME_LEN);
+ assert((HDstrlen(pline->filter[i].name) + 1) > H5Z_COMMON_NAME_LEN);
if (pline->filter[i].name != pline->filter[i]._name)
pline->filter[i].name = (char *)H5MM_xfree(pline->filter[i].name);
if (pline->filter[i].cd_values && pline->filter[i].cd_values != pline->filter[i]._cd_values)
- HDassert(pline->filter[i].cd_nelmts > H5Z_COMMON_CD_VALUES);
+ assert(pline->filter[i].cd_nelmts > H5Z_COMMON_CD_VALUES);
if (pline->filter[i].cd_values != pline->filter[i]._cd_values)
pline->filter[i].cd_values = (unsigned *)H5MM_xfree(pline->filter[i].cd_values);
} /* end for */
@@ -579,7 +579,7 @@ H5O__pline_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_pline_t, mesg);
@@ -612,9 +612,9 @@ H5O__pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(pline_src);
- HDassert(cpy_info);
- HDassert(cpy_info->file_dst);
+ assert(pline_src);
+ assert(cpy_info);
+ assert(cpy_info->file_dst);
/* Check to ensure that the version of the message to be copied does not exceed
the message version allowed by the destination file's high bound */
@@ -655,14 +655,14 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(pline);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(pline);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Number of filters:", pline->nused,
- pline->nalloc);
+ fprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Number of filters:", pline->nused,
+ pline->nalloc);
/* Loop over all the filters */
for (size_t i = 0; i < pline->nused; i++) {
@@ -671,29 +671,29 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in
*/
char name[64];
- HDmemset(name, 0, 64);
+ memset(name, 0, 64);
HDsnprintf(name, sizeof(name), "Filter at position %zu", i);
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
- HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter identification:", (unsigned)(pline->filter[i].id));
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
+ fprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Filter identification:", (unsigned)(pline->filter[i].id));
if (pline->filter[i].name)
- HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter name:", pline->filter[i].name);
+ fprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Filter name:", pline->filter[i].name);
else
- HDfprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3), "Filter name:");
- HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Flags:", pline->filter[i].flags);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Num CD values:", pline->filter[i].cd_nelmts);
+ fprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3), "Filter name:");
+ fprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Flags:", pline->filter[i].flags);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Num CD values:", pline->filter[i].cd_nelmts);
/* Filter parameters */
for (size_t j = 0; j < pline->filter[i].cd_nelmts; j++) {
char field_name[32];
HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j);
- HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), field_name,
- pline->filter[i].cd_values[j]);
+ fprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), field_name,
+ pline->filter[i].cd_values[j]);
}
}
@@ -720,8 +720,8 @@ H5O_pline_set_version(H5F_t *f, H5O_pline_t *pline)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(pline);
+ assert(f);
+ assert(pline);
/* Upgrade to the version indicated by the file's low bound if higher */
version = MAX(pline->version, H5O_pline_ver_bounds[H5F_LOW_BOUND(f)]);
diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c
index f4d3b5c..b0910e6 100644
--- a/src/H5Orefcount.c
+++ b/src/H5Orefcount.c
@@ -88,8 +88,8 @@ H5O__refcount_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
/* Version of message */
if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))
@@ -137,9 +137,9 @@ H5O__refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(refcount);
+ assert(f);
+ assert(p);
+ assert(refcount);
/* Message version */
*p++ = H5O_REFCOUNT_VERSION;
@@ -174,7 +174,7 @@ H5O__refcount_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(refcount);
+ assert(refcount);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_refcount_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -235,7 +235,7 @@ H5O__refcount_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_refcount_t, mesg);
@@ -264,8 +264,8 @@ H5O__refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_U
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(deleted);
- HDassert(cpy_info);
+ assert(deleted);
+ assert(cpy_info);
/* Always delete this message when copying objects between files. Let
* the copy routine set the correct ref. count.
@@ -295,13 +295,13 @@ H5O__refcount_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, in
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(refcount);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(refcount);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", (unsigned)*refcount);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of links:", (unsigned)*refcount);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__refcount_debug() */
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 9bf5d6f..3e4dd87 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -115,8 +115,8 @@ H5O__sdspace_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UN
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (sdim = H5FL_CALLOC(H5S_extent_t)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "dataspace structure allocation failed")
@@ -255,13 +255,13 @@ H5O__sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(sdim);
+ assert(f);
+ assert(p);
+ assert(sdim);
/* Version */
- HDassert(sdim->version > 0);
- HDassert(sdim->type != H5S_NULL || sdim->version >= H5O_SDSPACE_VERSION_2);
+ assert(sdim->version > 0);
+ assert(sdim->type != H5S_NULL || sdim->version >= H5O_SDSPACE_VERSION_2);
*p++ = (uint8_t)sdim->version;
/* Rank */
@@ -323,7 +323,7 @@ H5O__sdspace_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = H5FL_CALLOC(H5S_extent_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -425,7 +425,7 @@ H5O__sdspace_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5S_extent_t, mesg);
@@ -458,10 +458,10 @@ H5O__sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file_src);
- HDassert(src_space_extent);
- HDassert(cpy_info);
- HDassert(cpy_info->file_dst);
+ assert(file_src);
+ assert(src_space_extent);
+ assert(cpy_info);
+ assert(cpy_info->file_dst);
/* Check to ensure that the version of the message to be copied does not exceed
the message version allowed by the destination file's high bound */
@@ -514,35 +514,35 @@ H5O__sdspace_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(sdim);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(sdim);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Rank:", (unsigned long)(sdim->rank));
+ fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Rank:", (unsigned long)(sdim->rank));
if (sdim->rank > 0) {
unsigned u; /* local counting variable */
- HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:");
+ fprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:");
for (u = 0; u < sdim->rank; u++)
- HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->size[u]);
- HDfprintf(stream, "}\n");
+ fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->size[u]);
+ fprintf(stream, "}\n");
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Dim Max:");
+ fprintf(stream, "%*s%-*s ", indent, "", fwidth, "Dim Max:");
if (sdim->max) {
- HDfprintf(stream, "{");
+ fprintf(stream, "{");
for (u = 0; u < sdim->rank; u++) {
if (H5S_UNLIMITED == sdim->max[u])
- HDfprintf(stream, "%sUNLIM", u ? ", " : "");
+ fprintf(stream, "%sUNLIM", u ? ", " : "");
else
- HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->max[u]);
+ fprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->max[u]);
} /* end for */
- HDfprintf(stream, "}\n");
+ fprintf(stream, "}\n");
} /* end if */
else
- HDfprintf(stream, "CONSTANT\n");
+ fprintf(stream, "CONSTANT\n");
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 22d71a0..62ff8d6 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -110,15 +110,15 @@ H5O__shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(shared);
- HDassert(type);
- HDassert(type->share_flags & H5O_SHARE_IS_SHARABLE);
+ assert(f);
+ assert(shared);
+ assert(type);
+ assert(type->share_flags & H5O_SHARE_IS_SHARABLE);
/* This message could have a heap ID (SOHM) or the address of an object
* header on disk (named datatype)
*/
- HDassert(H5O_IS_STORED_SHARED(shared->type));
+ assert(H5O_IS_STORED_SHARED(shared->type));
/* Check for implicit shared object header message */
if (shared->type == H5O_SHARE_TYPE_SOHM) {
@@ -157,7 +157,7 @@ H5O__shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t
else {
H5O_loc_t oloc; /* Location for object header where message is stored */
- HDassert(shared->type == H5O_SHARE_TYPE_COMMITTED);
+ assert(shared->type == H5O_SHARE_TYPE_COMMITTED);
/* Build the object location for the shared message's object header */
oloc.file = f;
@@ -219,8 +219,8 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(shared);
+ assert(f);
+ assert(shared);
/* Check for type of shared message */
if (shared->type == H5O_SHARE_TYPE_COMMITTED) {
@@ -259,7 +259,7 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_
if (H5O__link_oh(f, adjust, open_oh, &deleted) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count")
- HDassert(!deleted);
+ assert(!deleted);
}
else
/* The shared message is in another object header */
@@ -267,7 +267,7 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count")
} /* end if */
else {
- HDassert(shared->type == H5O_SHARE_TYPE_SOHM || shared->type == H5O_SHARE_TYPE_HERE);
+ assert(shared->type == H5O_SHARE_TYPE_SOHM || shared->type == H5O_SHARE_TYPE_HERE);
/* Check for decrementing reference count on shared message */
if (adjust < 0) {
@@ -309,9 +309,9 @@ H5O__shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *b
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(buf);
- HDassert(type);
+ assert(f);
+ assert(buf);
+ assert(type);
/* Version */
version = *buf++;
@@ -346,7 +346,7 @@ H5O__shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *b
* Otherwise, it is a named datatype, so copy an H5O_loc_t.
*/
if (sh_mesg.type == H5O_SHARE_TYPE_SOHM) {
- HDassert(version >= H5O_SHARED_VERSION_3);
+ assert(version >= H5O_SHARED_VERSION_3);
H5MM_memcpy(&sh_mesg.u.heap_id, buf, sizeof(sh_mesg.u.heap_id));
} /* end if */
else {
@@ -393,9 +393,9 @@ H5O__shared_encode(const H5F_t *f, uint8_t *buf /*out*/, const H5O_shared_t *sh_
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(f);
- HDassert(buf);
- HDassert(sh_mesg);
+ assert(f);
+ assert(buf);
+ assert(sh_mesg);
/* If this message is shared in the heap, we need to use version 3 of the
* encoding and encode the SHARED_IN_HEAP flag.
@@ -403,7 +403,7 @@ H5O__shared_encode(const H5F_t *f, uint8_t *buf /*out*/, const H5O_shared_t *sh_
if (sh_mesg->type == H5O_SHARE_TYPE_SOHM)
version = H5O_SHARED_VERSION_LATEST;
else {
- HDassert(sh_mesg->type == H5O_SHARE_TYPE_COMMITTED);
+ assert(sh_mesg->type == H5O_SHARE_TYPE_COMMITTED);
version = H5O_SHARED_VERSION_2; /* version 1 is no longer used */
} /* end else */
@@ -439,8 +439,8 @@ H5O_set_shared(H5O_shared_t *dst, const H5O_shared_t *src)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(dst);
- HDassert(src);
+ assert(dst);
+ assert(src);
/* copy */
*dst = *src;
@@ -474,7 +474,7 @@ H5O__shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg)
(size_t)H5F_SIZEOF_ADDR(f); /* Sharing by another obj hdr */
} /* end if */
else {
- HDassert(sh_mesg->type == H5O_SHARE_TYPE_SOHM);
+ assert(sh_mesg->type == H5O_SHARE_TYPE_SOHM);
ret_value = 1 + /* Version */
1 + /* Type field */
H5O_FHEAP_ID_LEN; /* Shared in the heap */
@@ -503,8 +503,8 @@ H5O__shared_delete(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_sh
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(sh_mesg);
+ assert(f);
+ assert(sh_mesg);
/*
* Committed datatypes increment the OH of the original message when they
@@ -544,8 +544,8 @@ H5O__shared_link(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_shar
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(sh_mesg);
+ assert(f);
+ assert(sh_mesg);
/* Increment the reference count on the shared object */
if (H5O__shared_link_adj(f, open_oh, type, sh_mesg, 1) < 0)
@@ -582,13 +582,13 @@ H5O__shared_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, H5F_t *file_dst,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(file_src);
- HDassert(file_dst);
- HDassert(mesg_type);
- HDassert(shared_src);
- HDassert(shared_dst);
- HDassert(recompute_size);
- HDassert(cpy_info);
+ assert(file_src);
+ assert(file_dst);
+ assert(mesg_type);
+ assert(shared_src);
+ assert(shared_dst);
+ assert(recompute_size);
+ assert(cpy_info);
/* Committed shared messages create a shared message at the destination
* and also copy the committed object that they point to.
@@ -647,9 +647,9 @@ H5O__shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, const H5O
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(shared_src);
- HDassert(shared_dst);
+ assert(f);
+ assert(shared_src);
+ assert(shared_dst);
/* Copy the target of committed messages, try to share others */
if (shared_src->type == H5O_SHARE_TYPE_COMMITTED) {
@@ -694,35 +694,35 @@ H5O__shared_debug(const H5O_shared_t *mesg, FILE *stream, int indent, int fwidth
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
switch (mesg->type) {
case H5O_SHARE_TYPE_UNSHARED:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Unshared");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Unshared");
break;
case H5O_SHARE_TYPE_COMMITTED:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Obj Hdr");
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
- "Object address:", mesg->u.loc.oh_addr);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Obj Hdr");
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth,
+ "Object address:", mesg->u.loc.oh_addr);
break;
case H5O_SHARE_TYPE_SOHM:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "SOHM");
- HDfprintf(stream, "%*s%-*s %016llx\n", indent, "", fwidth,
- "Heap ID:", (unsigned long long)mesg->u.heap_id.val);
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "SOHM");
+ fprintf(stream, "%*s%-*s %016llx\n", indent, "", fwidth,
+ "Heap ID:", (unsigned long long)mesg->u.heap_id.val);
break;
case H5O_SHARE_TYPE_HERE:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Here");
+ fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Here");
break;
default:
- HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Shared Message type:", "Unknown",
- (unsigned)mesg->type);
+ fprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth, "Shared Message type:", "Unknown",
+ (unsigned)mesg->type);
} /* end switch */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Oshared.h b/src/H5Oshared.h
index b7d2353..d10b298 100644
--- a/src/H5Oshared.h
+++ b/src/H5Oshared.h
@@ -110,7 +110,7 @@ H5O_SHARED_ENCODE(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mes
#endif /* H5O_SHARED_ENCODE_REAL */
/* Sanity check */
- HDassert(sh_mesg->type == H5O_SHARE_TYPE_UNSHARED || sh_mesg->msg_type_id == H5O_SHARED_TYPE->id);
+ assert(sh_mesg->type == H5O_SHARE_TYPE_UNSHARED || sh_mesg->msg_type_id == H5O_SHARED_TYPE->id);
/* Check for message stored elsewhere */
if (H5O_IS_STORED_SHARED(sh_mesg->type) && !disable_shared) {
@@ -349,11 +349,11 @@ H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_NDEBUG_UNUSED *oloc_src, const
FUNC_ENTER_NOAPI_NOINIT
- HDassert(oloc_src->file);
- HDassert(oloc_dst->file);
- HDassert(mesg_src);
- HDassert(mesg_dst);
- HDassert(cpy_info);
+ assert(oloc_src->file);
+ assert(oloc_dst->file);
+ assert(mesg_src);
+ assert(mesg_dst);
+ assert(cpy_info);
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
@@ -384,8 +384,7 @@ H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_NDEBUG_UNUSED *oloc_src, const
/* Make sure that if the source or destination is committed, both are
* committed */
- HDassert((shared_src->type == H5O_SHARE_TYPE_COMMITTED) ==
- (shared_dst->type == H5O_SHARE_TYPE_COMMITTED));
+ assert((shared_src->type == H5O_SHARE_TYPE_COMMITTED) == (shared_dst->type == H5O_SHARE_TYPE_COMMITTED));
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c
index 8510c6e..5c9a199 100644
--- a/src/H5Oshmesg.c
+++ b/src/H5Oshmesg.c
@@ -75,8 +75,8 @@ H5O__shmesg_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (mesg = (H5O_shmesg_table_t *)H5MM_calloc(sizeof(H5O_shmesg_table_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
@@ -125,9 +125,9 @@ H5O__shmesg_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(p);
- HDassert(mesg);
+ assert(f);
+ assert(p);
+ assert(mesg);
/* Store version, table address, and number of indexes */
*p++ = (uint8_t)mesg->version;
@@ -161,7 +161,7 @@ H5O__shmesg_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(mesg);
+ assert(mesg);
if (!dest && NULL == (dest = (H5O_shmesg_table_t *)H5MM_malloc(sizeof(H5O_shmesg_table_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
@@ -199,7 +199,7 @@ H5O__shmesg_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const vo
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
+ assert(f);
ret_value = (size_t)(1 + /* Version number */
H5F_SIZEOF_ADDR(f) + /* Table address */
@@ -228,16 +228,16 @@ H5O__shmesg_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(f);
- HDassert(mesg);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
- "Shared message table address:", mesg->addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of indexes:", mesg->nindexes);
+ assert(f);
+ assert(mesg);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
+
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth,
+ "Shared message table address:", mesg->addr);
+ fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of indexes:", mesg->nindexes);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__shmesg_debug() */
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 2428f06..f107b2b 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -90,8 +90,8 @@ H5O__stab_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(p);
+ assert(f);
+ assert(p);
if (NULL == (stab = H5FL_CALLOC(H5O_stab_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -133,9 +133,9 @@ H5O__stab_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(p);
- HDassert(stab);
+ assert(f);
+ assert(p);
+ assert(stab);
/* encode */
H5F_addr_encode(f, &p, stab->btree_addr);
@@ -169,7 +169,7 @@ H5O__stab_copy(const void *_mesg, void *_dest)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(stab);
+ assert(stab);
if (!dest && NULL == (dest = H5FL_MALLOC(H5O_stab_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
@@ -229,7 +229,7 @@ H5O__stab_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_stab_t, mesg);
@@ -256,8 +256,8 @@ H5O__stab_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *mesg)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(mesg);
+ assert(f);
+ assert(mesg);
/* Free the file space for the symbol table */
if (H5G__stab_delete(f, (const H5O_stab_t *)mesg) < 0)
@@ -295,8 +295,8 @@ H5O__stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst,
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(stab_src);
- HDassert(file_dst);
+ assert(stab_src);
+ assert(file_dst);
/* Allocate space for the destination stab */
if (NULL == (stab_dst = H5FL_MALLOC(H5O_stab_t)))
@@ -356,11 +356,11 @@ H5O__stab_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_lo
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(stab_src);
- HDassert(H5F_addr_defined(dst_oloc->addr));
- HDassert(dst_oloc->file);
- HDassert(stab_dst);
- HDassert(cpy_info);
+ assert(stab_src);
+ assert(H5F_addr_defined(dst_oloc->addr));
+ assert(dst_oloc->file);
+ assert(stab_dst);
+ assert(cpy_info);
/* If we are performing a 'shallow hierarchy' copy, get out now */
if (cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth)
@@ -401,15 +401,15 @@ H5O__stab_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(f);
- HDassert(stab);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(stab);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "B-tree address:", stab->btree_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "B-tree address:", stab->btree_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Name heap address:", stab->heap_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Name heap address:", stab->heap_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__stab_debug() */
diff --git a/src/H5Otest.c b/src/H5Otest.c
index 143286c..b1cfb90 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -117,7 +117,7 @@ H5O__is_attr_dense_test(hid_t oid)
/* Check if dense storage is being used */
if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Check for any messages in object header */
- HDassert(H5O__msg_count_real(oh, H5O_MSG_ATTR) == 0);
+ assert(H5O__msg_count_real(oh, H5O_MSG_ATTR) == 0);
ret_value = TRUE;
} /* end if */
@@ -194,7 +194,7 @@ H5O__is_attr_empty_test(hid_t oid)
/* Check for using dense storage */
if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Check for any messages in object header */
- HDassert(nattrs == 0);
+ assert(nattrs == 0);
/* Set metadata tag in API context */
H5_BEGIN_TAG(loc->addr);
@@ -214,10 +214,10 @@ H5O__is_attr_empty_test(hid_t oid)
} /* end if */
/* Verify that attribute count in object header is correct */
- HDassert(nattrs == ainfo.nattrs);
+ assert(nattrs == ainfo.nattrs);
} /* end if */
else
- HDassert(nattrs == 0);
+ assert(nattrs == 0);
} /* end if */
/* Set the return value */
@@ -296,7 +296,7 @@ H5O__num_attrs_test(hid_t oid, hsize_t *nattrs)
/* Check for using dense storage */
if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Check for any messages in object header */
- HDassert(obj_nattrs == 0);
+ assert(obj_nattrs == 0);
/* Set metadata tag in API context */
H5_BEGIN_TAG(loc->addr);
@@ -314,7 +314,7 @@ H5O__num_attrs_test(hid_t oid, hsize_t *nattrs)
} /* end if */
/* Verify that attribute count in object header is correct */
- HDassert(obj_nattrs == ainfo.nattrs);
+ assert(obj_nattrs == ainfo.nattrs);
} /* end if */
/* Set the number of attributes */
@@ -535,7 +535,7 @@ H5O__expunge_chunks_test(const H5O_loc_t *loc)
/* Safety check */
nchunks = oh->nchunks;
- HDassert(0 < nchunks && nchunks < NELMTS(chk_addr));
+ assert(0 < nchunks && nchunks < NELMTS(chk_addr));
/* Iterate over all the chunks, saving the chunk addresses */
for (u = 0; u < oh->nchunks; u++)
@@ -585,8 +585,8 @@ H5O__get_rc_test(const H5O_loc_t *loc, unsigned *rc)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(rc);
+ assert(loc);
+ assert(rc);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
diff --git a/src/H5Ounknown.c b/src/H5Ounknown.c
index 38b07a1..2d2dc2b 100644
--- a/src/H5Ounknown.c
+++ b/src/H5Ounknown.c
@@ -75,7 +75,7 @@ H5O__unknown_free(void *mesg)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(mesg);
+ assert(mesg);
mesg = H5FL_FREE(H5O_unknown_t, mesg);
diff --git a/src/H5P.c b/src/H5P.c
index c66e723..3aea232 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -434,7 +434,7 @@ H5Pregister2(hid_t cls_id, const char *name, size_t size, void *def_value, H5P_p
/* Substitute the new property class in the ID */
if (NULL == (old_pclass = (H5P_genclass_t *)H5I_subst(cls_id, pclass)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID")
- HDassert(old_pclass == orig_pclass);
+ assert(old_pclass == orig_pclass);
/* Close the previous class */
if (H5P__close_class(old_pclass) < 0)
@@ -1124,8 +1124,8 @@ H5P__iterate_cb(H5P_genprop_t *prop, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(prop);
- HDassert(udata);
+ assert(prop);
+ assert(udata);
/* Call the user's callback routine */
ret_value = (*udata->iter_func)(udata->id, prop->name, udata->iter_data);
diff --git a/src/H5PB.c b/src/H5PB.c
index 069ee19..54a6a3a 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -78,8 +78,8 @@
#define H5PB__INSERT_LRU(page_buf, page_ptr) \
{ \
- HDassert(page_buf); \
- HDassert(page_ptr); \
+ assert(page_buf); \
+ assert(page_ptr); \
/* insert the entry at the head of the list. */ \
H5PB__PREPEND((page_ptr), (page_buf)->LRU_head_ptr, (page_buf)->LRU_tail_ptr, \
(page_buf)->LRU_list_len) \
@@ -87,8 +87,8 @@
#define H5PB__REMOVE_LRU(page_buf, page_ptr) \
{ \
- HDassert(page_buf); \
- HDassert(page_ptr); \
+ assert(page_buf); \
+ assert(page_ptr); \
/* remove the entry from the list. */ \
H5PB__REMOVE((page_ptr), (page_buf)->LRU_head_ptr, (page_buf)->LRU_tail_ptr, \
(page_buf)->LRU_list_len) \
@@ -96,8 +96,8 @@
#define H5PB__MOVE_TO_TOP_LRU(page_buf, page_ptr) \
{ \
- HDassert(page_buf); \
- HDassert(page_ptr); \
+ assert(page_buf); \
+ assert(page_ptr); \
/* Remove entry and insert at the head of the list. */ \
H5PB__REMOVE((page_ptr), (page_buf)->LRU_head_ptr, (page_buf)->LRU_tail_ptr, \
(page_buf)->LRU_list_len) \
@@ -163,7 +163,7 @@ H5PB_reset_stats(H5PB_t *page_buf)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(page_buf);
+ assert(page_buf);
page_buf->accesses[0] = 0;
page_buf->accesses[1] = 0;
@@ -205,7 +205,7 @@ H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsigned hits[2], u
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(page_buf);
+ assert(page_buf);
accesses[0] = page_buf->accesses[0];
accesses[1] = page_buf->accesses[1];
@@ -240,29 +240,29 @@ H5PB_print_stats(const H5PB_t *page_buf)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(page_buf);
-
- HDprintf("PAGE BUFFER STATISTICS:\n");
-
- HDprintf("******* METADATA\n");
- HDprintf("\t Total Accesses: %u\n", page_buf->accesses[0]);
- HDprintf("\t Hits: %u\n", page_buf->hits[0]);
- HDprintf("\t Misses: %u\n", page_buf->misses[0]);
- HDprintf("\t Evictions: %u\n", page_buf->evictions[0]);
- HDprintf("\t Bypasses: %u\n", page_buf->bypasses[0]);
- HDprintf("\t Hit Rate = %f%%\n",
- ((double)page_buf->hits[0] / (page_buf->accesses[0] - page_buf->bypasses[0])) * 100);
- HDprintf("*****************\n\n");
-
- HDprintf("******* RAWDATA\n");
- HDprintf("\t Total Accesses: %u\n", page_buf->accesses[1]);
- HDprintf("\t Hits: %u\n", page_buf->hits[1]);
- HDprintf("\t Misses: %u\n", page_buf->misses[1]);
- HDprintf("\t Evictions: %u\n", page_buf->evictions[1]);
- HDprintf("\t Bypasses: %u\n", page_buf->bypasses[1]);
- HDprintf("\t Hit Rate = %f%%\n",
- ((double)page_buf->hits[1] / (page_buf->accesses[1] - page_buf->bypasses[0])) * 100);
- HDprintf("*****************\n\n");
+ assert(page_buf);
+
+ printf("PAGE BUFFER STATISTICS:\n");
+
+ printf("******* METADATA\n");
+ printf("\t Total Accesses: %u\n", page_buf->accesses[0]);
+ printf("\t Hits: %u\n", page_buf->hits[0]);
+ printf("\t Misses: %u\n", page_buf->misses[0]);
+ printf("\t Evictions: %u\n", page_buf->evictions[0]);
+ printf("\t Bypasses: %u\n", page_buf->bypasses[0]);
+ printf("\t Hit Rate = %f%%\n",
+ ((double)page_buf->hits[0] / (page_buf->accesses[0] - page_buf->bypasses[0])) * 100);
+ printf("*****************\n\n");
+
+ printf("******* RAWDATA\n");
+ printf("\t Total Accesses: %u\n", page_buf->accesses[1]);
+ printf("\t Hits: %u\n", page_buf->hits[1]);
+ printf("\t Misses: %u\n", page_buf->misses[1]);
+ printf("\t Evictions: %u\n", page_buf->evictions[1]);
+ printf("\t Bypasses: %u\n", page_buf->bypasses[1]);
+ printf("\t Hit Rate = %f%%\n",
+ ((double)page_buf->hits[1] / (page_buf->accesses[1] - page_buf->bypasses[0])) * 100);
+ printf("*****************\n\n");
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5PB_print_stats */
@@ -287,7 +287,7 @@ H5PB_create(H5F_shared_t *f_sh, size_t size, unsigned page_buf_min_meta_perc, un
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
/* Check args */
if (f_sh->fs_strategy != H5F_FSPACE_STRATEGY_PAGE)
@@ -364,8 +364,8 @@ H5PB__flush_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(page_entry);
- HDassert(f_sh);
+ assert(page_entry);
+ assert(f_sh);
/* Flush the page if it's dirty */
if (page_entry->is_dirty)
@@ -395,7 +395,7 @@ H5PB_flush(H5F_shared_t *f_sh)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f_sh);
+ assert(f_sh);
/* Flush all the entries in the PB skiplist, if we have write access on the file */
if (f_sh->page_buf && (H5F_ACC_RDWR & H5F_SHARED_INTENT(f_sh))) {
@@ -430,9 +430,9 @@ H5PB__dest_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checking */
- HDassert(page_entry);
- HDassert(op_data);
- HDassert(op_data->page_buf);
+ assert(page_entry);
+ assert(op_data);
+ assert(op_data->page_buf);
/* Remove entry from LRU list */
if (op_data->actual_slist) {
@@ -465,7 +465,7 @@ H5PB_dest(H5F_shared_t *f_sh)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
/* flush and destroy the page buffer, if it exists */
if (f_sh->page_buf) {
@@ -523,9 +523,9 @@ H5PB_add_new_page(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t page_addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
page_buf = f_sh->page_buf;
- HDassert(page_buf);
+ assert(page_buf);
/* If there is an existing page, this means that at some point the
* file free space manager freed and re-allocated a page at the same
@@ -581,9 +581,9 @@ H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(page_buf);
- HDassert(size <= page_buf->page_size);
- HDassert(buf);
+ assert(page_buf);
+ assert(size <= page_buf->page_size);
+ assert(buf);
/* calculate the aligned address of the first page */
page_addr = (addr / page_buf->page_size) * page_buf->page_size;
@@ -593,7 +593,7 @@ H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf)
if (page_entry) {
haddr_t offset;
- HDassert(addr + size <= page_addr + page_buf->page_size);
+ assert(addr + size <= page_addr + page_buf->page_size);
offset = addr - page_addr;
H5MM_memcpy((uint8_t *)page_entry->page_buf_ptr + offset, buf, size);
@@ -629,22 +629,22 @@ H5PB_remove_entry(const H5F_shared_t *f_sh, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
page_buf = f_sh->page_buf;
- HDassert(page_buf);
+ assert(page_buf);
/* Search for address in the skip list */
page_entry = (H5PB_entry_t *)H5SL_search(page_buf->slist_ptr, (void *)(&addr));
/* If found, remove the entry from the PB cache */
if (page_entry) {
- HDassert(page_entry->type != H5F_MEM_PAGE_DRAW);
+ assert(page_entry->type != H5F_MEM_PAGE_DRAW);
if (NULL == H5SL_remove(page_buf->slist_ptr, &(page_entry->addr)))
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Page Entry is not in skip list")
/* Remove from LRU list */
H5PB__REMOVE_LRU(page_buf, page_entry)
- HDassert(H5SL_count(page_buf->slist_ptr) == page_buf->LRU_list_len);
+ assert(H5SL_count(page_buf->slist_ptr) == page_buf->LRU_list_len);
page_buf->meta_count--;
@@ -686,8 +686,8 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
- HDassert(type != H5FD_MEM_GHEAP);
+ assert(f_sh);
+ assert(type != H5FD_MEM_GHEAP);
/* Get pointer to page buffer info for this file */
page_buf = f_sh->page_buf;
@@ -753,7 +753,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
num_touched_pages =
(last_page_addr / page_buf->page_size + 1) - (first_page_addr / page_buf->page_size);
if (first_page_addr == last_page_addr) {
- HDassert(1 == num_touched_pages);
+ assert(1 == num_touched_pages);
last_page_addr = HADDR_UNDEF;
} /* end if */
} /* end if */
@@ -788,20 +788,20 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
if (node) {
page_entry = (H5PB_entry_t *)H5SL_item(node);
- HDassert(page_entry);
+ assert(page_entry);
/* If the current page address falls out of the access
block, then there are no more pages to go over */
if (page_entry->addr >= addr + size)
break;
- HDassert(page_entry->addr == search_addr);
+ assert(page_entry->addr == search_addr);
if (page_entry->is_dirty) {
/* special handling for the first page if it is not a full page access */
if (i == 0 && first_page_addr != addr) {
offset = addr - first_page_addr;
- HDassert(page_buf->page_size > offset);
+ assert(page_buf->page_size > offset);
H5MM_memcpy(buf, (uint8_t *)page_entry->page_buf_ptr + offset,
page_buf->page_size - (size_t)offset);
@@ -836,7 +836,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
else {
/* A raw data access could span 1 or 2 PB entries at this point so
we need to handle that */
- HDassert(1 == num_touched_pages || 2 == num_touched_pages);
+ assert(1 == num_touched_pages || 2 == num_touched_pages);
for (i = 0; i < num_touched_pages; i++) {
haddr_t buf_offset;
@@ -890,7 +890,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *
if (0 == can_make_space) {
/* make space can't return FALSE on second touched page since the first is of the same
* type */
- HDassert(0 == i);
+ assert(0 == i);
/* read entire block from VFD and return */
if (H5FD_read(file, type, addr, size, buf) < 0)
@@ -987,7 +987,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
/* Get pointer to page buffer info for this file */
page_buf = f_sh->page_buf;
@@ -1061,7 +1061,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
num_touched_pages =
(last_page_addr / page_buf->page_size + 1) - (first_page_addr / page_buf->page_size);
if (first_page_addr == last_page_addr) {
- HDassert(1 == num_touched_pages);
+ assert(1 == num_touched_pages);
last_page_addr = HADDR_UNDEF;
} /* end if */
} /* end if */
@@ -1088,7 +1088,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
page_entry = (H5PB_entry_t *)H5SL_search(page_buf->slist_ptr, (void *)(&search_addr));
if (page_entry) {
offset = addr - first_page_addr;
- HDassert(page_buf->page_size > offset);
+ assert(page_buf->page_size > offset);
/* Update page's data */
H5MM_memcpy((uint8_t *)page_entry->page_buf_ptr + offset, buf,
@@ -1102,7 +1102,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
/* Special handling for the last page if it is not a full page update */
else if (num_touched_pages > 1 && i == (num_touched_pages - 1) &&
(search_addr + page_buf->page_size) != (addr + size)) {
- HDassert(search_addr + page_buf->page_size > addr + size);
+ assert(search_addr + page_buf->page_size > addr + size);
/* Lookup the page in the skip list */
page_entry = (H5PB_entry_t *)H5SL_search(page_buf->slist_ptr, (void *)(&search_addr));
@@ -1141,7 +1141,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
} /* end if */
else {
/* An access could span 1 or 2 PBs at this point so we need to handle that */
- HDassert(1 == num_touched_pages || 2 == num_touched_pages);
+ assert(1 == num_touched_pages || 2 == num_touched_pages);
for (i = 0; i < num_touched_pages; i++) {
haddr_t buf_offset;
@@ -1194,7 +1194,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
* buffer for this I/O and we need to bypass
*/
if (0 == can_make_space) {
- HDassert(0 == i);
+ assert(0 == i);
/* Write to VFD and return */
if (H5FD_write(file, type, addr, size, buf) < 0)
@@ -1222,9 +1222,9 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const
if (NULL == (new_page_buf = H5FL_FAC_MALLOC(page_buf->page_fac)))
HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTALLOC, FAIL,
"memory allocation failed for page buffer entry")
- HDmemset(new_page_buf, 0, (size_t)offset);
- HDmemset((uint8_t *)new_page_buf + offset + access_size, 0,
- page_size - ((size_t)offset + access_size));
+ memset(new_page_buf, 0, (size_t)offset);
+ memset((uint8_t *)new_page_buf + offset + access_size, 0,
+ page_size - ((size_t)offset + access_size));
page_entry->page_buf_ptr = new_page_buf;
@@ -1323,7 +1323,7 @@ H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, hbool_t *enabled)
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(f_sh);
+ assert(f_sh);
/* Get pointer to page buffer info for this file */
page_buf = f_sh->page_buf;
@@ -1356,7 +1356,7 @@ H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, hbool_t *enabled)
* returns FALSE, the calling function performs I/O avoiding the page
* buffer layer */
if (page_buf) {
- HDassert(type == H5FD_MEM_DRAW);
+ assert(type == H5FD_MEM_DRAW);
page_buf->bypasses[1]++;
} /* end if */
@@ -1402,7 +1402,7 @@ H5PB__insert_entry(H5PB_t *page_buf, H5PB_entry_t *page_entry)
/* Insert entry in skip list */
if (H5SL_insert(page_buf->slist_ptr, page_entry, &(page_entry->addr)) < 0)
HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTINSERT, FAIL, "can't insert entry in skip list")
- HDassert(H5SL_count(page_buf->slist_ptr) * page_buf->page_size <= page_buf->max_size);
+ assert(H5SL_count(page_buf->slist_ptr) * page_buf->page_size <= page_buf->max_size);
/* Increment appropriate page count */
if (H5F_MEM_PAGE_DRAW == page_entry->type || H5F_MEM_PAGE_GHEAP == page_entry->type)
@@ -1445,8 +1445,8 @@ H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f_sh);
- HDassert(page_buf);
+ assert(f_sh);
+ assert(page_buf);
/* Get oldest entry */
page_entry = page_buf->LRU_tail_ptr;
@@ -1455,7 +1455,7 @@ H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type)
/* If threshould is 100% metadata and page buffer is full of
metadata, then we can't make space for raw data */
if (0 == page_buf->raw_count && page_buf->min_meta_count == page_buf->meta_count) {
- HDassert(page_buf->meta_count * page_buf->page_size == page_buf->max_size);
+ assert(page_buf->meta_count * page_buf->page_size == page_buf->max_size);
HGOTO_DONE(FALSE)
} /* end if */
@@ -1472,7 +1472,7 @@ H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type)
/* If threshould is 100% raw data and page buffer is full of
raw data, then we can't make space for meta data */
if (0 == page_buf->meta_count && page_buf->min_raw_count == page_buf->raw_count) {
- HDassert(page_buf->raw_count * page_buf->page_size == page_buf->max_size);
+ assert(page_buf->raw_count * page_buf->page_size == page_buf->max_size);
HGOTO_DONE(FALSE)
} /* end if */
@@ -1493,7 +1493,7 @@ H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type)
/* Remove entry from LRU list */
H5PB__REMOVE_LRU(page_buf, page_entry)
- HDassert(H5SL_count(page_buf->slist_ptr) == page_buf->LRU_list_len);
+ assert(H5SL_count(page_buf->slist_ptr) == page_buf->LRU_list_len);
/* Decrement appropriate page type counter */
if (H5F_MEM_PAGE_DRAW == page_entry->type || H5F_MEM_PAGE_GHEAP == page_entry->type)
@@ -1543,8 +1543,8 @@ H5PB__write_entry(H5F_shared_t *f_sh, H5PB_entry_t *page_entry)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f_sh);
- HDassert(page_entry);
+ assert(f_sh);
+ assert(page_entry);
/* Retrieve the 'eoa' for the file */
if (HADDR_UNDEF == (eoa = H5F_shared_get_eoa(f_sh, (H5FD_mem_t)page_entry->type)))
diff --git a/src/H5PLint.c b/src/H5PLint.c
index 62e0074..e9156f2 100644
--- a/src/H5PLint.c
+++ b/src/H5PLint.c
@@ -82,7 +82,7 @@ H5PL__get_plugin_control_mask(unsigned int *mask /*out*/)
FUNC_ENTER_PACKAGE_NOERR
/* Check args - Just assert on package functions */
- HDassert(mask);
+ assert(mask);
/* Return the mask */
*mask = H5PL_plugin_control_mask_g;
@@ -329,11 +329,11 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
+ assert(path);
if (type == H5PL_TYPE_NONE)
- HDassert(!key);
- HDassert(success);
- HDassert(plugin_info);
+ assert(!key);
+ assert(success);
+ assert(plugin_info);
/* Initialize out parameters */
*success = FALSE;
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index 9619b13..9575f3c 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -108,8 +108,8 @@ H5PL__insert_at(const char *path, unsigned int idx)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
- HDassert(HDstrlen(path));
+ assert(path);
+ assert(HDstrlen(path));
/* Expand the table if it is full */
if (H5PL_num_paths_g == H5PL_path_capacity_g)
@@ -158,7 +158,7 @@ H5PL__make_space_at(unsigned int idx)
FUNC_ENTER_PACKAGE_NOERR
/* Check args - Just assert on package functions */
- HDassert(idx < H5PL_path_capacity_g);
+ assert(idx < H5PL_path_capacity_g);
/* Copy the paths back to make a space */
for (u = H5PL_num_paths_g; u > idx; u--)
@@ -189,8 +189,8 @@ H5PL__replace_at(const char *path, unsigned int idx)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
- HDassert(HDstrlen(path));
+ assert(path);
+ assert(HDstrlen(path));
/* Check that the table entry is in use */
if (!H5PL_paths_g[idx])
@@ -359,7 +359,7 @@ H5PL__expand_path_table(void)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "allocating additional memory for path table failed")
/* Initialize the new memory */
- HDmemset(H5PL_paths_g + H5PL_num_paths_g, 0, (size_t)H5PL_PATH_CAPACITY_ADD * sizeof(char *));
+ memset(H5PL_paths_g + H5PL_num_paths_g, 0, (size_t)H5PL_PATH_CAPACITY_ADD * sizeof(char *));
done:
/* Set the path capacity back if there were problems */
@@ -386,8 +386,8 @@ H5PL__append_path(const char *path)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
- HDassert(HDstrlen(path));
+ assert(path);
+ assert(HDstrlen(path));
/* Insert the path at the end of the table */
if (H5PL__insert_at(path, H5PL_num_paths_g) < 0)
@@ -414,8 +414,8 @@ H5PL__prepend_path(const char *path)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
- HDassert(HDstrlen(path));
+ assert(path);
+ assert(HDstrlen(path));
/* Insert the path at the beginning of the table */
if (H5PL__insert_at(path, 0) < 0)
@@ -442,9 +442,9 @@ H5PL__replace_path(const char *path, unsigned int idx)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
- HDassert(HDstrlen(path));
- HDassert(idx < H5PL_path_capacity_g);
+ assert(path);
+ assert(HDstrlen(path));
+ assert(idx < H5PL_path_capacity_g);
/* Insert the path at the requested index */
if (H5PL__replace_at(path, idx) < 0)
@@ -472,9 +472,9 @@ H5PL__insert_path(const char *path, unsigned int idx)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(path);
- HDassert(HDstrlen(path));
- HDassert(idx < H5PL_path_capacity_g);
+ assert(path);
+ assert(HDstrlen(path));
+ assert(idx < H5PL_path_capacity_g);
/* Insert the path at the requested index */
if (H5PL__insert_at(path, idx) < 0)
@@ -503,7 +503,7 @@ H5PL__remove_path(unsigned int idx)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(idx < H5PL_path_capacity_g);
+ assert(idx < H5PL_path_capacity_g);
/* Check if the path at that index is set */
if (!H5PL_paths_g[idx])
@@ -612,8 +612,8 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
FUNC_ENTER_PACKAGE
- HDassert(plugin_path);
- HDassert(iter_op);
+ assert(plugin_path);
+ assert(iter_op);
/* Open the directory - skip the path if the directory can't be opened */
if (!(dirp = HDopendir(plugin_path)))
@@ -704,8 +704,8 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(plugin_path);
- HDassert(iter_op);
+ assert(plugin_path);
+ assert(iter_op);
/* Specify a file mask. *.* = We want everything! -
* skip the path if the directory can't be opened */
@@ -788,9 +788,9 @@ H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params, hbool
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(search_params);
- HDassert(found);
- HDassert(plugin_info);
+ assert(search_params);
+ assert(found);
+ assert(plugin_info);
/* Initialize output parameters */
*found = FALSE;
@@ -844,10 +844,10 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(search_params);
- HDassert(found);
- HDassert(dir);
- HDassert(plugin_info);
+ assert(search_params);
+ assert(found);
+ assert(dir);
+ assert(plugin_info);
/* Initialize the found parameter */
*found = FALSE;
@@ -926,10 +926,10 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(search_params);
- HDassert(found);
- HDassert(dir);
- HDassert(plugin_info);
+ assert(search_params);
+ assert(found);
+ assert(dir);
+ assert(plugin_info);
/* Initialize the found parameter */
*found = FALSE;
diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c
index 7d7c1d6..58b5b5b 100644
--- a/src/H5PLplugin_cache.c
+++ b/src/H5PLplugin_cache.c
@@ -186,7 +186,7 @@ H5PL__expand_cache(void)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "allocating additional memory for plugin cache failed")
/* Initialize the new memory */
- HDmemset(H5PL_cache_g + H5PL_num_plugins_g, 0, (size_t)H5PL_CACHE_CAPACITY_ADD * sizeof(H5PL_plugin_t));
+ memset(H5PL_cache_g + H5PL_num_plugins_g, 0, (size_t)H5PL_CACHE_CAPACITY_ADD * sizeof(H5PL_plugin_t));
done:
/* Set the cache capacity back if there were problems */
@@ -253,9 +253,9 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(search_params);
- HDassert(found);
- HDassert(plugin_info);
+ assert(search_params);
+ assert(found);
+ assert(plugin_info);
/* Initialize output parameters */
*found = FALSE;
@@ -289,7 +289,7 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
matched = TRUE;
}
else {
- HDassert(search_params->key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE);
+ assert(search_params->key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE);
/* Make sure the plugin cache entry key type matches our search key type */
if (H5PL_cache_g[u].key.vol.kind != H5VL_GET_CONNECTOR_BY_VALUE)
@@ -313,7 +313,7 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
matched = TRUE;
}
else {
- HDassert(search_params->key->vfd.kind == H5FD_GET_DRIVER_BY_VALUE);
+ assert(search_params->key->vfd.kind == H5FD_GET_DRIVER_BY_VALUE);
/* Make sure the plugin cache entry key type matches our search key type */
if (H5PL_cache_g[u].key.vfd.kind != H5FD_GET_DRIVER_BY_VALUE)
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index ece7af4..5a3c1f4 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -268,7 +268,7 @@ H5P__dapl_vds_file_pref_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Copy the prefix */
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -292,7 +292,7 @@ H5P__dapl_vds_file_pref_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Copy the prefix */
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -329,7 +329,7 @@ H5P__dapl_vds_file_pref_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
if (NULL != *pp) {
/* encode the length of the prefix */
@@ -372,14 +372,14 @@ H5P__dapl_vds_file_pref_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
- HDassert(pp);
- HDassert(*pp);
- HDassert(vds_file_pref);
+ assert(pp);
+ assert(*pp);
+ assert(vds_file_pref);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the value */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -415,7 +415,7 @@ H5P__dapl_vds_file_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -435,7 +435,7 @@ H5P__dapl_vds_file_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNU
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -485,7 +485,7 @@ H5P__dapl_vds_file_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UN
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -508,7 +508,7 @@ H5P__dapl_efile_pref_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Copy the prefix */
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -532,7 +532,7 @@ H5P__dapl_efile_pref_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Copy the prefix */
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -569,7 +569,7 @@ H5P__dapl_efile_pref_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
if (NULL != *pp) {
/* encode the length of the prefix */
@@ -612,14 +612,14 @@ H5P__dapl_efile_pref_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
- HDassert(pp);
- HDassert(*pp);
- HDassert(efile_pref);
+ assert(pp);
+ assert(*pp);
+ assert(efile_pref);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the value */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -655,7 +655,7 @@ H5P__dapl_efile_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -675,7 +675,7 @@ H5P__dapl_efile_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -725,7 +725,7 @@ H5P__dapl_efile_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -873,7 +873,7 @@ H5P__encode_chunk_cache_nslots(const void *value, void **_pp, size_t *size)
/* Sanity checks */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(size);
+ assert(size);
/* Determine if this is the default value, in which case only encode
* enc_size (as 255). Also set size needed for encoding. */
@@ -884,11 +884,11 @@ H5P__encode_chunk_cache_nslots(const void *value, void **_pp, size_t *size)
else {
enc_value = (uint64_t) * (const size_t *)value;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size > 0);
+ assert(enc_size > 0);
*size += (1 + enc_size);
} /* end else */
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
if (NULL != *pp) {
/* Encode the size */
@@ -928,13 +928,13 @@ H5P__decode_chunk_cache_nslots(const void **_pp, void *_value)
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Determine if enc_size indicates that this is the default value, in which
* case set value to H5D_ACS_DATA_CACHE_NUM_SLOTS_DEF and return */
@@ -973,7 +973,7 @@ H5P__encode_chunk_cache_nbytes(const void *value, void **_pp, size_t *size)
/* Sanity checks */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(size);
+ assert(size);
/* Determine if this is the default value, in which case only encode
* enc_size (as 255). Also set size needed for encoding. */
@@ -984,11 +984,11 @@ H5P__encode_chunk_cache_nbytes(const void *value, void **_pp, size_t *size)
else {
enc_value = (uint64_t) * (const size_t *)value;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size > 0);
+ assert(enc_size > 0);
*size += (1 + enc_size);
} /* end else */
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
if (NULL != *pp) {
/* Encode the size */
@@ -1028,13 +1028,13 @@ H5P__decode_chunk_cache_nbytes(const void **_pp, void *_value)
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Determine if enc_size indicates that this is the default value, in which
* case set value to H5D_ACS_DATA_CACHE_BYTE_SIZE_DEF and return */
@@ -1143,8 +1143,8 @@ H5P__dacc_vds_view_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(view);
- HDassert(size);
+ assert(view);
+ assert(size);
if (NULL != *pp)
/* Encode EDC property */
@@ -1175,9 +1175,9 @@ H5P__dacc_vds_view_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(view);
+ assert(pp);
+ assert(*pp);
+ assert(view);
/* Decode EDC property */
*view = (H5D_vds_view_t) * (*pp)++;
@@ -1316,7 +1316,7 @@ H5Pset_append_flush(hid_t plist_id, unsigned ndims, const hsize_t *boundary, H5D
info.func = func;
info.udata = udata;
- HDmemset(info.boundary, 0, sizeof(info.boundary));
+ memset(info.boundary, 0, sizeof(info.boundary));
/* boundary can be 0 to indicate no boundary is set */
for (u = 0; u < ndims; u++) {
if (boundary[u] != (boundary[u] & 0xffffffff)) /* negative value (including H5S_UNLIMITED) */
@@ -1366,7 +1366,7 @@ H5Pget_append_flush(hid_t plist_id, unsigned ndims, hsize_t boundary[], H5D_appe
/* Assign return values */
if (boundary) {
- HDmemset(boundary, 0, ndims * sizeof(hsize_t));
+ memset(boundary, 0, ndims * sizeof(hsize_t));
if (info.ndims > 0)
for (u = 0; u < info.ndims && u < ndims; u++)
boundary[u] = info.boundary[u];
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 298baa5..223eb3b 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -365,7 +365,7 @@ H5P__dcrt_layout_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of layout */
if (NULL == H5O_msg_copy(H5O_LAYOUT_ID, layout, &new_layout))
@@ -402,7 +402,7 @@ H5P__dcrt_layout_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of layout */
if (NULL == H5O_msg_copy(H5O_LAYOUT_ID, layout, &new_layout))
@@ -443,8 +443,8 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(layout);
- HDassert(size);
+ assert(layout);
+ assert(size);
if (NULL != *pp) {
/* Encode layout type */
@@ -577,9 +577,9 @@ H5P__dcrt_layout_dec(const void **_pp, void *value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode layout type */
type = (H5D_layout_t) * (*pp)++;
@@ -771,7 +771,7 @@ H5P__dcrt_layout_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old layout */
if (H5O_msg_reset(H5O_LAYOUT_ID, value) < 0)
@@ -803,7 +803,7 @@ H5P__dcrt_layout_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED siz
FUNC_ENTER_PACKAGE
- HDassert(layout);
+ assert(layout);
/* Make copy of layout */
if (NULL == H5O_msg_copy(H5O_LAYOUT_ID, layout, &new_layout))
@@ -842,9 +842,9 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2, size_t H5_ATTR_
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(layout1);
- HDassert(layout2);
- HDassert(size == sizeof(H5O_layout_t));
+ assert(layout1);
+ assert(layout2);
+ assert(size == sizeof(H5O_layout_t));
/* Check for different layout type */
if (layout1->type < layout2->type)
@@ -942,7 +942,7 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2, size_t H5_ATTR_
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HDassert(0 && "Unknown layout type!");
+ assert(0 && "Unknown layout type!");
} /* end switch */
done:
@@ -970,7 +970,7 @@ H5P__dcrt_layout_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED si
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old layout */
if (H5O_msg_reset(H5O_LAYOUT_ID, value) < 0)
@@ -1004,7 +1004,7 @@ H5P__dcrt_fill_value_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of fill value */
if (NULL == H5O_msg_copy(H5O_FILL_ID, fill, &new_fill))
@@ -1041,7 +1041,7 @@ H5P__dcrt_fill_value_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of fill value */
if (NULL == H5O_msg_copy(H5O_FILL_ID, fill, &new_fill))
@@ -1084,8 +1084,8 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size)
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
HDcompile_assert(sizeof(ssize_t) <= sizeof(int64_t));
- HDassert(fill);
- HDassert(size);
+ assert(fill);
+ assert(size);
if (NULL != *pp) {
/* Encode alloc and fill time */
@@ -1102,7 +1102,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size)
*pp += fill->size;
/* Encode fill value datatype */
- HDassert(fill->type);
+ assert(fill->type);
if (H5T_encode(fill->type, NULL, &dt_size) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype")
@@ -1110,7 +1110,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size)
/* Encode the size of a size_t */
enc_value = (uint64_t)dt_size;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Encode the size */
*(*pp)++ = (uint8_t)enc_size;
@@ -1134,7 +1134,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size)
/* calculate those if they were not calculated earlier */
if (NULL == *pp) {
/* Get the size of the encoded datatype */
- HDassert(fill->type);
+ assert(fill->type);
if (H5T_encode(fill->type, NULL, &dt_size) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype")
enc_value = (uint64_t)dt_size;
@@ -1198,7 +1198,7 @@ H5P__dcrt_fill_value_dec(const void **_pp, void *_value)
*pp += fill->size;
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the size of encoded datatype */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -1236,7 +1236,7 @@ H5P__dcrt_fill_value_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old fill value message */
if (H5O_msg_reset(H5O_FILL_ID, value) < 0)
@@ -1268,7 +1268,7 @@ H5P__dcrt_fill_value_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
- HDassert(fill);
+ assert(fill);
/* Make copy of fill value message */
if (NULL == H5O_msg_copy(H5O_FILL_ID, fill, &new_fill))
@@ -1307,9 +1307,9 @@ H5P_fill_value_cmp(const void *_fill1, const void *_fill2, size_t H5_ATTR_UNUSED
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(fill1);
- HDassert(fill2);
- HDassert(size == sizeof(H5O_fill_t));
+ assert(fill1);
+ assert(fill2);
+ assert(size == sizeof(H5O_fill_t));
/* Check the size of fill values */
if (fill1->size < fill2->size)
@@ -1332,7 +1332,7 @@ H5P_fill_value_cmp(const void *_fill1, const void *_fill2, size_t H5_ATTR_UNUSED
if (fill1->buf != NULL && fill2->buf == NULL)
HGOTO_DONE(1);
if (fill1->buf != NULL)
- if ((cmp_value = HDmemcmp(fill1->buf, fill2->buf, (size_t)fill1->size)) != 0)
+ if ((cmp_value = memcmp(fill1->buf, fill2->buf, (size_t)fill1->size)) != 0)
HGOTO_DONE(cmp_value);
/* Check the allocation time for the fill values */
@@ -1372,7 +1372,7 @@ H5P__dcrt_fill_value_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old fill value message */
if (H5O_msg_reset(H5O_FILL_ID, value) < 0)
@@ -1406,7 +1406,7 @@ H5P__dcrt_ext_file_list_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of external file list */
if (NULL == H5O_msg_copy(H5O_EFL_ID, efl, &new_efl))
@@ -1443,7 +1443,7 @@ H5P__dcrt_ext_file_list_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of external file list */
if (NULL == H5O_msg_copy(H5O_EFL_ID, efl, &new_efl))
@@ -1484,17 +1484,17 @@ H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(efl);
+ assert(efl);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
HDcompile_assert(sizeof(off_t) <= sizeof(uint64_t));
HDcompile_assert(sizeof(hsize_t) <= sizeof(uint64_t));
- HDassert(size);
+ assert(size);
if (NULL != *pp) {
/* Encode number of slots used */
enc_value = (uint64_t)efl->nused;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -1504,7 +1504,7 @@ H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size)
len = HDstrlen(efl->slot[u].name) + 1;
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -1515,14 +1515,14 @@ H5P__dcrt_ext_file_list_enc(const void *value, void **_pp, size_t *size)
/* Encode offset */
enc_value = (uint64_t)efl->slot[u].offset;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
/* encode size */
enc_value = (uint64_t)efl->slot[u].size;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
} /* end for */
@@ -1569,9 +1569,9 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pp);
- HDassert(*pp);
- HDassert(efl);
+ assert(pp);
+ assert(*pp);
+ assert(efl);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
HDcompile_assert(sizeof(off_t) <= sizeof(uint64_t));
HDcompile_assert(sizeof(hsize_t) <= sizeof(uint64_t));
@@ -1581,7 +1581,7 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value)
/* Decode number of slots used */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
nused = (size_t)enc_value;
@@ -1600,7 +1600,7 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value)
/* Decode length of slot name */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
len = (size_t)enc_value;
@@ -1610,13 +1610,13 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value)
/* decode offset */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
efl->slot[u].offset = (off_t)enc_value;
/* decode size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
efl->slot[u].size = (hsize_t)enc_value;
@@ -1650,7 +1650,7 @@ H5P__dcrt_ext_file_list_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old efl message */
if (H5O_msg_reset(H5O_EFL_ID, value) < 0)
@@ -1682,7 +1682,7 @@ H5P__dcrt_ext_file_list_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE
- HDassert(efl);
+ assert(efl);
/* Make copy of efl message */
if (NULL == H5O_msg_copy(H5O_EFL_ID, efl, &new_efl))
@@ -1722,9 +1722,9 @@ H5P__dcrt_ext_file_list_cmp(const void *_efl1, const void *_efl2, size_t H5_ATTR
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(efl1);
- HDassert(efl2);
- HDassert(size == sizeof(H5O_efl_t));
+ assert(efl1);
+ assert(efl2);
+ assert(size == sizeof(H5O_efl_t));
/* Check the number of allocated efl entries */
if (efl1->nalloc < efl2->nalloc)
@@ -1802,7 +1802,7 @@ H5P__dcrt_ext_file_list_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UN
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old efl message */
if (H5O_msg_reset(H5O_EFL_ID, value) < 0)
@@ -2018,7 +2018,7 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/])
/* Verify & initialize property's chunk dims */
H5MM_memcpy(&chunk_layout, &H5D_def_layout_chunk_g, sizeof(H5D_def_layout_chunk_g));
- HDmemset(&chunk_layout.u.chunk.dim, 0, sizeof(chunk_layout.u.chunk.dim));
+ memset(&chunk_layout.u.chunk.dim, 0, sizeof(chunk_layout.u.chunk.dim));
chunk_nelmts = 1;
for (u = 0; u < (unsigned)ndims; u++) {
if (dim[u] == 0)
@@ -2170,7 +2170,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const
H5MM_memcpy(&virtual_layout, &H5D_def_layout_virtual_g, sizeof(H5D_def_layout_virtual_g));
/* Sanity check */
- HDassert(virtual_layout.storage.u.virt.list_nalloc == 0);
+ assert(virtual_layout.storage.u.virt.list_nalloc == 0);
} /* end else */
/* Expand list if necessary */
@@ -2188,7 +2188,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const
/* Add virtual dataset mapping entry */
ent = &virtual_layout.storage.u.virt.list[virtual_layout.storage.u.virt.list_nused];
- HDmemset(ent, 0, sizeof(H5O_storage_virtual_ent_t)); /* Clear before starting to set up */
+ memset(ent, 0, sizeof(H5O_storage_virtual_ent_t)); /* Clear before starting to set up */
if (NULL == (ent->source_dset.virtual_select = H5S_copy(vspace, FALSE, TRUE)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
if (NULL == (ent->source_file_name = H5MM_xstrdup(src_file_name)))
@@ -2359,7 +2359,7 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t idx)
/* Get the virtual space */
if (idx >= layout.storage.u.virt.list_nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
- HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
+ assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
if (NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_dset.virtual_select, FALSE, TRUE)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
@@ -2416,7 +2416,7 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx)
/* Check index */
if (idx >= layout.storage.u.virt.list_nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
- HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
+ assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
/* Attempt to open source dataset and patch extent if extent status is not
* H5O_VIRTUAL_STATUS_CORRECT? -NAF */
@@ -2519,8 +2519,8 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si
/* Get the virtual filename */
if (idx >= layout.storage.u.virt.list_nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
- HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
- HDassert(layout.storage.u.virt.list[idx].source_file_name);
+ assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
+ assert(layout.storage.u.virt.list[idx].source_file_name);
if (name && (size > 0))
(void)HDstrncpy(name, layout.storage.u.virt.list[idx].source_file_name, size);
ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[idx].source_file_name);
@@ -2580,8 +2580,8 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si
/* Get the virtual filename */
if (idx >= layout.storage.u.virt.list_nused)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
- HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
- HDassert(layout.storage.u.virt.list[idx].source_dset_name);
+ assert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
+ assert(layout.storage.u.virt.list[idx].source_dset_name);
if (name && (size > 0))
(void)HDstrncpy(name, layout.storage.u.virt.list[idx].source_dset_name, size);
ret_value = (ssize_t)HDstrlen(layout.storage.u.virt.list[idx].source_dset_name);
@@ -3244,7 +3244,7 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/
/* Check for "default" fill value */
if (fill.size == 0) {
- HDmemset(value, 0, H5T_get_size(type));
+ memset(value, 0, H5T_get_size(type));
HGOTO_DONE(SUCCEED);
} /* end if */
@@ -3358,8 +3358,8 @@ H5P_is_fill_value_defined(const H5O_fill_t *fill, H5D_fill_value_t *status)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(fill);
- HDassert(status);
+ assert(fill);
+ assert(status);
/* Check if the fill value was "unset" */
if (fill->size == -1 && !fill->buf)
@@ -3399,7 +3399,7 @@ H5P_fill_value_defined(H5P_genplist_t *plist, H5D_fill_value_t *status)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(status);
+ assert(status);
/* Get the fill value struct */
if (H5P_peek(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0)
@@ -3434,7 +3434,7 @@ H5Pfill_value_defined(hid_t plist_id, H5D_fill_value_t *status)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*DF", plist_id, status);
- HDassert(status);
+ assert(status);
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c
index c02534b..abe94df 100644
--- a/src/H5Pdeprec.c
+++ b/src/H5Pdeprec.c
@@ -243,7 +243,7 @@ H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value, H5P_p
/* Substitute the new property class in the ID */
if (NULL == (old_pclass = (H5P_genclass_t *)H5I_subst(cls_id, pclass)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID")
- HDassert(old_pclass == orig_pclass);
+ assert(old_pclass == orig_pclass);
/* Close the previous class */
if (H5P__close_class(orig_pclass) < 0)
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 942d6f2..e1f22a5 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -507,8 +507,8 @@ H5P__dxfr_bkgr_buf_type_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(bkgr_buf_type);
- HDassert(size);
+ assert(bkgr_buf_type);
+ assert(size);
if (NULL != *pp)
/* Encode background buffer type */
@@ -544,9 +544,9 @@ H5P__dxfr_bkgr_buf_type_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(bkgr_buf_type);
+ assert(pp);
+ assert(*pp);
+ assert(bkgr_buf_type);
/* Decode background buffer type */
*bkgr_buf_type = (H5T_bkg_t) * (*pp)++;
@@ -578,8 +578,8 @@ H5P__dxfr_btree_split_ratio_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(btree_split_ratio);
- HDassert(size);
+ assert(btree_split_ratio);
+ assert(size);
if (NULL != *pp) {
/* Encode the size of a double*/
@@ -629,9 +629,9 @@ H5P__dxfr_btree_split_ratio_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(btree_split_ratio);
+ assert(pp);
+ assert(*pp);
+ assert(btree_split_ratio);
/* Decode the size */
enc_size = *(*pp)++;
@@ -669,7 +669,7 @@ H5P__dxfr_xform_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of data transform */
if (H5Z_xform_copy((H5Z_data_xform_t **)value) < 0)
@@ -701,7 +701,7 @@ H5P__dxfr_xform_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of data transform */
if (H5Z_xform_copy((H5Z_data_xform_t **)value) < 0)
@@ -740,7 +740,7 @@ H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size)
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(size);
+ assert(size);
/* Check for data transform set */
if (NULL != data_xform_prop) {
@@ -759,13 +759,13 @@ H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size)
/* encode the length of the prefix */
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
if (NULL != data_xform_prop) {
/* Sanity check */
- HDassert(pexp);
+ assert(pexp);
/* Copy the expression into the buffer */
H5MM_memcpy(*pp, (const uint8_t *)pexp, len);
@@ -811,14 +811,14 @@ H5P__dxfr_xform_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(data_xform_prop);
+ assert(pp);
+ assert(*pp);
+ assert(data_xform_prop);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Decode the length of xform expression */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
len = (size_t)enc_value;
@@ -855,7 +855,7 @@ H5P__dxfr_xform_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam
FUNC_ENTER_PACKAGE
- HDassert(value);
+ assert(value);
if (H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing the parse tree")
@@ -886,7 +886,7 @@ H5P__dxfr_xform_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of data transform */
if (H5Z_xform_copy((H5Z_data_xform_t **)value) < 0)
@@ -922,9 +922,9 @@ H5P__dxfr_xform_cmp(const void *_xform1, const void *_xform2, size_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(xform1);
- HDassert(xform2);
- HDassert(size == sizeof(H5Z_data_xform_t *));
+ assert(xform1);
+ assert(xform2);
+ assert(size == sizeof(H5Z_data_xform_t *));
/* Check for a property being set */
if (*xform1 == NULL && *xform2 != NULL)
@@ -933,7 +933,7 @@ H5P__dxfr_xform_cmp(const void *_xform1, const void *_xform2, size_t H5_ATTR_UNU
HGOTO_DONE(1);
if (*xform1) {
- HDassert(*xform2);
+ assert(*xform2);
/* Get the transform expressions */
pexp1 = H5Z_xform_extract_xform_str(*xform1);
@@ -946,7 +946,7 @@ H5P__dxfr_xform_cmp(const void *_xform1, const void *_xform2, size_t H5_ATTR_UNU
HGOTO_DONE(1);
if (pexp1) {
- HDassert(pexp2);
+ assert(pexp2);
ret_value = HDstrcmp(pexp1, pexp2);
} /* end if */
} /* end if */
@@ -975,7 +975,7 @@ H5P__dxfr_xform_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED siz
FUNC_ENTER_PACKAGE
- HDassert(value);
+ assert(value);
if (H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing the parse tree")
@@ -1592,7 +1592,7 @@ H5P_set_vlen_mem_manager(H5P_genplist_t *plist, H5MM_allocate_t alloc_func, void
FUNC_ENTER_NOAPI(FAIL)
- HDassert(plist);
+ assert(plist);
/* Update property list */
if (H5P_set(plist, H5D_XFER_VLEN_ALLOC_NAME, &alloc_func) < 0)
@@ -1796,8 +1796,8 @@ H5P__dxfr_io_xfer_mode_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(xfer_mode);
- HDassert(size);
+ assert(xfer_mode);
+ assert(size);
if (NULL != *pp)
/* Encode I/O transfer mode */
@@ -1833,9 +1833,9 @@ H5P__dxfr_io_xfer_mode_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(xfer_mode);
+ assert(pp);
+ assert(*pp);
+ assert(xfer_mode);
/* Decode I/O transfer mode */
*xfer_mode = (H5FD_mpio_xfer_t) * (*pp)++;
@@ -1868,8 +1868,8 @@ H5P__dxfr_mpio_collective_opt_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(coll_opt);
- HDassert(size);
+ assert(coll_opt);
+ assert(size);
if (NULL != *pp)
/* Encode MPI-I/O collective optimization property */
@@ -1906,9 +1906,9 @@ H5P__dxfr_mpio_collective_opt_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(coll_opt);
+ assert(pp);
+ assert(*pp);
+ assert(coll_opt);
/* Decode MPI-I/O collective optimization mode */
*coll_opt = (H5FD_mpio_collective_opt_t) * (*pp)++;
@@ -1941,8 +1941,8 @@ H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(chunk_opt);
- HDassert(size);
+ assert(chunk_opt);
+ assert(size);
if (NULL != *pp)
/* Encode MPI-I/O chunk optimization property */
@@ -1978,9 +1978,9 @@ H5P__dxfr_mpio_chunk_opt_hard_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(chunk_opt);
+ assert(pp);
+ assert(*pp);
+ assert(chunk_opt);
/* Decode MPI-I/O chunk optimization mode */
*chunk_opt = (H5FD_mpio_chunk_opt_t) * (*pp)++;
@@ -2122,8 +2122,8 @@ H5P__dxfr_edc_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(check);
- HDassert(size);
+ assert(check);
+ assert(size);
if (NULL != *pp)
/* Encode EDC property */
@@ -2159,9 +2159,9 @@ H5P__dxfr_edc_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(check);
+ assert(pp);
+ assert(*pp);
+ assert(check);
/* Decode EDC property */
*check = (H5Z_EDC_t) * (*pp)++;
@@ -2232,9 +2232,9 @@ H5P__dxfr_dset_io_hyp_sel_cmp(const void *_space1, const void *_space2, size_t H
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(space1);
- HDassert(space1);
- HDassert(size == sizeof(H5S_t *));
+ assert(space1);
+ assert(space1);
+ assert(size == sizeof(H5S_t *));
/* Check for a property being set */
if (*space1 == NULL && *space2 != NULL)
@@ -2243,7 +2243,7 @@ H5P__dxfr_dset_io_hyp_sel_cmp(const void *_space1, const void *_space2, size_t H
HGOTO_DONE(1);
if (*space1) {
- HDassert(*space2);
+ assert(*space2);
/* Compare the extents of the dataspaces */
/* (Error & not-equal count the same) */
@@ -2321,8 +2321,8 @@ H5P__dxfr_selection_io_mode_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(select_io_mode);
- HDassert(size);
+ assert(select_io_mode);
+ assert(size);
if (NULL != *pp)
/* Encode selection I/O mode property */
@@ -2358,9 +2358,9 @@ H5P__dxfr_selection_io_mode_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(select_io_mode);
+ assert(pp);
+ assert(*pp);
+ assert(select_io_mode);
/* Decode selection I/O mode property */
*select_io_mode = (H5D_selection_io_mode_t) * (*pp)++;
@@ -2631,8 +2631,8 @@ H5P__dxfr_modify_write_buf_enc(const void *value, void **_pp /*out*/, size_t *si
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(modify_write_buf);
- HDassert(size);
+ assert(modify_write_buf);
+ assert(size);
if (NULL != *pp)
/* Encode modify write buf property. Use "!!" so we always get 0 or 1 */
@@ -2665,9 +2665,9 @@ H5P__dxfr_modify_write_buf_dec(const void **_pp, void *_value /*out*/)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(modify_write_buf);
+ assert(pp);
+ assert(*pp);
+ assert(modify_write_buf);
/* Decode selection I/O mode property */
*modify_write_buf = (hbool_t) * (*pp)++;
diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c
index 2ee02c8..d241b74 100644
--- a/src/H5Pencdec.c
+++ b/src/H5Pencdec.c
@@ -90,8 +90,8 @@ H5P__encode_size_t(const void *value, void **_pp, size_t *size)
/* Sanity checks */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(enc_size < 256);
- HDassert(size);
+ assert(enc_size < 256);
+ assert(size);
if (NULL != *pp) {
/* Encode the size */
@@ -131,8 +131,8 @@ H5P__encode_hsize_t(const void *value, void **_pp, size_t *size)
/* Sanity checks */
HDcompile_assert(sizeof(hsize_t) <= sizeof(uint64_t));
- HDassert(enc_size < 256);
- HDassert(size);
+ assert(enc_size < 256);
+ assert(size);
if (NULL != *pp) {
*(*pp)++ = (uint8_t)enc_size;
@@ -168,8 +168,8 @@ H5P__encode_unsigned(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(value);
- HDassert(size);
+ assert(value);
+ assert(size);
if (NULL != *pp) {
/* Encode the size */
@@ -206,8 +206,8 @@ H5P__encode_uint8_t(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(value);
- HDassert(size);
+ assert(value);
+ assert(size);
if (NULL != *pp) {
/* Encode the value */
@@ -241,8 +241,8 @@ H5P__encode_hbool_t(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(value);
- HDassert(size);
+ assert(value);
+ assert(size);
if (NULL != *pp)
/* Encode the value */
@@ -275,8 +275,8 @@ H5P__encode_double(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(value);
- HDassert(size);
+ assert(value);
+ assert(size);
if (NULL != *pp) {
/* Encode the size */
@@ -321,8 +321,8 @@ H5P__encode_cb(H5P_genprop_t *prop, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(prop);
- HDassert(udata);
+ assert(prop);
+ assert(udata);
/* Check if this property can be encoded */
if (prop->encode) {
@@ -450,13 +450,13 @@ H5P__decode_size_t(const void **_pp, void *_value)
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the value */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -490,13 +490,13 @@ H5P__decode_hsize_t(const void **_pp, void *_value)
/* Sanity check */
HDcompile_assert(sizeof(hsize_t) <= sizeof(uint64_t));
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the value */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -529,9 +529,9 @@ H5P__decode_unsigned(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the size */
enc_size = *(*pp)++;
@@ -567,9 +567,9 @@ H5P__decode_uint8_t(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the value */
*value = *(*pp)++;
@@ -600,9 +600,9 @@ H5P__decode_hbool_t(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the value */
*value = (hbool_t) * (*pp)++;
@@ -634,9 +634,9 @@ H5P__decode_double(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(value);
+ assert(pp);
+ assert(*pp);
+ assert(value);
/* Decode the size */
enc_size = *(*pp)++;
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 84d2522..64fc129 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -868,7 +868,7 @@ H5P__facc_set_def_driver(void)
if ((driver_is_registered = H5FD_is_driver_registered_by_name(driver_env_var, &driver_id)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't check if VFL driver is already registered")
if (driver_is_registered) {
- HDassert(driver_id >= 0);
+ assert(driver_id >= 0);
if (H5I_inc_ref(driver_id, TRUE) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, FAIL, "unable to increment ref count on VFD")
@@ -948,8 +948,8 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver
FUNC_ENTER_PACKAGE
- HDassert(driver_name);
- HDassert(driver_id);
+ assert(driver_name);
+ assert(driver_id);
if (!HDstrcmp(driver_name, "sec2")) {
if ((*driver_id = H5FD_SEC2) < 0)
@@ -1166,7 +1166,7 @@ H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id, const void *new_drive
/* If VFD configuration information is supplied, ensure that either binary
* configuration data or a configuration string is supplied, but not both.
*/
- HDassert(!new_driver_info || !new_driver_config_str);
+ assert(!new_driver_info || !new_driver_config_str);
if (NULL == H5I_object_verify(new_driver_id, H5I_VFL))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file driver ID")
@@ -1258,8 +1258,8 @@ H5P_set_driver_by_name(H5P_genplist_t *plist, const char *driver_name, const cha
FUNC_ENTER_NOAPI(FAIL)
- HDassert(plist);
- HDassert(driver_name);
+ assert(plist);
+ assert(driver_name);
/* Register the driver */
if ((new_driver_id = H5FD_register_driver_by_name(driver_name, app_ref)) < 0)
@@ -1346,8 +1346,8 @@ H5P_set_driver_by_value(H5P_genplist_t *plist, H5FD_class_value_t driver_value,
FUNC_ENTER_NOAPI(FAIL)
- HDassert(plist);
- HDassert(driver_value >= 0);
+ assert(plist);
+ assert(driver_value >= 0);
/* Register the driver */
if ((new_driver_id = H5FD_register_driver_by_value(driver_value, app_ref)) < 0)
@@ -1827,7 +1827,7 @@ H5P__facc_file_driver_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of file driver ID & info */
if (H5P__file_driver_copy(value) < 0)
@@ -1859,7 +1859,7 @@ H5P__facc_file_driver_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of file driver */
if (H5P__file_driver_copy(value) < 0)
@@ -1954,9 +1954,9 @@ H5P__facc_file_driver_cmp(const void *_info1, const void *_info2, size_t H5_ATTR
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(info1);
- HDassert(info2);
- HDassert(size == sizeof(H5FD_driver_prop_t));
+ assert(info1);
+ assert(info2);
+ assert(size == sizeof(H5FD_driver_prop_t));
/* Compare drivers */
if (NULL == (cls1 = H5FD_get_class(info1->driver_id)))
@@ -1975,14 +1975,14 @@ H5P__facc_file_driver_cmp(const void *_info1, const void *_info2, size_t H5_ATTR
HGOTO_DONE(-1)
if (cls1->fapl_size > cls2->fapl_size)
HGOTO_DONE(1)
- HDassert(cls1->fapl_size == cls2->fapl_size);
+ assert(cls1->fapl_size == cls2->fapl_size);
if (info1->driver_info == NULL && info2->driver_info != NULL)
HGOTO_DONE(-1);
if (info1->driver_info != NULL && info2->driver_info == NULL)
HGOTO_DONE(1);
if (info1->driver_info) {
- HDassert(cls1->fapl_size > 0);
- if (0 != (cmp_value = HDmemcmp(info1->driver_info, info2->driver_info, cls1->fapl_size)))
+ assert(cls1->fapl_size > 0);
+ if (0 != (cmp_value = memcmp(info1->driver_info, info2->driver_info, cls1->fapl_size)))
HGOTO_DONE(cmp_value);
} /* end if */
@@ -3235,8 +3235,8 @@ H5Pget_file_image(hid_t fapl_id, void **buf /*out*/, size_t *buf_len /*out*/)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file image info")
/* verify file image field consistency */
- HDassert(((image_info.buffer != NULL) && (image_info.size > 0)) ||
- ((image_info.buffer == NULL) && (image_info.size == 0)));
+ assert(((image_info.buffer != NULL) && (image_info.size > 0)) ||
+ ((image_info.buffer == NULL) && (image_info.size == 0)));
/* Set output size */
if (buf_len != NULL)
@@ -3310,7 +3310,7 @@ H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get old file image info")
/* verify file image field consistency */
- HDassert(((info.buffer != NULL) && (info.size > 0)) || ((info.buffer == NULL) && (info.size == 0)));
+ assert(((info.buffer != NULL) && (info.size > 0)) || ((info.buffer == NULL) && (info.size == 0)));
/* Make sure a file image hasn't already been set */
if (info.buffer != NULL || info.size > 0)
@@ -3329,7 +3329,7 @@ H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback
/* Release old udata if it exists */
if (info.callbacks.udata != NULL) {
- HDassert(info.callbacks.udata_free);
+ assert(info.callbacks.udata_free);
if (info.callbacks.udata_free(info.callbacks.udata) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "udata_free callback failed")
} /* end if */
@@ -3338,8 +3338,8 @@ H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback
info.callbacks = *callbacks_ptr;
if (callbacks_ptr->udata) {
- HDassert(callbacks_ptr->udata_copy);
- HDassert(callbacks_ptr->udata_free);
+ assert(callbacks_ptr->udata_copy);
+ assert(callbacks_ptr->udata_free);
if ((info.callbacks.udata = callbacks_ptr->udata_copy(callbacks_ptr->udata)) == NULL)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't copy the supplied udata")
} /* end if */
@@ -3386,7 +3386,7 @@ H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file image info")
/* verify file image field consistency */
- HDassert(((info.buffer != NULL) && (info.size > 0)) || ((info.buffer == NULL) && (info.size == 0)));
+ assert(((info.buffer != NULL) && (info.size > 0)) || ((info.buffer == NULL) && (info.size == 0)));
/* verify that callbacks is not NULL */
if (NULL == callbacks)
@@ -3397,7 +3397,7 @@ H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback
/* Copy udata if it exists */
if (info.callbacks.udata != NULL) {
- HDassert(info.callbacks.udata_copy);
+ assert(info.callbacks.udata_copy);
if ((callbacks->udata = info.callbacks.udata_copy(info.callbacks.udata)) == 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't copy udata")
} /* end if */
@@ -3438,8 +3438,7 @@ H5P__file_image_info_copy(void *value)
info = (H5FD_file_image_info_t *)value;
/* verify file image field consistency */
- HDassert(((info->buffer != NULL) && (info->size > 0)) ||
- ((info->buffer == NULL) && (info->size == 0)));
+ assert(((info->buffer != NULL) && (info->size > 0)) || ((info->buffer == NULL) && (info->size == 0)));
if (info->buffer && info->size > 0) {
void *old_buffer; /* Pointer to old image buffer */
@@ -3512,8 +3511,7 @@ H5P__file_image_info_free(void *value)
info = (H5FD_file_image_info_t *)value;
/* Verify file image field consistency */
- HDassert(((info->buffer != NULL) && (info->size > 0)) ||
- ((info->buffer == NULL) && (info->size == 0)));
+ assert(((info->buffer != NULL) && (info->size > 0)) || ((info->buffer == NULL) && (info->size == 0)));
/* Free buffer */
if (info->buffer != NULL && info->size > 0) {
@@ -3618,7 +3616,7 @@ H5P__facc_cache_image_config_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
if (NULL != *pp) {
/* Encode type sizes (as a safety check) */
@@ -3665,9 +3663,9 @@ H5P__facc_cache_image_config_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(config);
+ assert(pp);
+ assert(*pp);
+ assert(config);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Set property to default value */
@@ -3712,7 +3710,7 @@ H5P__facc_file_image_info_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_U
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of file image info */
if (H5P__file_image_info_copy(value) < 0)
@@ -3744,7 +3742,7 @@ H5P__facc_file_image_info_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_U
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of file image info */
if (H5P__file_image_info_copy(value) < 0)
@@ -3840,9 +3838,9 @@ H5P__facc_file_image_info_cmp(const void *_info1, const void *_info2, size_t H5_
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(info1);
- HDassert(info2);
- HDassert(size == sizeof(H5FD_file_image_info_t));
+ assert(info1);
+ assert(info2);
+ assert(size == sizeof(H5FD_file_image_info_t));
/* Check for different buffer sizes */
if (info1->size < info2->size)
@@ -3878,7 +3876,7 @@ H5P__facc_file_image_info_cmp(const void *_info1, const void *_info2, size_t H5_
if (info1->buffer == NULL && info2->buffer != NULL)
HGOTO_DONE(1)
if (info1->buffer != NULL && info2->buffer != NULL)
- ret_value = HDmemcmp(info1->buffer, info2->buffer, size);
+ ret_value = memcmp(info1->buffer, info2->buffer, size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -4109,7 +4107,7 @@ H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
if (NULL != *pp) {
@@ -4136,7 +4134,7 @@ H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)config->initial_size;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -4144,13 +4142,13 @@ H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)config->max_size;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
enc_value = (uint64_t)config->min_size;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -4168,7 +4166,7 @@ H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)config->max_increment;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -4190,7 +4188,7 @@ H5P__facc_cache_config_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)config->max_decrement;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -4254,9 +4252,9 @@ H5P__facc_cache_config_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(config);
+ assert(pp);
+ assert(*pp);
+ assert(config);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Set property to default value */
@@ -4287,19 +4285,19 @@ H5P__facc_cache_config_dec(const void **_pp, void *_value)
H5_DECODE_UNSIGNED(*pp, config->set_initial_size);
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
config->initial_size = (size_t)enc_value;
H5_DECODE_DOUBLE(*pp, config->min_clean_fraction);
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
config->max_size = (size_t)enc_value;
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
config->min_size = (size_t)enc_value;
@@ -4319,7 +4317,7 @@ H5P__facc_cache_config_dec(const void **_pp, void *_value)
H5_DECODE_UNSIGNED(*pp, config->apply_max_increment);
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
config->max_increment = (size_t)enc_value;
@@ -4340,7 +4338,7 @@ H5P__facc_cache_config_dec(const void **_pp, void *_value)
H5_DECODE_UNSIGNED(*pp, config->apply_max_decrement);
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
config->max_decrement = (size_t)enc_value;
@@ -4386,8 +4384,8 @@ H5P__facc_fclose_degree_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(fclose_degree);
- HDassert(size);
+ assert(fclose_degree);
+ assert(size);
if (NULL != *pp)
/* Encode file close degree */
@@ -4423,9 +4421,9 @@ H5P__facc_fclose_degree_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(fclose_degree);
+ assert(pp);
+ assert(*pp);
+ assert(fclose_degree);
/* Decode file close degree */
*fclose_degree = (H5F_close_degree_t) * (*pp)++;
@@ -4457,8 +4455,8 @@ H5P__facc_multi_type_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(type);
- HDassert(size);
+ assert(type);
+ assert(size);
if (NULL != *pp)
/* Encode file close degree */
@@ -4494,9 +4492,9 @@ H5P__facc_multi_type_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(type);
+ assert(pp);
+ assert(*pp);
+ assert(type);
/* Decode multi VFD memory type */
*type = (H5FD_mem_t) * (*pp)++;
@@ -4527,8 +4525,8 @@ H5P__facc_libver_type_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(type);
- HDassert(size);
+ assert(type);
+ assert(size);
/* Encode */
if (NULL != *pp)
@@ -4563,9 +4561,9 @@ H5P__facc_libver_type_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(type);
+ assert(pp);
+ assert(*pp);
+ assert(type);
/* Decode */
*type = (H5F_libver_t) * (*pp)++;
@@ -4868,7 +4866,7 @@ H5P__facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
if (NULL != *pp) {
/* encode the length of the prefix */
@@ -4913,14 +4911,14 @@ H5P__facc_mdc_log_location_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
- HDassert(pp);
- HDassert(*pp);
- HDassert(log_location);
+ assert(pp);
+ assert(*pp);
+ assert(log_location);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the value */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -4957,7 +4955,7 @@ H5P__facc_mdc_log_location_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -4978,7 +4976,7 @@ H5P__facc_mdc_log_location_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -5031,7 +5029,7 @@ H5P__facc_mdc_log_location_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -5242,8 +5240,8 @@ H5P__encode_coll_md_read_flag_t(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(coll_md_read_flag);
- HDassert(size);
+ assert(coll_md_read_flag);
+ assert(size);
if (NULL != *pp) {
/* Encode the value */
@@ -5279,9 +5277,9 @@ H5P__decode_coll_md_read_flag_t(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(coll_md_read_flag);
+ assert(pp);
+ assert(*pp);
+ assert(coll_md_read_flag);
/* Decode file close degree */
*coll_md_read_flag = (H5P_coll_md_read_flag_t) * (*pp);
@@ -6337,7 +6335,7 @@ H5P__facc_vol_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of VOL connector ID & info */
if (H5VL_conn_copy((H5VL_connector_prop_t *)value) < 0)
@@ -6366,7 +6364,7 @@ H5P__facc_vol_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of VOL connector */
if (H5VL_conn_copy((H5VL_connector_prop_t *)value) < 0)
@@ -6454,9 +6452,9 @@ H5P__facc_vol_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(info1);
- HDassert(info2);
- HDassert(size == sizeof(H5VL_connector_prop_t));
+ assert(info1);
+ assert(info2);
+ assert(size == sizeof(H5VL_connector_prop_t));
/* Compare connectors */
if (NULL == (cls1 = (H5VL_class_t *)H5I_object(info1->connector_id)))
@@ -6464,7 +6462,7 @@ H5P__facc_vol_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UNUSED
if (NULL == (cls2 = (H5VL_class_t *)H5I_object(info2->connector_id)))
HGOTO_DONE(1)
status = H5VL_cmp_connector_cls(&cmp_value, cls1, cls2);
- HDassert(status >= 0);
+ assert(status >= 0);
if (cmp_value != 0)
HGOTO_DONE(cmp_value);
@@ -6475,9 +6473,9 @@ H5P__facc_vol_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UNUSED
/* Use one of the classes (cls1) info comparison routines to compare the
* info objects
*/
- HDassert(cls1->info_cls.cmp == cls2->info_cls.cmp);
+ assert(cls1->info_cls.cmp == cls2->info_cls.cmp);
status = H5VL_cmp_connector_info(cls1, &cmp_value, info1->connector_info, info2->connector_info);
- HDassert(status >= 0);
+ assert(status >= 0);
/* Set return value */
ret_value = cmp_value;
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index f5d0db4..95fe66d 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -700,8 +700,8 @@ H5P__fcrt_btree_rank_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(btree_k);
- HDassert(size);
+ assert(btree_k);
+ assert(size);
if (NULL != *pp) {
unsigned u; /* Local index variable */
@@ -749,9 +749,9 @@ H5P__fcrt_btree_rank_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(btree_k);
+ assert(pp);
+ assert(*pp);
+ assert(btree_k);
/* Decode the size */
enc_size = *(*pp)++;
@@ -987,8 +987,8 @@ H5P__fcrt_shmsg_index_types_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(type_flags);
- HDassert(size);
+ assert(type_flags);
+ assert(size);
if (NULL != *pp) {
unsigned u; /* Local index variable */
@@ -1037,9 +1037,9 @@ H5P__fcrt_shmsg_index_types_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(type_flags);
+ assert(pp);
+ assert(*pp);
+ assert(type_flags);
/* Decode the size */
enc_size = *(*pp)++;
@@ -1078,8 +1078,8 @@ H5P__fcrt_shmsg_index_minsize_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(minsizes);
- HDassert(size);
+ assert(minsizes);
+ assert(size);
if (NULL != *pp) {
unsigned u; /* Local index variable */
@@ -1128,9 +1128,9 @@ H5P__fcrt_shmsg_index_minsize_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(minsizes);
+ assert(pp);
+ assert(*pp);
+ assert(minsizes);
/* Decode the size */
enc_size = *(*pp)++;
@@ -1356,8 +1356,8 @@ H5P__fcrt_fspace_strategy_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(strategy);
- HDassert(size);
+ assert(strategy);
+ assert(size);
if (NULL != *pp)
/* Encode free-space strategy */
@@ -1393,9 +1393,9 @@ H5P__fcrt_fspace_strategy_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(strategy);
+ assert(pp);
+ assert(*pp);
+ assert(strategy);
/* Decode free-space strategy */
*strategy = (H5F_fspace_strategy_t) * (*pp)++;
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index 0fd3a68..4edb61d 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -571,7 +571,7 @@ H5P__gcrt_group_info_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Set property to default value */
- HDmemset(ginfo, 0, sizeof(H5O_ginfo_t));
+ memset(ginfo, 0, sizeof(H5O_ginfo_t));
*ginfo = H5G_def_ginfo_g;
UINT32DECODE(*pp, ginfo->lheap_size_hint)
@@ -667,7 +667,7 @@ H5P__gcrt_link_info_dec(const void **_pp, void *_value)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded")
/* Set property to default value */
- HDmemset(linfo, 0, sizeof(H5O_linfo_t));
+ memset(linfo, 0, sizeof(H5O_linfo_t));
*linfo = H5G_def_linfo_g;
H5_DECODE_UNSIGNED(*pp, crt_order_flags)
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 45647aa..88f9550 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -461,11 +461,11 @@ H5P_init_phase1(void)
H5P_libclass_t const *lib_class = init_class[u]; /* Current class to operate on */
/* Check if the current class hasn't been initialized and can be now */
- HDassert(lib_class->class_id);
+ assert(lib_class->class_id);
if (*lib_class->class_id == (-1) &&
(lib_class->par_pclass == NULL || *lib_class->par_pclass != NULL)) {
/* Sanity check - only the root class is not allowed to have a parent class */
- HDassert(lib_class->par_pclass || lib_class == H5P_CLS_ROOT);
+ assert(lib_class->par_pclass || lib_class == H5P_CLS_ROOT);
/* Allocate the new class */
if (NULL == (*lib_class->pclass = H5P__create_class(
@@ -499,7 +499,7 @@ H5P_init_phase1(void)
} while (pass_init > 0);
/* Verify that all classes were initialized */
- HDassert(tot_init == NELMTS(init_class));
+ assert(tot_init == NELMTS(init_class));
done:
if (ret_value < 0 && tot_init > 0) {
@@ -510,7 +510,7 @@ done:
for (u = 0; u < NELMTS(init_class); u++) {
H5P_libclass_t const *lib_class = init_class[u]; /* Current class to operate on */
- HDassert(lib_class->class_id);
+ assert(lib_class->class_id);
if (*lib_class->class_id >= 0) {
/* Close the class ID */
if (H5I_dec_ref(*lib_class->class_id) < 0)
@@ -706,7 +706,7 @@ H5P__close_class_cb(void *_pclass, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pclass);
+ assert(pclass);
/* Close the property list class object */
if (H5P__close_class(pclass) < 0)
@@ -737,7 +737,7 @@ H5P__close_list_cb(void *_plist, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
+ assert(plist);
/* Close the property list object */
if (H5P_close(plist) < 0)
@@ -779,10 +779,10 @@ H5P__do_prop_cb1(H5SL_t *slist, H5P_genprop_t *prop, H5P_prp_cb1_t cb)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(slist);
- HDassert(prop);
- HDassert(prop->cmp);
- HDassert(cb);
+ assert(slist);
+ assert(prop);
+ assert(prop->cmp);
+ assert(cb);
/* Allocate space for a temporary copy of the property value */
if (NULL == (tmp_value = H5MM_malloc(prop->size)))
@@ -846,7 +846,7 @@ H5P__copy_pclass(H5P_genclass_t *pclass)
FUNC_ENTER_PACKAGE
- HDassert(pclass);
+ assert(pclass);
/*
* Create new property class object
@@ -928,7 +928,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- HDassert(old_plist);
+ assert(old_plist);
/*
* Create new property list object
@@ -1144,8 +1144,8 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
FUNC_ENTER_PACKAGE
- HDassert(oprop);
- HDassert(type != H5P_PROP_WITHIN_UNKNOWN);
+ assert(oprop);
+ assert(type != H5P_PROP_WITHIN_UNKNOWN);
/* Allocate the new property */
if (NULL == (prop = H5FL_MALLOC(H5P_genprop_t)))
@@ -1158,8 +1158,8 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
/* Duplicating property for a class */
if (type == H5P_PROP_WITHIN_CLASS) {
- HDassert(oprop->type == H5P_PROP_WITHIN_CLASS);
- HDassert(oprop->shared_name == FALSE);
+ assert(oprop->type == H5P_PROP_WITHIN_CLASS);
+ assert(oprop->shared_name == FALSE);
/* Duplicate name */
prop->name = H5MM_xstrdup(oprop->name);
@@ -1176,8 +1176,8 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
} /* end if */
/* Duplicating a property from a class */
else {
- HDassert(oprop->type == H5P_PROP_WITHIN_CLASS);
- HDassert(oprop->shared_name == FALSE);
+ assert(oprop->type == H5P_PROP_WITHIN_CLASS);
+ assert(oprop->shared_name == FALSE);
/* Share the name */
prop->shared_name = TRUE;
@@ -1189,7 +1189,7 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
/* Duplicate current value, if it exists */
if (oprop->value != NULL) {
- HDassert(prop->size > 0);
+ assert(prop->size > 0);
if (NULL == (prop->value = H5MM_malloc(prop->size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
H5MM_memcpy(prop->value, oprop->value, prop->size);
@@ -1258,9 +1258,9 @@ H5P__create_prop(const char *name, size_t size, H5P_prop_within_t type, const vo
FUNC_ENTER_PACKAGE
- HDassert(name);
- HDassert((size > 0 && value != NULL) || (size == 0));
- HDassert(type != H5P_PROP_WITHIN_UNKNOWN);
+ assert(name);
+ assert((size > 0 && value != NULL) || (size == 0));
+ assert(type != H5P_PROP_WITHIN_UNKNOWN);
/* Allocate the new property */
if (NULL == (prop = H5FL_MALLOC(H5P_genprop_t)))
@@ -1339,9 +1339,9 @@ H5P__add_prop(H5SL_t *slist, H5P_genprop_t *prop)
FUNC_ENTER_PACKAGE
- HDassert(slist);
- HDassert(prop);
- HDassert(prop->type != H5P_PROP_WITHIN_UNKNOWN);
+ assert(slist);
+ assert(prop);
+ assert(prop->type != H5P_PROP_WITHIN_UNKNOWN);
/* Insert property into skip list */
if (H5SL_insert(slist, prop, prop->name) < 0)
@@ -1376,8 +1376,8 @@ H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name)
FUNC_ENTER_PACKAGE
- HDassert(plist);
- HDassert(name);
+ assert(plist);
+ assert(name);
/* Check if the property has been deleted from list */
if (H5SL_search(plist->del, name) != NULL) {
@@ -1435,8 +1435,8 @@ H5P__find_prop_pclass(H5P_genclass_t *pclass, const char *name)
FUNC_ENTER_PACKAGE
- HDassert(pclass);
- HDassert(name);
+ assert(pclass);
+ assert(name);
/* Get the property from the skip list */
if (NULL == (ret_value = (H5P_genprop_t *)H5SL_search(pclass->props, name)))
@@ -1469,7 +1469,7 @@ H5P__free_prop(H5P_genprop_t *prop)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(prop);
+ assert(prop);
/* Release the property value if it exists */
if (prop->value)
@@ -1512,7 +1512,7 @@ H5P__free_prop_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(tprop);
+ assert(tprop);
/* Call the close callback and ignore the return value, there's nothing we can do about it */
if (make_cb && tprop->close != NULL)
@@ -1550,7 +1550,7 @@ H5P__free_del_name_cb(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
- HDassert(del_name);
+ assert(del_name);
/* Free the name */
H5MM_xfree(del_name);
@@ -1585,8 +1585,8 @@ H5P__access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(pclass);
- HDassert(mod > H5P_MOD_ERR && mod < H5P_MOD_MAX);
+ assert(pclass);
+ assert(mod > H5P_MOD_ERR && mod < H5P_MOD_MAX);
switch (mod) {
case H5P_MOD_INC_CLS: /* Increment the dependent class count*/
@@ -1623,14 +1623,14 @@ H5P__access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
case H5P_MOD_ERR:
case H5P_MOD_MAX:
default:
- HDassert(0 && "Invalid H5P class modification");
+ assert(0 && "Invalid H5P class modification");
} /* end switch */
/* Check if we can release the class information now */
if (pclass->deleted && pclass->plists == 0 && pclass->classes == 0) {
H5P_genclass_t *par_class = pclass->parent; /* Pointer to class's parent */
- HDassert(pclass->name);
+ assert(pclass->name);
H5MM_xfree(pclass->name);
/* Free the class properties without making callbacks */
@@ -1680,9 +1680,9 @@ H5P__open_class_path_cb(void *_obj, hid_t H5_ATTR_UNUSED id, void *_key)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(obj);
- HDassert(H5I_GENPROP_CLS == H5I_get_type(id));
- HDassert(key);
+ assert(obj);
+ assert(H5I_GENPROP_CLS == H5I_get_type(id));
+ assert(key);
/* Check if the class object has the same parent as the new class */
if (obj->parent == key->parent) {
@@ -1739,11 +1739,11 @@ H5P__create_class(H5P_genclass_t *par_class, const char *name, H5P_plist_type_t
FUNC_ENTER_PACKAGE
- HDassert(name);
+ assert(name);
/* Allow internal classes to break some rules */
/* (This allows the root of the tree to be created with this routine -QAK) */
if (type == H5P_TYPE_USER)
- HDassert(par_class);
+ assert(par_class);
/* Allocate room for the class */
if (NULL == (pclass = H5FL_CALLOC(H5P_genclass_t)))
@@ -1835,7 +1835,7 @@ H5P__create(H5P_genclass_t *pclass)
FUNC_ENTER_PACKAGE
- HDassert(pclass);
+ assert(pclass);
/*
* Create new property list object
@@ -1974,7 +1974,7 @@ H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
- HDassert(pclass);
+ assert(pclass);
/* Create the new property list */
if ((plist = H5P__create(pclass)) == NULL)
@@ -2214,11 +2214,11 @@ H5P__register_real(H5P_genclass_t *pclass, const char *name, size_t size, const
FUNC_ENTER_PACKAGE
- HDassert(pclass);
- HDassert(0 == pclass->plists);
- HDassert(0 == pclass->classes);
- HDassert(name);
- HDassert((size > 0 && def_value != NULL) || (size == 0));
+ assert(pclass);
+ assert(0 == pclass->plists);
+ assert(0 == pclass->classes);
+ assert(name);
+ assert((size > 0 && def_value != NULL) || (size == 0));
/* Check for duplicate named properties */
if (NULL != H5SL_search(pclass->props, name))
@@ -2445,8 +2445,8 @@ H5P__register(H5P_genclass_t **ppclass, const char *name, size_t size, const voi
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(ppclass);
- HDassert(pclass);
+ assert(ppclass);
+ assert(pclass);
/* Check if class needs to be split because property lists or classes have
* been created since the last modification was made to the class.
@@ -2684,9 +2684,9 @@ H5P_insert(H5P_genplist_t *plist, const char *name, size_t size, void *value, H5
FUNC_ENTER_NOAPI_NOINIT
- HDassert(plist);
- HDassert(name);
- HDassert((size > 0 && value != NULL) || (size == 0));
+ assert(plist);
+ assert(name);
+ assert((size > 0 && value != NULL) || (size == 0));
/* Check for duplicate named properties */
if (NULL != H5SL_search(plist->props, name))
@@ -2777,10 +2777,10 @@ H5P__do_prop(H5P_genplist_t *plist, const char *name, H5P_do_plist_op_t plist_op
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(plist_op);
- HDassert(pclass_op);
+ assert(plist);
+ assert(name);
+ assert(plist_op);
+ assert(pclass_op);
/* Check if the property has been deleted */
if (NULL != H5SL_search(plist->del, name))
@@ -2857,9 +2857,9 @@ H5P__poke_plist_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_AT
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
+ assert(plist);
+ assert(name);
+ assert(prop);
/* Check for property size >0 */
if (0 == prop->size)
@@ -2904,10 +2904,10 @@ H5P__poke_pclass_cb(H5P_genplist_t *plist, const char H5_ATTR_NDEBUG_UNUSED *nam
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
- HDassert(prop->cmp);
+ assert(plist);
+ assert(name);
+ assert(prop);
+ assert(prop->cmp);
/* Check for property size >0 */
if (0 == prop->size)
@@ -2965,9 +2965,9 @@ H5P_poke(H5P_genplist_t *plist, const char *name, const void *value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(value);
+ assert(plist);
+ assert(name);
+ assert(value);
/* Find the property and set the value */
udata.value = value;
@@ -3010,9 +3010,9 @@ H5P__set_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
+ assert(plist);
+ assert(name);
+ assert(prop);
/* Check for property size >0 */
if (0 == prop->size)
@@ -3087,10 +3087,10 @@ H5P__set_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
- HDassert(prop->cmp);
+ assert(plist);
+ assert(name);
+ assert(prop);
+ assert(prop->cmp);
/* Check for property size >0 */
if (0 == prop->size)
@@ -3177,9 +3177,9 @@ H5P_set(H5P_genplist_t *plist, const char *name, const void *value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(value);
+ assert(plist);
+ assert(name);
+ assert(value);
/* Find the property and set the value */
udata.value = value;
@@ -3224,9 +3224,9 @@ H5P__class_get(const H5P_genclass_t *pclass, const char *name, void *value)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pclass);
- HDassert(name);
- HDassert(value);
+ assert(pclass);
+ assert(name);
+ assert(value);
/* Find property in list */
if (NULL == (prop = (H5P_genprop_t *)H5SL_search(pclass->props, name)))
@@ -3279,9 +3279,9 @@ H5P__class_set(const H5P_genclass_t *pclass, const char *name, const void *value
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pclass);
- HDassert(name);
- HDassert(value);
+ assert(pclass);
+ assert(name);
+ assert(value);
/* Find property in list */
if (NULL == (prop = (H5P_genprop_t *)H5SL_search(pclass->props, name)))
@@ -3326,8 +3326,8 @@ H5P_exist_plist(const H5P_genplist_t *plist, const char *name)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(plist);
- HDassert(name);
+ assert(plist);
+ assert(name);
/* Check for property in deleted property list */
if (H5SL_search(plist->del, name) != NULL)
@@ -3385,8 +3385,8 @@ H5P__exist_pclass(H5P_genclass_t *pclass, const char *name)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(pclass);
- HDassert(name);
+ assert(pclass);
+ assert(name);
/* Check for property in property list */
if (H5SL_search(pclass->props, name) != NULL)
@@ -3441,9 +3441,9 @@ H5P__get_size_plist(const H5P_genplist_t *plist, const char *name, size_t *size)
FUNC_ENTER_PACKAGE
- HDassert(plist);
- HDassert(name);
- HDassert(size);
+ assert(plist);
+ assert(name);
+ assert(size);
/* Find property */
if (NULL == (prop = H5P__find_prop_plist(plist, name)))
@@ -3486,9 +3486,9 @@ H5P__get_size_pclass(H5P_genclass_t *pclass, const char *name, size_t *size)
FUNC_ENTER_PACKAGE
- HDassert(pclass);
- HDassert(name);
- HDassert(size);
+ assert(pclass);
+ assert(name);
+ assert(size);
/* Find property */
if ((prop = H5P__find_prop_pclass(pclass, name)) == NULL)
@@ -3526,8 +3526,8 @@ H5P__get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(plist);
- HDassert(nprops);
+ assert(plist);
+ assert(nprops);
/* Get property size */
*nprops = plist->nprops;
@@ -3563,8 +3563,8 @@ H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops, hbool_t recu
FUNC_ENTER_NOAPI_NOERR
- HDassert(pclass);
- HDassert(nprops);
+ assert(pclass);
+ assert(nprops);
/* Get number of properties */
*nprops = pclass->nprops;
@@ -3609,8 +3609,8 @@ H5P__cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(prop1);
- HDassert(prop2);
+ assert(prop1);
+ assert(prop2);
/* Check the name */
if ((cmp_value = HDstrcmp(prop1->name, prop2->name)) != 0)
@@ -3740,8 +3740,8 @@ H5P__cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(pclass1);
- HDassert(pclass2);
+ assert(pclass1);
+ assert(pclass2);
/* Use the revision number to quickly check for identical classes */
if (pclass1->revision == pclass2->revision)
@@ -3871,8 +3871,8 @@ H5P__cmp_plist_cb(H5P_genprop_t *prop, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(prop);
- HDassert(udata);
+ assert(prop);
+ assert(udata);
/* Check if the property exists in the second property list */
if ((prop2_exist = H5P_exist_plist(udata->plist2, prop->name)) < 0)
@@ -3931,9 +3931,9 @@ H5P__cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2, int *
FUNC_ENTER_PACKAGE
- HDassert(plist1);
- HDassert(plist2);
- HDassert(cmp_ret);
+ assert(plist1);
+ assert(plist2);
+ assert(cmp_ret);
/* Check the number of properties */
if (plist1->nprops < plist2->nprops) {
@@ -4008,8 +4008,8 @@ H5P_class_isa(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
FUNC_ENTER_NOAPI_NOERR
- HDassert(pclass1);
- HDassert(pclass2);
+ assert(pclass1);
+ assert(pclass2);
/* Compare property classes */
if (H5P__cmp_class(pclass1, pclass2) == 0) {
@@ -4153,8 +4153,8 @@ H5P__iterate_plist_cb(void *_item, void *_key, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(item);
- HDassert(key);
+ assert(item);
+ assert(key);
/* Check if we've found the correctly indexed property */
if (*udata->curr_idx_ptr >= udata->prev_idx) {
@@ -4206,8 +4206,8 @@ H5P__iterate_plist_pclass_cb(void *_item, void *_key, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(item);
- HDassert(key);
+ assert(item);
+ assert(key);
/* Only call iterator callback for properties we haven't seen
* before and that haven't been deleted.
@@ -4285,9 +4285,9 @@ H5P__iterate_plist(const H5P_genplist_t *plist, hbool_t iter_all_prop, int *idx,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(idx);
- HDassert(cb_func);
+ assert(plist);
+ assert(idx);
+ assert(cb_func);
/* Create the skip list to hold names of properties already seen */
if (NULL == (seen = H5SL_create(H5SL_TYPE_STR, NULL)))
@@ -4364,8 +4364,8 @@ H5P__iterate_pclass_cb(void *_item, void H5_ATTR_NDEBUG_UNUSED *_key, void *_uda
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(item);
- HDassert((char *)_key);
+ assert(item);
+ assert((char *)_key);
/* Check if we've found the correctly indexed property */
if (*udata->curr_idx_ptr >= udata->prev_idx) {
@@ -4443,9 +4443,9 @@ H5P__iterate_pclass(const H5P_genclass_t *pclass, int *idx, H5P_iterate_int_t cb
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(pclass);
- HDassert(idx);
- HDassert(cb_func);
+ assert(pclass);
+ assert(idx);
+ assert(cb_func);
/* Set up iterator callback info */
udata_int.cb_func = cb_func;
@@ -4497,9 +4497,9 @@ H5P__peek_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_ATTR_NDE
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
+ assert(plist);
+ assert(name);
+ assert(prop);
/* Check for property size >0 */
if (0 == prop->size)
@@ -4545,9 +4545,9 @@ H5P_peek(H5P_genplist_t *plist, const char *name, void *value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(value);
+ assert(plist);
+ assert(name);
+ assert(value);
/* Find the property and peek at the value */
udata.value = value;
@@ -4590,9 +4590,9 @@ H5P__get_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, void *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
+ assert(plist);
+ assert(name);
+ assert(prop);
/* Check for property size >0 */
if (0 == prop->size)
@@ -4661,9 +4661,9 @@ H5P_get(H5P_genplist_t *plist, const char *name, void *value)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(value);
+ assert(plist);
+ assert(name);
+ assert(value);
/* Find the property and get the value */
udata.value = value;
@@ -4704,9 +4704,9 @@ H5P__del_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
+ assert(plist);
+ assert(name);
+ assert(prop);
/* Pass value to 'close' callback, if it exists */
if (NULL != prop->del) {
@@ -4773,9 +4773,9 @@ H5P__del_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(plist);
- HDassert(name);
- HDassert(prop);
+ assert(plist);
+ assert(name);
+ assert(prop);
/* Pass value to 'del' callback, if it exists */
if (NULL != prop->del) {
@@ -4848,8 +4848,8 @@ H5P_remove(H5P_genplist_t *plist, const char *name)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(plist);
- HDassert(name);
+ assert(plist);
+ assert(name);
/* Find the property and get the value */
if (H5P__do_prop(plist, name, H5P__del_plist_cb, H5P__del_pclass_cb, NULL) < 0)
@@ -4901,7 +4901,7 @@ H5P__copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name)
FUNC_ENTER_PACKAGE
- HDassert(name);
+ assert(name);
/* Get the objects to operate on */
if (NULL == (src_plist = (H5P_genplist_t *)H5I_object(src_id)) ||
@@ -5012,7 +5012,7 @@ H5P__copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(name);
+ assert(name);
/* Get property list classes */
if (NULL == (src_pclass = (H5P_genclass_t *)H5I_object(src_id)))
@@ -5044,7 +5044,7 @@ H5P__copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name)
/* Substitute the new destination property class in the ID */
if (NULL == (old_dst_pclass = (H5P_genclass_t *)H5I_subst(dst_id, dst_pclass)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID")
- HDassert(old_dst_pclass == orig_dst_pclass);
+ assert(old_dst_pclass == orig_dst_pclass);
/* Close the previous class */
if (H5P__close_class(old_dst_pclass) < 0)
@@ -5087,8 +5087,8 @@ H5P__unregister(H5P_genclass_t *pclass, const char *name)
FUNC_ENTER_PACKAGE
- HDassert(pclass);
- HDassert(name);
+ assert(pclass);
+ assert(name);
/* Get the property node from the skip list */
if ((prop = (H5P_genprop_t *)H5SL_search(pclass->props, name)) == NULL)
@@ -5150,7 +5150,7 @@ H5P_close(H5P_genplist_t *plist)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(plist);
+ assert(plist);
/* Make call to property list class close callback, if needed
* (up through chain of parent classes also)
@@ -5310,7 +5310,7 @@ H5P_get_class_name(H5P_genclass_t *pclass)
FUNC_ENTER_NOAPI_NOERR
- HDassert(pclass);
+ assert(pclass);
/* Get class name */
ret_value = H5MM_xstrdup(pclass->name);
@@ -5346,7 +5346,7 @@ H5P__get_class_path(H5P_genclass_t *pclass)
FUNC_ENTER_PACKAGE
- HDassert(pclass);
+ assert(pclass);
/* Recursively build the full path */
if (pclass->parent != NULL) {
@@ -5412,11 +5412,11 @@ H5P__open_class_path(const char *path)
FUNC_ENTER_PACKAGE
- HDassert(path);
+ assert(path);
/* Duplicate the path to use */
tmp_path = H5MM_xstrdup(path);
- HDassert(tmp_path);
+ assert(tmp_path);
/* Find the generic property class with this full path */
curr_name = tmp_path;
@@ -5491,7 +5491,7 @@ H5P__get_class_parent(const H5P_genclass_t *pclass)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(pclass);
+ assert(pclass);
/* Get property size */
ret_value = pclass->parent;
@@ -5523,7 +5523,7 @@ H5P__close_class(H5P_genclass_t *pclass)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(pclass);
+ assert(pclass);
/* Decrement the reference count & check if the object should go away */
if (H5P__access_class(pclass, H5P_MOD_DEC_REF) < 0)
@@ -5557,7 +5557,7 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
/* Sanity checks */
HDcompile_assert(H5P_TYPE_REFERENCE_ACCESS == (H5P_TYPE_MAX_TYPE - 1));
- HDassert(type >= H5P_TYPE_USER && type <= H5P_TYPE_REFERENCE_ACCESS);
+ assert(type >= H5P_TYPE_USER && type <= H5P_TYPE_REFERENCE_ACCESS);
/* Check arguments */
if (type == H5P_TYPE_USER)
@@ -5693,7 +5693,7 @@ H5P_get_plist_id(const H5P_genplist_t *plist)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(plist);
+ assert(plist);
FUNC_LEAVE_NOAPI(plist->plist_id)
} /* end H5P_get_plist_id() */
@@ -5720,7 +5720,7 @@ H5P_get_class(const H5P_genplist_t *plist)
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(plist);
+ assert(plist);
FUNC_LEAVE_NOAPI(plist->pclass)
} /* end H5P_get_class() */
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index 469006b..c143a71 100644
--- a/src/H5Plapl.c
+++ b/src/H5Plapl.c
@@ -257,7 +257,7 @@ H5P__lacc_elink_fapl_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Get the FAPL ID */
l_fapl_id = *(const hid_t *)value;
@@ -299,7 +299,7 @@ H5P__lacc_elink_fapl_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Get the FAPL ID */
l_fapl_id = *(const hid_t *)value;
@@ -370,7 +370,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size)
/* encode the length of the plist */
enc_value = (uint64_t)fapl_size;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -415,9 +415,9 @@ H5P__lacc_elink_fapl_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pp);
- HDassert(*pp);
- HDassert(elink_fapl);
+ assert(pp);
+ assert(*pp);
+ assert(elink_fapl);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Determine if the FAPL is non-default */
@@ -430,7 +430,7 @@ H5P__lacc_elink_fapl_dec(const void **_pp, void *_value)
/* Decode the plist length */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
fapl_size = (size_t)enc_value;
@@ -470,7 +470,7 @@ H5P__lacc_elink_fapl_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Get the FAPL ID */
l_fapl_id = (*(const hid_t *)value);
@@ -505,7 +505,7 @@ H5P__lacc_elink_fapl_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Get the FAPL ID */
l_fapl_id = (*(const hid_t *)value);
@@ -567,7 +567,7 @@ H5P__lacc_elink_fapl_cmp(const void *value1, const void *value2, size_t H5_ATTR_
herr_t H5_ATTR_NDEBUG_UNUSED status;
status = H5P__cmp_plist(obj1, obj2, &ret_value);
- HDassert(status >= 0);
+ assert(status >= 0);
} /* end if */
done:
@@ -596,7 +596,7 @@ H5P__lacc_elink_fapl_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Get the FAPL ID */
l_fapl_id = (*(const hid_t *)value);
@@ -629,7 +629,7 @@ H5P__lacc_elink_pref_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Copy the prefix */
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -657,7 +657,7 @@ H5P__lacc_elink_pref_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Copy the prefix */
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -699,7 +699,7 @@ H5P__lacc_elink_pref_enc(const void *value, void **_pp, size_t *size)
enc_value = (uint64_t)len;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
if (NULL != *pp) {
/* encode the length of the prefix */
@@ -747,14 +747,14 @@ H5P__lacc_elink_pref_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
- HDassert(pp);
- HDassert(*pp);
- HDassert(elink_pref);
+ assert(pp);
+ assert(*pp);
+ assert(elink_pref);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
/* Decode the size */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
/* Decode the value */
UINT64DECODE_VAR(*pp, enc_value, enc_size);
@@ -794,7 +794,7 @@ H5P__lacc_elink_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
@@ -818,7 +818,7 @@ H5P__lacc_elink_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
*(char **)value = H5MM_xstrdup(*(const char **)value);
@@ -876,7 +876,7 @@ H5P__lacc_elink_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
H5MM_xfree(*(void **)value);
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index 214c3ba..13cb66f 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -1210,7 +1210,7 @@ H5P__get_filter(const H5Z_filter_info_t *filter, unsigned int *flags /*out*/, si
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(filter);
+ assert(filter);
/* Filter flags */
if (flags)
@@ -1288,7 +1288,7 @@ H5P__ocrt_pipeline_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of I/O pipeline */
if (NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &new_pline))
@@ -1325,7 +1325,7 @@ H5P__ocrt_pipeline_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of I/O pipeline */
if (NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &new_pline))
@@ -1362,8 +1362,8 @@ H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(pline);
- HDassert(size);
+ assert(pline);
+ assert(size);
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
if (NULL != *pp) {
@@ -1376,7 +1376,7 @@ H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size)
/* encode nused value */
enc_value = (uint64_t)pline->nused;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -1406,7 +1406,7 @@ H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size)
/* encode cd_nelmts */
enc_value = (uint64_t)pline->filter[u].cd_nelmts;
enc_size = H5VM_limit_enc_size(enc_value);
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
*(*pp)++ = (uint8_t)enc_size;
UINT64ENCODE_VAR(*pp, enc_value, enc_size);
@@ -1467,12 +1467,12 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value)
/* decode nused */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
nused = (size_t)enc_value;
/* Set property default value */
- HDmemset(pline, 0, sizeof(H5O_pline_t));
+ memset(pline, 0, sizeof(H5O_pline_t));
*pline = H5O_def_pline_g;
for (u = 0; u < nused; u++) {
@@ -1498,7 +1498,7 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value)
/* decode num elements */
enc_size = *(*pp)++;
- HDassert(enc_size < 256);
+ assert(enc_size < 256);
UINT64DECODE_VAR(*pp, enc_value, enc_size);
filter.cd_nelmts = (size_t)enc_value;
@@ -1547,7 +1547,7 @@ H5P__ocrt_pipeline_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old I/O pipeline */
if (H5O_msg_reset(H5O_PLINE_ID, value) < 0)
@@ -1580,7 +1580,7 @@ H5P__ocrt_pipeline_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED s
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pline);
+ assert(pline);
/* Make copy of I/O pipeline */
if (NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &new_pline))
@@ -1619,9 +1619,9 @@ H5P__ocrt_pipeline_cmp(const void *_pline1, const void *_pline2, size_t H5_ATTR_
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(pline1);
- HDassert(pline2);
- HDassert(size == sizeof(H5O_pline_t));
+ assert(pline1);
+ assert(pline2);
+ assert(size == sizeof(H5O_pline_t));
/* Check the number of used pipeline entries */
if (pline1->nused < pline2->nused)
@@ -1711,7 +1711,7 @@ H5P__ocrt_pipeline_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Reset the old I/O pipeline */
if (H5O_msg_reset(H5O_PLINE_ID, value) < 0)
diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c
index 94e0a12..4260492 100644
--- a/src/H5Pocpypl.c
+++ b/src/H5Pocpypl.c
@@ -238,7 +238,7 @@ H5P__copy_merge_comm_dt_list(H5O_copy_dtype_merge_list_t **value)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of merge committed dtype list */
src_dt_list = *value;
@@ -301,7 +301,7 @@ H5P__ocpy_merge_comm_dt_list_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATT
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of merge committed dtype list */
if (H5P__copy_merge_comm_dt_list((H5O_copy_dtype_merge_list_t **)value) < 0)
@@ -333,7 +333,7 @@ H5P__ocpy_merge_comm_dt_list_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATT
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of merge committed dtype list */
if (H5P__copy_merge_comm_dt_list((H5O_copy_dtype_merge_list_t **)value) < 0)
@@ -368,8 +368,8 @@ H5P__ocpy_merge_comm_dt_list_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt_list_ptr);
- HDassert(size);
+ assert(dt_list_ptr);
+ assert(size);
/* Iterate over merge committed dtype list */
dt_list = *dt_list_ptr;
@@ -429,9 +429,9 @@ H5P__ocpy_merge_comm_dt_list_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(pp);
- HDassert(*pp);
- HDassert(dt_list);
+ assert(pp);
+ assert(*pp);
+ assert(dt_list);
/* Start off with NULL (default value) */
*dt_list = NULL;
@@ -445,7 +445,7 @@ H5P__ocpy_merge_comm_dt_list_dec(const void **_pp, void *_value)
if (NULL == (tmp_dt_list->path = H5MM_strdup(*(const char **)pp)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed")
*pp += len + 1;
- HDassert(len == HDstrlen(tmp_dt_list->path));
+ assert(len == HDstrlen(tmp_dt_list->path));
/* Add copied node to dtype list */
if (dt_list_tail) {
@@ -497,7 +497,7 @@ H5P__ocpy_merge_comm_dt_list_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATT
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Free the merge named dtype list */
H5P__free_merge_comm_dtype_list(*(H5O_copy_dtype_merge_list_t **)value);
@@ -526,7 +526,7 @@ H5P__ocpy_merge_comm_dt_list_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATT
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(value);
+ assert(value);
/* Make copy of merge committed dtype list */
if (H5P__copy_merge_comm_dt_list((H5O_copy_dtype_merge_list_t **)value) < 0)
@@ -563,15 +563,15 @@ H5P__ocpy_merge_comm_dt_list_cmp(const void *_dt_list1, const void *_dt_list2, s
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(_dt_list1);
- HDassert(_dt_list2);
- HDassert(size == sizeof(H5O_copy_dtype_merge_list_t *));
+ assert(_dt_list1);
+ assert(_dt_list2);
+ assert(size == sizeof(H5O_copy_dtype_merge_list_t *));
/* Walk through the lists, comparing each path. For the lists to be the
* same, the paths must be in the same order. */
while (dt_list1 && dt_list2) {
- HDassert(dt_list1->path);
- HDassert(dt_list2->path);
+ assert(dt_list1->path);
+ assert(dt_list2->path);
/* Compare paths */
ret_value = HDstrcmp(dt_list1->path, dt_list2->path);
@@ -611,7 +611,7 @@ H5P__ocpy_merge_comm_dt_list_close(const char H5_ATTR_UNUSED *name, size_t H5_AT
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(value);
+ assert(value);
/* Free the merge named dtype list */
H5P__free_merge_comm_dtype_list(*(H5O_copy_dtype_merge_list_t **)value);
diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c
index e27de8c..d7fabff 100644
--- a/src/H5Pstrcpl.c
+++ b/src/H5Pstrcpl.c
@@ -222,8 +222,8 @@ H5P__strcrt_char_encoding_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(encoding);
- HDassert(size);
+ assert(encoding);
+ assert(size);
if (NULL != *pp)
/* Encode character set encoding */
@@ -259,9 +259,9 @@ H5P__strcrt_char_encoding_dec(const void **_pp, void *_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pp);
- HDassert(*pp);
- HDassert(encoding);
+ assert(pp);
+ assert(*pp);
+ assert(encoding);
/* Decode character set encoding */
*encoding = (H5T_cset_t) * (*pp)++;
diff --git a/src/H5R.c b/src/H5R.c
index f64141f..ce54bd2 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -146,7 +146,7 @@ H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_p
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token")
/* Create the reference (do not pass filename, since file_id is attached) */
- HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
+ memset(ref_ptr, 0, H5R_REF_BUF_SIZE);
if (H5R__create_object(&obj_token, cont_info.token_size, (H5R_ref_priv_t *)ref_ptr) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create object reference")
@@ -247,7 +247,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id,
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token")
/* Create the reference (do not pass filename, since file_id is attached) */
- HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
+ memset(ref_ptr, 0, H5R_REF_BUF_SIZE);
if (H5R__create_region((const H5O_token_t *)&obj_token, cont_info.token_size, space,
(H5R_ref_priv_t *)ref_ptr) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create region reference")
@@ -345,7 +345,7 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token")
/* Create the reference (do not pass filename, since file_id is attached) */
- HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
+ memset(ref_ptr, 0, H5R_REF_BUF_SIZE);
if (H5R__create_attr((const H5O_token_t *)&obj_token, cont_info.token_size, attr_name,
(H5R_ref_priv_t *)ref_ptr) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create attribute reference")
@@ -387,7 +387,7 @@ H5Rdestroy(H5R_ref_t *ref_ptr)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTFREE, FAIL, "unable to destroy reference")
/* Memset back to 0 for safety */
- HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
+ memset(ref_ptr, 0, H5R_REF_BUF_SIZE);
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5RS.c b/src/H5RS.c
index 13422a3..d9a4de3 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -110,7 +110,7 @@ H5RS__xstrdup(H5RS_str_t *rs, const char *s)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(rs);
+ assert(rs);
if (s) {
size_t len = HDstrlen(s);
@@ -124,7 +124,7 @@ H5RS__xstrdup(H5RS_str_t *rs, const char *s)
if (NULL == (rs->s = (char *)H5FL_BLK_MALLOC(str_buf, rs->max)))
HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, FAIL, "memory allocation failed")
if (len)
- HDmemcpy(rs->s, s, len);
+ memcpy(rs->s, s, len);
rs->end = rs->s + len;
*rs->end = '\0';
rs->len = len;
@@ -138,9 +138,9 @@ H5RS__xstrdup(H5RS_str_t *rs, const char *s)
} /* end if */
else {
/* Sanity checks */
- HDassert(NULL == rs->end);
- HDassert(0 == rs->max);
- HDassert(0 == rs->len);
+ assert(NULL == rs->end);
+ assert(0 == rs->max);
+ assert(0 == rs->len);
} /* end else */
} /* end else */
@@ -174,7 +174,7 @@ H5RS__prepare_for_append(H5RS_str_t *rs)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(rs);
+ assert(rs);
if (NULL == rs->s) {
rs->max = H5RS_ALLOC_SIZE;
@@ -226,7 +226,7 @@ H5RS__resize_for_append(H5RS_str_t *rs, size_t len)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(rs);
+ assert(rs);
/* Check if buffer should be re-allocated */
if (len >= (rs->max - rs->len)) {
@@ -365,24 +365,24 @@ H5RS_asprintf_cat(H5RS_str_t *rs, const char *fmt, ...)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(rs);
- HDassert(fmt);
+ assert(rs);
+ assert(fmt);
/* Prepare the [possibly wrapped or empty] ref-counted string for an append */
if (H5RS__prepare_for_append(rs) < 0)
HGOTO_ERROR(H5E_RS, H5E_CANTINIT, FAIL, "can't initialize ref-counted string")
/* Attempt to write formatted output into the managed string */
- HDva_start(args1, fmt);
- HDva_copy(args2, args1);
+ va_start(args1, fmt);
+ va_copy(args2, args1);
while ((out_len = (size_t)HDvsnprintf(rs->end, (rs->max - rs->len), fmt, args1)) >= (rs->max - rs->len)) {
/* Allocate a large enough buffer */
if (H5RS__resize_for_append(rs, out_len) < 0)
HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer")
/* Restart the va_list */
- HDva_end(args1);
- HDva_copy(args1, args2);
+ va_end(args1);
+ va_copy(args1, args2);
} /* end while */
/* Increment the size & end of the string */
@@ -390,8 +390,8 @@ H5RS_asprintf_cat(H5RS_str_t *rs, const char *fmt, ...)
rs->end += out_len;
/* Finish access to varargs */
- HDva_end(args1);
- HDva_end(args2);
+ va_end(args1);
+ va_end(args2);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -419,8 +419,8 @@ H5RS_acat(H5RS_str_t *rs, const char *s)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(rs);
- HDassert(s);
+ assert(rs);
+ assert(s);
/* Concatenate the provided string on to the managed string */
if (*s) {
@@ -436,7 +436,7 @@ H5RS_acat(H5RS_str_t *rs, const char *s)
HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer")
/* Append the string */
- HDmemcpy(rs->end, s, len);
+ memcpy(rs->end, s, len);
rs->end += len;
*rs->end = '\0';
rs->len += len;
@@ -468,8 +468,8 @@ H5RS_ancat(H5RS_str_t *rs, const char *s, size_t n)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(rs);
- HDassert(s);
+ assert(rs);
+ assert(s);
/* Concatenate the provided string on to the managed string */
if (n && *s) {
@@ -488,7 +488,7 @@ H5RS_ancat(H5RS_str_t *rs, const char *s, size_t n)
HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer")
/* Append the string */
- HDmemcpy(rs->end, s, n);
+ memcpy(rs->end, s, n);
rs->end += n;
*rs->end = '\0';
rs->len += n;
@@ -519,8 +519,8 @@ H5RS_aputc(H5RS_str_t *rs, int c)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(rs);
- HDassert(c);
+ assert(rs);
+ assert(c);
/* Allocate the underlying string, if necessary */
if (H5RS__prepare_for_append(rs) < 0)
@@ -565,8 +565,8 @@ H5RS_decr(H5RS_str_t *rs)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(rs);
- HDassert(rs->n > 0);
+ assert(rs);
+ assert(rs->n > 0);
/* Decrement reference count for string */
if ((--rs->n) == 0) {
@@ -604,8 +604,8 @@ H5RS_incr(H5RS_str_t *rs)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(rs);
- HDassert(rs->n > 0);
+ assert(rs);
+ assert(rs->n > 0);
/* If the ref-counted string started life as a wrapper around an existing
* string, duplicate the string now, so that the wrapped string can go out
@@ -684,10 +684,10 @@ H5RS_cmp(const H5RS_str_t *rs1, const H5RS_str_t *rs2)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(rs1);
- HDassert(rs1->s);
- HDassert(rs2);
- HDassert(rs2->s);
+ assert(rs1);
+ assert(rs1->s);
+ assert(rs2);
+ assert(rs2->s);
FUNC_LEAVE_NOAPI(HDstrcmp(rs1->s, rs2->s))
} /* end H5RS_cmp() */
@@ -716,8 +716,8 @@ H5RS_len(const H5RS_str_t *rs)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(rs);
- HDassert(rs->s);
+ assert(rs);
+ assert(rs->s);
FUNC_LEAVE_NOAPI(HDstrlen(rs->s))
} /* end H5RS_len() */
@@ -749,8 +749,8 @@ H5RS_get_str(const H5RS_str_t *rs)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(rs);
- HDassert(rs->s);
+ assert(rs);
+ assert(rs->s);
FUNC_LEAVE_NOAPI(rs->s)
} /* end H5RS_get_str() */
@@ -780,8 +780,8 @@ H5RS_get_count(const H5RS_str_t *rs)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(rs);
- HDassert(rs->n > 0);
+ assert(rs);
+ assert(rs->n > 0);
FUNC_LEAVE_NOAPI(rs->n)
} /* end H5RS_get_count() */
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index 0e1011f..b1daf26 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -107,7 +107,7 @@ H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -173,11 +173,11 @@ H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t t
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(obj_token);
- HDassert(token_size);
- HDassert(space);
- HDassert(nalloc);
+ assert(f);
+ assert(obj_token);
+ assert(token_size);
+ assert(space);
+ assert(nalloc);
/* Get required buffer size */
if (H5R__encode_heap(f, NULL, &buf_size, NULL, (size_t)0) < 0)
@@ -194,7 +194,7 @@ H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t t
/* Zero the heap ID out, may leak heap space if user is re-using
* reference and doesn't have garbage collection turned on
*/
- HDmemset(buf, 0, buf_size);
+ memset(buf, 0, buf_size);
/* Get the amount of space required to serialize the selection */
if ((data_size = H5S_SELECT_SERIAL_SIZE(space)) < 0)
@@ -412,7 +412,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -663,7 +663,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
"can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 7b22150..a14d4b3 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -91,10 +91,10 @@
#ifdef H5R_DEBUG
#define H5R_LOG_DEBUG(...) \
do { \
- HDfprintf(stdout, " # %s(): ", __func__); \
- HDfprintf(stdout, __VA_ARGS__); \
- HDfprintf(stdout, "\n"); \
- HDfflush(stdout); \
+ fprintf(stdout, " # %s(): ", __func__); \
+ fprintf(stdout, __VA_ARGS__); \
+ fprintf(stdout, "\n"); \
+ fflush(stdout); \
} while (0)
static const char *
H5R__print_token(const H5O_token_t token)
@@ -187,7 +187,7 @@ H5R__create_object(const H5O_token_t *obj_token, size_t token_size, H5R_ref_priv
FUNC_ENTER_PACKAGE
- HDassert(ref);
+ assert(ref);
/* Create new reference */
ref->info.obj.filename = NULL;
@@ -226,8 +226,8 @@ H5R__create_region(const H5O_token_t *obj_token, size_t token_size, H5S_t *space
FUNC_ENTER_PACKAGE
- HDassert(space);
- HDassert(ref);
+ assert(space);
+ assert(ref);
/* Create new reference */
ref->info.obj.filename = NULL;
@@ -275,8 +275,8 @@ H5R__create_attr(const H5O_token_t *obj_token, size_t token_size, const char *at
FUNC_ENTER_PACKAGE
- HDassert(attr_name);
- HDassert(ref);
+ assert(attr_name);
+ assert(ref);
/* Make sure that attribute name is not longer than supported encode size */
if (HDstrlen(attr_name) > H5R_MAX_STRING_LEN)
@@ -327,7 +327,7 @@ H5R__destroy(H5R_ref_priv_t *ref)
FUNC_ENTER_PACKAGE
- HDassert(ref != NULL);
+ assert(ref != NULL);
H5R_LOG_DEBUG("Destroying reference, filename=%s, obj_addr=%s, encode size=%u", ref->info.obj.filename,
H5R__print_token(ref->info.obj.token), ref->encode_size);
@@ -355,11 +355,11 @@ H5R__destroy(H5R_ref_priv_t *ref)
break;
case H5R_BADTYPE:
case H5R_MAXTYPE:
- HDassert("invalid reference type" && 0);
+ assert("invalid reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)")
default:
- HDassert("unknown reference type" && 0);
+ assert("unknown reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
@@ -395,8 +395,8 @@ H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref, hbool_t app_ref)
FUNC_ENTER_PACKAGE
- HDassert(ref != NULL);
- HDassert(id != H5I_INVALID_HID);
+ assert(ref != NULL);
+ assert(id != H5I_INVALID_HID);
/* If a location ID was previously assigned, decrement refcount and
* assign new one */
@@ -440,7 +440,7 @@ H5R__get_loc_id(const H5R_ref_priv_t *ref)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(ref != NULL);
+ assert(ref != NULL);
ret_value = ref->loc_id;
@@ -543,7 +543,7 @@ H5R__get_type(const H5R_ref_priv_t *ref)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(ref != NULL);
+ assert(ref != NULL);
ret_value = (H5R_type_t)ref->type;
FUNC_LEAVE_NOAPI(ret_value)
@@ -565,8 +565,8 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
FUNC_ENTER_PACKAGE
- HDassert(ref1 != NULL);
- HDassert(ref2 != NULL);
+ assert(ref1 != NULL);
+ assert(ref2 != NULL);
/* Compare reference types */
if (ref1->type != ref2->type)
@@ -575,7 +575,7 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
/* Compare object addresses */
if (ref1->token_size != ref2->token_size)
HGOTO_DONE(FALSE);
- if (0 != HDmemcmp(&ref1->info.obj.token, &ref2->info.obj.token, ref1->token_size))
+ if (0 != memcmp(&ref1->info.obj.token, &ref2->info.obj.token, ref1->token_size))
HGOTO_DONE(FALSE);
/* Compare filenames */
@@ -594,7 +594,7 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOMPARE, FAIL, "cannot compare dataspace extents")
break;
case H5R_ATTR:
- HDassert(ref1->info.attr.name && ref2->info.attr.name);
+ assert(ref1->info.attr.name && ref2->info.attr.name);
if (0 != HDstrcmp(ref1->info.attr.name, ref2->info.attr.name))
HGOTO_DONE(FALSE);
break;
@@ -602,10 +602,10 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
case H5R_DATASET_REGION1:
case H5R_BADTYPE:
case H5R_MAXTYPE:
- HDassert("invalid reference type" && 0);
+ assert("invalid reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)")
default:
- HDassert("unknown reference type" && 0);
+ assert("unknown reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
@@ -629,7 +629,7 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref)
FUNC_ENTER_PACKAGE
- HDassert((src_ref != NULL) && (dst_ref != NULL));
+ assert((src_ref != NULL) && (dst_ref != NULL));
H5MM_memcpy(&dst_ref->info.obj.token, &src_ref->info.obj.token, sizeof(H5O_token_t));
dst_ref->encode_size = src_ref->encode_size;
@@ -649,18 +649,18 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref)
break;
case H5R_OBJECT1:
case H5R_DATASET_REGION1:
- HDassert("invalid reference type" && 0);
+ assert("invalid reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)")
case H5R_BADTYPE:
case H5R_MAXTYPE:
default:
- HDassert("unknown reference type" && 0);
+ assert("unknown reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
/* We only need to keep a copy of the filename if we don't have the loc_id */
if (src_ref->loc_id == H5I_INVALID_HID) {
- HDassert(src_ref->info.obj.filename);
+ assert(src_ref->info.obj.filename);
if (NULL == (dst_ref->info.obj.filename = HDstrdup(src_ref->info.obj.filename)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy filename")
@@ -696,8 +696,8 @@ H5R__get_obj_token(const H5R_ref_priv_t *ref, H5O_token_t *obj_token, size_t *to
FUNC_ENTER_PACKAGE
- HDassert(ref != NULL);
- HDassert(ref->token_size <= H5O_MAX_TOKEN_SIZE);
+ assert(ref != NULL);
+ assert(ref->token_size <= H5O_MAX_TOKEN_SIZE);
if (obj_token) {
if (0 == ref->token_size)
@@ -727,13 +727,13 @@ H5R__set_obj_token(H5R_ref_priv_t *ref, const H5O_token_t *obj_token, size_t tok
FUNC_ENTER_PACKAGE_NOERR
- HDassert(ref != NULL);
- HDassert(obj_token);
- HDassert(token_size);
- HDassert(token_size <= H5O_MAX_TOKEN_SIZE);
+ assert(ref != NULL);
+ assert(obj_token);
+ assert(token_size);
+ assert(token_size <= H5O_MAX_TOKEN_SIZE);
H5MM_memcpy(&ref->info.obj.token, obj_token, token_size);
- HDassert(token_size <= 255);
+ assert(token_size <= 255);
ref->token_size = (uint8_t)token_size;
FUNC_LEAVE_NOAPI(ret_value)
@@ -757,9 +757,9 @@ H5R__get_region(const H5R_ref_priv_t *ref, H5S_t *space)
FUNC_ENTER_PACKAGE
- HDassert(ref != NULL);
- HDassert(ref->type == H5R_DATASET_REGION2);
- HDassert(space);
+ assert(ref != NULL);
+ assert(ref->type == H5R_DATASET_REGION2);
+ assert(space);
/* Copy reference selection to destination */
if (H5S_select_copy(space, ref->info.reg.space, FALSE) < 0)
@@ -788,7 +788,7 @@ H5R__get_file_name(const H5R_ref_priv_t *ref, char *buf, size_t size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(ref != NULL);
+ assert(ref != NULL);
/* Return if that reference has no filename set */
if (!ref->info.obj.filename)
@@ -796,7 +796,7 @@ H5R__get_file_name(const H5R_ref_priv_t *ref, char *buf, size_t size)
/* Get the file name length */
copy_len = HDstrlen(ref->info.obj.filename);
- HDassert(copy_len <= H5R_MAX_STRING_LEN);
+ assert(copy_len <= H5R_MAX_STRING_LEN);
/* Copy the file name */
if (buf) {
@@ -828,12 +828,12 @@ H5R__get_attr_name(const H5R_ref_priv_t *ref, char *buf, size_t size)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(ref != NULL);
- HDassert(ref->type == H5R_ATTR);
+ assert(ref != NULL);
+ assert(ref->type == H5R_ATTR);
/* Get the attribute name length */
attr_name_len = HDstrlen(ref->info.attr.name);
- HDassert(attr_name_len <= H5R_MAX_STRING_LEN);
+ assert(attr_name_len <= H5R_MAX_STRING_LEN);
/* Get the attribute name */
if (buf) {
@@ -866,8 +866,8 @@ H5R__encode(const char *filename, const H5R_ref_priv_t *ref, unsigned char *buf,
FUNC_ENTER_PACKAGE
- HDassert(ref);
- HDassert(nalloc);
+ assert(ref);
+ assert(nalloc);
/**
* Encoding format:
@@ -929,11 +929,11 @@ H5R__encode(const char *filename, const H5R_ref_priv_t *ref, unsigned char *buf,
case H5R_DATASET_REGION1:
case H5R_BADTYPE:
case H5R_MAXTYPE:
- HDassert("invalid reference type" && 0);
+ assert("invalid reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)")
default:
- HDassert("unknown reference type" && 0);
+ assert("unknown reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
@@ -966,9 +966,9 @@ H5R__decode(const unsigned char *buf, size_t *nbytes, H5R_ref_priv_t *ref)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(buf);
- HDassert(nbytes);
- HDassert(ref);
+ assert(buf);
+ assert(nbytes);
+ assert(ref);
/* Don't decode if buffer size isn't big enough */
buf_size = *nbytes;
@@ -1016,10 +1016,10 @@ H5R__decode(const unsigned char *buf, size_t *nbytes, H5R_ref_priv_t *ref)
case H5R_DATASET_REGION1:
case H5R_BADTYPE:
case H5R_MAXTYPE:
- HDassert("invalid reference type" && 0);
+ assert("invalid reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)")
default:
- HDassert("unknown reference type" && 0);
+ assert("unknown reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
@@ -1055,7 +1055,7 @@ H5R__encode_obj_token(const H5O_token_t *obj_token, size_t token_size, unsigned
FUNC_ENTER_PACKAGE_NOERR
- HDassert(nalloc);
+ assert(nalloc);
/* Don't encode if buffer size isn't big enough or buffer is empty */
if (buf && *nalloc >= token_size) {
@@ -1089,10 +1089,10 @@ H5R__decode_obj_token(const unsigned char *buf, size_t *nbytes, H5O_token_t *obj
FUNC_ENTER_PACKAGE
- HDassert(buf);
- HDassert(nbytes);
- HDassert(obj_token);
- HDassert(token_size);
+ assert(buf);
+ assert(nbytes);
+ assert(obj_token);
+ assert(token_size);
/* Don't decode if buffer size isn't big enough */
if (*nbytes < sizeof(uint8_t))
@@ -1104,7 +1104,7 @@ H5R__decode_obj_token(const unsigned char *buf, size_t *nbytes, H5O_token_t *obj
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Invalid token size (%u)", *token_size)
/* Make sure that token is initialized */
- HDmemset(obj_token, 0, sizeof(H5O_token_t));
+ memset(obj_token, 0, sizeof(H5O_token_t));
/* Decode token */
H5MM_memcpy(obj_token, p, *token_size);
@@ -1133,8 +1133,8 @@ H5R__encode_region(H5S_t *space, unsigned char *buf, size_t *nalloc)
FUNC_ENTER_PACKAGE
- HDassert(space);
- HDassert(nalloc);
+ assert(space);
+ assert(nalloc);
/* Get the amount of space required to serialize the selection */
if ((buf_size = H5S_SELECT_SERIAL_SIZE(space)) < 0)
@@ -1185,9 +1185,9 @@ H5R__decode_region(const unsigned char *buf, size_t *nbytes, H5S_t **space_ptr)
FUNC_ENTER_PACKAGE
- HDassert(buf);
- HDassert(nbytes);
- HDassert(space_ptr);
+ assert(buf);
+ assert(nbytes);
+ assert(space_ptr);
/* Don't decode if buffer size isn't big enough */
if (*nbytes < (2 * sizeof(uint32_t)))
@@ -1241,8 +1241,8 @@ H5R__encode_string(const char *string, unsigned char *buf, size_t *nalloc)
FUNC_ENTER_PACKAGE
- HDassert(string);
- HDassert(nalloc);
+ assert(string);
+ assert(nalloc);
/* Get the amount of space required to serialize the string */
string_len = HDstrlen(string);
@@ -1284,9 +1284,9 @@ H5R__decode_string(const unsigned char *buf, size_t *nbytes, char **string_ptr)
FUNC_ENTER_PACKAGE
- HDassert(buf);
- HDassert(nbytes);
- HDassert(string_ptr);
+ assert(buf);
+ assert(nbytes);
+ assert(string_ptr);
/* Don't decode if buffer size isn't big enough */
if (*nbytes < sizeof(uint16_t))
@@ -1294,7 +1294,7 @@ H5R__decode_string(const unsigned char *buf, size_t *nbytes, char **string_ptr)
/* Get the string length */
UINT16DECODE(p, string_len);
- HDassert(string_len <= H5R_MAX_STRING_LEN);
+ assert(string_len <= H5R_MAX_STRING_LEN);
/* Allocate the string */
if (NULL == (string = (char *)H5MM_malloc(string_len + 1)))
@@ -1328,8 +1328,8 @@ H5R__encode_heap(H5F_t *f, unsigned char *buf, size_t *nalloc, const unsigned ch
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(nalloc);
+ assert(f);
+ assert(nalloc);
buf_size = H5HG_HEAP_ID_SIZE(f);
if (buf && *nalloc >= buf_size) {
@@ -1370,10 +1370,10 @@ H5R__decode_heap(H5F_t *f, const unsigned char *buf, size_t *nbytes, unsigned ch
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(buf);
- HDassert(nbytes);
- HDassert(data_ptr);
+ assert(f);
+ assert(buf);
+ assert(nbytes);
+ assert(data_ptr);
buf_size = H5HG_HEAP_ID_SIZE(f);
/* Don't decode if buffer size isn't big enough */
@@ -1413,9 +1413,9 @@ H5R__encode_token_obj_compat(const H5O_token_t *obj_token, size_t token_size, un
FUNC_ENTER_PACKAGE_NOERR
- HDassert(obj_token);
- HDassert(token_size);
- HDassert(nalloc);
+ assert(obj_token);
+ assert(token_size);
+ assert(nalloc);
/* Don't encode if buffer size isn't big enough or buffer is empty */
if (buf && *nalloc >= token_size)
@@ -1443,10 +1443,10 @@ H5R__decode_token_obj_compat(const unsigned char *buf, size_t *nbytes, H5O_token
FUNC_ENTER_PACKAGE
- HDassert(buf);
- HDassert(nbytes);
- HDassert(obj_token);
- HDassert(token_size);
+ assert(buf);
+ assert(nbytes);
+ assert(obj_token);
+ assert(token_size);
/* Don't decode if buffer size isn't big enough */
if (*nbytes < token_size)
@@ -1484,10 +1484,10 @@ H5R__decode_token_region_compat(H5F_t *f, const unsigned char *buf, size_t *nbyt
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(buf);
- HDassert(nbytes);
- HDassert(token_size);
+ assert(f);
+ assert(buf);
+ assert(nbytes);
+ assert(token_size);
/* Read from heap */
if (H5R__decode_heap(f, buf, nbytes, &data, &data_size) < 0)
diff --git a/src/H5S.c b/src/H5S.c
index b0f9dbf..4293ca9 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -186,8 +186,8 @@ H5S_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
- HDassert(0 == H5I_nmembers(H5I_DATASPACE));
- HDassert(0 == H5I_nmembers(H5I_SPACE_SEL_ITER));
+ assert(0 == H5I_nmembers(H5I_DATASPACE));
+ assert(0 == H5I_nmembers(H5I_SPACE_SEL_ITER));
/* Destroy the dataspace object id group */
n += (H5I_dec_type_ref(H5I_DATASPACE) > 0);
@@ -219,7 +219,7 @@ H5S__close_cb(void *_space, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(space);
+ assert(space);
/* Close the dataspace object */
if (H5S_close(space) < 0)
@@ -280,7 +280,7 @@ H5S_create(H5S_class_t type)
case H5S_NO_CLASS:
default:
- HDassert("unknown dataspace (extent) type" && 0);
+ assert("unknown dataspace (extent) type" && 0);
break;
} /* end switch */
@@ -369,7 +369,7 @@ H5S__extent_release(H5S_extent_t *extent)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(extent);
+ assert(extent);
/* Release extent */
if (extent->type == H5S_SIMPLE) {
@@ -404,7 +404,7 @@ H5S_close(H5S_t *ds)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(ds);
+ assert(ds);
/* Release selection (this should come before the extent release) */
if (H5S_SELECT_RELEASE(ds) < 0)
@@ -556,8 +556,8 @@ H5S_extent_copy(H5S_t *dst, const H5S_t *src)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dst);
- HDassert(src);
+ assert(dst);
+ assert(src);
/* Copy extent */
if (H5S__extent_copy_real(&(dst->extent), &(src->extent), TRUE) < 0)
@@ -629,7 +629,7 @@ H5S__extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_m
case H5S_NO_CLASS:
default:
- HDassert("unknown dataspace type" && 0);
+ assert("unknown dataspace type" && 0);
break;
} /* end switch */
@@ -716,7 +716,7 @@ H5S_get_simple_extent_npoints(const H5S_t *ds)
FUNC_ENTER_NOAPI_NOERR
/* check args */
- HDassert(ds);
+ assert(ds);
/* Get the number of elements in extent */
ret_value = (hssize_t)ds->extent.nelem;
@@ -783,7 +783,7 @@ H5S_get_npoints_max(const H5S_t *ds)
FUNC_ENTER_NOAPI(0)
/* check args */
- HDassert(ds);
+ assert(ds);
switch (H5S_GET_EXTENT_TYPE(ds)) {
case H5S_NULL:
@@ -812,7 +812,7 @@ H5S_get_npoints_max(const H5S_t *ds)
case H5S_NO_CLASS:
default:
- HDassert("unknown dataspace class" && 0);
+ assert("unknown dataspace class" && 0);
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, 0, "internal error (unknown dataspace class)")
}
@@ -879,7 +879,7 @@ H5S_get_simple_extent_ndims(const H5S_t *ds)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(ds);
+ assert(ds);
switch (H5S_GET_EXTENT_TYPE(ds)) {
case H5S_NULL:
@@ -890,7 +890,7 @@ H5S_get_simple_extent_ndims(const H5S_t *ds)
case H5S_NO_CLASS:
default:
- HDassert("unknown dataspace class" && 0);
+ assert("unknown dataspace class" && 0);
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "internal error (unknown dataspace class)")
} /* end switch */
@@ -956,7 +956,7 @@ H5S_extent_get_dims(const H5S_extent_t *ext, hsize_t dims[], hsize_t max_dims[])
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(ext);
+ assert(ext);
switch (ext->type) {
case H5S_NULL:
@@ -980,7 +980,7 @@ H5S_extent_get_dims(const H5S_extent_t *ext, hsize_t dims[], hsize_t max_dims[])
case H5S_NO_CLASS:
default:
- HDassert("unknown dataspace class" && 0);
+ assert("unknown dataspace class" && 0);
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "internal error (unknown dataspace class)")
} /* end switch */
@@ -1010,7 +1010,7 @@ H5S_get_simple_extent_dims(const H5S_t *ds, hsize_t dims[], hsize_t max_dims[])
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(ds);
+ assert(ds);
/* Get dims for extent */
if ((ret_value = H5S_extent_get_dims(&ds->extent, dims, max_dims)) < 0)
@@ -1040,10 +1040,10 @@ H5S_write(H5F_t *f, H5O_t *oh, unsigned update_flags, H5S_t *ds)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(oh);
- HDassert(ds);
- HDassert(H5S_GET_EXTENT_TYPE(ds) >= 0);
+ assert(f);
+ assert(oh);
+ assert(ds);
+ assert(H5S_GET_EXTENT_TYPE(ds) >= 0);
/* Write the current dataspace extent to the dataspace message */
if (H5O_msg_write_oh(f, oh, H5O_SDSPACE_ID, 0, update_flags, &(ds->extent)) < 0)
@@ -1072,10 +1072,10 @@ H5S_append(H5F_t *f, H5O_t *oh, H5S_t *ds)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(f);
- HDassert(oh);
- HDassert(ds);
- HDassert(H5S_GET_EXTENT_TYPE(ds) >= 0);
+ assert(f);
+ assert(oh);
+ assert(ds);
+ assert(H5S_GET_EXTENT_TYPE(ds) >= 0);
/* Add the dataspace message to the object header */
if (H5O_msg_append_oh(f, oh, H5O_SDSPACE_ID, 0, 0, &(ds->extent)) < 0)
@@ -1108,7 +1108,7 @@ H5S_read(const H5O_loc_t *loc)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(loc);
+ assert(loc);
if (NULL == (ds = H5FL_CALLOC(H5S_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -1153,7 +1153,7 @@ H5S__is_simple(const H5S_t *sdim)
FUNC_ENTER_PACKAGE_NOERR
/* Check args and all the boring stuff. */
- HDassert(sdim);
+ assert(sdim);
/* H5S_NULL shouldn't be simple dataspace */
ret_value =
@@ -1281,7 +1281,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, const hs
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(rank <= H5S_MAX_RANK);
+ assert(rank <= H5S_MAX_RANK);
/* shift out of the previous state to a "simple" dataspace. */
if (H5S__extent_release(&space->extent) < 0)
@@ -1321,7 +1321,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, const hs
/* Selection related cleanup */
/* Set offset to zeros */
- HDmemset(space->select.offset, 0, sizeof(hsize_t) * space->extent.rank);
+ memset(space->select.offset, 0, sizeof(hsize_t) * space->extent.rank);
space->select.offset_changed = FALSE;
/* If the selection is 'all', update the number of elements selected */
@@ -1422,7 +1422,7 @@ H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/], const hsize_t max
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(rank <= H5S_MAX_RANK);
+ assert(rank <= H5S_MAX_RANK);
/* Create the space and set the extent */
if (NULL == (ret_value = H5S_create(H5S_SIMPLE)))
@@ -1696,7 +1696,7 @@ H5S_get_simple_extent_type(const H5S_t *space)
FUNC_ENTER_NOAPI_NOERR
- HDassert(space);
+ assert(space);
ret_value = H5S_GET_EXTENT_TYPE(space);
@@ -1794,8 +1794,8 @@ H5S_set_extent(H5S_t *space, const hsize_t *size)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space && H5S_SIMPLE == H5S_GET_EXTENT_TYPE(space));
- HDassert(size);
+ assert(space && H5S_SIMPLE == H5S_GET_EXTENT_TYPE(space));
+ assert(size);
/* Verify that the dimensions being changed are allowed to change */
for (u = 0; u < space->extent.rank; u++)
@@ -1841,7 +1841,7 @@ H5S_has_extent(const H5S_t *ds)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(ds);
+ assert(ds);
if (0 == ds->extent.rank && 0 == ds->extent.nelem && H5S_NULL != ds->extent.type)
ret_value = FALSE;
@@ -1874,8 +1874,8 @@ H5S_set_extent_real(H5S_t *space, const hsize_t *size)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space && H5S_SIMPLE == H5S_GET_EXTENT_TYPE(space));
- HDassert(size);
+ assert(space && H5S_SIMPLE == H5S_GET_EXTENT_TYPE(space));
+ assert(size);
/* Change the dataspace size & re-compute the number of elements in the extent */
for (u = 0, nelem = 1; u < space->extent.rank; u++) {
@@ -1956,8 +1956,8 @@ H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(ds1);
- HDassert(ds2);
+ assert(ds1);
+ assert(ds2);
/* Make certain the dataspaces are the same type */
if (ds1->extent.type != ds2->extent.type)
@@ -1969,8 +1969,8 @@ H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2)
/* Make certain the dataspaces' current dimensions are the same size */
if (ds1->extent.rank > 0) {
- HDassert(ds1->extent.size);
- HDassert(ds2->extent.size);
+ assert(ds1->extent.size);
+ assert(ds2->extent.size);
for (u = 0; u < ds1->extent.rank; u++)
if (ds1->extent.size[u] != ds2->extent.size[u])
HGOTO_DONE(FALSE)
@@ -2012,7 +2012,7 @@ H5S_extent_nelem(const H5S_extent_t *ext)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(ext);
+ assert(ext);
/* Return the number of elements in extent */
FUNC_LEAVE_NOAPI(ext->nelem)
@@ -2038,8 +2038,8 @@ H5S_set_version(H5F_t *f, H5S_t *ds)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(ds);
+ assert(f);
+ assert(ds);
/* Upgrade to the version indicated by the file's low bound if higher */
version = MAX(ds->extent.version, H5O_sdspace_ver_bounds[H5F_LOW_BOUND(f)]);
diff --git a/src/H5SL.c b/src/H5SL.c
index 11ccb9f..a65a144 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -158,17 +158,17 @@
/* Check if we need to increase allocation of forward pointers */ \
if (LVL + 1 >= ((size_t)1) << X->log_nalloc) { \
H5SL_node_t **_tmp; \
- HDassert(LVL + 1 == ((size_t)1) << X->log_nalloc); \
+ assert(LVL + 1 == ((size_t)1) << X->log_nalloc); \
/* Double the amount of allocated space */ \
X->log_nalloc++; \
\
/* Check if we need to create a new factory */ \
if (X->log_nalloc >= H5SL_fac_nused_g) { \
- HDassert(X->log_nalloc == H5SL_fac_nused_g); \
+ assert(X->log_nalloc == H5SL_fac_nused_g); \
\
/* Check if we need to allocate space for the factory pointer*/ \
if (H5SL_fac_nused_g >= H5SL_fac_nalloc_g) { \
- HDassert(H5SL_fac_nused_g == H5SL_fac_nalloc_g); \
+ assert(H5SL_fac_nused_g == H5SL_fac_nalloc_g); \
/* Double the size of the array of factory pointers */ \
H5SL_fac_nalloc_g *= 2; \
if (NULL == (H5SL_fac_g = (H5FL_fac_head_t **)H5MM_realloc( \
@@ -200,7 +200,7 @@
/* Check if we can reduce the allocation of forward pointers */ \
if (LVL <= ((size_t)1) << (X->log_nalloc - 1)) { \
H5SL_node_t **_tmp; \
- HDassert(LVL == ((size_t)1) << (X->log_nalloc - 1)); \
+ assert(LVL == ((size_t)1) << (X->log_nalloc - 1)); \
X->log_nalloc--; \
\
/* Allocate space for new forward pointers */ \
@@ -224,14 +224,14 @@
H5SL_GROW(X, _lvl, ERR); \
\
if (_lvl == (size_t)SLIST->curr_level) { \
- HDassert(PREV == SLIST->header); \
+ assert(PREV == SLIST->header); \
/* Grow the head */ \
H5SL_GROW(PREV, _lvl, ERR) \
SLIST->curr_level++; \
X->forward[_lvl + 1] = NULL; \
} \
else { \
- HDassert(_lvl < (size_t)SLIST->curr_level); \
+ assert(_lvl < (size_t)SLIST->curr_level); \
X->forward[_lvl + 1] = PREV->forward[_lvl + 1]; \
} \
PREV->forward[_lvl + 1] = X; \
@@ -243,7 +243,7 @@
{ \
size_t _lvl = X->level; \
\
- HDassert(PREV->forward[_lvl] == X); \
+ assert(PREV->forward[_lvl] == X); \
PREV->forward[_lvl] = X->forward[_lvl]; \
H5SL_SHRINK(X, _lvl); \
}
@@ -287,12 +287,12 @@
} \
X = X->forward[_i]; \
} \
- HDassert(!_drop->forward[_i] || \
- !H5_GLUE3(H5SL_LOCATE_, CMP, _CMP)(SLIST, TYPE, _drop->forward[_i], KEY, HASHVAL)); \
+ assert(!_drop->forward[_i] || \
+ !H5_GLUE3(H5SL_LOCATE_, CMP, _CMP)(SLIST, TYPE, _drop->forward[_i], KEY, HASHVAL)); \
\
/* Promote the middle node if necessary */ \
if (_count == 3) { \
- HDassert(X == _last->forward[_i]->forward[_i]); \
+ assert(X == _last->forward[_i]->forward[_i]); \
H5SL_PROMOTE(SLIST, X, _last, NULL) \
} \
\
@@ -351,7 +351,7 @@
/* If we have already found the node to drop into and there */ \
/* is more than one node in this gap, we can stop searching */ \
if (_drop) { \
- HDassert(_count >= 1); \
+ assert(_count >= 1); \
_count = 2; \
break; \
} \
@@ -378,9 +378,9 @@
} \
X = X->forward[_i]; \
} \
- HDassert(_count >= 1 && _count <= 3); \
- HDassert(!_drop->forward[_i] || \
- !H5_GLUE3(H5SL_LOCATE_, CMP, _CMP)(SLIST, TYPE, _drop->forward[_i], KEY, HASHVAL)); \
+ assert(_count >= 1 && _count <= 3); \
+ assert(!_drop->forward[_i] || \
+ !H5_GLUE3(H5SL_LOCATE_, CMP, _CMP)(SLIST, TYPE, _drop->forward[_i], KEY, HASHVAL)); \
\
/* Check if we need to adjust node heights */ \
if (_count == 1) { \
@@ -402,8 +402,8 @@
} \
else if (!_head->forward[_i + 1]) { \
/* shrink the header */ \
- HDassert(_i == SLIST->curr_level - 1); \
- HDassert((size_t)SLIST->curr_level == _head->level); \
+ assert(_i == SLIST->curr_level - 1); \
+ assert((size_t)SLIST->curr_level == _head->level); \
\
H5SL_SHRINK(_head, (size_t)(_i + 1)) \
SLIST->curr_level--; \
@@ -417,7 +417,7 @@
X = _llast->forward[_i]; \
for (_count = 1; _count < 3 && X->forward[_i] != _last; _count++) \
X = X->forward[_i]; \
- HDassert(X->forward[_i] == _last); \
+ assert(X->forward[_i] == _last); \
\
/* Demote the separator node */ \
H5SL_DEMOTE(_last, _llast) \
@@ -427,8 +427,8 @@
H5SL_PROMOTE(SLIST, X, _llast, NULL) \
else if (!_head->forward[_i + 1]) { \
/* shrink the header */ \
- HDassert(_i == SLIST->curr_level - 1); \
- HDassert((size_t)SLIST->curr_level == _head->level); \
+ assert(_i == SLIST->curr_level - 1); \
+ assert((size_t)SLIST->curr_level == _head->level); \
\
H5SL_SHRINK(_head, (size_t)(_i + 1)) \
SLIST->curr_level--; \
@@ -455,7 +455,7 @@
_next->item = X->item; \
_next->hashval = X->hashval; \
} \
- HDassert(!X->level); \
+ assert(!X->level); \
\
/* Remove the node */ \
X->backward->forward[0] = X->forward[0]; \
@@ -538,12 +538,12 @@ H5SL_init(void)
/* Allocate space for array of factories */
H5SL_fac_g = (H5FL_fac_head_t **)H5MM_malloc(sizeof(H5FL_fac_head_t *));
- HDassert(H5SL_fac_g);
+ assert(H5SL_fac_g);
H5SL_fac_nalloc_g = 1;
/* Initialize first factory */
H5SL_fac_g[0] = H5FL_fac_init(sizeof(H5SL_node_t *));
- HDassert(H5SL_fac_g[0]);
+ assert(H5SL_fac_g[0]);
H5SL_fac_nused_g = 1;
FUNC_LEAVE_NOAPI(ret_value)
@@ -582,7 +582,7 @@ H5SL_term_package(void)
for (i = 0; i < H5SL_fac_nused_g; i++) {
ret = H5FL_fac_term(H5SL_fac_g[i]);
- HDassert(ret >= 0);
+ assert(ret >= 0);
}
H5SL_fac_nused_g = 0;
@@ -680,8 +680,8 @@ H5SL__insert_common(H5SL_t *slist, void *item, const void *key)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -730,7 +730,7 @@ H5SL__insert_common(H5SL_t *slist, void *item, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* 'key' must not have been found in existing list, if we get here */
@@ -749,7 +749,7 @@ H5SL__insert_common(H5SL_t *slist, void *item, const void *key)
if (x->forward[0])
x->forward[0]->backward = x;
else {
- HDassert(slist->last == prev);
+ assert(slist->last == prev);
slist->last = x;
}
@@ -796,7 +796,7 @@ H5SL__release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -874,7 +874,7 @@ H5SL__close_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -922,7 +922,7 @@ H5SL_create(H5SL_type_t type, H5SL_cmp_t cmp)
FUNC_ENTER_NOAPI(NULL)
/* Check args */
- HDassert(type >= H5SL_TYPE_INT && type <= H5SL_TYPE_GENERIC);
+ assert(type >= H5SL_TYPE_INT && type <= H5SL_TYPE_GENERIC);
/* Allocate skip list structure */
if (NULL == (new_slist = H5FL_MALLOC(H5SL_t)))
@@ -930,7 +930,7 @@ H5SL_create(H5SL_type_t type, H5SL_cmp_t cmp)
/* Set the static internal fields */
new_slist->type = type;
- HDassert((type == H5SL_TYPE_GENERIC) == !!cmp);
+ assert((type == H5SL_TYPE_GENERIC) == !!cmp);
new_slist->cmp = cmp;
/* Set the dynamic internal fields */
@@ -988,7 +988,7 @@ H5SL_count(H5SL_t *slist)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1025,8 +1025,8 @@ H5SL_insert(H5SL_t *slist, void *item, const void *key)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1071,8 +1071,8 @@ H5SL_add(H5SL_t *slist, void *item, const void *key)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1114,8 +1114,8 @@ H5SL_remove(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1164,7 +1164,7 @@ H5SL_remove(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
done:
@@ -1202,7 +1202,7 @@ H5SL_remove_first(H5SL_t *slist)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Assign level */
H5_CHECK_OVERFLOW(slist->curr_level, int, size_t);
@@ -1218,8 +1218,8 @@ H5SL_remove_first(H5SL_t *slist)
/* Assign return value */
ret_value = tmp->item;
- HDassert(level == head->level);
- HDassert(0 == tmp->level);
+ assert(level == head->level);
+ assert(0 == tmp->level);
/* Remove the first node */
head->forward[0] = tmp->forward[0];
@@ -1235,14 +1235,14 @@ H5SL_remove_first(H5SL_t *slist)
/* Reshape the skip list as necessary to maintain 1-2-3 condition */
for (i = 0; i < level; i++) {
next = head->forward[i + 1];
- HDassert(next);
+ assert(next);
/* Check if head->forward[i] == head->forward[i+1] (illegal) */
if (head->forward[i] == next) {
tmp = next;
next = next->forward[i + 1];
- HDassert(tmp->level == i + 1);
+ assert(tmp->level == i + 1);
/* Demote head->forward[i] */
H5SL_DEMOTE(tmp, head)
@@ -1250,8 +1250,8 @@ H5SL_remove_first(H5SL_t *slist)
/* Check if we need to promote the following node to maintain
* 1-2-3 condition */
if (tmp->forward[i]->forward[i] != next) {
- HDassert(tmp->forward[i]->forward[i]->forward[i] == next ||
- tmp->forward[i]->forward[i]->forward[i]->forward[i] == next);
+ assert(tmp->forward[i]->forward[i]->forward[i] == next ||
+ tmp->forward[i]->forward[i]->forward[i]->forward[i] == next);
tmp = tmp->forward[i];
H5SL_PROMOTE(slist, tmp, head, NULL);
/* In this case, since there is a node of height = i+1 here
@@ -1261,7 +1261,7 @@ H5SL_remove_first(H5SL_t *slist)
}
else if (!head->forward[i + 1]) {
/* We just shrunk the largest node, shrink the header */
- HDassert(i == level - 1);
+ assert(i == level - 1);
H5SL_SHRINK(head, level)
slist->curr_level--;
@@ -1305,8 +1305,8 @@ H5SL_search(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1355,7 +1355,7 @@ H5SL_search(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* 'key' must not have been found in list, if we get here */
@@ -1397,8 +1397,8 @@ H5SL_less(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1447,7 +1447,7 @@ H5SL_less(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* An exact match for 'key' must not have been found in list, if we get here */
@@ -1502,8 +1502,8 @@ H5SL_greater(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1552,7 +1552,7 @@ H5SL_greater(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* An exact match for 'key' must not have been found in list, if we get here */
@@ -1597,8 +1597,8 @@ H5SL_find(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1647,7 +1647,7 @@ H5SL_find(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* 'key' must not have been found in list, if we get here */
@@ -1689,8 +1689,8 @@ H5SL_below(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1739,7 +1739,7 @@ H5SL_below(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* An exact match for 'key' must not have been found in list, if we get here */
@@ -1794,8 +1794,8 @@ H5SL_above(H5SL_t *slist, const void *key)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
- HDassert(key);
+ assert(slist);
+ assert(key);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1844,7 +1844,7 @@ H5SL_above(H5SL_t *slist, const void *key)
break;
default:
- HDassert(0 && "Unknown skiplist type!");
+ assert(0 && "Unknown skiplist type!");
}
/* An exact match for 'key' must not have been found in list, if we get here */
@@ -1883,7 +1883,7 @@ H5SL_first(H5SL_t *slist)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1916,7 +1916,7 @@ H5SL_next(H5SL_node_t *slist_node)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist_node);
+ assert(slist_node);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1949,7 +1949,7 @@ H5SL_prev(H5SL_node_t *slist_node)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist_node);
+ assert(slist_node);
/* Check internal consistency */
/* (Pre-condition) */
@@ -1983,7 +1983,7 @@ H5SL_last(H5SL_t *slist)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -2016,7 +2016,7 @@ H5SL_item(H5SL_node_t *slist_node)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist_node);
+ assert(slist_node);
/* Check internal consistency */
/* (Pre-condition) */
@@ -2067,7 +2067,7 @@ H5SL_iterate(H5SL_t *slist, H5SL_operator_t op, void *op_data)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -2125,7 +2125,7 @@ H5SL_release(H5SL_t *slist)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -2174,7 +2174,7 @@ H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -2221,7 +2221,7 @@ H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
@@ -2261,7 +2261,7 @@ H5SL_close(H5SL_t *slist)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(slist);
+ assert(slist);
/* Check internal consistency */
/* (Pre-condition) */
diff --git a/src/H5SM.c b/src/H5SM.c
index b481134..a2ced45 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -120,9 +120,9 @@ H5SM_init(H5F_t *f, H5P_genplist_t *fc_plist, const H5O_loc_t *ext_loc)
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
- HDassert(f);
+ assert(f);
/* File should not already have a SOHM table */
- HDassert(!H5F_addr_defined(H5F_SOHM_ADDR(f)));
+ assert(!H5F_addr_defined(H5F_SOHM_ADDR(f)));
/* Set the ring type in the DXPL */
H5AC_set_ring(H5AC_RING_USER, &orig_ring);
@@ -159,15 +159,15 @@ H5SM_init(H5F_t *f, H5P_genplist_t *fc_plist, const H5O_loc_t *ext_loc)
/* Check that number of indexes in table and in superblock make sense.
* Right now we just use one byte to hold the number of indexes.
*/
- HDassert(table->num_indexes < 256);
+ assert(table->num_indexes < 256);
/* Check that list and btree cutoffs make sense. There can't be any
* values greater than the list max but less than the btree min; the
* list max has to be greater than or equal to one less than the btree
* min.
*/
- HDassert(list_max + 1 >= btree_min);
- HDassert(table->num_indexes > 0 && table->num_indexes <= H5O_SHMESG_MAX_NINDEXES);
+ assert(list_max + 1 >= btree_min);
+ assert(table->num_indexes > 0 && table->num_indexes <= H5O_SHMESG_MAX_NINDEXES);
/* Allocate the SOHM indexes as an array. */
if (NULL == (table->indexes =
@@ -404,8 +404,8 @@ H5SM_get_fheap_addr(H5F_t *f, unsigned type_id, haddr_t *fheap_addr)
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
/* Sanity checks */
- HDassert(f);
- HDassert(fheap_addr);
+ assert(f);
+ assert(fheap_addr);
/* Set up user data for callback */
cache_udata.f = f;
@@ -453,9 +453,9 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(header);
- HDassert(header->index_addr == HADDR_UNDEF);
- HDassert(header->btree_min <= header->list_max + 1);
+ assert(header);
+ assert(header->index_addr == HADDR_UNDEF);
+ assert(header->btree_min <= header->list_max + 1);
/* In most cases, the index starts as a list */
if (header->list_max > 0) {
@@ -493,7 +493,7 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header)
} /* end else */
/* Create a heap to hold the shared messages that the list or B-tree will index */
- HDmemset(&fheap_cparam, 0, sizeof(fheap_cparam));
+ memset(&fheap_cparam, 0, sizeof(fheap_cparam));
fheap_cparam.managed.width = H5O_FHEAP_MAN_WIDTH;
fheap_cparam.managed.start_block_size = H5O_FHEAP_MAN_START_BLOCK_SIZE;
fheap_cparam.managed.max_direct_size = H5O_FHEAP_MAN_MAX_DIRECT_SIZE;
@@ -515,7 +515,7 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header)
/* 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")
- HDassert(fheap_id_len == H5O_FHEAP_ID_LEN);
+ assert(fheap_id_len == H5O_FHEAP_ID_LEN);
}
#endif /* NDEBUG */
@@ -566,8 +566,8 @@ H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, hbool_t delete_heap)
/* If the index list is in the cache, expunge it now */
if (index_status & H5AC_ES__IN_CACHE) {
/* Sanity checks on index list */
- HDassert(!(index_status & H5AC_ES__IS_PINNED));
- HDassert(!(index_status & H5AC_ES__IS_PROTECTED));
+ assert(!(index_status & H5AC_ES__IS_PINNED));
+ assert(!(index_status & H5AC_ES__IS_PROTECTED));
/* Evict the index list from the metadata cache */
if (H5AC_expunge_entry(f, H5AC_SOHM_LIST, header->index_addr, H5AC__FREE_FILE_SPACE_FLAG) < 0)
@@ -575,7 +575,7 @@ H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, hbool_t delete_heap)
} /* end if */
} /* end if */
else {
- HDassert(header->index_type == H5SM_BTREE);
+ assert(header->index_type == H5SM_BTREE);
/* Delete the B-tree. */
if (H5B2_delete(f, header->index_addr, f, NULL, NULL) < 0)
@@ -627,8 +627,8 @@ H5SM__create_list(H5F_t *f, H5SM_index_header_t *header)
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(header);
+ assert(f);
+ assert(header);
num_entries = header->list_max;
@@ -707,8 +707,8 @@ H5SM__convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header, H5SM_list_t *
FUNC_ENTER_PACKAGE
- HDassert(_list && *_list);
- HDassert(header);
+ assert(_list && *_list);
+ assert(header);
/* Get pointer to list of messages to convert */
list = *_list;
@@ -810,16 +810,16 @@ H5SM__bt2_convert_to_list_op(const void *record, void *op_data)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(record);
- HDassert(op_data);
+ assert(record);
+ assert(op_data);
/* Get the message index, and increment the # of messages in list */
mesg_idx = list->header->num_messages++;
- HDassert(list->header->num_messages <= list->header->list_max);
+ assert(list->header->num_messages <= list->header->list_max);
/* Insert this message at the end of the list */
- HDassert(list->messages[mesg_idx].location == H5SM_NO_LOC);
- HDassert(message->location != H5SM_NO_LOC);
+ assert(list->messages[mesg_idx].location == H5SM_NO_LOC);
+ assert(message->location != H5SM_NO_LOC);
H5MM_memcpy(&(list->messages[mesg_idx]), message, sizeof(H5SM_sohm_t));
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1139,19 +1139,19 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id,
if (((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_HERE)
*mesg_flags |= H5O_MSG_FLAG_SHAREABLE;
else {
- HDassert(((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_SOHM);
+ assert(((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_SOHM);
*mesg_flags |= H5O_MSG_FLAG_SHARED;
} /* end else */
} /* end if */
done:
- HDassert((ret_value != TRUE) || ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_HERE ||
- ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_SOHM);
+ assert((ret_value != TRUE) || ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_HERE ||
+ ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_SOHM);
#ifndef NDEBUG
/* If we previously deferred this operation, make sure the saved message
* type is the same as the one we get here. */
if (defer_flags & H5SM_WAS_DEFERRED)
- HDassert(deferred_type == ((H5O_shared_t *)mesg)->type);
+ assert(deferred_type == ((H5O_shared_t *)mesg)->type);
#endif /* NDEBUG */
/* Release the master SOHM table */
@@ -1187,15 +1187,15 @@ H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed)
FUNC_ENTER_PACKAGE
- HDassert(record);
- HDassert(op_data);
- HDassert(changed);
+ assert(record);
+ assert(op_data);
+ assert(changed);
/* If the message was previously shared in an object header, share
* it in the heap now.
*/
if (message->location == H5SM_IN_OH) {
- HDassert(op_data->key && op_data->key->fheap);
+ assert(op_data->key && op_data->key->fheap);
/* Put the message in the heap and record its new heap ID */
if (H5HF_insert(op_data->key->fheap, op_data->key->encoding_size, op_data->key->encoding,
@@ -1206,7 +1206,7 @@ H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed)
message->u.heap_loc.ref_count = 2;
} /* end if */
else {
- HDassert(message->location == H5SM_IN_HEAP);
+ assert(message->location == H5SM_IN_HEAP);
/* If it's already in the heap, just increment the ref count */
++message->u.heap_loc.ref_count;
} /* end else */
@@ -1273,9 +1273,9 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(header);
- HDassert(header->index_type != H5SM_BADTYPE);
- HDassert(cache_flags_ptr);
+ assert(header);
+ assert(header->index_type != H5SM_BADTYPE);
+ assert(cache_flags_ptr);
/* Encode the message to be written */
if ((buf_size = H5O_msg_raw_size(f, type_id, TRUE, mesg)) == 0)
@@ -1341,7 +1341,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
} /* end if */
else {
/* If the message was already in the heap, increase its ref count */
- HDassert(list->messages[list_pos].location == H5SM_IN_HEAP);
+ assert(list->messages[list_pos].location == H5SM_IN_HEAP);
++(list->messages[list_pos].u.heap_loc.ref_count);
} /* end else */
@@ -1353,7 +1353,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
} /* end if */
/* Index is a B-tree */
else {
- HDassert(header->index_type == H5SM_BTREE);
+ assert(header->index_type == H5SM_BTREE);
/* Open the index v2 B-tree */
if (NULL == (bt2 = H5B2_open(f, header->index_addr, f)))
@@ -1402,7 +1402,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
* shared message is serialized. -QAK
*/
if (defer)
- HDmemset(&shared.u, 0, sizeof(shared.u));
+ memset(&shared.u, 0, sizeof(shared.u));
#endif /* H5_USING_MEMCHECKER */
} /* end if */
else {
@@ -1487,13 +1487,13 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to find empty entry in list")
}
/* Insert message into list */
- HDassert(list->messages[empty_pos].location == H5SM_NO_LOC);
- HDassert(key.message.location != H5SM_NO_LOC);
+ assert(list->messages[empty_pos].location == H5SM_NO_LOC);
+ assert(key.message.location != H5SM_NO_LOC);
list->messages[empty_pos] = key.message;
} /* end if */
/* Index is a B-tree */
else {
- HDassert(header->index_type == H5SM_BTREE);
+ assert(header->index_type == H5SM_BTREE);
/* Open the index v2 B-tree, if it isn't already */
if (NULL == bt2) {
@@ -1570,9 +1570,9 @@ H5SM_delete(H5F_t *f, H5O_t *open_oh, H5O_shared_t *sh_mesg)
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
- HDassert(f);
- HDassert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
- HDassert(sh_mesg);
+ assert(f);
+ assert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
+ assert(sh_mesg);
/* Get message type */
type_id = sh_mesg->msg_type_id;
@@ -1665,9 +1665,9 @@ H5SM__find_in_list(const H5SM_list_t *list, const H5SM_mesg_key_t *key, size_t *
FUNC_ENTER_PACKAGE
- HDassert(list);
+ assert(list);
/* Both key and empty_pos can be NULL, but not both! */
- HDassert(key || empty_pos);
+ assert(key || empty_pos);
/* Initialize empty_pos to an invalid value */
if (empty_pos)
@@ -1730,9 +1730,9 @@ H5SM__decr_ref(void *record, void *op_data, hbool_t *changed)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(record);
- HDassert(op_data);
- HDassert(changed);
+ assert(record);
+ assert(op_data);
+ assert(changed);
/* Adjust the message's reference count if it's stored in the heap.
* Messages stored in object headers always have refcounts of 1,
@@ -1784,11 +1784,11 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(header);
- HDassert(mesg);
- HDassert(cache_flags);
- HDassert(*encoded_mesg == NULL);
+ assert(f);
+ assert(header);
+ assert(mesg);
+ assert(cache_flags);
+ assert(*encoded_mesg == NULL);
/* Get the message type for later */
type_id = mesg->msg_type_id;
@@ -1851,7 +1851,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c
} /* end if */
else {
/* Index is a B-tree */
- HDassert(header->index_type == H5SM_BTREE);
+ assert(header->index_type == H5SM_BTREE);
/* Open the index v2 B-tree */
if (NULL == (bt2 = H5B2_open(f, header->index_addr, f)))
@@ -1910,7 +1910,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c
HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to release SOHM list")
list = NULL;
- HDassert(fheap);
+ assert(fheap);
if (H5HF_close(fheap) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close fractal heap")
fheap = NULL;
@@ -1976,9 +1976,9 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist)
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
/* Sanity check */
- HDassert(ext_loc);
- HDassert(f);
- HDassert(fc_plist);
+ assert(ext_loc);
+ assert(f);
+ assert(fc_plist);
/* Check for the extension having a 'shared message info' message */
if ((status = H5O_msg_exists(ext_loc, H5O_SHMESG_ID)) < 0)
@@ -1996,15 +1996,15 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist)
HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "shared message info message not present")
/* Portably initialize the arrays */
- HDmemset(index_flags, 0, sizeof(index_flags));
- HDmemset(minsizes, 0, sizeof(minsizes));
+ memset(index_flags, 0, sizeof(index_flags));
+ memset(minsizes, 0, sizeof(minsizes));
/* Set SOHM info from file */
H5F_SET_SOHM_ADDR(f, sohm_table.addr);
H5F_SET_SOHM_VERS(f, sohm_table.version);
H5F_SET_SOHM_NINDEXES(f, sohm_table.nindexes);
- HDassert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
- HDassert(H5F_SOHM_NINDEXES(f) > 0 && H5F_SOHM_NINDEXES(f) <= H5O_SHMESG_MAX_NINDEXES);
+ assert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
+ assert(H5F_SOHM_NINDEXES(f) > 0 && H5F_SOHM_NINDEXES(f) <= H5O_SHMESG_MAX_NINDEXES);
/* Set up user data for callback */
cache_udata.f = f;
@@ -2028,8 +2028,8 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist)
minsizes[u] = (unsigned)table->indexes[u].min_mesg_size;
/* Sanity check */
- HDassert(sohm_l2b == table->indexes[u].list_max);
- HDassert(sohm_b2l == table->indexes[u].btree_min);
+ assert(sohm_l2b == table->indexes[u].list_max);
+ assert(sohm_b2l == table->indexes[u].btree_min);
/* Check for sharing attributes in this file, which means that creation
* indices must be tracked on object header message in the file.
@@ -2094,7 +2094,7 @@ H5SM_reconstitute(H5O_shared_t *sh_mesg, H5F_t *f, unsigned msg_type_id, H5O_fhe
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check args */
- HDassert(sh_mesg);
+ assert(sh_mesg);
/* Set flag for shared message */
sh_mesg->type = H5O_SHARE_TYPE_SOHM;
@@ -2128,8 +2128,8 @@ H5SM__get_refcount_bt2_cb(const void *_record, void *_op_data)
/*
* Check arguments.
*/
- HDassert(record);
- HDassert(op_data);
+ assert(record);
+ assert(op_data);
/* Make a copy of the record */
*op_data = *record;
@@ -2168,9 +2168,9 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
FUNC_ENTER_NOAPI_NOINIT_TAG(H5AC__SOHM_TAG)
/* Sanity check */
- HDassert(f);
- HDassert(sh_mesg);
- HDassert(ref_count);
+ assert(f);
+ assert(sh_mesg);
+ assert(ref_count);
/* Set up user data for callback */
tbl_cache_udata.f = f;
@@ -2232,7 +2232,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
hbool_t msg_exists; /* Whether the message exists in the v2 B-tree */
/* Index is a B-tree */
- HDassert(header->index_type == H5SM_BTREE);
+ assert(header->index_type == H5SM_BTREE);
/* Open the index v2 B-tree */
if (NULL == (bt2 = H5B2_open(f, header->index_addr, f)))
@@ -2247,7 +2247,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
} /* end else */
/* Set the refcount for the message */
- HDassert(message.location == H5SM_IN_HEAP);
+ assert(message.location == H5SM_IN_HEAP);
*ref_count = message.u.heap_loc.ref_count;
done:
@@ -2296,10 +2296,10 @@ H5SM__read_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
/*
* Check arguments.
*/
- HDassert(oh);
- HDassert(mesg);
- HDassert(udata);
- HDassert(NULL == udata->encoding_buf);
+ assert(oh);
+ assert(mesg);
+ assert(udata);
+ assert(NULL == udata->encoding_buf);
/* Check the creation index for this message */
if (sequence == udata->idx) {
@@ -2310,7 +2310,7 @@ H5SM__read_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
/* Get the message's encoded size */
udata->buf_size = mesg->raw_size;
- HDassert(udata->buf_size);
+ assert(udata->buf_size);
/* Allocate buffer to return the message in */
if (NULL == (udata->encoding_buf = H5MM_malloc(udata->buf_size)))
@@ -2385,9 +2385,9 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh
FUNC_ENTER_PACKAGE
- HDassert(f);
- HDassert(mesg);
- HDassert(fheap);
+ assert(f);
+ assert(mesg);
+ assert(fheap);
/* Set up user data for message iteration */
udata.file = f;
@@ -2404,7 +2404,7 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh
H5O_mesg_operator_t op; /* Wrapper for operator */
type = H5O_msg_class_g[mesg->msg_type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Reset object location for operation */
if (H5O_loc_reset(&oloc) < 0)
@@ -2431,14 +2431,14 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh
HGOTO_ERROR(H5E_SOHM, H5E_BADITER, FAIL, "unable to iterate over object header messages")
} /* end if */
else {
- HDassert(mesg->location == H5SM_IN_HEAP);
+ assert(mesg->location == H5SM_IN_HEAP);
/* Copy the message from the heap */
if (H5HF_op(fheap, &(mesg->u.heap_loc.fheap_id), H5SM__read_mesg_fh_cb, &udata) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, FAIL, "can't read message from fractal heap.")
} /* end else */
- HDassert(udata.encoding_buf);
- HDassert(udata.buf_size);
+ assert(udata.encoding_buf);
+ assert(udata.buf_size);
/* Record the returned values */
*encoded_mesg = udata.encoding_buf;
@@ -2478,8 +2478,8 @@ H5SM__table_free(H5SM_master_table_t *table)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(table);
- HDassert(table->indexes);
+ assert(table);
+ assert(table->indexes);
table->indexes = H5FL_ARR_FREE(H5SM_index_header_t, table->indexes);
@@ -2505,8 +2505,8 @@ H5SM__list_free(H5SM_list_t *list)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(list);
- HDassert(list->messages);
+ assert(list);
+ assert(list->messages);
list->messages = H5FL_ARR_FREE(H5SM_sohm_t, list->messages);
@@ -2541,11 +2541,11 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, int fwi
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
- HDassert(f);
- HDassert(table_addr != HADDR_UNDEF);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(table_addr != HADDR_UNDEF);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* If table_vers and num_indexes are UINT_MAX, replace them with values from
* userblock
@@ -2553,11 +2553,11 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, int fwi
if (table_vers == UINT_MAX)
table_vers = H5F_SOHM_VERS(f);
else if (table_vers != H5F_SOHM_VERS(f))
- HDfprintf(stream, "*** SOHM TABLE VERSION DOESN'T MATCH VERSION IN SUPERBLOCK!\n");
+ fprintf(stream, "*** SOHM TABLE VERSION DOESN'T MATCH VERSION IN SUPERBLOCK!\n");
if (num_indexes == UINT_MAX)
num_indexes = H5F_SOHM_NINDEXES(f);
else if (num_indexes != H5F_SOHM_NINDEXES(f))
- HDfprintf(stream, "*** NUMBER OF SOHM INDEXES DOESN'T MATCH VALUE IN SUPERBLOCK!\n");
+ fprintf(stream, "*** NUMBER OF SOHM INDEXES DOESN'T MATCH VALUE IN SUPERBLOCK!\n");
/* Check arguments. Version must be 0, the only version implemented so far */
if (table_vers > HDF5_SHAREDHEADER_VERSION)
@@ -2574,28 +2574,28 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, int fwi
H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
- HDfprintf(stream, "%*sShared Message Master Table...\n", indent, "");
+ fprintf(stream, "%*sShared Message Master Table...\n", indent, "");
for (x = 0; x < num_indexes; ++x) {
- HDfprintf(stream, "%*sIndex %d...\n", indent, "", x);
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "SOHM Index Type:",
- (table->indexes[x].index_type == H5SM_LIST
- ? "List"
- : (table->indexes[x].index_type == H5SM_BTREE ? "B-Tree" : "Unknown")));
-
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
- "Address of index:", table->indexes[x].index_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
- "Address of index's heap:", table->indexes[x].heap_addr);
- HDfprintf(stream, "%*s%-*s 0x%08x\n", indent + 3, "", fwidth,
- "Message type flags:", table->indexes[x].mesg_types);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
- "Minimum size of messages:", table->indexes[x].min_mesg_size);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
- "Number of messages:", table->indexes[x].num_messages);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
- "Maximum list size:", table->indexes[x].list_max);
- HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
- "Minimum B-tree size:", table->indexes[x].btree_min);
+ fprintf(stream, "%*sIndex %d...\n", indent, "", x);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "SOHM Index Type:",
+ (table->indexes[x].index_type == H5SM_LIST
+ ? "List"
+ : (table->indexes[x].index_type == H5SM_BTREE ? "B-Tree" : "Unknown")));
+
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
+ "Address of index:", table->indexes[x].index_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
+ "Address of index's heap:", table->indexes[x].heap_addr);
+ fprintf(stream, "%*s%-*s 0x%08x\n", indent + 3, "", fwidth,
+ "Message type flags:", table->indexes[x].mesg_types);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
+ "Minimum size of messages:", table->indexes[x].min_mesg_size);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
+ "Number of messages:", table->indexes[x].num_messages);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
+ "Maximum list size:", table->indexes[x].list_max);
+ fprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth,
+ "Minimum B-tree size:", table->indexes[x].btree_min);
} /* end for */
done:
@@ -2633,11 +2633,11 @@ H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, int fwidt
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
- HDassert(f);
- HDassert(list_addr != HADDR_UNDEF);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
+ assert(f);
+ assert(list_addr != HADDR_UNDEF);
+ assert(stream);
+ assert(indent >= 0);
+ assert(fwidth >= 0);
/* Set up user data for callback */
tbl_cache_udata.f = f;
@@ -2673,31 +2673,31 @@ H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, int fwidt
if (NULL == (fh = H5HF_open(f, table->indexes[index_num].heap_addr)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open SOHM heap")
- HDfprintf(stream, "%*sShared Message List Index...\n", indent, "");
+ fprintf(stream, "%*sShared Message List Index...\n", indent, "");
for (x = 0; x < table->indexes[index_num].num_messages; ++x) {
- HDfprintf(stream, "%*sShared Object Header Message %d...\n", indent, "", x);
- HDfprintf(stream, "%*s%-*s %08lu\n", indent + 3, "", fwidth,
- "Hash value:", (unsigned long)list->messages[x].hash);
+ fprintf(stream, "%*sShared Object Header Message %d...\n", indent, "", x);
+ fprintf(stream, "%*s%-*s %08lu\n", indent + 3, "", fwidth,
+ "Hash value:", (unsigned long)list->messages[x].hash);
if (list->messages[x].location == H5SM_IN_HEAP) {
- HDassert(fh);
+ assert(fh);
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in heap");
- HDfprintf(stream, "%*s%-*s 0x%" PRIx64 "\n", indent + 3, "", fwidth,
- "Heap ID:", list->messages[x].u.heap_loc.fheap_id.val);
- HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", fwidth,
- "Reference count:", list->messages[x].u.heap_loc.ref_count);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in heap");
+ fprintf(stream, "%*s%-*s 0x%" PRIx64 "\n", indent + 3, "", fwidth,
+ "Heap ID:", list->messages[x].u.heap_loc.fheap_id.val);
+ fprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", fwidth,
+ "Reference count:", list->messages[x].u.heap_loc.ref_count);
} /* end if */
else if (list->messages[x].location == H5SM_IN_OH) {
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in object header");
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
- "Object header address:", list->messages[x].u.mesg_loc.oh_addr);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
- "Message creation index:", list->messages[x].u.mesg_loc.oh_addr);
- HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth,
- "Message type ID:", list->messages[x].msg_type_id);
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in object header");
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
+ "Object header address:", list->messages[x].u.mesg_loc.oh_addr);
+ fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth,
+ "Message creation index:", list->messages[x].u.mesg_loc.oh_addr);
+ fprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth,
+ "Message type ID:", list->messages[x].msg_type_id);
} /* end if */
else
- HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "invalid");
+ fprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "invalid");
} /* end for */
done:
@@ -2740,10 +2740,10 @@ H5SM_ih_size(H5F_t *f, hsize_t *hdr_size, H5_ih_info_t *ih_info)
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
- HDassert(hdr_size);
- HDassert(ih_info);
+ assert(f);
+ assert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
+ assert(hdr_size);
+ assert(ih_info);
/* Set up user data for callback */
cache_udata.f = f;
@@ -2775,7 +2775,7 @@ H5SM_ih_size(H5F_t *f, hsize_t *hdr_size, H5_ih_info_t *ih_info)
} /* end if */
} /* end if */
else {
- HDassert(table->indexes[u].index_type == H5SM_LIST);
+ assert(table->indexes[u].index_type == H5SM_LIST);
ih_info->index_size += table->indexes[u].list_size;
} /* end else */
diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c
index 15b0125..461fdcf 100644
--- a/src/H5SMbtree2.c
+++ b/src/H5SMbtree2.c
@@ -92,7 +92,7 @@ H5SM__bt2_crt_context(void *_f)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
+ assert(f);
/* Allocate callback context */
if (NULL == (ctx = H5FL_MALLOC(H5SM_bt2_ctx_t)))
@@ -129,7 +129,7 @@ H5SM__bt2_dst_context(void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
/* Release callback context */
ctx = H5FL_FREE(H5SM_bt2_ctx_t, ctx);
@@ -186,14 +186,14 @@ H5SM__bt2_debug(FILE *stream, int indent, int fwidth, const void *record, const
FUNC_ENTER_PACKAGE_NOERR
if (sohm->location == H5SM_IN_HEAP)
- HDfprintf(stream, "%*s%-*s {%" PRIu64 ", %" PRIo32 ", %" PRIxHSIZE "}\n", indent, "", fwidth,
- "Shared Message in heap:", sohm->u.heap_loc.fheap_id.val, sohm->hash,
- sohm->u.heap_loc.ref_count);
+ fprintf(stream, "%*s%-*s {%" PRIu64 ", %" PRIo32 ", %" PRIxHSIZE "}\n", indent, "", fwidth,
+ "Shared Message in heap:", sohm->u.heap_loc.fheap_id.val, sohm->hash,
+ sohm->u.heap_loc.ref_count);
else {
- HDassert(sohm->location == H5SM_IN_OH);
- HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIo32 ", %x, %" PRIx32 "}\n", indent, "", fwidth,
- "Shared Message in OH:", sohm->u.mesg_loc.oh_addr, sohm->hash, sohm->msg_type_id,
- sohm->u.mesg_loc.index);
+ assert(sohm->location == H5SM_IN_OH);
+ fprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIo32 ", %x, %" PRIx32 "}\n", indent, "", fwidth,
+ "Shared Message in OH:", sohm->u.mesg_loc.oh_addr, sohm->hash, sohm->msg_type_id,
+ sohm->u.mesg_loc.index);
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 64d34c8..694a82f 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -134,9 +134,9 @@ H5SM__cache_table_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->f);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->f);
+ assert(image_len);
/* Set the image length size */
*image_len = H5SM_TABLE_SIZE(udata->f);
@@ -168,7 +168,7 @@ H5SM__cache_table_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -210,17 +210,17 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(udata->f);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(udata->f);
f = udata->f;
- HDassert(dirty);
+ assert(dirty);
/* Verify that we're reading version 0 of the table; this is the only
* version defined so far.
*/
- HDassert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION);
+ assert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION);
/* Allocate space for the master table in memory */
if (NULL == (table = H5FL_CALLOC(H5SM_master_table_t)))
@@ -228,16 +228,16 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
/* Read number of indexes and version from file superblock */
table->num_indexes = H5F_SOHM_NINDEXES(f);
- HDassert(table->num_indexes > 0);
+ assert(table->num_indexes > 0);
/* Compute the size of the SOHM table header on disk. This is the "table"
* itself plus each index within the table
*/
table->table_size = H5SM_TABLE_SIZE(f);
- HDassert(table->table_size == len);
+ assert(table->table_size == len);
/* Check magic number */
- if (HDmemcmp(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM table signature")
image += H5_SIZEOF_MAGIC;
@@ -286,7 +286,7 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == table->table_size);
+ assert((size_t)(image - (const uint8_t *)_image) == table->table_size);
/* Set return value */
ret_value = table;
@@ -323,10 +323,10 @@ H5SM__cache_table_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(table);
- HDassert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(table->cache_info.type == H5AC_SOHM_TABLE);
- HDassert(image_len);
+ assert(table);
+ assert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(table->cache_info.type == H5AC_SOHM_TABLE);
+ assert(image_len);
*image_len = table->table_size;
@@ -358,17 +358,17 @@ H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(table);
- HDassert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(table->cache_info.type == H5AC_SOHM_TABLE);
- HDassert(table->table_size == len);
+ assert(f);
+ assert(image);
+ assert(table);
+ assert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(table->cache_info.type == H5AC_SOHM_TABLE);
+ assert(table->table_size == len);
/* Verify that we're writing version 0 of the table; this is the only
* version defined so far.
*/
- HDassert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION);
+ assert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION);
/* Encode magic number */
H5MM_memcpy(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -409,7 +409,7 @@ H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_
UINT32ENCODE(image, computed_chksum);
/* sanity check */
- HDassert((size_t)(image - ((uint8_t *)_image)) == table->table_size);
+ assert((size_t)(image - ((uint8_t *)_image)) == table->table_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SM__cache_table_serialize() */
@@ -444,9 +444,9 @@ H5SM__cache_table_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(table);
- HDassert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(table->cache_info.type == H5AC_SOHM_TABLE);
+ assert(table);
+ assert(table->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(table->cache_info.type == H5AC_SOHM_TABLE);
/* Destroy Shared Object Header Message table */
if (H5SM__table_free(table) < 0)
@@ -479,10 +479,10 @@ H5SM__cache_list_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(udata);
- HDassert(udata->header);
- HDassert(udata->header->list_size > 0);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->header);
+ assert(udata->header->list_size > 0);
+ assert(image_len);
/* Set the image length size */
*image_len = udata->header->list_size;
@@ -516,8 +516,8 @@ H5SM__cache_list_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
/* Exact size with checksum at the end */
chk_size = H5SM_LIST_SIZE(udata->f, udata->header->num_messages);
@@ -561,17 +561,17 @@ H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED le
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(udata->header);
- HDassert(udata->header->list_size == len);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(udata->header);
+ assert(udata->header->list_size == len);
+ assert(dirty);
/* Allocate space for the SOHM list data structure */
if (NULL == (list = H5FL_MALLOC(H5SM_list_t)))
HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed")
- HDmemset(&list->cache_info, 0, sizeof(H5AC_info_t));
+ memset(&list->cache_info, 0, sizeof(H5AC_info_t));
/* Allocate list in memory as an array*/
if (NULL == (list->messages = (H5SM_sohm_t *)H5FL_ARR_MALLOC(H5SM_sohm_t, udata->header->list_max)))
@@ -579,7 +579,7 @@ H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED le
list->header = udata->header;
/* Check magic number */
- if (HDmemcmp(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
+ if (memcmp(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM list signature")
image += H5_SIZEOF_MAGIC;
@@ -598,7 +598,7 @@ H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED le
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) <= udata->header->list_size);
+ assert((size_t)(image - (const uint8_t *)_image) <= udata->header->list_size);
/* Initialize the rest of the array */
for (u = udata->header->num_messages; u < udata->header->list_max; u++)
@@ -638,11 +638,11 @@ H5SM__cache_list_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(list);
- HDassert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(list->cache_info.type == H5AC_SOHM_LIST);
- HDassert(list->header);
- HDassert(image_len);
+ assert(list);
+ assert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(list->cache_info.type == H5AC_SOHM_LIST);
+ assert(list->header);
+ assert(image_len);
*image_len = list->header->list_size;
@@ -677,13 +677,13 @@ H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_U
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(f);
- HDassert(image);
- HDassert(list);
- HDassert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(list->cache_info.type == H5AC_SOHM_LIST);
- HDassert(list->header);
- HDassert(list->header->list_size == len);
+ assert(f);
+ assert(image);
+ assert(list);
+ assert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ assert(list->cache_info.type == H5AC_SOHM_LIST);
+ assert(list->header);
+ assert(list->header->list_size == len);
/* Encode magic number */
H5MM_memcpy(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -702,17 +702,17 @@ H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_U
} /* end if */
} /* end for */
- HDassert(mesgs_serialized == list->header->num_messages);
+ assert(mesgs_serialized == list->header->num_messages);
/* Compute checksum on buffer */
computed_chksum = H5_checksum_metadata(_image, (size_t)(image - (uint8_t *)_image), 0);
UINT32ENCODE(image, computed_chksum);
/* sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) <= list->header->list_size);
+ assert((size_t)(image - (uint8_t *)_image) <= list->header->list_size);
/* Clear memory */
- HDmemset(image, 0, (list->header->list_size - (size_t)(image - (uint8_t *)_image)));
+ memset(image, 0, (list->header->list_size - (size_t)(image - (uint8_t *)_image)));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -748,9 +748,9 @@ H5SM__cache_list_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(list);
- HDassert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert(list->cache_info.type == H5AC_SOHM_LIST);
+ assert(list);
+ assert(list->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ assert(list->cache_info.type == H5AC_SOHM_LIST);
/* Destroy Shared Object Header Message list */
if (H5SM__list_free(list) < 0)
diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c
index 4714b52..b8b55e5 100644
--- a/src/H5SMmessage.c
+++ b/src/H5SMmessage.c
@@ -90,7 +90,7 @@ H5SM__compare_cb(const void *obj, size_t obj_len, void *_udata)
udata->ret = -1;
else
/* Sizes are the same. Return result of memcmp */
- udata->ret = HDmemcmp(udata->key->encoding, obj, obj_len);
+ udata->ret = memcmp(udata->key->encoding, obj, obj_len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SM__compare_cb() */
@@ -123,16 +123,16 @@ H5SM__compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
/*
* Check arguments.
*/
- HDassert(oh);
- HDassert(mesg);
- HDassert(udata && udata->key);
+ assert(oh);
+ assert(mesg);
+ assert(udata && udata->key);
/* Check the creation index for this message */
if (sequence == udata->idx) {
size_t aligned_encoded_size = H5O_ALIGN_OH(oh, udata->key->encoding_size);
/* Sanity check the message's length */
- HDassert(mesg->raw_size > 0);
+ assert(mesg->raw_size > 0);
if (aligned_encoded_size > mesg->raw_size)
udata->ret = 1;
@@ -145,8 +145,8 @@ H5SM__compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
HGOTO_ERROR(H5E_SOHM, H5E_CANTENCODE, H5_ITER_ERROR,
"unable to encode object header message")
- HDassert(udata->key->encoding_size <= mesg->raw_size);
- udata->ret = HDmemcmp(udata->key->encoding, mesg->raw, udata->key->encoding_size);
+ assert(udata->key->encoding_size <= mesg->raw_size);
+ udata->ret = memcmp(udata->key->encoding, mesg->raw, udata->key->encoding_size);
} /* end else */
/* Indicate that we found the message we were looking for */
@@ -215,8 +215,8 @@ H5SM__message_compare(const void *rec1, const void *rec2, int *result)
*/
H5SM_compare_udata_t udata;
- HDassert(key->message.hash == mesg->hash);
- HDassert(key->encoding_size > 0 && key->encoding);
+ assert(key->message.hash == mesg->hash);
+ assert(key->encoding_size > 0 && key->encoding);
/* Set up user data for callback */
udata.key = key;
@@ -234,8 +234,8 @@ H5SM__message_compare(const void *rec1, const void *rec2, int *result)
H5O_mesg_operator_t op; /* Message operator */
/* Sanity checks */
- HDassert(key->file);
- HDassert(mesg->location == H5SM_IN_OH);
+ assert(key->file);
+ assert(mesg->location == H5SM_IN_OH);
/* Reset the object location */
if (H5O_loc_reset(&oloc) < 0)
@@ -284,7 +284,7 @@ H5SM__message_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(ctx);
+ assert(ctx);
*raw++ = (uint8_t)message->location;
UINT32ENCODE(raw, message->hash);
@@ -294,7 +294,7 @@ H5SM__message_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
H5MM_memcpy(raw, message->u.heap_loc.fheap_id.id, (size_t)H5O_FHEAP_ID_LEN);
} /* end if */
else {
- HDassert(message->location == H5SM_IN_OH);
+ assert(message->location == H5SM_IN_OH);
*raw++ = 0; /* reserved (possible flags byte) */
*raw++ = (uint8_t)message->msg_type_id;
@@ -334,7 +334,7 @@ H5SM__message_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
H5MM_memcpy(message->u.heap_loc.fheap_id.id, raw, (size_t)H5O_FHEAP_ID_LEN);
} /* end if */
else {
- HDassert(message->location == H5SM_IN_OH);
+ assert(message->location == H5SM_IN_OH);
raw++; /* reserved */
message->msg_type_id = *raw++;
diff --git a/src/H5SMtest.c b/src/H5SMtest.c
index 72f6547..66c3f79 100644
--- a/src/H5SMtest.c
+++ b/src/H5SMtest.c
@@ -72,8 +72,8 @@ H5SM__get_mesg_count_test(H5F_t *f, unsigned type_id, size_t *mesg_count)
FUNC_ENTER_PACKAGE_TAG(H5AC__SOHM_TAG)
/* Sanity check */
- HDassert(f);
- HDassert(mesg_count);
+ assert(f);
+ assert(mesg_count);
/* Check for shared messages being enabled */
if (H5F_addr_defined(H5F_SOHM_ADDR(f))) {
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 7f5633f..a5d86ae 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -148,8 +148,8 @@ H5S__all_iter_init(H5S_t H5_ATTR_UNUSED *space, H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
- HDassert(iter);
+ assert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
+ assert(iter);
/* Start at the upper left location */
iter->u.all.elmt_offset = 0;
@@ -182,8 +182,8 @@ H5S__all_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(iter);
- HDassert(coords);
+ assert(iter);
+ assert(coords);
/* Calculate the coordinates for the current iterator offset */
if (H5VM_array_calc(iter->u.all.elmt_offset, iter->rank, iter->dims, coords) < 0)
@@ -214,9 +214,9 @@ H5S__all_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(start);
- HDassert(end);
+ assert(iter);
+ assert(start);
+ assert(end);
for (u = 0; u < iter->rank; u++) {
/* Set the start of the 'all' block */
@@ -249,7 +249,7 @@ H5S__all_iter_nelmts(const H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(iter->elmt_left)
} /* end H5S__all_iter_nelmts() */
@@ -277,7 +277,7 @@ H5S__all_iter_has_next_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(FALSE)
} /* end H5S__all_iter_has_next_block() */
@@ -306,8 +306,8 @@ H5S__all_iter_next(H5S_sel_iter_t *iter, size_t nelem)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(nelem > 0);
+ assert(iter);
+ assert(nelem > 0);
/* Increment the iterator */
iter->u.all.elmt_offset += nelem;
@@ -339,7 +339,7 @@ H5S__all_iter_next_block(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__all_iter_next_block() */
@@ -382,18 +382,18 @@ H5S__all_iter_get_seq_list(H5S_sel_iter_t *iter, size_t H5_ATTR_UNUSED maxseq, s
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* Determine the actual number of elements to use */
H5_CHECK_OVERFLOW(iter->elmt_left, hsize_t, size_t);
elem_used = MIN(maxelem, (size_t)iter->elmt_left);
- HDassert(elem_used > 0);
+ assert(elem_used > 0);
/* Compute the offset in the dataset */
off[0] = iter->u.all.byte_offset;
@@ -436,7 +436,7 @@ H5S__all_iter_release(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__all_iter_release() */
@@ -464,7 +464,7 @@ H5S__all_release(H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
/* Reset the number of elements in the selection */
space->select.num_elem = 0;
@@ -497,8 +497,8 @@ H5S__all_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSE
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
/* Set number of elements in selection */
dst->select.num_elem = (hsize_t)H5S_GET_EXTENT_NPOINTS(dst);
@@ -531,7 +531,7 @@ H5S__all_is_valid(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__all_is_valid() */
@@ -560,7 +560,7 @@ H5S__all_serial_size(H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* Basic number of bytes required to serialize point selection:
* <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
@@ -598,9 +598,9 @@ H5S__all_serialize(H5S_t *space, uint8_t **p)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(p);
- HDassert(pp);
+ assert(space);
+ assert(p);
+ assert(pp);
/* Store the preamble information */
UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */
@@ -646,8 +646,8 @@ H5S__all_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hboo
const uint8_t *p_end = *p + p_size - 1; /* Pointer to last valid byte in buffer */
FUNC_ENTER_PACKAGE
- HDassert(p);
- HDassert(*p);
+ assert(p);
+ assert(*p);
/* As part of the efforts to push all selection-type specific coding
to the callbacks, the coding for the allocation of a null dataspace
@@ -725,9 +725,9 @@ H5S__all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(start);
+ assert(end);
/* Get the dataspace extent rank */
rank = space->extent.rank;
@@ -766,8 +766,8 @@ H5S__all_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* 'All' selections always start at offset 0 */
*offset = 0;
@@ -827,7 +827,7 @@ H5S__all_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__all_is_contiguous() */
@@ -855,7 +855,7 @@ H5S__all_is_single(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__all_is_single() */
@@ -885,7 +885,7 @@ H5S__all_is_regular(H5S_t H5_ATTR_UNUSED *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__all_is_regular() */
@@ -919,8 +919,8 @@ H5S__all_shape_same(H5S_t *space1, H5S_t *space2)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space1);
- HDassert(space2);
+ assert(space1);
+ assert(space2);
/* Initialize dataspace dims */
space1_dim = (int)space1->extent.rank - 1;
@@ -979,10 +979,10 @@ H5S__all_intersect_block(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUS
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(space);
- HDassert(H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
+ assert(start);
+ assert(end);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__all_intersect_block() */
@@ -1011,8 +1011,8 @@ H5S__all_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *off
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__all_adjust_u() */
@@ -1041,8 +1041,8 @@ H5S__all_adjust_s(H5S_t H5_ATTR_UNUSED *space, const hssize_t H5_ATTR_UNUSED *of
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__all_adjust_s() */
@@ -1066,8 +1066,8 @@ H5S__all_project_scalar(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
- HDassert(offset);
+ assert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
+ assert(offset);
/* Set offset of selection in projected buffer */
*offset = 0;
@@ -1097,9 +1097,9 @@ H5S__all_project_simple(const H5S_t H5_ATTR_UNUSED *base_space, H5S_t *new_space
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base_space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(base_space));
- HDassert(new_space);
- HDassert(offset);
+ assert(base_space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(base_space));
+ assert(new_space);
+ assert(offset);
/* Select the entire new space */
if (H5S_select_all(new_space, TRUE) < 0)
@@ -1135,7 +1135,7 @@ H5S_select_all(H5S_t *space, hbool_t rel_prev)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space);
+ assert(space);
/* Remove current selection first */
if (rel_prev)
diff --git a/src/H5Sdbg.c b/src/H5Sdbg.c
index f4d027b..39c9cfb 100644
--- a/src/H5Sdbg.c
+++ b/src/H5Sdbg.c
@@ -83,22 +83,22 @@ H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth)
switch (H5S_GET_EXTENT_TYPE(mesg)) {
case H5S_NULL:
- HDfprintf(stream, "%*s%-*s H5S_NULL\n", indent, "", fwidth, "Space class:");
+ fprintf(stream, "%*s%-*s H5S_NULL\n", indent, "", fwidth, "Space class:");
break;
case H5S_SCALAR:
- HDfprintf(stream, "%*s%-*s H5S_SCALAR\n", indent, "", fwidth, "Space class:");
+ fprintf(stream, "%*s%-*s H5S_SCALAR\n", indent, "", fwidth, "Space class:");
break;
case H5S_SIMPLE:
- HDfprintf(stream, "%*s%-*s H5S_SIMPLE\n", indent, "", fwidth, "Space class:");
+ fprintf(stream, "%*s%-*s H5S_SIMPLE\n", indent, "", fwidth, "Space class:");
H5O_debug_id(H5O_SDSPACE_ID, f, &(mesg->extent), stream, indent + 3, MAX(0, fwidth - 3));
break;
case H5S_NO_CLASS:
default:
- HDfprintf(stream, "%*s%-*s **UNKNOWN-%ld**\n", indent, "", fwidth,
- "Space class:", (long)(H5S_GET_EXTENT_TYPE(mesg)));
+ fprintf(stream, "%*s%-*s **UNKNOWN-%ld**\n", indent, "", fwidth,
+ "Space class:", (long)(H5S_GET_EXTENT_TYPE(mesg)));
break;
} /* end switch */
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index ad77ce8..de5668d 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -296,12 +296,12 @@ H5S__hyper_print_spans_helper(FILE *f, const H5S_hyper_span_t *span, unsigned de
FUNC_ENTER_PACKAGE_NOERR
while (span) {
- HDfprintf(f, "%s: %*sdepth=%u, span=%p, (%" PRIuHSIZE ", %" PRIuHSIZE "), next=%p\n", __func__,
- depth * 2, "", depth, (void *)span, span->low, span->high, (void *)span->next);
+ fprintf(f, "%s: %*sdepth=%u, span=%p, (%" PRIuHSIZE ", %" PRIuHSIZE "), next=%p\n", __func__,
+ depth * 2, "", depth, (void *)span, span->low, span->high, (void *)span->next);
if (span->down) {
- HDfprintf(f, "%s: %*sspans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n",
- __func__, (depth + 1) * 2, "", (void *)span->down, span->down->count,
- span->down->low_bounds[0], span->down->high_bounds[0], (void *)span->down->head);
+ fprintf(f, "%s: %*sspans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n",
+ __func__, (depth + 1) * 2, "", (void *)span->down, span->down->count,
+ span->down->low_bounds[0], span->down->high_bounds[0], (void *)span->down->head);
H5S__hyper_print_spans_helper(f, span->down->head, depth + 1);
} /* end if */
span = span->next;
@@ -316,9 +316,9 @@ H5S__hyper_print_spans(FILE *f, const H5S_hyper_span_info_t *span_lst)
FUNC_ENTER_PACKAGE_NOERR
if (span_lst != NULL) {
- HDfprintf(f, "%s: spans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n",
- __func__, (void *)span_lst, span_lst->count, span_lst->low_bounds[0],
- span_lst->high_bounds[0], (void *)span_lst->head);
+ fprintf(f, "%s: spans=%p, count=%u, bounds[0]={%" PRIuHSIZE ", %" PRIuHSIZE "}, head=%p\n", __func__,
+ (void *)span_lst, span_lst->count, span_lst->low_bounds[0], span_lst->high_bounds[0],
+ (void *)span_lst->head);
H5S__hyper_print_spans_helper(f, span_lst->head, 0);
} /* end if */
@@ -343,21 +343,21 @@ H5S__hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, cons
FUNC_ENTER_PACKAGE_NOERR
if (dinfo != NULL) {
- HDfprintf(f, "%s: %s: start=[", __func__, field);
+ fprintf(f, "%s: %s: start=[", __func__, field);
for (u = 0; u < ndims; u++)
- HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].start, (u < (ndims - 1) ? ", " : "]\n"));
- HDfprintf(f, "%s: %s: stride=[", __func__, field);
+ fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].start, (u < (ndims - 1) ? ", " : "]\n"));
+ fprintf(f, "%s: %s: stride=[", __func__, field);
for (u = 0; u < ndims; u++)
- HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].stride, (u < (ndims - 1) ? ", " : "]\n"));
- HDfprintf(f, "%s: %s: count=[", __func__, field);
+ fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].stride, (u < (ndims - 1) ? ", " : "]\n"));
+ fprintf(f, "%s: %s: count=[", __func__, field);
for (u = 0; u < ndims; u++)
- HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].count, (u < (ndims - 1) ? ", " : "]\n"));
- HDfprintf(f, "%s: %s: block=[", __func__, field);
+ fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].count, (u < (ndims - 1) ? ", " : "]\n"));
+ fprintf(f, "%s: %s: block=[", __func__, field);
for (u = 0; u < ndims; u++)
- HDfprintf(f, "%" PRIuHSIZE "%s", dinfo[u].block, (u < (ndims - 1) ? ", " : "]\n"));
+ fprintf(f, "%" PRIuHSIZE "%s", dinfo[u].block, (u < (ndims - 1) ? ", " : "]\n"));
} /* end if */
else
- HDfprintf(f, "%s: %s==NULL\n", __func__, field);
+ fprintf(f, "%s: %s==NULL\n", __func__, field);
FUNC_LEAVE_NOAPI(SUCCEED)
}
@@ -404,7 +404,7 @@ H5S__hyper_print_spans_dfs(FILE *f, const H5S_hyper_span_info_t *span_lst, unsig
/* get the actual tail from head */
cur_elem = span_lst->head;
- HDassert(cur_elem); /* at least 1 element */
+ assert(cur_elem); /* at least 1 element */
while (cur_elem) {
actual_tail = cur_elem;
cur_elem = cur_elem->next;
@@ -412,32 +412,32 @@ H5S__hyper_print_spans_dfs(FILE *f, const H5S_hyper_span_info_t *span_lst, unsig
} /* end while */
for (u = 0; u < depth; u++)
- HDfprintf(f, "\t");
- HDfprintf(f, "DIM[%u]: ref_count=%u, #elems=%u, head=%p, tail=%p, actual_tail=%p, matched=%d\n", depth,
- span_lst->count, num_elems, (void *)span_lst->head, (void *)span_lst->tail, (void *)actual_tail,
- (span_lst->tail == actual_tail));
+ fprintf(f, "\t");
+ fprintf(f, "DIM[%u]: ref_count=%u, #elems=%u, head=%p, tail=%p, actual_tail=%p, matched=%d\n", depth,
+ span_lst->count, num_elems, (void *)span_lst->head, (void *)span_lst->tail, (void *)actual_tail,
+ (span_lst->tail == actual_tail));
for (u = 0; u < depth; u++)
- HDfprintf(f, "\t");
- HDfprintf(f, "low_bounds=[");
+ fprintf(f, "\t");
+ fprintf(f, "low_bounds=[");
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%" PRIuHSIZE ",", span_lst->low_bounds[u]);
- HDfprintf(f, "%" PRIuHSIZE "]\n", span_lst->low_bounds[dims - 1]);
+ fprintf(f, "%" PRIuHSIZE ",", span_lst->low_bounds[u]);
+ fprintf(f, "%" PRIuHSIZE "]\n", span_lst->low_bounds[dims - 1]);
for (u = 0; u < depth; u++)
- HDfprintf(f, "\t");
- HDfprintf(f, "high_bounds=[");
+ fprintf(f, "\t");
+ fprintf(f, "high_bounds=[");
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%" PRIuHSIZE ",", span_lst->high_bounds[u]);
- HDfprintf(f, "%" PRIuHSIZE "]\n", span_lst->high_bounds[dims - 1]);
+ fprintf(f, "%" PRIuHSIZE ",", span_lst->high_bounds[u]);
+ fprintf(f, "%" PRIuHSIZE "]\n", span_lst->high_bounds[dims - 1]);
cur_elem = span_lst->head;
elem_idx = 0;
while (cur_elem) {
for (u = 0; u < depth; u++)
- HDfprintf(f, "\t");
- HDfprintf(f, "ELEM[%u]: ptr=%p, low=%" PRIuHSIZE ", high=%" PRIuHSIZE ", down=%p\n", elem_idx++,
- (void *)cur_elem, cur_elem->low, cur_elem->high, (void *)cur_elem->down);
+ fprintf(f, "\t");
+ fprintf(f, "ELEM[%u]: ptr=%p, low=%" PRIuHSIZE ", high=%" PRIuHSIZE ", down=%p\n", elem_idx++,
+ (void *)cur_elem, cur_elem->low, cur_elem->high, (void *)cur_elem->down);
if (cur_elem->down)
H5S__hyper_print_spans_dfs(f, cur_elem->down, depth + 1, dims);
cur_elem = cur_elem->next;
@@ -471,39 +471,39 @@ H5S__hyper_print_space_dfs(FILE *f, const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(hslab);
+ assert(hslab);
- HDfprintf(f, "=======================\n");
- HDfprintf(f, "SPACE: span_lst=%p, #dims=%u, offset_changed=%d\n", (void *)hslab->span_lst, dims,
- space->select.offset_changed);
+ fprintf(f, "=======================\n");
+ fprintf(f, "SPACE: span_lst=%p, #dims=%u, offset_changed=%d\n", (void *)hslab->span_lst, dims,
+ space->select.offset_changed);
- HDfprintf(f, " offset=[");
+ fprintf(f, " offset=[");
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%lld,", space->select.offset[u]);
- HDfprintf(f, "%lld]\n", space->select.offset[dims - 1]);
+ fprintf(f, "%lld,", space->select.offset[u]);
+ fprintf(f, "%lld]\n", space->select.offset[dims - 1]);
- HDfprintf(f, " low_bounds=[");
+ fprintf(f, " low_bounds=[");
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.low_bounds[u]);
- HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.low_bounds[dims - 1]);
+ fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.low_bounds[u]);
+ fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.low_bounds[dims - 1]);
} /* end if */
else {
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->low_bounds[u]);
- HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->low_bounds[dims - 1]);
+ fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->low_bounds[u]);
+ fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->low_bounds[dims - 1]);
} /* end else */
- HDfprintf(f, " high_bounds=[");
+ fprintf(f, " high_bounds=[");
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.high_bounds[u]);
- HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.high_bounds[dims - 1]);
+ fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->diminfo.high_bounds[u]);
+ fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->diminfo.high_bounds[dims - 1]);
} /* end if */
else {
for (u = 0; u < dims - 1; u++)
- HDfprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->high_bounds[u]);
- HDfprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->high_bounds[dims - 1]);
+ fprintf(f, "%" PRIuHSIZE ",", space->select.sel_info.hslab->span_lst->high_bounds[u]);
+ fprintf(f, "%" PRIuHSIZE "]\n", space->select.sel_info.hslab->span_lst->high_bounds[dims - 1]);
} /* end else */
/* Print out diminfo, if it's valid */
@@ -513,7 +513,7 @@ H5S__hyper_print_space_dfs(FILE *f, const H5S_t *space)
/* Start print out the highest-order of dimension */
if (hslab->span_lst)
H5S__hyper_print_spans_dfs(f, hslab->span_lst, 0, dims);
- HDfprintf(f, "=======================\n\n");
+ fprintf(f, "=======================\n\n");
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_print_space_dfs() */
@@ -573,9 +573,9 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
- HDassert(iter);
- HDassert(space->select.sel_info.hslab->unlim_dim < 0);
+ assert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
+ assert(iter);
+ assert(space->select.sel_info.hslab->unlim_dim < 0);
/* Initialize the hyperslab iterator's rank */
iter->u.hyp.iter_rank = 0;
@@ -639,7 +639,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
for (i = (int)rank - 1, acc = 1; i >= 0; i--) {
if (tdiminfo[i].block == mem_size[i] && i > 0) {
/* "Flatten" this dimension */
- HDassert(tdiminfo[i].start == 0);
+ assert(tdiminfo[i].start == 0);
acc *= mem_size[i];
/* Indicate that the dimension was flattened */
@@ -731,7 +731,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
} /* end if */
else {
/* Share the source dataspace's span tree by incrementing the reference count on it */
- HDassert(space->select.sel_info.hslab->span_lst);
+ assert(space->select.sel_info.hslab->span_lst);
iter->u.hyp.spans = space->select.sel_info.hslab->span_lst;
iter->u.hyp.spans->count++;
} /* end else */
@@ -740,8 +740,8 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
spans = iter->u.hyp.spans;
for (u = 0; u < rank; u++) {
/* Set the pointers to the initial span in each dimension */
- HDassert(spans);
- HDassert(spans->head);
+ assert(spans);
+ assert(spans->head);
/* Set the pointer to the first span in the list for this node */
iter->u.hyp.span[u] = spans->head;
@@ -802,8 +802,8 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(coords);
+ assert(iter);
+ assert(coords);
/* Copy the offset of the current point */
@@ -832,7 +832,7 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
u = 0;
/* Sanity check */
- HDassert(v >= 0);
+ assert(v >= 0);
/* Compute the coords for the flattened dimensions */
H5VM_array_calc(iter->u.hyp.off[v], (unsigned)((begin - u) + 1), &(iter->dims[u]),
@@ -846,7 +846,7 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
/* Walk up through as many non-flattened dimensions as possible */
while (u >= 0 && !iter->u.hyp.flattened[u]) {
/* Sanity check */
- HDassert(v >= 0);
+ assert(v >= 0);
/* Copy the coordinate */
coords[u] = iter->u.hyp.off[v];
@@ -857,7 +857,7 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
} /* end while */
} /* end else */
} /* end while */
- HDassert(v < 0);
+ assert(v < 0);
} /* end if */
else
H5MM_memcpy(coords, iter->u.hyp.off, sizeof(hsize_t) * iter->rank);
@@ -892,9 +892,9 @@ H5S__hyper_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(start);
- HDassert(end);
+ assert(iter);
+ assert(start);
+ assert(end);
/* Copy the offset of the current point */
@@ -935,7 +935,7 @@ H5S__hyper_iter_nelmts(const H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(iter->elmt_left)
} /* end H5S__hyper_iter_nelmts() */
@@ -966,7 +966,7 @@ H5S__hyper_iter_has_next_block(const H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
/* Check for a single "regular" hyperslab */
if (iter->u.hyp.diminfo_valid) {
@@ -1178,9 +1178,9 @@ H5S__hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem)
if (curr_dim >= 0) {
/* Walk back down the iterator positions, resetting them */
while (curr_dim < fast_dim) {
- HDassert(curr_span);
- HDassert(curr_span->down);
- HDassert(curr_span->down->head);
+ assert(curr_span);
+ assert(curr_span->down);
+ assert(curr_span->down->head);
/* Increment current dimension */
curr_dim++;
@@ -1196,7 +1196,7 @@ H5S__hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem)
} /* end while */
/* Verify that the curr_span points to the fastest dim */
- HDassert(curr_span == ispan[fast_dim]);
+ assert(curr_span == ispan[fast_dim]);
} /* end if */
} /* end while */
} /* end else */
@@ -1355,9 +1355,9 @@ H5S__hyper_iter_next_block(H5S_sel_iter_t *iter)
if (curr_dim >= 0) {
/* Walk back down the iterator positions, resetting them */
while (curr_dim < fast_dim) {
- HDassert(curr_span);
- HDassert(curr_span->down);
- HDassert(curr_span->down->head);
+ assert(curr_span);
+ assert(curr_span->down);
+ assert(curr_span->down->head);
/* Increment current dimension */
curr_dim++;
@@ -1373,7 +1373,7 @@ H5S__hyper_iter_next_block(H5S_sel_iter_t *iter)
} /* end while */
/* Verify that the curr_span points to the fastest dim */
- HDassert(curr_span == ispan[fast_dim]);
+ assert(curr_span == ispan[fast_dim]);
} /* end if */
} /* end else */
@@ -1437,13 +1437,13 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(iter);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* Set the rank of the fastest changing dimension */
ndims = iter->rank;
@@ -1516,7 +1516,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
/* Check if we are still within the span */
if (abs_arr[fast_dim] <= curr_span->high) {
/* Sanity check */
- HDassert(ispan[fast_dim] == curr_span);
+ assert(ispan[fast_dim] == curr_span);
/* Update byte offset */
loc_arr[fast_dim] += span_size;
@@ -1593,9 +1593,9 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
if (curr_dim >= 0) {
/* Walk back down the iterator positions, resetting them */
while ((unsigned)curr_dim < fast_dim) {
- HDassert(curr_span);
- HDassert(curr_span->down);
- HDassert(curr_span->down->head);
+ assert(curr_span);
+ assert(curr_span->down);
+ assert(curr_span->down->head);
/* Increment current dimension */
curr_dim++;
@@ -1615,7 +1615,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
} /* end while */
/* Verify that the curr_span points to the fastest dim */
- HDassert(curr_span == ispan[fast_dim]);
+ assert(curr_span == ispan[fast_dim]);
/* Reset the buffer offset */
for (u = 0, loc_off = 0; u < ndims; u++)
@@ -1623,7 +1623,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
} /* end else */
else
/* We had better be done with I/O or bad things are going to happen... */
- HDassert(io_elmts_left == 0);
+ assert(io_elmts_left == 0);
} /* end if */
} /* end if */
@@ -1632,7 +1632,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
H5S_hyper_span_t *prev_span; /* Previous hyperslab span node */
/* Sanity check */
- HDassert(curr_span);
+ assert(curr_span);
/* Set to current span, so the first adjustment to loc_off is 0 */
prev_span = curr_span;
@@ -1795,15 +1795,15 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
/* Check if we are finished with the spans in the tree */
if (curr_dim < 0) {
/* We had better be done with I/O or bad things are going to happen... */
- HDassert(io_elmts_left == 0);
+ assert(io_elmts_left == 0);
break;
} /* end if */
else {
/* Walk back down the iterator positions, resetting them */
while ((unsigned)curr_dim < fast_dim) {
- HDassert(curr_span);
- HDassert(curr_span->down);
- HDassert(curr_span->down->head);
+ assert(curr_span);
+ assert(curr_span->down);
+ assert(curr_span->down->head);
/* Increment current dimension to the next dimension down */
curr_dim++;
@@ -1823,7 +1823,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
} /* end while */
/* Verify that the curr_span points to the fastest dim */
- HDassert(curr_span == ispan[fast_dim]);
+ assert(curr_span == ispan[fast_dim]);
} /* end else */
/* Reset the buffer offset */
@@ -1910,13 +1910,13 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* Set the local copy of the diminfo pointer */
tdiminfo = iter->u.hyp.diminfo;
@@ -1953,8 +1953,8 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max
io_left = MIN((size_t)iter->elmt_left, maxelem);
/* Sanity check that there aren't any "remainder" sequences in process */
- HDassert(!((iter->u.hyp.off[fast_dim] - tdiminfo[fast_dim].start) % tdiminfo[fast_dim].stride != 0 ||
- ((iter->u.hyp.off[fast_dim] != tdiminfo[fast_dim].start) && tdiminfo[fast_dim].count == 1)));
+ assert(!((iter->u.hyp.off[fast_dim] - tdiminfo[fast_dim].start) % tdiminfo[fast_dim].stride != 0 ||
+ ((iter->u.hyp.off[fast_dim] != tdiminfo[fast_dim].start) && tdiminfo[fast_dim].count == 1)));
/* We've cleared the "remainder" of the previous fastest dimension
* sequence before calling this routine, so we must be at the beginning of
@@ -2137,7 +2137,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max
duffs_index = (fast_dim_count + 7) / 8;
switch (fast_dim_count % 8) {
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
break;
case 0:
do {
@@ -2273,7 +2273,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max
} /* end if */
/* don't bother checking slower dimensions */
- HDassert(io_left == 0 || curr_seq == maxseq);
+ assert(io_left == 0 || curr_seq == maxseq);
} /* end if */
/* Update the iterator */
@@ -2349,13 +2349,13 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* Set a local copy of the diminfo pointer */
tdiminfo = iter->u.hyp.diminfo;
@@ -2428,8 +2428,8 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t
/* Check for 1-dim selection */
if (0 == fast_dim) {
/* Sanity checks */
- HDassert(1 == tot_blk_count);
- HDassert(io_left == actual_elem);
+ assert(1 == tot_blk_count);
+ assert(io_left == actual_elem);
/* Store the sequence information */
*off++ = loc;
@@ -2546,8 +2546,8 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t
/* Compute elements left */
elmt_remainder = io_left - (tot_blk_count * actual_elem);
- HDassert(elmt_remainder < fast_dim_block);
- HDassert(elmt_remainder > 0);
+ assert(elmt_remainder < fast_dim_block);
+ assert(elmt_remainder > 0);
/* Store the sequence information */
*off++ = loc;
@@ -2567,8 +2567,8 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t
} /* end if */
/* Sanity check */
- HDassert(*nseq > 0);
- HDassert(*nelem > 0);
+ assert(*nseq > 0);
+ assert(*nelem > 0);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_iter_get_seq_list_single() */
@@ -2612,14 +2612,14 @@ H5S__hyper_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(iter->elmt_left > 0);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(iter->elmt_left > 0);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* Check for the special case of just one H5Sselect_hyperslab call made */
if (iter->u.hyp.diminfo_valid) {
@@ -2765,7 +2765,7 @@ H5S__hyper_iter_release(H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(iter);
+ assert(iter);
/* Free the copy of the hyperslab selection span tree */
if (iter->u.hyp.spans != NULL)
@@ -2849,8 +2849,8 @@ H5S__hyper_new_span_info(unsigned rank)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(rank > 0);
- HDassert(rank <= H5S_MAX_RANK);
+ assert(rank > 0);
+ assert(rank <= H5S_MAX_RANK);
/* Allocate a new span info node */
if (NULL == (ret_value = (H5S_hyper_span_info_t *)H5FL_ARR_CALLOC(hbounds_t, rank * 2)))
@@ -2896,7 +2896,7 @@ H5S__hyper_copy_span_helper(H5S_hyper_span_info_t *spans, unsigned rank, unsigne
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(spans);
+ assert(spans);
/* Check if the span tree was already copied */
if (spans->op_info[op_info_i].op_gen == op_gen) {
@@ -2987,7 +2987,7 @@ H5S__hyper_copy_span(H5S_hyper_span_info_t *spans, unsigned rank)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(spans);
+ assert(spans);
/* Acquire an operation generation value for this operation */
op_gen = H5S__hyper_get_op_gen();
@@ -3051,8 +3051,8 @@ H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_sp
span2 = span_info2->head;
/* Sanity checking */
- HDassert(span1);
- HDassert(span2);
+ assert(span1);
+ assert(span2);
/* infinite loop which must be broken out of */
while (1) {
@@ -3184,7 +3184,7 @@ H5S__hyper_free_span(H5S_hyper_span_t *span)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(span);
+ assert(span);
/* Decrement the reference count of the 'down spans', freeing them if appropriate */
if (span->down != NULL)
@@ -3233,8 +3233,8 @@ H5S__hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
/* Allocate space for the hyperslab selection information */
if (NULL == (dst->select.sel_info.hslab = H5FL_MALLOC(H5S_hyper_sel_t)))
@@ -3302,7 +3302,7 @@ H5S__hyper_is_valid(const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* Check for unlimited selection */
if (space->select.sel_info.hslab->unlim_dim >= 0)
@@ -3358,7 +3358,7 @@ H5S__hyper_span_nblocks_helper(H5S_hyper_span_info_t *spans, unsigned op_info_i,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(spans);
+ assert(spans);
/* Check if the span tree was already counted */
if (spans->op_info[op_info_i].op_gen == op_gen)
@@ -3462,8 +3462,8 @@ H5S__get_select_hyper_nblocks(const H5S_t *space, hbool_t app_ref)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(space->select.sel_info.hslab->unlim_dim < 0);
+ assert(space);
+ assert(space->select.sel_info.hslab->unlim_dim < 0);
/* Check for a "regular" hyperslab selection */
/* (No need to rebuild the dimension info yet -QAK) */
@@ -3608,7 +3608,7 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver
FUNC_ENTER_PACKAGE
/* Get bounding box for the selection */
- HDmemset(bounds_end, 0, sizeof(bounds_end));
+ memset(bounds_end, 0, sizeof(bounds_end));
if (space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
/* Get bounding box for the selection */
@@ -3704,7 +3704,7 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver
} /* end if */
else {
hsize_t max_size = block_count;
- HDassert(space->select.sel_info.hslab->unlim_dim < 0);
+ assert(space->select.sel_info.hslab->unlim_dim < 0);
/* Find max for block_count and bounds_end[] */
for (u = 0; u < space->extent.rank; u++)
@@ -3754,7 +3754,7 @@ H5S__hyper_serial_size(H5S_t *space)
FUNC_ENTER_PACKAGE
- HDassert(space);
+ assert(space);
/* Determine the number of blocks */
if (space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
@@ -3796,12 +3796,12 @@ H5S__hyper_serial_size(H5S_t *space)
* (4 (start/stride/count/block) * <enc_size (8 bytes)> * <rank>) =
* 17 + (4 * 8 * rank) bytes
*/
- HDassert(enc_size == 8);
+ assert(enc_size == 8);
ret_value = (hssize_t)17 + ((hssize_t)4 * (hssize_t)8 * (hssize_t)space->extent.rank);
}
else {
- HDassert(version == H5S_HYPER_VERSION_1);
- HDassert(enc_size == 4);
+ assert(version == H5S_HYPER_VERSION_1);
+ assert(enc_size == 4);
/* Version 1 */
/* Basic number of bytes required to serialize hyperslab selection:
* <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
@@ -3851,11 +3851,11 @@ H5S__hyper_serialize_helper(const H5S_hyper_span_info_t *spans, hsize_t *start,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(spans);
- HDassert(start);
- HDassert(end);
- HDassert(rank < H5S_MAX_RANK);
- HDassert(p && pp);
+ assert(spans);
+ assert(start);
+ assert(end);
+ assert(rank < H5S_MAX_RANK);
+ assert(p && pp);
/* Walk through the list of spans, recursing or outputting them */
curr = spans->head;
@@ -3923,7 +3923,7 @@ H5S__hyper_serialize_helper(const H5S_hyper_span_info_t *spans, hsize_t *start,
break;
default:
- HDassert(0 && "Unknown enc size?!?");
+ assert(0 && "Unknown enc size?!?");
} /* end switch */
} /* end else */
@@ -3984,10 +3984,10 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(space);
- HDassert(p);
+ assert(space);
+ assert(p);
pp = (*p);
- HDassert(pp);
+ assert(pp);
/* Set some convenience values */
ndims = space->extent.rank;
@@ -4029,13 +4029,13 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
if (is_regular) {
if (version >= H5S_HYPER_VERSION_2) {
- HDassert(H5S_UNLIMITED == HSIZE_UNDEF);
+ assert(H5S_UNLIMITED == HSIZE_UNDEF);
/* Iterate over dimensions */
/* Encode start/stride/block/count */
switch (enc_size) {
case H5S_SELECT_INFO_ENC_SIZE_2:
- HDassert(version == H5S_HYPER_VERSION_3);
+ assert(version == H5S_HYPER_VERSION_3);
for (u = 0; u < space->extent.rank; u++) {
UINT16ENCODE(pp, diminfo[u].start);
UINT16ENCODE(pp, diminfo[u].stride);
@@ -4051,7 +4051,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
break;
case H5S_SELECT_INFO_ENC_SIZE_4:
- HDassert(version == H5S_HYPER_VERSION_3);
+ assert(version == H5S_HYPER_VERSION_3);
for (u = 0; u < space->extent.rank; u++) {
UINT32ENCODE(pp, diminfo[u].start);
UINT32ENCODE(pp, diminfo[u].stride);
@@ -4067,7 +4067,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
break;
case H5S_SELECT_INFO_ENC_SIZE_8:
- HDassert(version == H5S_HYPER_VERSION_2 || version == H5S_HYPER_VERSION_3);
+ assert(version == H5S_HYPER_VERSION_2 || version == H5S_HYPER_VERSION_3);
for (u = 0; u < space->extent.rank; u++) {
UINT64ENCODE(pp, diminfo[u].start);
UINT64ENCODE(pp, diminfo[u].stride);
@@ -4090,7 +4090,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
} /* end switch */
} /* end if */
else {
- HDassert(version == H5S_HYPER_VERSION_1);
+ assert(version == H5S_HYPER_VERSION_1);
/* Set some convenience values */
fast_dim = ndims - 1;
@@ -4171,19 +4171,19 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
/* Encode number of hyperslabs */
switch (enc_size) {
case H5S_SELECT_INFO_ENC_SIZE_2:
- HDassert(version == H5S_HYPER_VERSION_3);
+ assert(version == H5S_HYPER_VERSION_3);
H5_CHECK_OVERFLOW(block_count, hsize_t, uint16_t);
UINT16ENCODE(pp, (uint16_t)block_count);
break;
case H5S_SELECT_INFO_ENC_SIZE_4:
- HDassert(version == H5S_HYPER_VERSION_1 || version == H5S_HYPER_VERSION_3);
+ assert(version == H5S_HYPER_VERSION_1 || version == H5S_HYPER_VERSION_3);
H5_CHECK_OVERFLOW(block_count, hsize_t, uint32_t);
UINT32ENCODE(pp, (uint32_t)block_count);
break;
case H5S_SELECT_INFO_ENC_SIZE_8:
- HDassert(version == H5S_HYPER_VERSION_3);
+ assert(version == H5S_HYPER_VERSION_3);
UINT64ENCODE(pp, block_count);
break;
@@ -4256,9 +4256,9 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(p);
+ assert(p);
pp = (*p);
- HDassert(pp);
+ assert(pp);
/* As part of the efforts to push all selection-type specific coding
to the callbacks, the coding for the allocation of a null dataspace
@@ -4325,7 +4325,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb
if (!*space) {
/* Patch the rank of the allocated dataspace */
- HDmemset(dims, 0, (size_t)rank * sizeof(dims[0]));
+ memset(dims, 0, (size_t)rank * sizeof(dims[0]));
if (H5S_set_extent_simple(tmp_space, rank, dims, NULL) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions")
} /* end if */
@@ -4340,8 +4340,8 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb
hsize_t count[H5S_MAX_RANK]; /* Hyperslab count information */
/* Sanity checks */
- HDassert(H5S_UNLIMITED == HSIZE_UNDEF);
- HDassert(version >= H5S_HYPER_VERSION_2);
+ assert(H5S_UNLIMITED == HSIZE_UNDEF);
+ assert(version >= H5S_HYPER_VERSION_2);
/* Decode start/stride/block/count */
switch (enc_size) {
@@ -4565,13 +4565,13 @@ H5S__hyper_span_blocklist(const H5S_hyper_span_info_t *spans, hsize_t start[], h
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(spans);
- HDassert(rank < H5S_MAX_RANK);
- HDassert(start);
- HDassert(end);
- HDassert(startblock);
- HDassert(numblocks && *numblocks > 0);
- HDassert(buf && *buf);
+ assert(spans);
+ assert(rank < H5S_MAX_RANK);
+ assert(start);
+ assert(end);
+ assert(startblock);
+ assert(numblocks && *numblocks > 0);
+ assert(buf && *buf);
/* Walk through the list of spans, recursing or outputting them */
curr = spans->head;
@@ -4662,9 +4662,9 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(buf);
- HDassert(space->select.sel_info.hslab->unlim_dim < 0);
+ assert(space);
+ assert(buf);
+ assert(space->select.sel_info.hslab->unlim_dim < 0);
/* Attempt to rebuild diminfo if it is invalid and has not been confirmed
* to be impossible.
@@ -4737,7 +4737,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo
/* Iterate over the blocks in the fastest dimension */
while (tmp_count[fast_dim] > 0 && numblocks > 0) {
/* Sanity check */
- HDassert(startblock == 0);
+ assert(startblock == 0);
/* Copy the starting location */
H5MM_memcpy(buf, offset, sizeof(hsize_t) * ndims);
@@ -4901,9 +4901,9 @@ H5S__hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(space);
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(start);
+ assert(end);
/* Check which set of low & high bounds we should be using */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
@@ -4922,7 +4922,7 @@ H5S__hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
/* Loop over dimensions */
for (u = 0; u < space->extent.rank; u++) {
/* Sanity check */
- HDassert(low_bounds[u] <= high_bounds[u]);
+ assert(low_bounds[u] <= high_bounds[u]);
/* Check for offset moving selection negative */
if (((hssize_t)low_bounds[u] + space->select.offset[u]) < 0)
@@ -4978,8 +4978,8 @@ H5S__hyper_offset(const H5S_t *space, hsize_t *offset)
FUNC_ENTER_PACKAGE
- HDassert(space && space->extent.rank > 0);
- HDassert(offset);
+ assert(space && space->extent.rank > 0);
+ assert(offset);
/* Start at linear offset 0 */
*offset = 0;
@@ -5044,7 +5044,7 @@ H5S__hyper_offset(const H5S_t *space, hsize_t *offset)
/* Advance to first span in "down" dimension */
if (span->down) {
- HDassert(span->down->head);
+ assert(span->down->head);
span = span->down->head;
} /* end if */
else
@@ -5111,8 +5111,8 @@ H5S__hyper_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(space);
- HDassert(num_elem_non_unlim);
+ assert(space);
+ assert(num_elem_non_unlim);
/* Get number of elements in the non-unlimited dimensions */
if (space->select.sel_info.hslab->unlim_dim >= 0)
@@ -5152,7 +5152,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* Check for a "regular" hyperslab selection */
/* (No need to rebuild the dimension info yet -QAK) */
@@ -5337,7 +5337,7 @@ H5S__hyper_is_single(const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* Check for a "single" hyperslab selection */
/* (No need to rebuild the dimension info yet, since the span-tree
@@ -5411,7 +5411,7 @@ H5S__hyper_is_regular(H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
/* Attempt to rebuild diminfo if it is invalid and has not been confirmed
* to be impossible.
@@ -5463,10 +5463,10 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(span_info1);
- HDassert(span_info2);
- HDassert(offset);
- HDassert(rest_zeros);
+ assert(span_info1);
+ assert(span_info2);
+ assert(offset);
+ assert(rest_zeros);
/* Compare low & high bounds for this span list */
/* (Could compare lower dimensions also, but not certain if
@@ -5485,8 +5485,8 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
span2 = span_info2->head;
/* Sanity checking */
- HDassert(span1);
- HDassert(span2);
+ assert(span1);
+ assert(span2);
/* infinite loop which must be broken out of */
while (1) {
@@ -5573,13 +5573,13 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(span_info1);
- HDassert(span_info2);
- HDassert(ndims > 0);
+ assert(span_info1);
+ assert(span_info2);
+ assert(ndims > 0);
/* Initialize arrays */
- HDmemset(offset, 0, sizeof(offset));
- HDmemset(rest_zeros, 0, sizeof(rest_zeros));
+ memset(offset, 0, sizeof(offset));
+ memset(rest_zeros, 0, sizeof(rest_zeros));
/* Check for an offset between the two selections */
span1 = span_info1->head;
@@ -5597,7 +5597,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
/* Sanity check */
/* (Both span trees must have the same depth) */
- HDassert((span1->down && span2->down) || (NULL == span1->down && NULL == span2->down));
+ assert((span1->down && span2->down) || (NULL == span1->down && NULL == span2->down));
/* Advance to next dimension */
if (span1->down) {
@@ -5619,7 +5619,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
/* Sanity check */
/* (Must eventually have found a non-zero offset) */
- HDassert(i >= 0);
+ assert(i >= 0);
} /* end if */
/* If the offset vector is all zero, we can use the faster span tree
@@ -5668,16 +5668,16 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space1);
- HDassert(space2);
+ assert(space1);
+ assert(space2);
/* Get dataspace ranks */
space1_rank = space1->extent.rank;
space2_rank = space2->extent.rank;
/* Sanity check */
- HDassert(space1_rank >= space2_rank);
- HDassert(space2_rank > 0);
+ assert(space1_rank >= space2_rank);
+ assert(space2_rank > 0);
/* Rebuild diminfo if it is invalid and has not been confirmed to be
* impossible */
@@ -5766,7 +5766,7 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
} /* end while */
/* Sanity check */
- HDassert(spans1);
+ assert(spans1);
} /* end if */
else
spans1 = space1->select.sel_info.hslab->span_lst;
@@ -5806,7 +5806,7 @@ H5S__hyper_release(H5S_t *space)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
+ assert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
/* Reset the number of points selected */
space->select.num_elem = 0;
@@ -5852,8 +5852,8 @@ H5S__hyper_coord_to_span(unsigned rank, const hsize_t *coords)
FUNC_ENTER_PACKAGE
- HDassert(rank > 0);
- HDassert(coords);
+ assert(rank > 0);
+ assert(coords);
/* Search for location to insert new element in tree */
if (rank > 1) {
@@ -5919,10 +5919,10 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(span_tree);
- HDassert(rank > 0);
- HDassert(coords);
- HDassert(first_dim_modified);
+ assert(span_tree);
+ assert(rank > 0);
+ assert(coords);
+ assert(first_dim_modified);
/* Get pointer to last span in span tree */
tail_span = span_tree->tail;
@@ -5938,7 +5938,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
prev_down_tail_span_high = tail_span->down->tail->high;
/* Drop down a dimension */
- HDassert(rank > 1);
+ assert(rank > 1);
if (H5S__hyper_add_span_element_helper(tail_span->down, rank - 1, &coords[1], first_dim_modified) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert coordinate into span tree")
@@ -5983,14 +5983,14 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
/* Determine which span to stop at */
if (tail_span->down->tail != prev_down_tail_span) {
/* Sanity check */
- HDassert(prev_down_tail_span->next == tail_span->down->tail);
+ assert(prev_down_tail_span->next == tail_span->down->tail);
/* Set the span to stop at */
stop_span = prev_down_tail_span;
} /* end if */
else {
/* Sanity check */
- HDassert(prev_down_tail_span_high != tail_span->down->tail->high);
+ assert(prev_down_tail_span_high != tail_span->down->tail->high);
/* Set the span to stop at */
stop_span = tail_span->down->tail;
@@ -6043,13 +6043,13 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
/* Update pointers appropriately */
if (stop_span == prev_down_tail_span) {
/* Sanity check */
- HDassert(stop_span->next == tail_span->down->tail);
+ assert(stop_span->next == tail_span->down->tail);
tmp_span->next = stop_span->next;
} /* end if */
else {
/* Sanity check */
- HDassert(tmp_span->next == tail_span->down->tail);
+ assert(tmp_span->next == tail_span->down->tail);
tmp_span->next = NULL;
tail_span->down->tail = tmp_span;
@@ -6105,7 +6105,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
} /* end else */
/* Update high bound for current span tree */
- HDassert(coords[0] > span_tree->high_bounds[0]);
+ assert(coords[0] > span_tree->high_bounds[0]);
span_tree->high_bounds[0] = coords[0];
/* Update high bounds for dimensions below this one */
@@ -6167,10 +6167,10 @@ H5S_hyper_add_span_element(H5S_t *space, unsigned rank, const hsize_t *coords)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(space);
- HDassert(rank > 0);
- HDassert(coords);
- HDassert(space->extent.rank == rank);
+ assert(space);
+ assert(rank > 0);
+ assert(coords);
+ assert(space->extent.rank == rank);
/* Check if this is the first element in the selection */
if (NULL == space->select.sel_info.hslab) {
@@ -6263,9 +6263,9 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(spans);
- HDassert(start);
- HDassert(end);
+ assert(spans);
+ assert(start);
+ assert(end);
/* Check if we've already visited this span tree */
if (spans->op_info[op_info_i].op_gen != op_gen) {
@@ -6350,10 +6350,10 @@ H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(space);
- HDassert(H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
+ assert(start);
+ assert(end);
/* Attempt to rebuild diminfo if it is invalid and has not been confirmed
* to be impossible.
@@ -6400,7 +6400,7 @@ H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
nstride = 0;
/* Sanity check */
- HDassert(nstride <= space->select.sel_info.hslab->diminfo.opt[u].count);
+ assert(nstride <= space->select.sel_info.hslab->diminfo.opt[u].count);
/* "Rebase" the adjusted start coord into the same range
* range of values as the selections's first block.
@@ -6481,8 +6481,8 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(spans);
- HDassert(offset);
+ assert(spans);
+ assert(offset);
/* Check if we've already set this span tree */
if (spans->op_info[op_info_i].op_gen != op_gen) {
@@ -6491,7 +6491,7 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
/* Adjust the span tree's low & high bounds */
for (u = 0; u < rank; u++) {
- HDassert(spans->low_bounds[u] >= offset[u]);
+ assert(spans->low_bounds[u] >= offset[u]);
spans->low_bounds[u] -= offset[u];
spans->high_bounds[u] -= offset[u];
} /* end for */
@@ -6500,7 +6500,7 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
span = spans->head;
while (span != NULL) {
/* Adjust span offset */
- HDassert(span->low >= *offset);
+ assert(span->low >= *offset);
span->low -= *offset;
span->high -= *offset;
@@ -6546,8 +6546,8 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
@@ -6562,11 +6562,11 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset)
/* (No need to rebuild the dimension info yet -QAK) */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
for (u = 0; u < space->extent.rank; u++) {
- HDassert(space->select.sel_info.hslab->diminfo.opt[u].start >= offset[u]);
+ assert(space->select.sel_info.hslab->diminfo.opt[u].start >= offset[u]);
space->select.sel_info.hslab->diminfo.opt[u].start -= offset[u];
/* Adjust the low & high bounds */
- HDassert(space->select.sel_info.hslab->diminfo.low_bounds[u] >= offset[u]);
+ assert(space->select.sel_info.hslab->diminfo.low_bounds[u] >= offset[u]);
space->select.sel_info.hslab->diminfo.low_bounds[u] -= offset[u];
space->select.sel_info.hslab->diminfo.high_bounds[u] -= offset[u];
} /* end for */
@@ -6611,8 +6611,8 @@ H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
- HDassert(offset);
+ assert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
+ assert(offset);
/* Check for a "regular" hyperslab selection */
/* (No need to rebuild the dimension info yet -QAK) */
@@ -6624,11 +6624,11 @@ H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset)
/* Build the table of the initial offset */
for (u = 0; u < space->extent.rank; u++) {
/* Sanity check diminfo */
- HDassert(1 == diminfo[u].count);
- HDassert(1 == diminfo[u].block);
+ assert(1 == diminfo[u].count);
+ assert(1 == diminfo[u].block);
/* Sanity check bounds, while we're here */
- HDassert(diminfo[u].start == space->select.sel_info.hslab->diminfo.low_bounds[u]);
+ assert(diminfo[u].start == space->select.sel_info.hslab->diminfo.low_bounds[u]);
/* Keep the offset for later */
block[u] = diminfo[u].start;
@@ -6643,9 +6643,9 @@ H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset)
curr_dim = 0;
while (1) {
/* Sanity checks */
- HDassert(NULL == curr->next);
- HDassert(curr->low == curr->high);
- HDassert(curr_dim < space->extent.rank);
+ assert(NULL == curr->next);
+ assert(curr->low == curr->high);
+ assert(curr_dim < space->extent.rank);
/* Save the location of the selection in current dimension */
block[curr_dim] = curr->low;
@@ -6689,16 +6689,16 @@ H5S__hyper_project_simple_lower(const H5S_t *base_space, H5S_t *new_space)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
- HDassert(new_space);
- HDassert(new_space->extent.rank < base_space->extent.rank);
+ assert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
+ assert(new_space);
+ assert(new_space->extent.rank < base_space->extent.rank);
/* Walk down the span tree until we reach the selection to project */
down = base_space->select.sel_info.hslab->span_lst;
curr_dim = 0;
while (down && curr_dim < (base_space->extent.rank - new_space->extent.rank)) {
/* Sanity check */
- HDassert(NULL == down->head->next);
+ assert(NULL == down->head->next);
/* Advance down to next dimension */
down = down->head->down;
@@ -6740,9 +6740,9 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
- HDassert(new_space);
- HDassert(new_space->extent.rank > base_space->extent.rank);
+ assert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
+ assert(new_space);
+ assert(new_space->extent.rank > base_space->extent.rank);
/* Create nodes until reaching the correct # of dimensions */
new_space->select.sel_info.hslab->span_lst = NULL;
@@ -6765,7 +6765,7 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space)
/* Allocate a new node */
if (NULL == (new_span = H5S__hyper_new_span((hsize_t)0, (hsize_t)0, NULL, NULL))) {
- HDassert(new_span_info);
+ assert(new_span_info);
if (!prev_span)
(void)H5FL_ARR_FREE(hbounds_t, new_span_info);
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span")
@@ -6800,7 +6800,7 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space)
} /* end while */
if (NULL == new_space->select.sel_info.hslab->span_lst)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "NULL span list pointer")
- HDassert(prev_span);
+ assert(prev_span);
/* Share the underlying hyperslab span information */
prev_span->down = base_space->select.sel_info.hslab->span_lst;
@@ -6840,9 +6840,9 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
- HDassert(new_space);
- HDassert(offset);
+ assert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
+ assert(new_space);
+ assert(offset);
/* We are setting a new selection, remove any current selection in new dataspace */
if (H5S_SELECT_RELEASE(new_space) < 0)
@@ -6869,7 +6869,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
hsize_t block[H5S_MAX_RANK]; /* Block selected in base dataspace */
/* Compute the offset for the down-projection */
- HDmemset(block, 0, sizeof(block));
+ memset(block, 0, sizeof(block));
for (u = 0; u < (base_space->extent.rank - new_space->extent.rank); u++)
block[u] = opt_diminfo[u].start;
*offset = H5VM_array_offset(base_space->extent.rank, base_space->extent.size, block);
@@ -6879,7 +6879,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
new_space_dim = 0;
} /* end if */
else {
- HDassert(new_space->extent.rank > base_space->extent.rank);
+ assert(new_space->extent.rank > base_space->extent.rank);
/* The offset is zero when projected into higher dimensions */
*offset = 0;
@@ -6952,7 +6952,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
unsigned curr_dim; /* Current dimension being operated on */
/* Clear the block buffer */
- HDmemset(block, 0, sizeof(block));
+ memset(block, 0, sizeof(block));
/* Advance down selected spans */
curr = base_space->select.sel_info.hslab->span_lst->head;
@@ -6975,7 +6975,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
"can't project hyperslab selection into less dimensions")
} /* end if */
else {
- HDassert(new_space->extent.rank > base_space->extent.rank);
+ assert(new_space->extent.rank > base_space->extent.rank);
/* The offset is zero when projected into higher dimensions */
*offset = 0;
@@ -7028,8 +7028,8 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(spans);
- HDassert(offset);
+ assert(spans);
+ assert(offset);
/* Check if we've already set this span tree */
if (spans->op_info[op_info_i].op_gen != op_gen) {
@@ -7038,7 +7038,7 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
/* Adjust the span tree's low & high bounds */
for (u = 0; u < rank; u++) {
- HDassert((hssize_t)spans->low_bounds[u] >= offset[u]);
+ assert((hssize_t)spans->low_bounds[u] >= offset[u]);
spans->low_bounds[u] = (hsize_t)((hssize_t)spans->low_bounds[u] - offset[u]);
spans->high_bounds[u] = (hsize_t)((hssize_t)spans->high_bounds[u] - offset[u]);
} /* end for */
@@ -7047,7 +7047,7 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
span = spans->head;
while (span != NULL) {
/* Adjust span offset */
- HDassert((hssize_t)span->low >= *offset);
+ assert((hssize_t)span->low >= *offset);
span->low = (hsize_t)((hssize_t)span->low - *offset);
span->high = (hsize_t)((hssize_t)span->high - *offset);
@@ -7093,8 +7093,8 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
@@ -7109,12 +7109,12 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
/* (No need to rebuild the dimension info yet -QAK) */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
for (u = 0; u < space->extent.rank; u++) {
- HDassert((hssize_t)space->select.sel_info.hslab->diminfo.opt[u].start >= offset[u]);
+ assert((hssize_t)space->select.sel_info.hslab->diminfo.opt[u].start >= offset[u]);
space->select.sel_info.hslab->diminfo.opt[u].start =
(hsize_t)((hssize_t)space->select.sel_info.hslab->diminfo.opt[u].start - offset[u]);
/* Adjust the low & high bounds */
- HDassert((hssize_t)space->select.sel_info.hslab->diminfo.low_bounds[u] >= offset[u]);
+ assert((hssize_t)space->select.sel_info.hslab->diminfo.low_bounds[u] >= offset[u]);
space->select.sel_info.hslab->diminfo.low_bounds[u] =
(hsize_t)((hssize_t)space->select.sel_info.hslab->diminfo.low_bounds[u] - offset[u]);
space->select.sel_info.hslab->diminfo.high_bounds[u] =
@@ -7169,8 +7169,8 @@ H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(space);
- HDassert(old_offset);
+ assert(space);
+ assert(old_offset);
/* Check for hyperslab selection & offset changed */
if (H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS && space->select.offset_changed) {
@@ -7187,7 +7187,7 @@ H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust selection")
/* Zero out the selection offset */
- HDmemset(space->select.offset, 0, sizeof(hssize_t) * space->extent.rank);
+ memset(space->select.offset, 0, sizeof(hssize_t) * space->extent.rank);
/* Indicate that the offset was normalized */
ret_value = TRUE;
@@ -7226,8 +7226,8 @@ H5S_hyper_denormalize_offset(H5S_t *space, const hssize_t *old_offset)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(space);
- HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
+ assert(space);
+ assert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
/* Call the 'adjust' routine */
if (H5S__hyper_adjust_s(space, old_offset) < 0)
@@ -7271,7 +7271,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(span_tree);
+ assert(span_tree);
/* Check for adding first node to merged spans */
if (*span_tree == NULL) {
@@ -7295,7 +7295,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
(*span_tree)->high_bounds[0] = high;
if (down) {
/* Sanity check */
- HDassert(ndims > 1);
+ assert(ndims > 1);
H5MM_memcpy(&((*span_tree)->low_bounds[1]), down->low_bounds, sizeof(hsize_t) * (ndims - 1));
H5MM_memcpy(&((*span_tree)->high_bounds[1]), down->high_bounds, sizeof(hsize_t) * (ndims - 1));
@@ -7320,7 +7320,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
/* Sanity check */
/* (If down_cmp was set to TRUE above, we won't be in this branch) */
- HDassert(down_cmp != TRUE);
+ assert(down_cmp != TRUE);
/* Check if there is actually a down span */
if (down) {
@@ -7345,8 +7345,8 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
/* Update low & high bounds in lower dimensions, if there are any */
if (down) {
/* Sanity checks */
- HDassert(ndims > 1);
- HDassert(down_cmp >= 0);
+ assert(ndims > 1);
+ assert(down_cmp >= 0);
/* Check if we are sharing down spans with a previous node */
/* (Only need to check for bounds changing if down spans aren't shared) */
@@ -7431,11 +7431,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(a_spans);
- HDassert(b_spans);
- HDassert(a_not_b);
- HDassert(a_and_b);
- HDassert(b_not_a);
+ assert(a_spans);
+ assert(b_spans);
+ assert(a_not_b);
+ assert(a_and_b);
+ assert(b_not_a);
/* Set which list(s) to be generated, based on selector */
need_a_not_b = ((selector & H5S_HYPER_COMPUTE_A_NOT_B) != 0);
@@ -7539,8 +7539,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps between upper part of span 'a' and lower part of span 'b' */
/* Make certain both spans either have a down span or both don't have one */
- HDassert((span_a->down != NULL && span_b->down != NULL) ||
- (span_a->down == NULL && span_b->down == NULL));
+ assert((span_a->down != NULL && span_b->down != NULL) ||
+ (span_a->down == NULL && span_b->down == NULL));
/* If there are no down spans, just add the overlapping area to the a_and_b list */
if (span_a->down == NULL) {
@@ -7569,7 +7569,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- HDassert(need_a_not_b == TRUE);
+ assert(need_a_not_b == TRUE);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_b->low, span_a->high,
@@ -7584,7 +7584,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- HDassert(need_a_and_b == TRUE);
+ assert(need_a_and_b == TRUE);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_a->high,
@@ -7599,7 +7599,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- HDassert(need_b_not_a == TRUE);
+ assert(need_b_not_a == TRUE);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_a->high,
@@ -7653,8 +7653,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps between middle part of span 'a' and span 'b' */
/* Make certain both spans either have a down span or both don't have one */
- HDassert((span_a->down != NULL && span_b->down != NULL) ||
- (span_a->down == NULL && span_b->down == NULL));
+ assert((span_a->down != NULL && span_b->down != NULL) ||
+ (span_a->down == NULL && span_b->down == NULL));
/* If there are no down spans, just add the overlapping area to the a_and_b list */
if (span_a->down == NULL) {
@@ -7679,7 +7679,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- HDassert(need_a_not_b == TRUE);
+ assert(need_a_not_b == TRUE);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_b->low, span_b->high,
@@ -7694,7 +7694,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- HDassert(need_a_and_b == TRUE);
+ assert(need_a_and_b == TRUE);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_b->high,
@@ -7709,7 +7709,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- HDassert(need_b_not_a == TRUE);
+ assert(need_b_not_a == TRUE);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_b->high,
@@ -7760,8 +7760,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps between span 'a' and midle of span 'b' */
/* Make certain both spans either have a down span or both don't have one */
- HDassert((span_a->down != NULL && span_b->down != NULL) ||
- (span_a->down == NULL && span_b->down == NULL));
+ assert((span_a->down != NULL && span_b->down != NULL) ||
+ (span_a->down == NULL && span_b->down == NULL));
/* If there are no down spans, just add the overlapping area to the a_and_b list */
if (span_a->down == NULL) {
@@ -7786,7 +7786,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- HDassert(need_a_not_b == TRUE);
+ assert(need_a_not_b == TRUE);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_a->high,
@@ -7801,7 +7801,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- HDassert(need_a_and_b == TRUE);
+ assert(need_a_and_b == TRUE);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_a->high,
@@ -7816,7 +7816,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- HDassert(need_b_not_a == TRUE);
+ assert(need_b_not_a == TRUE);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_a->low, span_a->high,
@@ -7877,8 +7877,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for overlaps between lower part of span 'a' and upper part of span 'b' */
/* Make certain both spans either have a down span or both don't have one */
- HDassert((span_a->down != NULL && span_b->down != NULL) ||
- (span_a->down == NULL && span_b->down == NULL));
+ assert((span_a->down != NULL && span_b->down != NULL) ||
+ (span_a->down == NULL && span_b->down == NULL));
/* If there are no down spans, just add the overlapping area to the a_and_b list */
if (span_a->down == NULL) {
@@ -7903,7 +7903,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- HDassert(need_a_not_b == TRUE);
+ assert(need_a_not_b == TRUE);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_b->high,
@@ -7918,7 +7918,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- HDassert(need_a_and_b == TRUE);
+ assert(need_a_and_b == TRUE);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_b->high,
@@ -7933,7 +7933,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- HDassert(need_b_not_a == TRUE);
+ assert(need_b_not_a == TRUE);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_a->low, span_b->high,
@@ -8037,7 +8037,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
} /* end if */
else
/* Sanity check */
- HDassert(span_a == NULL && span_b == NULL);
+ assert(span_a == NULL && span_b == NULL);
} /* end else */
} /* end else */
@@ -8077,7 +8077,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
FUNC_ENTER_PACKAGE
/* Make certain both 'a' & 'b' spans have down span trees or neither does */
- HDassert((a_spans != NULL && b_spans != NULL) || (a_spans == NULL && b_spans == NULL));
+ assert((a_spans != NULL && b_spans != NULL) || (a_spans == NULL && b_spans == NULL));
/* Check if the span trees for the 'a' span and the 'b' span are the same */
if (H5S__hyper_cmp_spans(a_spans, b_spans)) {
@@ -8410,8 +8410,8 @@ H5S__hyper_merge_spans(H5S_t *space, H5S_hyper_span_info_t *new_spans)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(space);
- HDassert(new_spans);
+ assert(space);
+ assert(new_spans);
/* If this is the first span tree in the hyperslab selection, just use it */
if (space->select.sel_info.hslab->span_lst == NULL) {
@@ -8465,7 +8465,7 @@ H5S__hyper_spans_nelem_helper(H5S_hyper_span_info_t *spans, unsigned op_info_i,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(spans);
+ assert(spans);
/* Check if the span tree was already counted */
if (spans->op_info[op_info_i].op_gen == op_gen)
@@ -8535,7 +8535,7 @@ H5S__hyper_spans_nelem(H5S_hyper_span_info_t *spans)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(spans);
+ assert(spans);
/* Acquire an operation generation value for this operation */
op_gen = H5S__hyper_get_op_gen();
@@ -8579,8 +8579,8 @@ H5S__hyper_add_disjoint_spans(H5S_t *space, H5S_hyper_span_info_t *new_spans)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(new_spans);
+ assert(space);
+ assert(new_spans);
/* Update the number of elements in the selection */
space->select.num_elem += H5S__hyper_spans_nelem(new_spans);
@@ -8635,11 +8635,11 @@ H5S__hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(rank > 0);
- HDassert(start);
- HDassert(stride);
- HDassert(count);
- HDassert(block);
+ assert(rank > 0);
+ assert(start);
+ assert(stride);
+ assert(count);
+ assert(block);
/* Start creating spans in fastest changing dimension */
for (i = (int)(rank - 1); i >= 0; i--) {
@@ -8783,8 +8783,8 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(new_hyper_diminfo);
+ assert(space);
+ assert(new_hyper_diminfo);
/* Check for conditions that prevent us from using the fast algorithm here */
/* (and instead require H5S__hyper_rebuild) */
@@ -8939,13 +8939,13 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
/* Set the new diminfo values */
space->select.sel_info.hslab->diminfo.app[curr_dim].start =
space->select.sel_info.hslab->diminfo.opt[curr_dim].start = tmp_diminfo[curr_dim].start;
- HDassert(tmp_diminfo[curr_dim].stride > 0);
+ assert(tmp_diminfo[curr_dim].stride > 0);
space->select.sel_info.hslab->diminfo.app[curr_dim].stride =
space->select.sel_info.hslab->diminfo.opt[curr_dim].stride = tmp_diminfo[curr_dim].stride;
- HDassert(tmp_diminfo[curr_dim].count > 0);
+ assert(tmp_diminfo[curr_dim].count > 0);
space->select.sel_info.hslab->diminfo.app[curr_dim].count =
space->select.sel_info.hslab->diminfo.opt[curr_dim].count = tmp_diminfo[curr_dim].count;
- HDassert(tmp_diminfo[curr_dim].block > 0);
+ assert(tmp_diminfo[curr_dim].block > 0);
space->select.sel_info.hslab->diminfo.app[curr_dim].block =
space->select.sel_info.hslab->diminfo.opt[curr_dim].block = tmp_diminfo[curr_dim].block;
@@ -9000,7 +9000,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(spans);
+ assert(spans);
/* Initialization */
span = spans->head;
@@ -9026,7 +9026,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
hsize_t curr_block; /* Block size of current span */
/* Sanity check */
- HDassert(prev_span);
+ assert(prev_span);
/* Check that down spans match current slab info */
/* (Can skip check if previous span's down pointer is same as current one) */
@@ -9099,8 +9099,8 @@ H5S__hyper_rebuild(H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(space->select.sel_info.hslab->span_lst);
+ assert(space);
+ assert(space->select.sel_info.hslab->span_lst);
/* Check whether the slab can be rebuilt */
/* (Only regular selection can be rebuilt. If yes, fill in correct values) */
@@ -9152,8 +9152,8 @@ H5S__hyper_generate_spans(H5S_t *space)
FUNC_ENTER_PACKAGE
- HDassert(space);
- HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
+ assert(space);
+ assert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
/* Get the diminfo */
for (u = 0; u < space->extent.rank; u++) {
@@ -9206,8 +9206,8 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(spans1);
- HDassert(spans2);
+ assert(spans1);
+ assert(spans2);
/* Use low & high bounds to try to avoid spinning through the span lists */
if (H5S_RANGE_OVERLAP(spans1->low_bounds[0], spans1->high_bounds[0], spans2->low_bounds[0],
@@ -9223,7 +9223,7 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp
/* Check for spans in lowest dimension already */
if (span1->down) {
/* Sanity check */
- HDassert(span2->down);
+ assert(span2->down);
/* Check lower dimensions for overlap */
if (H5S__check_spans_overlap(span1->down, span2->down))
@@ -9251,8 +9251,8 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp
} /* end while */
/* Make certain we've exhausted our comparisons */
- HDassert((NULL == span1 && (NULL != span2 && NULL == span2->next)) ||
- ((NULL != span1 && NULL == span1->next) && NULL == span2));
+ assert((NULL == span1 && (NULL != span2 && NULL == span2->next)) ||
+ ((NULL != span1 && NULL == span1->next) && NULL == span2));
} /* end of */
done:
@@ -9303,13 +9303,13 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
FUNC_ENTER_PACKAGE
- HDassert(space1);
- HDassert(space2_span_lst);
- HDassert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
+ assert(space1);
+ assert(space2_span_lst);
+ assert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
/* The result is either a to-be-created space or an empty one */
- HDassert(*result == NULL || *result == space1);
- HDassert(space1->select.sel_info.hslab->span_lst);
- HDassert(span2_owned);
+ assert(*result == NULL || *result == space1);
+ assert(space1->select.sel_info.hslab->span_lst);
+ assert(span2_owned);
/* Reset flags to return */
*span2_owned = FALSE;
@@ -9372,7 +9372,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
case H5S_SELECT_NOTA:
if (!is_result_new) {
- HDassert(space1 == *result);
+ assert(space1 == *result);
/* Free the current selection */
if (H5S__hyper_free_span_info(space1->select.sel_info.hslab->span_lst) < 0)
@@ -9455,7 +9455,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
case H5S_SELECT_NOTB:
case H5S_SELECT_NOTA:
if (!is_result_new) {
- HDassert(space1 == *result);
+ assert(space1 == *result);
/* Free the current selection */
if (H5S__hyper_free_span_info(space1->select.sel_info.hslab->span_lst) < 0)
@@ -9482,7 +9482,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
/* Other than OR, the span_lst is set to NULL. And in OR,
* a_not_b is not needed
*/
- HDassert(NULL == (*result)->select.sel_info.hslab->span_lst);
+ assert(NULL == (*result)->select.sel_info.hslab->span_lst);
/* The results dataspace takes ownership of the spans */
/* (Since it must be NULL) */
@@ -9505,7 +9505,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
* 2. a_not_b will never be computed together with a_and_b
* because merging these two equals to a.
*/
- HDassert(NULL == (*result)->select.sel_info.hslab->span_lst);
+ assert(NULL == (*result)->select.sel_info.hslab->span_lst);
/* The results dataspace takes ownership of the spans */
/* (Since it must be NULL) */
@@ -9588,12 +9588,12 @@ H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], c
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
- HDassert(start);
- HDassert(stride);
- HDassert(count);
- HDassert(block);
+ assert(space);
+ assert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
+ assert(start);
+ assert(stride);
+ assert(count);
+ assert(block);
/* Generate span tree for new hyperslab information */
if (NULL == (new_spans = H5S__hyper_make_spans(space->extent.rank, start, stride, count, block)))
@@ -9629,7 +9629,7 @@ H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], c
unsigned u; /* Local index variable */
/* Sanity check */
- HDassert(space->select.sel_info.hslab->span_lst->head);
+ assert(space->select.sel_info.hslab->span_lst->head);
/* Build diminfo struct */
for (u = 0; u < space->extent.rank; u++) {
@@ -9680,14 +9680,14 @@ H5S__set_regular_hyperslab(H5S_t *space, const hsize_t start[], const hsize_t *a
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(start);
- HDassert(app_stride);
- HDassert(app_count);
- HDassert(app_block);
- HDassert(opt_stride);
- HDassert(opt_count);
- HDassert(opt_block);
+ assert(space);
+ assert(start);
+ assert(app_stride);
+ assert(app_count);
+ assert(app_block);
+ assert(opt_stride);
+ assert(opt_count);
+ assert(opt_block);
/* If we are setting a new selection, remove current selection first */
if (H5S_SELECT_RELEASE(space) < 0)
@@ -9781,9 +9781,9 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(start);
- HDassert(block);
+ assert(space);
+ assert(start);
+ assert(block);
/* Check for single block selection in dataspace */
single_block = TRUE;
@@ -9939,7 +9939,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
} /* end if */
/* Sanity check */
- HDassert(first_span_start <= last_span_start);
+ assert(first_span_start <= last_span_start);
/* Compute new start / count / block values */
new_start[u] = first_span_start;
@@ -10014,10 +10014,10 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space);
- HDassert(start);
- HDassert(count);
- HDassert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
+ assert(space);
+ assert(start);
+ assert(count);
+ assert(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID);
/* Point to the correct stride values */
if (stride == NULL)
@@ -10098,8 +10098,8 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
if (count[u] == 1)
int_stride[u] = 1;
else {
- HDassert((stride[u] > block[u]) ||
- ((stride[u] == block[u]) && (count[u] == H5S_UNLIMITED)));
+ assert((stride[u] > block[u]) ||
+ ((stride[u] == block[u]) && (count[u] == H5S_UNLIMITED)));
int_stride[u] = stride[u];
} /* end else */
int_count[u] = count[u];
@@ -10117,7 +10117,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
"cannot modify unlimited selection with another unlimited selection")
if (!((op == H5S_SELECT_AND) || (op == H5S_SELECT_NOTA)))
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported operation on unlimited selection")
- HDassert(space->select.sel_info.hslab->diminfo_valid);
+ assert(space->select.sel_info.hslab->diminfo_valid);
/* Clip unlimited selection to include new selection */
if (H5S_hyper_clip_unlim(space,
@@ -10128,7 +10128,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection")
/* If an empty space was returned it must be "none" */
- HDassert((space->select.num_elem > (hsize_t)0) || (space->select.type->type == H5S_SEL_NONE));
+ assert((space->select.num_elem > (hsize_t)0) || (space->select.type->type == H5S_SEL_NONE));
} /* end if */
/* Fixup operation for non-hyperslab selections */
@@ -10234,7 +10234,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
hbool_t single_block; /* Whether the selection is a single block */
/* Sanity check */
- HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
+ assert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
/* Handle unlimited selections */
if (unlim_dim >= 0) {
@@ -10260,14 +10260,14 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
*/
H5S__hyper_get_clip_diminfo(start[unlim_dim], opt_stride[unlim_dim], &tmp_count, &tmp_block,
bounds_end[unlim_dim] + (hsize_t)1);
- HDassert((tmp_count == 1) || (opt_count != H5S_hyper_ones_g));
- HDassert((tmp_block == 1) || (opt_block != H5S_hyper_ones_g));
+ assert((tmp_count == 1) || (opt_count != H5S_hyper_ones_g));
+ assert((tmp_block == 1) || (opt_block != H5S_hyper_ones_g));
if (opt_count != H5S_hyper_ones_g) {
- HDassert(opt_count == int_count);
+ assert(opt_count == int_count);
int_count[unlim_dim] = tmp_count;
} /* end if */
if (opt_block != H5S_hyper_ones_g) {
- HDassert(opt_block == int_block);
+ assert(opt_block == int_block);
int_block[unlim_dim] = tmp_block;
} /* end if */
} /* end if */
@@ -10413,12 +10413,12 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(old_space);
- HDassert(start);
- HDassert(count);
- HDassert(op >= H5S_SELECT_SET && op <= H5S_SELECT_NOTA);
- HDassert(new_space);
- HDassert(*new_space == NULL);
+ assert(old_space);
+ assert(start);
+ assert(count);
+ assert(op >= H5S_SELECT_SET && op <= H5S_SELECT_NOTA);
+ assert(new_space);
+ assert(*new_space == NULL);
/* Point to the correct stride values */
if (stride == NULL)
@@ -10603,14 +10603,14 @@ H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **resu
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(space1);
- HDassert(space2);
- HDassert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
- HDassert(space1->extent.rank == space2->extent.rank);
+ assert(space1);
+ assert(space2);
+ assert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
+ assert(space1->extent.rank == space2->extent.rank);
/* The result is either a to-be-created space or an empty one */
- HDassert(NULL == *result || *result == space1);
- HDassert(space1->select.sel_info.hslab->span_lst);
- HDassert(space2->select.sel_info.hslab->span_lst);
+ assert(NULL == *result || *result == space1);
+ assert(space1->select.sel_info.hslab->span_lst);
+ assert(space2->select.sel_info.hslab->span_lst);
/* Note: the offset of space2 is not considered here for bounding box */
if (H5S__fill_in_new_space(space1, op, space2->select.sel_info.hslab->span_lst, FALSE, &span2_owned,
@@ -10619,7 +10619,7 @@ H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **resu
/* Update diminfo if space2's diminfo was valid, otherwise just mark it as
* invalid if the spans were updated */
- HDassert(result);
+ assert(result);
if (updated_spans) {
if (space2->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
if (H5S__hyper_update_diminfo(*result, op, space2->select.sel_info.hslab->diminfo.opt) < 0)
@@ -10717,9 +10717,9 @@ H5S__combine_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space1);
- HDassert(space2);
- HDassert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
+ assert(space1);
+ assert(space2);
+ assert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
/* Check if space1 selections has span trees */
if (NULL == space1->select.sel_info.hslab->span_lst)
@@ -10858,9 +10858,9 @@ H5S__modify_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space1);
- HDassert(space2);
- HDassert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
+ assert(space1);
+ assert(space2);
+ assert(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA);
/* Check that the space selections both have span trees */
if (NULL == space1->select.sel_info.hslab->span_lst)
@@ -11008,14 +11008,14 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
FUNC_ENTER_PACKAGE
- HDassert(udata->nelem > 0);
+ assert(udata->nelem > 0);
/*
* Skip over skipped elements
*/
if (udata->skip > 0) {
/* Work upwards, finishing each span tree before moving up */
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
do {
/* Check for lowest dimension */
if (udata->ds_span[udata->depth]->down) {
@@ -11038,11 +11038,11 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
} /* end if */
} /* end if */
else {
- HDassert(udata->ds_rank - udata->depth == 1);
+ assert(udata->ds_rank - udata->depth == 1);
/* If we will run out of elements to skip in this span,
* skip the remainder of the skipped elements and break out */
- HDassert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
+ assert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
if (udata->skip < (udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1)) {
udata->ds_low[udata->depth] += udata->skip;
udata->skip = 0;
@@ -11073,7 +11073,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
/* Ran out of spans, move up one dimension */
udata->depth--;
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
udata->ds_low[udata->depth]++;
}
else
@@ -11082,9 +11082,9 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
} while ((udata->skip > 0) || (udata->ds_low[udata->depth] > udata->ds_span[udata->depth]->high));
/* Work downwards until skip is 0 */
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
while (udata->skip > 0) {
- HDassert(udata->ds_span[udata->depth]->down);
+ assert(udata->ds_span[udata->depth]->down);
udata->depth++;
udata->ds_span[udata->depth] = udata->ds_span[udata->depth - 1]->down->head;
udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low;
@@ -11108,7 +11108,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
/* Advance to next span */
udata->ds_span[udata->depth] = udata->ds_span[udata->depth]->next;
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low;
} while (udata->skip > 0);
} /* end if */
@@ -11128,7 +11128,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
/* Advance to next span */
udata->ds_span[udata->depth] = udata->ds_span[udata->depth]->next;
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low;
} while (udata->skip > 0);
} /* end else */
@@ -11140,7 +11140,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
*/
/* Work upwards, adding all elements of each span tree until it can't fit
* all elements */
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
do {
/* Check for lowest dimension */
if (udata->ds_span[udata->depth]->down) {
@@ -11223,11 +11223,11 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
} /* end if */
} /* end if */
else {
- HDassert(udata->ds_rank - udata->depth == 1);
+ assert(udata->ds_rank - udata->depth == 1);
/* If we will run out of elements to add in this span, add the
* remainder of the elements and break out */
- HDassert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
+ assert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
if (udata->nelem < (udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1)) {
if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth], 1, udata->ds_low[udata->depth],
udata->ds_low[udata->depth] + udata->nelem - 1, NULL) < 0)
@@ -11251,7 +11251,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
else if (udata->depth > 0) {
/* Append this span tree to the higher dimension's, and release
* ownership of it */
- HDassert(udata->ps_span_info[udata->depth]);
+ assert(udata->ps_span_info[udata->depth]);
if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth - 1],
udata->ds_rank - udata->depth + 1, udata->ds_low[udata->depth - 1],
udata->ds_low[udata->depth - 1],
@@ -11263,7 +11263,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
/* Ran out of spans, move up one dimension */
udata->depth--;
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
udata->ds_low[udata->depth]++;
} /* end if */
else {
@@ -11277,9 +11277,9 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
} while ((udata->nelem > 0) || (udata->ds_low[udata->depth] > udata->ds_span[udata->depth]->high));
/* Work downwards until nelem is 0 */
- HDassert(udata->ds_span[udata->depth] || (udata->nelem == 0));
+ assert(udata->ds_span[udata->depth] || (udata->nelem == 0));
while (udata->nelem > 0) {
- HDassert(udata->ds_span[udata->depth]->down);
+ assert(udata->ds_span[udata->depth]->down);
udata->depth++;
udata->ds_span[udata->depth] = udata->ds_span[udata->depth - 1]->down->head;
udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low;
@@ -11289,7 +11289,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
* any complete spans, advance to the first not fully added
* span and continue down
*/
- HDassert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
+ assert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
if (udata->nelem <
H5S__hyper_spans_nelem_helper(udata->ds_span[udata->depth]->down, 0, udata->op_gen) *
(udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1)) {
@@ -11364,16 +11364,16 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
/* Advance to next span */
udata->ds_span[udata->depth] = udata->ds_span[udata->depth]->next;
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low;
} while (udata->nelem > 0);
} /* end if */
else {
- HDassert(udata->ds_rank - udata->depth == 1);
+ assert(udata->ds_rank - udata->depth == 1);
do {
/* If we will run out of elements to add in this span, add
* the remainder of the elements and break out */
- HDassert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
+ assert(udata->ds_low[udata->depth] <= udata->ds_span[udata->depth]->high);
if (udata->nelem < (udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1)) {
if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth], 1,
udata->ds_low[udata->depth],
@@ -11392,14 +11392,14 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
/* Advance to next span */
udata->ds_span[udata->depth] = udata->ds_span[udata->depth]->next;
- HDassert(udata->ds_span[udata->depth]);
+ assert(udata->ds_span[udata->depth]);
udata->ds_low[udata->depth] = udata->ds_span[udata->depth]->low;
} while (udata->nelem > 0);
} /* end else */
} /* end while */
- HDassert(udata->skip == 0);
- HDassert(udata->nelem == 0);
+ assert(udata->skip == 0);
+ assert(udata->nelem == 0);
/* Mark projected space as changed (for all ranks) */
udata->ps_clean_bitmap = 0;
@@ -11407,7 +11407,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata)
done:
/* Cleanup on failure */
if (copied_span_info) {
- HDassert(ret_value < 0);
+ assert(ret_value < 0);
if (H5S__hyper_free_span_info(copied_span_info) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info")
copied_span_info = NULL;
@@ -11484,7 +11484,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
for (u = 0; u < count; u++) {
ss_span = ss_span_info->head;
sis_span = sis_span_info->head;
- HDassert(ss_span && sis_span);
+ assert(ss_span && sis_span);
ss_low = ss_span->low;
sis_low = sis_span->low;
@@ -11513,7 +11513,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
"can't iterate over source selections")
} /* end if */
else {
- HDassert(depth == udata->ss_rank - 1);
+ assert(depth == udata->ss_rank - 1);
/* Add skipped elements if there's a pre-gap */
if (ss_low < sis_low) {
@@ -11539,7 +11539,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
} /* end if */
else if (ss_span->high == high) {
/* Advance source span */
- HDassert(ss_span->high < sis_span->high);
+ assert(ss_span->high < sis_span->high);
sis_low = high + 1;
ss_span = ss_span->next;
if (ss_span)
@@ -11547,7 +11547,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
} /* end if */
else {
/* Advance source intersect span */
- HDassert(ss_span->high > sis_span->high);
+ assert(ss_span->high > sis_span->high);
ss_low = high + 1;
sis_span = sis_span->next;
if (sis_span)
@@ -11574,7 +11574,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
} /* end if */
else {
/* Advance source intersect span */
- HDassert(ss_low > sis_span->high);
+ assert(ss_low > sis_span->high);
sis_span = sis_span->next;
if (sis_span)
sis_low = sis_span->low;
@@ -11614,18 +11614,18 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
* first iteration of the loop, if so we do not need to continue
* looping and can just copy the result */
if (udata->ps_clean_bitmap & (((uint32_t)1) << depth)) {
- HDassert(u == 0);
+ assert(u == 0);
if (udata->skip == old_skip) {
/* First case: algorithm added only elements */
- HDassert(udata->nelem >= old_nelem);
+ assert(udata->nelem >= old_nelem);
udata->nelem += (count - 1) * (udata->nelem - old_nelem);
} /* end if */
else if (udata->nelem == 0) {
/* Second case: algorithm added only skip. In this case,
* nelem must be 0 since otherwise adding skip would have
* triggered a change in the projected space */
- HDassert(old_nelem == 0);
- HDassert(udata->skip > old_skip);
+ assert(old_nelem == 0);
+ assert(udata->skip > old_skip);
udata->skip += (count - 1) * (udata->skip - old_skip);
} /* end if */
else {
@@ -11635,9 +11635,9 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
hsize_t skip_add;
hsize_t nelem_add;
- HDassert(udata->nelem > 0);
- HDassert(udata->skip > old_skip);
- HDassert(old_nelem == 0);
+ assert(udata->nelem > 0);
+ assert(udata->skip > old_skip);
+ assert(old_nelem == 0);
skip_add = udata->skip - old_skip;
nelem_add = udata->nelem - old_nelem;
@@ -11719,18 +11719,18 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(src_space);
- HDassert(dst_space);
- HDassert(src_intersect_space);
- HDassert(proj_space);
+ assert(src_space);
+ assert(dst_space);
+ assert(src_intersect_space);
+ assert(proj_space);
/* Assert that src_space and src_intersect_space have same rank and there
* are no point selections */
- HDassert(H5S_GET_EXTENT_NDIMS(src_space) == H5S_GET_EXTENT_NDIMS(src_intersect_space));
- HDassert(H5S_GET_SELECT_NPOINTS(src_space) == H5S_GET_SELECT_NPOINTS(dst_space));
- HDassert(H5S_GET_SELECT_TYPE(src_space) != H5S_SEL_POINTS);
- HDassert(H5S_GET_SELECT_TYPE(dst_space) != H5S_SEL_POINTS);
- HDassert(H5S_GET_SELECT_TYPE(src_intersect_space) == H5S_SEL_HYPERSLABS);
+ assert(H5S_GET_EXTENT_NDIMS(src_space) == H5S_GET_EXTENT_NDIMS(src_intersect_space));
+ assert(H5S_GET_SELECT_NPOINTS(src_space) == H5S_GET_SELECT_NPOINTS(dst_space));
+ assert(H5S_GET_SELECT_TYPE(src_space) != H5S_SEL_POINTS);
+ assert(H5S_GET_SELECT_TYPE(dst_space) != H5S_SEL_POINTS);
+ assert(H5S_GET_SELECT_TYPE(src_intersect_space) == H5S_SEL_HYPERSLABS);
/* Set up ss_span_info */
if (H5S_GET_SELECT_TYPE(src_space) == H5S_SEL_HYPERSLABS) {
@@ -11745,7 +11745,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
} /* end if */
else {
/* Create temporary span tree from all selection */
- HDassert(H5S_GET_SELECT_TYPE(src_space) == H5S_SEL_ALL);
+ assert(H5S_GET_SELECT_TYPE(src_space) == H5S_SEL_ALL);
if (NULL == (ss_span_info_buf =
H5S__hyper_make_spans(H5S_GET_EXTENT_NDIMS(src_space), H5S_hyper_zeros_g,
@@ -11767,7 +11767,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
} /* end if */
else {
/* Create temporary span tree from all selection */
- HDassert(H5S_GET_SELECT_TYPE(dst_space) == H5S_SEL_ALL);
+ assert(H5S_GET_SELECT_TYPE(dst_space) == H5S_SEL_ALL);
if (NULL == (ds_span_info_buf =
H5S__hyper_make_spans(H5S_GET_EXTENT_NDIMS(dst_space), H5S_hyper_zeros_g,
@@ -11784,7 +11784,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Initialize udata */
/* We will use op_info[0] for nelem and op_info[1] for copied spans */
- HDmemset(&udata, 0, sizeof(udata));
+ memset(&udata, 0, sizeof(udata));
udata.ds_span[0] = ds_span_info->head;
udata.ds_low[0] = udata.ds_span[0]->low;
udata.ss_rank = H5S_GET_EXTENT_NDIMS(src_space);
@@ -11865,7 +11865,7 @@ done:
unsigned u;
for (u = 0; u < H5S_MAX_RANK; u++)
- HDassert(!udata.ps_span_info[u]);
+ assert(!udata.ps_span_info[u]);
}
#endif /* NDEBUG */
@@ -11915,11 +11915,11 @@ H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, hsize
*count = (hsize_t)1;
} /* end if */
else {
- HDassert(*count == H5S_UNLIMITED);
+ assert(*count == H5S_UNLIMITED);
/* Calculate initial count (last block may be partial) */
*count = (clip_size - start + stride - (hsize_t)1) / stride;
- HDassert(*count > (hsize_t)0);
+ assert(*count > (hsize_t)0);
} /* end else */
FUNC_LEAVE_NOAPI_VOID
@@ -11958,11 +11958,11 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size)
FUNC_ENTER_NOAPI(FAIL)
/* Check parameters */
- HDassert(space);
+ assert(space);
hslab = space->select.sel_info.hslab;
- HDassert(hslab);
- HDassert(hslab->unlim_dim >= 0);
- HDassert(!hslab->span_lst);
+ assert(hslab);
+ assert(hslab->unlim_dim >= 0);
+ assert(!hslab->span_lst);
/* Save original unlimited dimension */
orig_unlim_dim = hslab->unlim_dim;
@@ -12003,7 +12003,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size)
/* Check if last block is partial. If superset is set, just keep the
* last block complete to speed computation. */
- HDassert(clip_size > diminfo->start);
+ assert(clip_size > diminfo->start);
if (((diminfo->stride * (diminfo->count - (hsize_t)1)) + diminfo->block) >
(clip_size - diminfo->start)) {
hsize_t start[H5S_MAX_RANK];
@@ -12012,7 +12012,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size)
/* Last block is partial, need to construct compound selection */
/* Fill start with zeros */
- HDmemset(start, 0, sizeof(start));
+ memset(start, 0, sizeof(start));
/* Set block to clip_size in unlimited dimension, H5S_MAX_SIZE in
* others so only unlimited dimension is clipped */
@@ -12089,9 +12089,9 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, hbo
FUNC_ENTER_PACKAGE_NOERR
/* Check parameters */
- HDassert(clip_space);
- HDassert(clip_space->select.sel_info.hslab);
- HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0);
+ assert(clip_space);
+ assert(clip_space->select.sel_info.hslab);
+ assert(clip_space->select.sel_info.hslab->unlim_dim >= 0);
diminfo = &clip_space->select.sel_info.hslab->diminfo.opt[clip_space->select.sel_info.hslab->unlim_dim];
@@ -12104,7 +12104,7 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, hbo
else {
/* Unlimited count, need to match extent so a block (possibly) gets cut
* off so the number of slices matches num_slices */
- HDassert(diminfo->count == H5S_UNLIMITED);
+ assert(diminfo->count == H5S_UNLIMITED);
/* Calculate number of complete blocks in clip_space */
count = num_slices / diminfo->block;
@@ -12156,20 +12156,20 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, hbo
FUNC_ENTER_NOAPI_NOERR
/* Check parameters */
- HDassert(clip_space);
- HDassert(match_space);
- HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0);
+ assert(clip_space);
+ assert(match_space);
+ assert(clip_space->select.sel_info.hslab->unlim_dim >= 0);
/* Check for "none" match space */
if (match_space->select.type->type == H5S_SEL_NONE)
num_slices = (hsize_t)0;
else {
- HDassert(match_space->select.type->type == H5S_SEL_HYPERSLABS);
- HDassert(match_space->select.sel_info.hslab);
+ assert(match_space->select.type->type == H5S_SEL_HYPERSLABS);
+ assert(match_space->select.sel_info.hslab);
/* Calculate number of slices */
num_slices = match_space->select.num_elem / clip_space->select.sel_info.hslab->num_elem_non_unlim;
- HDassert((match_space->select.num_elem % clip_space->select.sel_info.hslab->num_elem_non_unlim) == 0);
+ assert((match_space->select.num_elem % clip_space->select.sel_info.hslab->num_elem_non_unlim) == 0);
} /* end else */
/* Call "real" get_clip_extent function */
@@ -12213,14 +12213,14 @@ H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, const H5S_t *match_spac
FUNC_ENTER_NOAPI_NOERR
/* Check parameters */
- HDassert(clip_space);
- HDassert(match_space);
- HDassert(clip_space->select.sel_info.hslab);
- HDassert(match_space->select.sel_info.hslab);
- HDassert(clip_space->select.sel_info.hslab->unlim_dim >= 0);
- HDassert(match_space->select.sel_info.hslab->unlim_dim >= 0);
- HDassert(clip_space->select.sel_info.hslab->num_elem_non_unlim ==
- match_space->select.sel_info.hslab->num_elem_non_unlim);
+ assert(clip_space);
+ assert(match_space);
+ assert(clip_space->select.sel_info.hslab);
+ assert(match_space->select.sel_info.hslab);
+ assert(clip_space->select.sel_info.hslab->unlim_dim >= 0);
+ assert(match_space->select.sel_info.hslab->unlim_dim >= 0);
+ assert(clip_space->select.sel_info.hslab->num_elem_non_unlim ==
+ match_space->select.sel_info.hslab->num_elem_non_unlim);
match_diminfo =
&match_space->select.sel_info.hslab->diminfo.opt[match_space->select.sel_info.hslab->unlim_dim];
@@ -12242,12 +12242,12 @@ H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, const H5S_t *match_spac
num_slices = block * count;
/* Check for partial last block */
- HDassert(match_clip_size >= match_diminfo->start);
+ assert(match_clip_size >= match_diminfo->start);
if (((match_diminfo->stride * (count - (hsize_t)1)) + block) >
(match_clip_size - match_diminfo->start)) {
/* Subtract slices missing from last block */
- HDassert((((match_diminfo->stride * (count - (hsize_t)1)) + block) -
- (match_clip_size - match_diminfo->start)) < num_slices);
+ assert((((match_diminfo->stride * (count - (hsize_t)1)) + block) -
+ (match_clip_size - match_diminfo->start)) < num_slices);
num_slices -= ((match_diminfo->stride * (count - (hsize_t)1)) + block) -
(match_clip_size - match_diminfo->start);
} /* end if */
@@ -12296,11 +12296,11 @@ H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index)
FUNC_ENTER_NOAPI(NULL)
/* Check parameters */
- HDassert(space);
+ assert(space);
hslab = space->select.sel_info.hslab;
- HDassert(hslab);
- HDassert(hslab->unlim_dim >= 0);
- HDassert(hslab->diminfo.opt[hslab->unlim_dim].count == H5S_UNLIMITED);
+ assert(hslab);
+ assert(hslab->unlim_dim >= 0);
+ assert(hslab->diminfo.opt[hslab->unlim_dim].count == H5S_UNLIMITED);
/* Set start to select block_indexth block in unlimited dimension and set
* count to 1 in that dimension to only select that block. Copy all other
@@ -12374,11 +12374,11 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *pa
FUNC_ENTER_NOAPI_NOERR
/* Check parameters */
- HDassert(space);
+ assert(space);
hslab = space->select.sel_info.hslab;
- HDassert(hslab);
- HDassert(hslab->unlim_dim >= 0);
- HDassert(hslab->diminfo.opt[hslab->unlim_dim].count == H5S_UNLIMITED);
+ assert(hslab);
+ assert(hslab->unlim_dim >= 0);
+ assert(hslab->diminfo.opt[hslab->unlim_dim].count == H5S_UNLIMITED);
diminfo = &hslab->diminfo.opt[hslab->unlim_dim];
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index c1465d0..417ade6 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -126,7 +126,7 @@ H5S__mpio_all_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
+ assert(space);
/* Just treat the entire extent as a block of bytes */
if ((snelmts = (hssize_t)H5S_GET_EXTENT_NPOINTS(space)) < 0)
@@ -380,7 +380,7 @@ H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_typ
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
+ assert(space);
/* Get the total number of points selected */
if ((snum_points = (hssize_t)H5S_GET_SELECT_NPOINTS(space)) < 0)
@@ -520,7 +520,7 @@ H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Da
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
+ assert(space);
/* Get the total number of points selected */
if ((snum_points = (hssize_t)H5S_GET_SELECT_NPOINTS(space)) < 0)
@@ -681,8 +681,8 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(sizeof(MPI_Aint) >= sizeof(elmt_size));
+ assert(space);
+ assert(sizeof(MPI_Aint) >= sizeof(elmt_size));
bigio_count = H5_mpi_get_bigio_count();
@@ -697,7 +697,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
/* Abbreviate args */
diminfo = sel_iter->u.hyp.diminfo;
- HDassert(diminfo);
+ assert(diminfo);
/* Make a local copy of the dimension info so we can operate with them */
@@ -707,7 +707,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
rank = sel_iter->u.hyp.iter_rank;
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "%s: Flattened selection\n", __func__);
+ fprintf(H5DEBUG(S), "%s: Flattened selection\n", __func__);
#endif
for (u = 0; u < rank; ++u) {
H5_CHECK_OVERFLOW(diminfo[u].start, hsize_t, hssize_t)
@@ -719,21 +719,21 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
#ifdef H5S_DEBUG
if (H5DEBUG(S)) {
- HDfprintf(H5DEBUG(S),
- "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE
- " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
- __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
+ fprintf(H5DEBUG(S),
+ "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE
+ " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
+ __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
if (u == 0)
- HDfprintf(H5DEBUG(S), " rank=%u\n", rank);
+ fprintf(H5DEBUG(S), " rank=%u\n", rank);
else
- HDfprintf(H5DEBUG(S), "\n");
+ fprintf(H5DEBUG(S), "\n");
}
#endif
/* Sanity check */
- HDassert(d[u].block > 0);
- HDassert(d[u].count > 0);
- HDassert(d[u].xtent > 0);
+ assert(d[u].block > 0);
+ assert(d[u].count > 0);
+ assert(d[u].xtent > 0);
} /* end for */
} /* end if */
else {
@@ -741,7 +741,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
rank = space->extent.rank;
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "%s: Non-flattened selection\n", __func__);
+ fprintf(H5DEBUG(S), "%s: Non-flattened selection\n", __func__);
#endif
for (u = 0; u < rank; ++u) {
H5_CHECK_OVERFLOW(diminfo[u].start, hsize_t, hssize_t)
@@ -753,21 +753,21 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
#ifdef H5S_DEBUG
if (H5DEBUG(S)) {
- HDfprintf(H5DEBUG(S),
- "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE
- " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
- __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
+ fprintf(H5DEBUG(S),
+ "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE
+ " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE,
+ __func__, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent);
if (u == 0)
- HDfprintf(H5DEBUG(S), " rank=%u\n", rank);
+ fprintf(H5DEBUG(S), " rank=%u\n", rank);
else
- HDfprintf(H5DEBUG(S), "\n");
+ fprintf(H5DEBUG(S), "\n");
}
#endif
/* Sanity check */
- HDassert(d[u].block > 0);
- HDassert(d[u].count > 0);
- HDassert(d[u].xtent > 0);
+ assert(d[u].block > 0);
+ assert(d[u].count > 0);
+ assert(d[u].xtent > 0);
} /* end for */
} /* end else */
@@ -780,8 +780,8 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
#ifdef H5S_DEBUG
if (H5DEBUG(S)) {
i = ((int)rank) - 1;
- HDfprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i], i,
- max_xtent[i]);
+ fprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i], i,
+ max_xtent[i]);
}
#endif
for (i = ((int)rank) - 2; i >= 0; --i) {
@@ -789,8 +789,8 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
max_xtent[i] = max_xtent[i + 1] * d[i].xtent;
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i,
- offset[i], i, max_xtent[i]);
+ fprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i],
+ i, max_xtent[i]);
#endif
} /* end for */
@@ -805,9 +805,9 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
*******************************************************/
#ifdef H5S_DEBUG
if (H5DEBUG(S)) {
- HDfprintf(H5DEBUG(S), "%s: Making contig type %zu MPI_BYTEs\n", __func__, elmt_size);
+ fprintf(H5DEBUG(S), "%s: Making contig type %zu MPI_BYTEs\n", __func__, elmt_size);
for (i = ((int)rank) - 1; i >= 0; --i)
- HDfprintf(H5DEBUG(S), "d[%d].xtent=%" PRIuHSIZE "\n", i, d[i].xtent);
+ fprintf(H5DEBUG(S), "d[%d].xtent=%" PRIuHSIZE "\n", i, d[i].xtent);
}
#endif
@@ -835,16 +835,16 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
for (i = ((int)rank) - 1; i >= 0; --i) {
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S),
- "%s: Dimension i=%d \n"
- "start=%" PRIdHSIZE " count=%" PRIuHSIZE " block=%" PRIuHSIZE " stride=%" PRIuHSIZE
- ", xtent=%" PRIuHSIZE " max_xtent=%" PRIuHSIZE "\n",
- __func__, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]);
+ fprintf(H5DEBUG(S),
+ "%s: Dimension i=%d \n"
+ "start=%" PRIdHSIZE " count=%" PRIuHSIZE " block=%" PRIuHSIZE " stride=%" PRIuHSIZE
+ ", xtent=%" PRIuHSIZE " max_xtent=%" PRIuHSIZE "\n",
+ __func__, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]);
#endif
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "%s: i=%d Making vector-type \n", __func__, i);
+ fprintf(H5DEBUG(S), "%s: i=%d Making vector-type \n", __func__, i);
#endif
/****************************************
* Build vector type of the selection.
@@ -943,7 +943,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
MPI_Datatype interm_type;
int block_len = 1;
- HDassert(0 == lb);
+ assert(0 == lb);
mpi_code = MPI_Type_create_hindexed(1, &block_len, &start_disp, outer_type, &interm_type);
MPI_Type_free(&outer_type);
@@ -981,8 +981,8 @@ done:
#ifdef H5S_DEBUG
if (H5DEBUG(S))
- HDfprintf(H5DEBUG(S), "Leave %s, count=%d is_derived_type=%s\n", __func__, *count,
- (*is_derived_type) ? "TRUE" : "FALSE");
+ fprintf(H5DEBUG(S), "Leave %s, count=%d is_derived_type=%s\n", __func__, *count,
+ (*is_derived_type) ? "TRUE" : "FALSE");
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__mpio_reg_hyper_type() */
@@ -1021,10 +1021,10 @@ H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *ne
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(space->extent.size);
- HDassert(space->select.sel_info.hslab->span_lst);
- HDassert(space->select.sel_info.hslab->span_lst->head);
+ assert(space);
+ assert(space->extent.size);
+ assert(space->select.sel_info.hslab->span_lst);
+ assert(space->select.sel_info.hslab->span_lst->head);
bigio_count = H5_mpi_get_bigio_count();
/* Create the base type for an element */
@@ -1092,7 +1092,7 @@ H5S__release_datatype(H5S_mpio_mpitype_list_t *type_list)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(type_list);
+ assert(type_list);
/* Iterate over the list, freeing the MPI data types */
curr = type_list->head;
@@ -1151,8 +1151,8 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(spans);
- HDassert(type_list);
+ assert(spans);
+ assert(type_list);
bigio_count = H5_mpi_get_bigio_count();
/* Check if we've visited this span tree before */
@@ -1396,8 +1396,8 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(space);
- HDassert(elmt_size);
+ assert(space);
+ assert(elmt_size);
/* Create MPI type based on the kind of selection */
switch (H5S_GET_EXTENT_TYPE(space)) {
@@ -1420,7 +1420,7 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int
case H5S_SEL_POINTS:
case H5S_SEL_HYPERSLABS:
/* Sanity check */
- HDassert(!do_permute);
+ assert(!do_permute);
if (H5S__mpio_permute_type(space, elmt_size, permute_map, new_type, count,
is_derived_type) < 0)
@@ -1431,7 +1431,7 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert("unknown selection type" && 0);
+ assert("unknown selection type" && 0);
break;
} /* end switch */
} /* end if */
@@ -1473,7 +1473,7 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int
case H5S_SEL_ERROR:
case H5S_SEL_N:
default:
- HDassert("unknown selection type" && 0);
+ assert("unknown selection type" && 0);
break;
} /* end switch */
} /* end else */
@@ -1481,7 +1481,7 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int
case H5S_NO_CLASS:
default:
- HDassert("unknown dataspace type" && 0);
+ assert("unknown dataspace type" && 0);
break;
} /* end switch */
diff --git a/src/H5Snone.c b/src/H5Snone.c
index c6e862c..f7f0b8a 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -148,8 +148,8 @@ H5S__none_iter_init(H5S_t H5_ATTR_UNUSED *space, H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
- HDassert(iter);
+ assert(space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
+ assert(iter);
/* Initialize type of selection iterator */
iter->type = H5S_sel_iter_none;
@@ -176,8 +176,8 @@ H5S__none_iter_coords(const H5S_sel_iter_t H5_ATTR_UNUSED *iter, hsize_t H5_ATTR
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(coords);
+ assert(iter);
+ assert(coords);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__none_iter_coords() */
@@ -202,9 +202,9 @@ H5S__none_iter_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter, hsize_t H5_ATTR_
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(start);
- HDassert(end);
+ assert(iter);
+ assert(start);
+ assert(end);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__none_iter_block() */
@@ -227,7 +227,7 @@ H5S__none_iter_nelmts(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(0)
} /* end H5S__none_iter_nelmts() */
@@ -255,7 +255,7 @@ H5S__none_iter_has_next_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__none_iter_has_next_block() */
@@ -284,8 +284,8 @@ H5S__none_iter_next(H5S_sel_iter_t H5_ATTR_UNUSED *iter, size_t H5_ATTR_UNUSED n
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(nelem > 0);
+ assert(iter);
+ assert(nelem > 0);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__none_iter_next() */
@@ -313,7 +313,7 @@ H5S__none_iter_next_block(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__none_iter_next_block() */
@@ -355,13 +355,13 @@ H5S__none_iter_get_seq_list(H5S_sel_iter_t H5_ATTR_UNUSED *iter, size_t H5_ATTR_
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* "none" selections don't generate sequences of bytes */
*nseq = 0;
@@ -395,7 +395,7 @@ H5S__none_iter_release(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__none_iter_release() */
@@ -423,7 +423,7 @@ H5S__none_release(H5S_t H5_ATTR_UNUSED *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__none_release() */
@@ -453,8 +453,8 @@ H5S__none_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUS
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
/* Set number of elements in selection */
dst->select.num_elem = 0;
@@ -487,7 +487,7 @@ H5S__none_is_valid(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__none_is_valid() */
@@ -516,7 +516,7 @@ H5S__none_serial_size(H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* Basic number of bytes required to serialize point selection:
* <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
@@ -554,9 +554,9 @@ H5S__none_serialize(H5S_t *space, uint8_t **p)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(p);
- HDassert(pp);
+ assert(space);
+ assert(p);
+ assert(pp);
/* Store the preamble information */
UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */
@@ -603,8 +603,8 @@ H5S__none_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbo
FUNC_ENTER_PACKAGE
- HDassert(p);
- HDassert(*p);
+ assert(p);
+ assert(*p);
/* As part of the efforts to push all selection-type specific coding
to the callbacks, the coding for the allocation of a null dataspace
@@ -679,9 +679,9 @@ H5S__none_bounds(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *star
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(start);
+ assert(end);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S_none_bounds() */
@@ -711,8 +711,8 @@ H5S__none_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *offs
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__none_offset() */
@@ -767,7 +767,7 @@ H5S__none_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(FALSE)
} /* end H5S__none_is_contiguous() */
@@ -795,7 +795,7 @@ H5S__none_is_single(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(FALSE)
} /* end H5S__none_is_single() */
@@ -825,7 +825,7 @@ H5S__none_is_regular(H5S_t H5_ATTR_UNUSED *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__none_is_regular() */
@@ -855,8 +855,8 @@ H5S__none_shape_same(H5S_t H5_ATTR_UNUSED *space1, H5S_t H5_ATTR_UNUSED *space2)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space1);
- HDassert(space2);
+ assert(space1);
+ assert(space2);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S__none_shape_same() */
@@ -887,10 +887,10 @@ H5S__none_intersect_block(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNU
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(space);
- HDassert(H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
+ assert(start);
+ assert(end);
FUNC_LEAVE_NOAPI(FALSE)
} /* end H5S__none_intersect_block() */
@@ -919,8 +919,8 @@ H5S__none_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *of
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__none_adjust_u() */
@@ -949,8 +949,8 @@ H5S__none_adjust_s(H5S_t H5_ATTR_UNUSED *space, const hssize_t H5_ATTR_UNUSED *o
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__none_adjust_s() */
@@ -973,8 +973,8 @@ H5S__none_project_scalar(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUS
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
- HDassert(offset);
+ assert(space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
+ assert(offset);
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5S__none_project_scalar() */
@@ -1001,9 +1001,9 @@ H5S__none_project_simple(const H5S_t H5_ATTR_UNUSED *base_space, H5S_t *new_spac
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base_space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(base_space));
- HDassert(new_space);
- HDassert(offset);
+ assert(base_space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(base_space));
+ assert(new_space);
+ assert(offset);
/* Select the entire new space */
if (H5S_select_none(new_space) < 0)
@@ -1038,7 +1038,7 @@ H5S_select_none(H5S_t *space)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space);
+ assert(space);
/* Remove current selection first */
if (H5S_SELECT_RELEASE(space) < 0)
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index 5233946..d9a7e1e 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -176,8 +176,8 @@ H5S__point_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
- HDassert(iter);
+ assert(space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
+ assert(iter);
/* If this iterator is created from an API call, by default we clone the
* selection now, as the dataspace could be modified or go out of scope.
@@ -227,8 +227,8 @@ H5S__point_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(coords);
+ assert(iter);
+ assert(coords);
/* Copy the offset of the current point */
H5MM_memcpy(coords, iter->u.pnt.curr->pnt, sizeof(hsize_t) * iter->rank);
@@ -255,9 +255,9 @@ H5S__point_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(start);
- HDassert(end);
+ assert(iter);
+ assert(start);
+ assert(end);
/* Copy the current point as a block */
H5MM_memcpy(start, iter->u.pnt.curr->pnt, sizeof(hsize_t) * iter->rank);
@@ -284,7 +284,7 @@ H5S__point_iter_nelmts(const H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
FUNC_LEAVE_NOAPI(iter->elmt_left)
} /* end H5S__point_iter_nelmts() */
@@ -314,7 +314,7 @@ H5S__point_iter_has_next_block(const H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
/* Check if there is another point in the list */
if (iter->u.pnt.curr->next == NULL)
@@ -348,8 +348,8 @@ H5S__point_iter_next(H5S_sel_iter_t *iter, size_t nelem)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(nelem > 0);
+ assert(iter);
+ assert(nelem > 0);
/* Increment the iterator */
while (nelem > 0) {
@@ -383,7 +383,7 @@ H5S__point_iter_next_block(H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
/* Increment the iterator */
iter->u.pnt.curr = iter->u.pnt.curr->next;
@@ -437,13 +437,13 @@ H5S__point_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
- HDassert(maxseq > 0);
- HDassert(maxelem > 0);
- HDassert(nseq);
- HDassert(nelem);
- HDassert(off);
- HDassert(len);
+ assert(iter);
+ assert(maxseq > 0);
+ assert(maxelem > 0);
+ assert(nseq);
+ assert(nelem);
+ assert(off);
+ assert(len);
/* Choose the minimum number of bytes to sequence through */
H5_CHECK_OVERFLOW(iter->elmt_left, hsize_t, size_t);
@@ -544,7 +544,7 @@ H5S__point_iter_release(H5S_sel_iter_t *iter)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(iter);
+ assert(iter);
/* If this iterator copied the point list, we must free it */
if ((iter->flags & H5S_SEL_ITER_API_CALL) && !(iter->flags & H5S_SEL_ITER_SHARE_WITH_DATASPACE))
@@ -582,10 +582,10 @@ H5S__point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *c
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(space);
- HDassert(num_elem > 0);
- HDassert(coord);
- HDassert(op == H5S_SELECT_SET || op == H5S_SELECT_APPEND || op == H5S_SELECT_PREPEND);
+ assert(space);
+ assert(num_elem > 0);
+ assert(coord);
+ assert(op == H5S_SELECT_SET || op == H5S_SELECT_APPEND || op == H5S_SELECT_PREPEND);
for (u = 0; u < num_elem; u++) {
unsigned dim; /* Counter for dimensions */
@@ -640,7 +640,7 @@ H5S__point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *c
tmp_node = space->select.sel_info.pnt_lst->head;
if (tmp_node != NULL) {
- HDassert(space->select.sel_info.pnt_lst->tail);
+ assert(space->select.sel_info.pnt_lst->tail);
space->select.sel_info.pnt_lst->tail->next = top;
} /* end if */
else
@@ -694,7 +694,7 @@ H5S__point_release(H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
/* Free the point list */
H5S__free_pnt_list(space->select.sel_info.pnt_lst);
@@ -743,10 +743,10 @@ H5S_select_elements(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space);
- HDassert(num_elem);
- HDassert(coord);
- HDassert(op == H5S_SELECT_SET || op == H5S_SELECT_APPEND || op == H5S_SELECT_PREPEND);
+ assert(space);
+ assert(num_elem);
+ assert(coord);
+ assert(op == H5S_SELECT_SET || op == H5S_SELECT_APPEND || op == H5S_SELECT_PREPEND);
/* If we are setting a new selection, remove current selection first */
if (op == H5S_SELECT_SET || H5S_GET_SELECT_TYPE(space) != H5S_SEL_POINTS)
@@ -763,7 +763,7 @@ H5S_select_elements(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize
/* Set the bound box to the default value */
H5VM_array_fill(space->select.sel_info.pnt_lst->low_bounds, &tmp, sizeof(hsize_t),
space->extent.rank);
- HDmemset(space->select.sel_info.pnt_lst->high_bounds, 0, sizeof(hsize_t) * space->extent.rank);
+ memset(space->select.sel_info.pnt_lst->high_bounds, 0, sizeof(hsize_t) * space->extent.rank);
}
/* Add points to selection */
@@ -806,8 +806,8 @@ H5S__copy_pnt_list(const H5S_pnt_list_t *src, unsigned rank)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(src);
- HDassert(rank > 0);
+ assert(src);
+ assert(rank > 0);
/* Allocate room for the head of the point list */
if (NULL == (dst = H5FL_MALLOC(H5S_pnt_list_t)))
@@ -881,7 +881,7 @@ H5S__free_pnt_list(H5S_pnt_list_t *pnt_lst)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(pnt_lst);
+ assert(pnt_lst);
/* Traverse the list, freeing all memory */
curr = pnt_lst->head;
@@ -925,8 +925,8 @@ H5S__point_copy(H5S_t *dst, const H5S_t *src, hbool_t H5_ATTR_UNUSED share_selec
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(src);
- HDassert(dst);
+ assert(src);
+ assert(dst);
/* Allocate room for the head of the point list */
if (NULL ==
@@ -965,7 +965,7 @@ H5S__point_is_valid(const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* Check each dimension */
for (u = 0; u < space->extent.rank; u++) {
@@ -1065,7 +1065,7 @@ H5S__point_get_version_enc_size(const H5S_t *space, uint32_t *version, uint8_t *
FUNC_ENTER_PACKAGE
/* Get bounding box for the selection */
- HDmemset(bounds_end, 0, sizeof(bounds_end));
+ memset(bounds_end, 0, sizeof(bounds_end));
if (H5S__point_bounds(space, bounds_start, bounds_end) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds")
@@ -1166,7 +1166,7 @@ H5S__point_serial_size(H5S_t *space)
FUNC_ENTER_PACKAGE
- HDassert(space);
+ assert(space);
/* Determine the version and encoded size for point selection */
if (H5S__point_get_version_enc_size(space, &version, &enc_size) < 0)
@@ -1232,10 +1232,10 @@ H5S__point_serialize(H5S_t *space, uint8_t **p)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
- HDassert(p);
+ assert(space);
+ assert(p);
pp = (*p);
- HDassert(pp);
+ assert(pp);
/* Determine the version and encoded size for point selection info */
if (H5S__point_get_version_enc_size(space, &version, &enc_size) < 0)
@@ -1249,7 +1249,7 @@ H5S__point_serialize(H5S_t *space, uint8_t **p)
*(pp)++ = enc_size; /* Store size of point info */
}
else {
- HDassert(version == H5S_POINT_VERSION_1);
+ assert(version == H5S_POINT_VERSION_1);
UINT32ENCODE(pp, (uint32_t)0); /* Store the un-used padding */
lenp = pp; /* Keep the pointer to the length location for later */
pp += 4; /* Skip over space for length */
@@ -1261,7 +1261,7 @@ H5S__point_serialize(H5S_t *space, uint8_t **p)
switch (enc_size) {
case H5S_SELECT_INFO_ENC_SIZE_2:
- HDassert(version == H5S_POINT_VERSION_2);
+ assert(version == H5S_POINT_VERSION_2);
/* Encode number of elements */
UINT16ENCODE(pp, (uint16_t)space->select.num_elem);
@@ -1277,7 +1277,7 @@ H5S__point_serialize(H5S_t *space, uint8_t **p)
break;
case H5S_SELECT_INFO_ENC_SIZE_4:
- HDassert(version == H5S_POINT_VERSION_1 || version == H5S_POINT_VERSION_2);
+ assert(version == H5S_POINT_VERSION_1 || version == H5S_POINT_VERSION_2);
/* Encode number of elements */
UINT32ENCODE(pp, (uint32_t)space->select.num_elem);
@@ -1297,7 +1297,7 @@ H5S__point_serialize(H5S_t *space, uint8_t **p)
break;
case H5S_SELECT_INFO_ENC_SIZE_8:
- HDassert(version == H5S_POINT_VERSION_2);
+ assert(version == H5S_POINT_VERSION_2);
/* Encode number of elements */
UINT64ENCODE(pp, space->select.num_elem);
@@ -1370,9 +1370,9 @@ H5S__point_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(p);
+ assert(p);
pp = (*p);
- HDassert(pp);
+ assert(pp);
/* As part of the efforts to push all selection-type specific coding
to the callbacks, the coding for the allocation of a null dataspace
@@ -1419,7 +1419,7 @@ H5S__point_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb
if (!*space) {
/* Patch the rank of the allocated dataspace */
- (void)HDmemset(dims, 0, (size_t)rank * sizeof(dims[0]));
+ (void)memset(dims, 0, (size_t)rank * sizeof(dims[0]));
if (H5S_set_extent_simple(tmp_space, rank, dims, NULL) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions")
} /* end if */
@@ -1564,8 +1564,8 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t n
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(buf);
+ assert(space);
+ assert(buf);
/* Get the dataspace extent rank */
rank = space->extent.rank;
@@ -1688,15 +1688,15 @@ H5S__point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(space);
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(start);
+ assert(end);
/* Loop over dimensions */
for (u = 0; u < space->extent.rank; u++) {
/* Sanity check */
- HDassert(space->select.sel_info.pnt_lst->low_bounds[u] <=
- space->select.sel_info.pnt_lst->high_bounds[u]);
+ assert(space->select.sel_info.pnt_lst->low_bounds[u] <=
+ space->select.sel_info.pnt_lst->high_bounds[u]);
/* Check for offset moving selection negative */
if (((hssize_t)space->select.sel_info.pnt_lst->low_bounds[u] + space->select.offset[u]) < 0)
@@ -1745,8 +1745,8 @@ H5S__point_offset(const H5S_t *space, hsize_t *offset)
FUNC_ENTER_PACKAGE
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Start at linear offset 0 */
*offset = 0;
@@ -1832,7 +1832,7 @@ H5S__point_is_contiguous(const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* One point is definitely contiguous */
if (space->select.num_elem == 1)
@@ -1869,7 +1869,7 @@ H5S__point_is_single(const H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
+ assert(space);
/* One point is definitely 'single' :-) */
if (space->select.num_elem == 1)
@@ -1909,7 +1909,7 @@ H5S__point_is_regular(H5S_t *space)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
/* Only simple check for regular points for now... */
if (space->select.num_elem == 1)
@@ -1953,16 +1953,16 @@ H5S__point_shape_same(H5S_t *space1, H5S_t *space2)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(space1);
- HDassert(space2);
+ assert(space1);
+ assert(space2);
/* Get dataspace ranks */
space1_rank = space1->extent.rank;
space2_rank = space2->extent.rank;
/* Sanity check */
- HDassert(space1_rank >= space2_rank);
- HDassert(space2_rank > 0);
+ assert(space1_rank >= space2_rank);
+ assert(space2_rank > 0);
/* Initialize dimensions */
space1_dim = (int)space1_rank - 1;
@@ -2054,10 +2054,10 @@ H5S__point_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(space);
- HDassert(H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
+ assert(start);
+ assert(end);
/* Loop over points */
pnt = space->select.sel_info.pnt_lst->head;
@@ -2109,8 +2109,8 @@ H5S__point_adjust_u(H5S_t *space, const hsize_t *offset)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
@@ -2128,7 +2128,7 @@ H5S__point_adjust_u(H5S_t *space, const hsize_t *offset)
/* Adjust each coordinate for point node */
for (u = 0; u < rank; u++) {
/* Check for offset moving selection negative */
- HDassert(node->pnt[u] >= offset[u]);
+ assert(node->pnt[u] >= offset[u]);
/* Adjust node's coordinate location */
node->pnt[u] -= offset[u];
@@ -2176,8 +2176,8 @@ H5S__point_adjust_s(H5S_t *space, const hssize_t *offset)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
@@ -2195,7 +2195,7 @@ H5S__point_adjust_s(H5S_t *space, const hssize_t *offset)
/* Adjust each coordinate for point node */
for (u = 0; u < rank; u++) {
/* Check for offset moving selection negative */
- HDassert((hssize_t)node->pnt[u] >= offset[u]);
+ assert((hssize_t)node->pnt[u] >= offset[u]);
/* Adjust node's coordinate location */
node->pnt[u] = (hsize_t)((hssize_t)node->pnt[u] - offset[u]);
@@ -2207,7 +2207,7 @@ H5S__point_adjust_s(H5S_t *space, const hssize_t *offset)
/* update the bound box of the selection */
for (u = 0; u < rank; u++) {
- HDassert((hssize_t)space->select.sel_info.pnt_lst->low_bounds[u] >= offset[u]);
+ assert((hssize_t)space->select.sel_info.pnt_lst->low_bounds[u] >= offset[u]);
space->select.sel_info.pnt_lst->low_bounds[u] =
(hsize_t)((hssize_t)space->select.sel_info.pnt_lst->low_bounds[u] - offset[u]);
space->select.sel_info.pnt_lst->high_bounds[u] =
@@ -2240,8 +2240,8 @@ H5S__point_project_scalar(const H5S_t *space, hsize_t *offset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
- HDassert(offset);
+ assert(space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
+ assert(offset);
/* Get the head of the point list */
node = space->select.sel_info.pnt_lst->head;
@@ -2284,9 +2284,9 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base_space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(base_space));
- HDassert(new_space);
- HDassert(offset);
+ assert(base_space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(base_space));
+ assert(new_space);
+ assert(offset);
/* We are setting a new selection, remove any current selection in new dataspace */
if (H5S_SELECT_RELEASE(new_space) < 0)
@@ -2304,7 +2304,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
rank_diff = base_space->extent.rank - new_space->extent.rank;
/* Calculate offset of selection in projected buffer */
- HDmemset(block, 0, sizeof(block));
+ memset(block, 0, sizeof(block));
H5MM_memcpy(block, base_space->select.sel_info.pnt_lst->head->pnt, sizeof(hsize_t) * rank_diff);
*offset = H5VM_array_offset(base_space->extent.rank, base_space->extent.size, block);
@@ -2342,7 +2342,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
} /* end for */
} /* end if */
else {
- HDassert(new_space->extent.rank > base_space->extent.rank);
+ assert(new_space->extent.rank > base_space->extent.rank);
/* Compute the difference in ranks */
rank_diff = new_space->extent.rank - base_space->extent.rank;
@@ -2360,7 +2360,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
new_node->next = NULL;
/* Copy over the point's coordinates */
- HDmemset(new_node->pnt, 0, sizeof(hsize_t) * rank_diff);
+ memset(new_node->pnt, 0, sizeof(hsize_t) * rank_diff);
H5MM_memcpy(&new_node->pnt[rank_diff], base_node->pnt,
(base_space->extent.rank * sizeof(hsize_t)));
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 28c30ea..37f2192 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -95,9 +95,9 @@ H5S_select_offset(H5S_t *space, const hssize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(0 < space->extent.rank && space->extent.rank <= H5S_MAX_RANK);
- HDassert(offset);
+ assert(space);
+ assert(0 < space->extent.rank && space->extent.rank <= H5S_MAX_RANK);
+ assert(offset);
/* Copy the offset over */
H5MM_memcpy(space->select.offset, offset, sizeof(hssize_t) * space->extent.rank);
@@ -228,8 +228,8 @@ H5S_select_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(dst);
- HDassert(src);
+ assert(dst);
+ assert(src);
/* Release the current selection */
if (H5S_SELECT_RELEASE(dst) < 0)
@@ -269,7 +269,7 @@ H5S_select_release(H5S_t *ds)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(ds);
+ assert(ds);
/* Call the selection type's release function */
if ((ds->select.type) && ((ret_value = (*ds->select.type->release)(ds)) < 0))
@@ -303,7 +303,7 @@ H5S_select_serial_size(H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(space);
+ assert(space);
/* Call the selection type's serial_size function */
ret_value = (*space->select.type->serial_size)(space);
@@ -342,8 +342,8 @@ H5S_select_serialize(H5S_t *space, uint8_t **p)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(space);
- HDassert(p);
+ assert(space);
+ assert(p);
/* Call the selection type's serialize function */
ret_value = (*space->select.type->serialize)(space, p);
@@ -413,7 +413,7 @@ H5S_get_select_npoints(const H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
FUNC_LEAVE_NOAPI(space->select.num_elem)
} /* end H5S_get_select_npoints() */
@@ -487,7 +487,7 @@ H5S_select_valid(const H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(space);
+ assert(space);
ret_value = (*space->select.type->is_valid)(space);
@@ -529,7 +529,7 @@ H5S_select_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size)
hbool_t skip = (p_size == SIZE_MAX ? TRUE : FALSE); /* If p_size is unknown, skip buffer checks */
FUNC_ENTER_NOAPI(FAIL)
- HDassert(space);
+ assert(space);
/* Selection-type specific coding is moved to the callbacks. */
@@ -653,9 +653,9 @@ H5S_get_select_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(start);
+ assert(end);
ret_value = (*space->select.type->bounds)(space, start, end);
@@ -693,8 +693,8 @@ H5S_get_select_offset(const H5S_t *space, hsize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
ret_value = (*space->select.type->offset)(space, offset);
@@ -731,7 +731,7 @@ H5S_get_select_unlim_dim(const H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
ret_value = (*space->select.type->unlim_dim)(space);
@@ -766,8 +766,8 @@ H5S_get_select_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unli
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space);
- HDassert(num_elem_non_unlim);
+ assert(space);
+ assert(num_elem_non_unlim);
/* Check for selection callback */
if (!space->select.type->num_elem_non_unlim)
@@ -811,7 +811,7 @@ H5S_select_is_contiguous(const H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
ret_value = (*space->select.type->is_contiguous)(space);
@@ -847,7 +847,7 @@ H5S_select_is_single(const H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
ret_value = (*space->select.type->is_single)(space);
@@ -883,7 +883,7 @@ H5S_select_is_regular(H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
ret_value = (*space->select.type->is_regular)(space);
@@ -919,8 +919,8 @@ H5S_select_adjust_u(H5S_t *space, const hsize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Perform operation */
ret_value = (*space->select.type->adjust_u)(space, offset);
@@ -957,8 +957,8 @@ H5S_select_adjust_s(H5S_t *space, const hssize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
/* Perform operation */
ret_value = (*space->select.type->adjust_s)(space, offset);
@@ -1045,8 +1045,8 @@ H5S_select_project_scalar(const H5S_t *space, hsize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(offset);
+ assert(space);
+ assert(offset);
ret_value = (*space->select.type->project_scalar)(space, offset);
@@ -1084,9 +1084,9 @@ H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
- HDassert(new_space);
- HDassert(offset);
+ assert(space);
+ assert(new_space);
+ assert(offset);
ret_value = (*space->select.type->project_simple)(space, new_space, offset);
@@ -1119,8 +1119,8 @@ H5S_select_iter_init(H5S_sel_iter_t *sel_iter, H5S_t *space, size_t elmt_size, u
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(sel_iter);
- HDassert(space);
+ assert(sel_iter);
+ assert(space);
/* Initialize common information */
@@ -1144,7 +1144,7 @@ H5S_select_iter_init(H5S_sel_iter_t *sel_iter, H5S_t *space, size_t elmt_size, u
/* Call initialization routine for selection type */
ret_value = (*space->select.type->iter_init)(space, sel_iter);
- HDassert(sel_iter->type);
+ assert(sel_iter->type);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_select_iter_init() */
@@ -1179,8 +1179,8 @@ H5S_select_iter_coords(const H5S_sel_iter_t *sel_iter, hsize_t *coords)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(sel_iter);
- HDassert(coords);
+ assert(sel_iter);
+ assert(coords);
/* Call iter_coords routine for selection type */
ret_value = (*sel_iter->type->iter_coords)(sel_iter, coords);
@@ -1216,7 +1216,7 @@ H5S_select_iter_nelmts(const H5S_sel_iter_t *sel_iter)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(sel_iter);
+ assert(sel_iter);
/* Call iter_nelmts routine for selection type */
ret_value = (*sel_iter->type->iter_nelmts)(sel_iter);
@@ -1254,8 +1254,8 @@ H5S_select_iter_next(H5S_sel_iter_t *iter, size_t nelem)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(iter);
- HDassert(nelem > 0);
+ assert(iter);
+ assert(nelem > 0);
/* Call iter_next routine for selection type */
ret_value = (*iter->type->iter_next)(iter, nelem);
@@ -1292,7 +1292,7 @@ H5S_select_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelmt
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(iter);
+ assert(iter);
/* Call the selection type's get_seq_list function */
if ((ret_value = (*iter->type->iter_get_seq_list)(iter, maxseq, maxelmts, nseq, nelmts, off, len)) < 0)
@@ -1330,7 +1330,7 @@ H5S_select_iter_release(H5S_sel_iter_t *sel_iter)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(sel_iter);
+ assert(sel_iter);
/* Call selection type-specific release routine */
ret_value = (*sel_iter->type->iter_release)(sel_iter);
@@ -1384,10 +1384,10 @@ H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_ite
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(buf);
- HDassert(type);
- HDassert(space);
- HDassert(op);
+ assert(buf);
+ assert(type);
+ assert(space);
+ assert(op);
/* Get the datatype size */
if (0 == (elmt_size = H5T_get_size(type)))
@@ -1411,7 +1411,7 @@ H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_ite
if (ndims > 0) {
/* Copy the size of the space */
- HDassert(space->extent.size);
+ assert(space->extent.size);
H5MM_memcpy(space_size, space->extent.size, ndims * sizeof(hsize_t));
} /* end if */
space_size[ndims] = elmt_size;
@@ -1576,7 +1576,7 @@ H5S_get_select_type(const H5S_t *space)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(space);
+ assert(space);
/* Set return value */
ret_value = H5S_GET_SELECT_TYPE(space);
@@ -1619,8 +1619,8 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space1);
- HDassert(space2);
+ assert(space1);
+ assert(space2);
/* Check for different number of elements selected */
if (H5S_GET_SELECT_NPOINTS(space1) != H5S_GET_SELECT_NPOINTS(space2))
@@ -1662,8 +1662,8 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
} /* end else */
space_a_rank = space_a->extent.rank;
space_b_rank = space_b->extent.rank;
- HDassert(space_a_rank >= space_b_rank);
- HDassert(space_b_rank > 0);
+ assert(space_a_rank >= space_b_rank);
+ assert(space_b_rank > 0);
/* Get selection type for both dataspaces */
sel_a_type = H5S_GET_SELECT_TYPE(space_a);
@@ -1689,8 +1689,8 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
space_b_dim = (int)space_b_rank - 1;
while (space_b_dim >= 0) {
/* Sanity check */
- HDassert(low_a[space_a_dim] <= high_a[space_a_dim]);
- HDassert(low_a[space_b_dim] <= high_a[space_b_dim]);
+ assert(low_a[space_a_dim] <= high_a[space_a_dim]);
+ assert(low_a[space_b_dim] <= high_a[space_b_dim]);
/* Verify that the ranges are the same */
if ((high_a[space_a_dim] - low_a[space_a_dim]) != (high_b[space_b_dim] - low_b[space_b_dim]))
@@ -1704,7 +1704,7 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
/* Check that the rest of the ranges in space a are "flat" */
while (space_a_dim >= 0) {
/* Sanity check */
- HDassert(low_a[space_a_dim] <= high_a[space_a_dim]);
+ assert(low_a[space_a_dim] <= high_a[space_a_dim]);
/* This range should be flat to be the same in a lower dimension */
if (low_a[space_a_dim] != high_a[space_a_dim])
@@ -1939,9 +1939,9 @@ H5S_select_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(space);
- HDassert(start);
- HDassert(end);
+ assert(space);
+ assert(start);
+ assert(end);
/* If selections aren't "none", compare their bounds */
if (H5S_SEL_NONE != H5S_GET_SELECT_TYPE(space)) {
@@ -2091,19 +2091,19 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(base_space != NULL);
- HDassert((H5S_GET_EXTENT_TYPE(base_space) == H5S_SCALAR) ||
- (H5S_GET_EXTENT_TYPE(base_space) == H5S_SIMPLE));
- HDassert(new_space_ptr != NULL);
- HDassert((new_space_rank != 0) || (H5S_GET_SELECT_NPOINTS(base_space) <= 1));
- HDassert(new_space_rank <= H5S_MAX_RANK);
- HDassert(element_size > 0);
+ assert(base_space != NULL);
+ assert((H5S_GET_EXTENT_TYPE(base_space) == H5S_SCALAR) ||
+ (H5S_GET_EXTENT_TYPE(base_space) == H5S_SIMPLE));
+ assert(new_space_ptr != NULL);
+ assert((new_space_rank != 0) || (H5S_GET_SELECT_NPOINTS(base_space) <= 1));
+ assert(new_space_rank <= H5S_MAX_RANK);
+ assert(element_size > 0);
/* Get the extent info for the base dataspace */
if ((sbase_space_rank = H5S_get_simple_extent_dims(base_space, base_space_dims, base_space_maxdims)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimensionality of base space")
base_space_rank = (unsigned)sbase_space_rank;
- HDassert(base_space_rank != new_space_rank);
+ assert(base_space_rank != new_space_rank);
/* Check if projected space is scalar */
if (new_space_rank == 0) {
@@ -2112,7 +2112,7 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign
/* Retrieve the number of elements selected */
if ((npoints = (hssize_t)H5S_GET_SELECT_NPOINTS(base_space)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get number of points selected")
- HDassert(npoints <= 1);
+ assert(npoints <= 1);
/* Create new scalar dataspace */
if (NULL == (new_space = H5S_create(H5S_SCALAR)))
@@ -2146,7 +2146,7 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to project scalar selection")
} /* end if */
else {
- HDassert(0 == npoints);
+ assert(0 == npoints);
if (H5S_select_none(new_space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't delete default selection")
@@ -2238,7 +2238,7 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign
*/
if (H5S_GET_EXTENT_TYPE(base_space) == H5S_SIMPLE && base_space->select.offset_changed) {
if (new_space_rank > base_space_rank) {
- HDmemset(new_space->select.offset, 0, sizeof(new_space->select.offset[0]) * rank_diff);
+ memset(new_space->select.offset, 0, sizeof(new_space->select.offset[0]) * rank_diff);
H5MM_memcpy(&new_space->select.offset[rank_diff], base_space->select.offset,
sizeof(new_space->select.offset[0]) * base_space_rank);
} /* end if */
@@ -2254,7 +2254,7 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign
/* If we have done the projection correctly, the following assertion
* should hold.
*/
- HDassert(TRUE == H5S_select_shape_same(base_space, new_space));
+ assert(TRUE == H5S_select_shape_same(base_space, new_space));
/* load the address of the new space into *new_space_ptr */
*new_space_ptr = new_space;
@@ -2316,10 +2316,10 @@ H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *_buf)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(fill);
- HDassert(fill_size > 0);
- HDassert(space);
- HDassert(_buf);
+ assert(fill);
+ assert(fill_size > 0);
+ assert(space);
+ assert(_buf);
/* Allocate the selection iterator */
if (NULL == (iter = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -2362,7 +2362,7 @@ H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *_buf)
buf = (uint8_t *)_buf + off[curr_seq];
/* Fill each sequence in memory with fill value */
- HDassert((len[curr_seq] % fill_size) == 0);
+ assert((len[curr_seq] % fill_size) == 0);
H5VM_array_fill(buf, fill, fill_size, (len[curr_seq] / fill_size));
} /* end for */
@@ -2433,12 +2433,12 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(src_space);
- HDassert(dst_space);
- HDassert(src_intersect_space);
- HDassert(new_space_ptr);
- HDassert(H5S_GET_SELECT_NPOINTS(src_space) == H5S_GET_SELECT_NPOINTS(dst_space));
- HDassert(H5S_GET_EXTENT_NDIMS(src_space) == H5S_GET_EXTENT_NDIMS(src_intersect_space));
+ assert(src_space);
+ assert(dst_space);
+ assert(src_intersect_space);
+ assert(new_space_ptr);
+ assert(H5S_GET_SELECT_NPOINTS(src_space) == H5S_GET_SELECT_NPOINTS(dst_space));
+ assert(H5S_GET_EXTENT_NDIMS(src_space) == H5S_GET_EXTENT_NDIMS(src_intersect_space));
if (NULL == (ss_iter = H5FL_CALLOC(H5S_sel_iter_t)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator")
@@ -2473,8 +2473,8 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
* covered above, and the source intersect space must have the same
* rank, so it also cannot be scalar, as scalar dataspaces have a rank
* of 0. */
- HDassert(H5S_GET_EXTENT_TYPE(src_space) != H5S_SCALAR);
- HDassert(H5S_GET_EXTENT_TYPE(src_intersect_space) != H5S_SCALAR);
+ assert(H5S_GET_EXTENT_TYPE(src_space) != H5S_SCALAR);
+ assert(H5S_GET_EXTENT_TYPE(src_intersect_space) != H5S_SCALAR);
/* Check for scalar dst_space. In this case we simply check if the
* (single) point selected in src_space intersects src_intersect_space,
@@ -2487,8 +2487,8 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Get source space bounds. Should be a single point. */
if (H5S_SELECT_BOUNDS(src_space, coords_start, coords_end) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get source space bounds")
- HDassert(0 == HDmemcmp(coords_start, coords_end,
- H5S_GET_EXTENT_NDIMS(src_space) * sizeof(coords_start[0])));
+ assert(0 == memcmp(coords_start, coords_end,
+ H5S_GET_EXTENT_NDIMS(src_space) * sizeof(coords_start[0])));
/* Check for intersection */
if ((intersect = H5S_SELECT_INTERSECT_BLOCK(src_intersect_space, coords_start, coords_end)) < 0)
@@ -2536,7 +2536,7 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
} /* end for */
/* By this point, src_intersect_space must be a hyperslab selection */
- HDassert(H5S_GET_SELECT_TYPE(src_intersect_space) == H5S_SEL_HYPERSLABS);
+ assert(H5S_GET_SELECT_TYPE(src_intersect_space) == H5S_SEL_HYPERSLABS);
/* If either the source space or the destination space is a point
* selection, iterate element by element */
@@ -2561,8 +2561,8 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Iterate over points */
do {
- HDassert(ss_iter->elmt_left > 0);
- HDassert(ss_iter->elmt_left > 0);
+ assert(ss_iter->elmt_left > 0);
+ assert(ss_iter->elmt_left > 0);
/* Get SS coords */
if (H5S_SELECT_ITER_COORDS(ss_iter, coords) < 0)
@@ -2596,11 +2596,11 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
"can't advacne destination selection iterator")
ds_iter->elmt_left--;
} while (ss_iter->elmt_left > 0);
- HDassert(H5S_SELECT_ITER_NELMTS(ds_iter) == 0);
+ assert(H5S_SELECT_ITER_NELMTS(ds_iter) == 0);
} /* end if */
else {
- HDassert(H5S_GET_SELECT_TYPE(src_space) != H5S_SEL_NONE);
- HDassert(H5S_GET_SELECT_TYPE(dst_space) != H5S_SEL_NONE);
+ assert(H5S_GET_SELECT_TYPE(src_space) != H5S_SEL_NONE);
+ assert(H5S_GET_SELECT_TYPE(dst_space) != H5S_SEL_NONE);
/* Source and destination selections are all or hyperslab,
* intersecting selection is hyperslab. Call the hyperslab routine
@@ -2746,8 +2746,8 @@ H5S_select_subtract(H5S_t *space, H5S_t *subtract_space)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(space);
- HDassert(subtract_space);
+ assert(space);
+ assert(subtract_space);
/* If either space is using the none selection, then we do not need to do
* anything */
@@ -2788,8 +2788,8 @@ H5S_select_subtract(H5S_t *space, H5S_t *subtract_space)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection")
} /* end if */
- HDassert(space->select.type->type == H5S_SEL_HYPERSLABS);
- HDassert(subtract_space->select.type->type == H5S_SEL_HYPERSLABS);
+ assert(space->select.type->type == H5S_SEL_HYPERSLABS);
+ assert(subtract_space->select.type->type == H5S_SEL_HYPERSLABS);
/* Both spaces are now hyperslabs, perform the operation */
if (H5S__modify_select(space, H5S_SELECT_NOTB, subtract_space) < 0)
@@ -2980,7 +2980,7 @@ H5S_select_contig_block(H5S_t *space, hbool_t *is_contig, hsize_t *off, size_t *
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(space);
+ assert(space);
/* Allocate and initialize the iterator */
if (NULL == (iter = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -3087,7 +3087,7 @@ H5S__sel_iter_close_cb(H5S_sel_iter_t *_sel_iter, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(sel_iter);
+ assert(sel_iter);
/* Close the selection iterator object */
if (H5S_sel_iter_close(sel_iter) < 0)
@@ -3117,7 +3117,7 @@ H5S_sel_iter_close(H5S_sel_iter_t *sel_iter)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(sel_iter);
+ assert(sel_iter);
/* Call selection type-specific release routine */
if (H5S_SELECT_ITER_RELEASE(sel_iter) < 0)
diff --git a/src/H5Stest.c b/src/H5Stest.c
index 520de76..4bbbf87 100644
--- a/src/H5Stest.c
+++ b/src/H5Stest.c
@@ -87,8 +87,8 @@ H5S__get_rebuild_status_test(hid_t space_id, H5S_diminfo_valid_t *status1, H5S_d
FUNC_ENTER_PACKAGE
- HDassert(status1);
- HDassert(status2);
+ assert(status1);
+ assert(status2);
/* Get dataspace structures */
if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
@@ -134,7 +134,7 @@ H5S__get_diminfo_status_test(hid_t space_id, H5S_diminfo_valid_t *status)
FUNC_ENTER_PACKAGE
- HDassert(status);
+ assert(status);
/* Get dataspace structures */
if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
@@ -174,7 +174,7 @@ H5S__check_spans_tail_ptr(const H5S_hyper_span_info_t *span_lst)
FUNC_ENTER_PACKAGE
- HDassert(span_lst);
+ assert(span_lst);
cur_elem = span_lst->head;
while (cur_elem) {
@@ -223,7 +223,7 @@ H5S__check_points_tail_ptr(const H5S_pnt_list_t *pnt_lst)
FUNC_ENTER_PACKAGE
- HDassert(pnt_lst);
+ assert(pnt_lst);
cur_elem = pnt_lst->head;
while (cur_elem) {
@@ -268,7 +268,7 @@ H5S__check_internal_consistency(const H5S_t *space)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(space);
+ assert(space);
if (space->select.type->type == H5S_SEL_NONE)
HGOTO_DONE(ret_value);
diff --git a/src/H5T.c b/src/H5T.c
index 9cbf546..fb4dc0e 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -1394,7 +1394,7 @@ H5T_init(void)
/* Only register the default property list if it hasn't been created yet */
if (H5P_LST_DATATYPE_CREATE_ID_g == (-1)) {
/* ========== Datatype Creation Property Class Initialization ============*/
- HDassert(H5P_CLS_DATATYPE_CREATE_g != NULL);
+ assert(H5P_CLS_DATATYPE_CREATE_g != NULL);
/* Register the default datatype creation property list */
if ((H5P_LST_DATATYPE_CREATE_ID_g = H5P_create_id(H5P_CLS_DATATYPE_CREATE_g, FALSE)) < 0)
@@ -1452,8 +1452,8 @@ H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
if (H5T_STATE_IMMUTABLE == dt->shared->state) {
dt->shared->state = H5T_STATE_RDONLY;
@@ -1492,7 +1492,7 @@ H5T_top_term_package(void)
H5T_path_t *path;
path = H5T_g.path[i];
- HDassert(path);
+ assert(path);
if (path->conv.u.app_func) {
H5T__print_stats(path, &nprint /*in,out*/);
path->cdata.command = H5T_CONV_FREE;
@@ -1501,11 +1501,11 @@ H5T_top_term_package(void)
(size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function "
- "0x%016zx failed to free private data for "
- "%s (ignored)\n",
- (size_t)path->conv.u.app_func, path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function "
+ "0x%016zx failed to free private data for "
+ "%s (ignored)\n",
+ (size_t)path->conv.u.app_func, path->name);
} /* end if */
#endif
H5E_clear_stack(NULL); /*ignore the error*/
@@ -1516,11 +1516,11 @@ H5T_top_term_package(void)
(size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function "
- "0x%016zx failed to free private data for "
- "%s (ignored)\n",
- (size_t)path->conv.u.lib_func, path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function "
+ "0x%016zx failed to free private data for "
+ "%s (ignored)\n",
+ (size_t)path->conv.u.lib_func, path->name);
} /* end if */
#endif
H5E_clear_stack(NULL); /*ignore the error*/
@@ -1686,7 +1686,7 @@ H5T_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(0 == H5I_nmembers(H5I_DATATYPE));
+ assert(0 == H5I_nmembers(H5I_DATATYPE));
/* Destroy the datatype object id group */
n += (H5I_dec_type_ref(H5I_DATATYPE) > 0);
@@ -1711,8 +1711,8 @@ H5T__close_cb(H5T_t *dt, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
/* If this datatype is VOL-managed (i.e.: has a VOL object),
* close it through the VOL connector.
@@ -2111,7 +2111,7 @@ H5T_get_class(const H5T_t *dt, htri_t internal)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
/* Externally, a VL string is a string; internally, a VL string is a VL. */
if (internal) {
@@ -2183,8 +2183,8 @@ H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_api)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
- HDassert(cls > H5T_NO_CLASS && cls < H5T_NCLASSES);
+ assert(dt);
+ assert(cls > H5T_NO_CLASS && cls < H5T_NCLASSES);
/* Consider VL string as a string for API, as a VL for internal use. */
/* (note that this check must be performed before checking if the VL
@@ -2444,7 +2444,7 @@ H5T_get_super(const H5T_t *dt)
FUNC_ENTER_NOAPI(NULL)
- HDassert(dt);
+ assert(dt);
if (!dt->shared->parent)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "not a derived data type");
@@ -2475,11 +2475,11 @@ H5T__register_int(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
- HDassert(name && *name);
- HDassert(src);
- HDassert(dst);
- HDassert(func);
+ assert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
+ assert(name && *name);
+ assert(src);
+ assert(dst);
+ assert(func);
/* Set up conversion function wrapper */
conv_func.is_app = FALSE;
@@ -2526,11 +2526,11 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(src);
- HDassert(dst);
- HDassert(conv);
- HDassert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
- HDassert(name && *name);
+ assert(src);
+ assert(dst);
+ assert(conv);
+ assert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
+ assert(name && *name);
if (H5T_PERS_HARD == pers) {
/* Only bother to register the path if it's not a no-op path (for this machine) */
@@ -2575,7 +2575,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
*/
for (i = 1; i < H5T_g.npaths; i++) {
old_path = H5T_g.path[i];
- HDassert(old_path);
+ assert(old_path);
/* Does the new soft conversion function apply to this path? */
if (old_path->is_hard || old_path->src->shared->type != src->shared->type ||
@@ -2586,7 +2586,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
(tmp_did = H5I_register(H5I_DATATYPE, H5T_copy(old_path->dst, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL,
"unable to register data types for conv query")
- HDmemset(&cdata, 0, sizeof cdata);
+ memset(&cdata, 0, sizeof cdata);
cdata.command = H5T_CONV_INIT;
if (conv->is_app) {
if ((conv->u.app_func)(tmp_sid, tmp_did, &cdata, (size_t)0, (size_t)0, (size_t)0, NULL, NULL,
@@ -2631,10 +2631,10 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function 0x%016zx "
- "failed to free private data for %s (ignored)\n",
- (size_t)old_path->conv.u.app_func, old_path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function 0x%016zx "
+ "failed to free private data for %s (ignored)\n",
+ (size_t)old_path->conv.u.app_func, old_path->name);
#endif
} /* end if */
} /* end if */
@@ -2642,10 +2642,10 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
(size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function 0x%016zx "
- "failed to free private data for %s (ignored)\n",
- (size_t)old_path->conv.u.lib_func, old_path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function 0x%016zx "
+ "failed to free private data for %s (ignored)\n",
+ (size_t)old_path->conv.u.lib_func, old_path->name);
#endif
} /* end if */
(void)H5T_close_real(old_path->src);
@@ -2763,7 +2763,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
if (H5T_PERS_DONTCARE == pers || H5T_PERS_SOFT == pers) {
for (i = H5T_g.nsoft - 1; i >= 0; --i) {
soft = H5T_g.soft + i;
- HDassert(soft);
+ assert(soft);
if (name && *name && HDstrcmp(name, soft->name) != 0)
continue;
if (src && src->shared->type != soft->src)
@@ -2782,7 +2782,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
/* Remove matching conversion paths, except no-op path */
for (i = H5T_g.npaths - 1; i > 0; --i) {
path = H5T_g.path[i];
- HDassert(path);
+ assert(path);
/* Not a match */
if (((H5T_PERS_SOFT == pers && path->is_hard) || (H5T_PERS_HARD == pers && !path->is_hard)) ||
@@ -2811,10 +2811,10 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function 0x%016zx failed "
- "to free private data for %s (ignored)\n",
- (size_t)path->conv.u.app_func, path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function 0x%016zx failed "
+ "to free private data for %s (ignored)\n",
+ (size_t)path->conv.u.app_func, path->name);
#endif
} /* end if */
} /* end if */
@@ -2822,10 +2822,10 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
(size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function 0x%016zx failed "
- "to free private data for %s (ignored)\n",
- (size_t)path->conv.u.lib_func, path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function 0x%016zx failed "
+ "to free private data for %s (ignored)\n",
+ (size_t)path->conv.u.lib_func, path->name);
#endif
} /* end if */
(void)H5T_close_real(path->src);
@@ -3568,7 +3568,7 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo
if (NULL == (tmp = (*copyfn)(old_dt->shared->u.compnd.memb[i].type)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy compound field's datatype")
new_dt->shared->u.compnd.memb[i].type = tmp;
- HDassert(tmp != NULL);
+ assert(tmp != NULL);
/* Range check against compound member's offset */
if ((accum_change < 0) &&
@@ -3726,7 +3726,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(old_dt);
+ assert(old_dt);
/* Allocate and copy core datatype information */
if (NULL == (new_dt = H5T__initiate_copy(old_dt)))
@@ -3768,7 +3768,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
done:
if (ret_value == NULL)
if (new_dt) {
- HDassert(new_dt->shared);
+ assert(new_dt->shared);
if (new_dt->shared->owned_vol_obj && H5VL_free_object(new_dt->shared->owned_vol_obj) < 0)
HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
@@ -3802,7 +3802,7 @@ H5T_copy_reopen(H5T_t *old_dt)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(old_dt);
+ assert(old_dt);
/* Allocate and copy core datatype information */
if (NULL == (new_dt = H5T__initiate_copy(old_dt)))
@@ -3875,7 +3875,7 @@ H5T_copy_reopen(H5T_t *old_dt)
done:
if (ret_value == NULL)
if (new_dt) {
- HDassert(new_dt->shared);
+ assert(new_dt->shared);
if (new_dt->shared->owned_vol_obj && H5VL_free_object(new_dt->shared->owned_vol_obj) < 0)
HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
@@ -3908,7 +3908,7 @@ H5T_lock(H5T_t *dt, hbool_t immutable)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dt);
+ assert(dt);
switch (dt->shared->state) {
case H5T_STATE_TRANSIENT:
@@ -3973,7 +3973,7 @@ done:
if (ret_value == NULL)
if (dt) {
if (dt->shared) {
- HDassert(!dt->shared->owned_vol_obj);
+ assert(!dt->shared->owned_vol_obj);
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
} /* end if */
dt = H5FL_FREE(H5T_t, dt);
@@ -4004,7 +4004,7 @@ H5T__free(H5T_t *dt)
FUNC_ENTER_PACKAGE
- HDassert(dt && dt->shared);
+ assert(dt && dt->shared);
/* Free the ID to name info */
H5G_name_free(&(dt->path));
@@ -4052,7 +4052,7 @@ H5T__free(H5T_t *dt)
dt->shared->type = H5T_NO_CLASS;
/* Close the parent */
- HDassert(dt->shared->parent != dt);
+ assert(dt->shared->parent != dt);
if (dt->shared->parent && H5T_close_real(dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close parent data type")
dt->shared->parent = NULL;
@@ -4089,14 +4089,14 @@ H5T_close_real(H5T_t *dt)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dt && dt->shared);
+ assert(dt && dt->shared);
/* Clean up resources, depending on shared state */
if (dt->shared->state != H5T_STATE_OPEN) {
if (H5T__free(dt) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype");
- HDassert(!dt->shared->owned_vol_obj);
+ assert(!dt->shared->owned_vol_obj);
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
} /* end if */
else
@@ -4131,8 +4131,8 @@ H5T_close(H5T_t *dt)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
/* Named datatype cleanups */
if (dt->shared->state == H5T_STATE_OPEN) {
@@ -4140,9 +4140,9 @@ H5T_close(H5T_t *dt)
dt->shared->fo_count--;
/* Sanity checks */
- HDassert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
- HDassert(H5F_addr_defined(dt->sh_loc.u.loc.oh_addr));
- HDassert(H5F_addr_defined(dt->oloc.addr));
+ assert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
+ assert(H5F_addr_defined(dt->sh_loc.u.loc.oh_addr));
+ assert(H5F_addr_defined(dt->oloc.addr));
/* If a named type is being closed then close the object header and
* remove from the list of open objects in the file.
@@ -4230,11 +4230,11 @@ H5T__set_size(H5T_t *dt, size_t size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dt);
- HDassert(dt->shared);
- HDassert(size != 0);
- HDassert(H5T_REFERENCE != dt->shared->type);
- HDassert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
+ assert(dt);
+ assert(dt->shared);
+ assert(size != 0);
+ assert(H5T_REFERENCE != dt->shared->type);
+ assert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
if (dt->shared->parent) {
if (H5T__set_size(dt->shared->parent, size) < 0)
@@ -4300,7 +4300,7 @@ H5T__set_size(H5T_t *dt, size_t size)
/* Compound must not have been packed previously */
/* We will check if resizing changed the packed state of
* this type at the end of this function */
- HDassert(!dt->shared->u.compnd.packed);
+ assert(!dt->shared->u.compnd.packed);
} /* end if */
break;
@@ -4365,16 +4365,16 @@ H5T__set_size(H5T_t *dt, size_t size)
case H5T_VLEN:
case H5T_ARRAY:
case H5T_REFERENCE:
- HDassert("can't happen" && 0);
+ assert("can't happen" && 0);
break;
case H5T_NO_CLASS:
case H5T_NCLASSES:
- HDassert("invalid type" && 0);
+ assert("invalid type" && 0);
break;
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
break;
} /* end switch */
@@ -4418,8 +4418,8 @@ H5T_get_size(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
FUNC_LEAVE_NOAPI(dt->shared->size)
} /* end H5T_get_size() */
@@ -4444,8 +4444,8 @@ H5T_get_force_conv(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
FUNC_LEAVE_NOAPI(dt->shared->force_conv)
} /* end H5T_get_force_conv() */
@@ -4479,15 +4479,15 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
FUNC_ENTER_NOAPI(0)
/* Sanity check */
- HDassert(dt1);
- HDassert(dt2);
+ assert(dt1);
+ assert(dt2);
/* the easy case */
if (dt1 == dt2)
HGOTO_DONE(0);
- HDassert(dt1->shared);
- HDassert(dt2->shared);
+ assert(dt1->shared);
+ assert(dt2->shared);
/* compare */
if (dt1->shared->type < dt2->shared->type)
@@ -4560,10 +4560,10 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
#ifdef H5T_DEBUG
/* I don't quite trust the code above yet :-) --RPM */
for (u = 0; u < dt1->shared->u.compnd.nmembs - 1; u++) {
- HDassert(HDstrcmp(dt1->shared->u.compnd.memb[idx1[u]].name,
- dt1->shared->u.compnd.memb[idx1[u + 1]].name));
- HDassert(HDstrcmp(dt2->shared->u.compnd.memb[idx2[u]].name,
- dt2->shared->u.compnd.memb[idx2[u + 1]].name));
+ assert(HDstrcmp(dt1->shared->u.compnd.memb[idx1[u]].name,
+ dt1->shared->u.compnd.memb[idx1[u + 1]].name));
+ assert(HDstrcmp(dt2->shared->u.compnd.memb[idx2[u]].name,
+ dt2->shared->u.compnd.memb[idx2[u + 1]].name));
}
#endif
@@ -4657,9 +4657,9 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
#ifdef H5T_DEBUG
/* I don't quite trust the code above yet :-) --RPM */
for (u = 0; u < dt1->shared->u.enumer.nmembs - 1; u++) {
- HDassert(
+ assert(
HDstrcmp(dt1->shared->u.enumer.name[idx1[u]], dt1->shared->u.enumer.name[idx1[u + 1]]));
- HDassert(
+ assert(
HDstrcmp(dt2->shared->u.enumer.name[idx2[u]], dt2->shared->u.enumer.name[idx2[u + 1]]));
}
#endif
@@ -4707,8 +4707,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
idx = u;
} /* end else */
- tmp = HDmemcmp((uint8_t *)dt1->shared->u.enumer.value + idx1[u] * base_size,
- (uint8_t *)dt2->shared->u.enumer.value + idx2[idx] * base_size, base_size);
+ tmp = memcmp((uint8_t *)dt1->shared->u.enumer.value + idx1[u] * base_size,
+ (uint8_t *)dt2->shared->u.enumer.value + idx2[idx] * base_size, base_size);
if (tmp < 0)
HGOTO_DONE(-1);
if (tmp > 0)
@@ -4717,12 +4717,12 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
break;
case H5T_VLEN:
- HDassert(dt1->shared->u.vlen.type > H5T_VLEN_BADTYPE &&
- dt1->shared->u.vlen.type < H5T_VLEN_MAXTYPE);
- HDassert(dt2->shared->u.vlen.type > H5T_VLEN_BADTYPE &&
- dt2->shared->u.vlen.type < H5T_VLEN_MAXTYPE);
- HDassert(dt1->shared->u.vlen.loc >= H5T_LOC_BADLOC && dt1->shared->u.vlen.loc < H5T_LOC_MAXLOC);
- HDassert(dt2->shared->u.vlen.loc >= H5T_LOC_BADLOC && dt2->shared->u.vlen.loc < H5T_LOC_MAXLOC);
+ assert(dt1->shared->u.vlen.type > H5T_VLEN_BADTYPE &&
+ dt1->shared->u.vlen.type < H5T_VLEN_MAXTYPE);
+ assert(dt2->shared->u.vlen.type > H5T_VLEN_BADTYPE &&
+ dt2->shared->u.vlen.type < H5T_VLEN_MAXTYPE);
+ assert(dt1->shared->u.vlen.loc >= H5T_LOC_BADLOC && dt1->shared->u.vlen.loc < H5T_LOC_MAXLOC);
+ assert(dt2->shared->u.vlen.loc >= H5T_LOC_BADLOC && dt2->shared->u.vlen.loc < H5T_LOC_MAXLOC);
/* Arbitrarily sort sequence VL datatypes before string VL datatypes */
if (dt1->shared->u.vlen.type == H5T_VLEN_SEQUENCE &&
@@ -4908,7 +4908,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
case H5T_ARRAY:
case H5T_NCLASSES:
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
break;
}
break;
@@ -4952,10 +4952,10 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst)
FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
- HDassert(src);
- HDassert(src->shared);
- HDassert(dst);
- HDassert(dst->shared);
+ assert(src);
+ assert(src->shared);
+ assert(dst);
+ assert(dst->shared);
/* Set up conversion function wrapper */
conv_func.is_app = FALSE;
@@ -5012,10 +5012,10 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(src);
- HDassert(src->shared);
- HDassert(dst);
- HDassert(dst->shared);
+ assert(src);
+ assert(src->shared);
+ assert(dst);
+ assert(dst->shared);
/*
* Make sure the first entry in the table is the no-op conversion path.
@@ -5035,7 +5035,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
+ fprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
#endif
H5E_clear_stack(NULL); /*ignore the error*/
} /* end if */
@@ -5064,7 +5064,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
while (cmp && lt < rt) {
md = (lt + rt) / 2;
- HDassert(H5T_g.path[md]);
+ assert(H5T_g.path[md]);
cmp = H5T_cmp(src, H5T_g.path[md]->src, FALSE);
if (0 == cmp)
cmp = H5T_cmp(dst, H5T_g.path[md]->dst, FALSE);
@@ -5113,8 +5113,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
*/
if (conv->u.app_func &&
(!table || (table && conv->is_app) || (table && !table->is_hard && !conv->is_app))) {
- HDassert(path != table);
- HDassert(NULL == path->conv.u.app_func);
+ assert(path != table);
+ assert(NULL == path->conv.u.app_func);
if (path->src && (src_id = H5I_register(H5I_DATATYPE, H5T_copy(path->src, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register source conversion type for query")
@@ -5145,7 +5145,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
* for an applicable function and add it to the path. This can't happen
* for the no-op conversion path.
*/
- HDassert(path->conv.u.app_func || (src && dst));
+ assert(path->conv.u.app_func || (src && dst));
for (i = H5T_g.nsoft - 1; i >= 0 && !path->conv.u.app_func; --i) {
hbool_t path_init_error = FALSE;
@@ -5161,14 +5161,14 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
if (H5T_g.soft[i].conv.is_app) {
if ((H5T_g.soft[i].conv.u.app_func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0,
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
- HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t));
+ memset(&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear_stack(NULL); /*ignore the error*/
path_init_error = TRUE;
} /* end if */
} /* end if */
else if ((H5T_g.soft[i].conv.u.lib_func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0,
(size_t)0, NULL, NULL) < 0) {
- HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t));
+ memset(&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear_stack(NULL); /*ignore the error*/
path_init_error = TRUE;
} /* end if */
@@ -5197,7 +5197,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
while (cmp && lt < rt) {
md = (lt + rt) / 2;
- HDassert(H5T_g.path[md]);
+ assert(H5T_g.path[md]);
cmp = H5T_cmp(src, H5T_g.path[md]->src, FALSE);
if (0 == cmp)
cmp = H5T_cmp(dst, H5T_g.path[md]->dst, FALSE);
@@ -5212,7 +5212,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
/* Replace an existing table entry or add a new entry */
if (table && path != table) {
- HDassert(table == H5T_g.path[md]);
+ assert(table == H5T_g.path[md]);
H5T__print_stats(table, &nprint /*in,out*/);
table->cdata.command = H5T_CONV_FREE;
if (table->conv.is_app) {
@@ -5220,8 +5220,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n",
- (size_t)path->conv.u.app_func, path->name);
+ fprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n",
+ (size_t)path->conv.u.app_func, path->name);
#endif
H5E_clear_stack(NULL); /*ignore the failure*/
} /* end if */
@@ -5230,8 +5230,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
(size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n",
- (size_t)path->conv.u.lib_func, path->name);
+ fprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n",
+ (size_t)path->conv.u.lib_func, path->name);
#endif
H5E_clear_stack(NULL); /*ignore the failure*/
} /* end if */
@@ -5244,7 +5244,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
H5T_g.path[md] = path;
} /* end if */
else if (path != table) {
- HDassert(cmp);
+ assert(cmp);
if ((size_t)H5T_g.npaths >= H5T_g.apaths) {
size_t na = MAX(128, 2 * H5T_g.apaths);
H5T_path_t **x;
@@ -5308,7 +5308,7 @@ H5T_path_noop(const H5T_path_t *p)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(p);
+ assert(p);
FUNC_LEAVE_NOAPI(p->is_noop || (p->is_hard && 0 == H5T_cmp(p->src, p->dst, FALSE)))
} /* end H5T_path_noop() */
@@ -5343,7 +5343,7 @@ H5T_path_compound_subset(const H5T_path_t *p)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(p);
+ assert(p);
if (p->are_compounds)
ret_value = H5T__conv_struct_subset(&(p->cdata));
@@ -5367,7 +5367,7 @@ H5T_path_bkg(const H5T_path_t *p)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(p);
+ assert(p);
FUNC_LEAVE_NOAPI(p->cdata.need_bkg)
} /* end H5T_path_bkg() */
@@ -5487,7 +5487,7 @@ H5T_oloc(H5T_t *dt)
FUNC_ENTER_NOAPI(NULL)
- HDassert(dt);
+ assert(dt);
switch (dt->shared->state) {
case H5T_STATE_TRANSIENT:
@@ -5496,7 +5496,7 @@ H5T_oloc(H5T_t *dt)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "not a named datatype")
case H5T_STATE_NAMED:
case H5T_STATE_OPEN:
- HDassert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
+ assert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
ret_value = &dt->oloc;
break;
default:
@@ -5527,7 +5527,7 @@ H5T_nameof(H5T_t *dt)
FUNC_ENTER_NOAPI(NULL)
- HDassert(dt);
+ assert(dt);
switch (dt->shared->state) {
case H5T_STATE_TRANSIENT:
@@ -5566,7 +5566,7 @@ H5T_is_immutable(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
if (dt->shared->state == H5T_STATE_IMMUTABLE)
ret_value = TRUE;
@@ -5590,7 +5590,7 @@ H5T_is_named(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
if (dt->vol_obj)
ret_value = TRUE;
@@ -5624,11 +5624,11 @@ H5T_convert_committed_datatype(H5T_t *dt, H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dt);
- HDassert(f);
+ assert(dt);
+ assert(f);
if (H5T_is_named(dt) && (dt->sh_loc.file != f)) {
- HDassert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
+ assert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
H5O_msg_reset_share(H5O_DTYPE_ID, dt);
if (H5O_loc_free(&dt->oloc) < 0)
@@ -5676,7 +5676,7 @@ H5T_get_ref_type(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
if (dt->shared->type == H5T_REFERENCE)
ret_value = dt->shared->u.atomic.u.r.rtype;
@@ -5705,7 +5705,7 @@ H5T_is_sensible(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
switch (dt->shared->type) {
case H5T_COMPOUND:
@@ -5775,8 +5775,8 @@ H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dt);
- HDassert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
+ assert(dt);
+ assert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
/* Datatypes can't change in size if the force_conv flag is not set */
if (dt->shared->force_conv) {
@@ -5936,7 +5936,7 @@ H5T_is_relocatable(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(dt);
+ assert(dt);
/* VL and reference datatypes are relocatable */
if (H5T_detect_class(dt, H5T_VLEN, FALSE) || H5T_detect_class(dt, H5T_REFERENCE, FALSE))
@@ -5968,7 +5968,7 @@ H5T__detect_vlen_ref(const H5T_t *dt)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dt);
+ assert(dt);
/* Check if this datatype is a vlen reference */
/* TODO currently H5T_STD_REF is always considered as a vlen type */
@@ -6035,7 +6035,7 @@ H5T_is_vl_storage(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(dt);
+ assert(dt);
/* VL and region reference datatypes are stored in variable-length form */
if (H5T_detect_class(dt, H5T_VLEN, FALSE))
@@ -6071,8 +6071,8 @@ H5T__upgrade_version_cb(H5T_t *dt, void *op_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(dt);
- HDassert(op_value);
+ assert(dt);
+ assert(op_value);
/* Special behavior for each type of datatype */
switch (dt->shared->type) {
@@ -6127,7 +6127,7 @@ H5T__upgrade_version(H5T_t *dt, unsigned new_version)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dt);
+ assert(dt);
/* Iterate over entire datatype, upgrading the version of components, if it's useful */
if (H5T__visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPLEX_LAST), H5T__upgrade_version_cb, &new_version) <
@@ -6160,8 +6160,8 @@ H5T_set_version(H5F_t *f, H5T_t *dt)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(dt);
+ assert(f);
+ assert(dt);
vers = H5O_dtype_ver_bounds[H5F_LOW_BOUND(f)];
if (vers > dt->shared->version) {
@@ -6201,8 +6201,8 @@ H5T_patch_file(H5T_t *dt, H5F_t *f)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(dt);
- HDassert(f);
+ assert(dt);
+ assert(f);
if (H5T_STATE_OPEN == dt->shared->state || H5T_STATE_NAMED == dt->shared->state) {
dt->oloc.file = f;
@@ -6230,9 +6230,9 @@ H5T_patch_vlen_file(H5T_t *dt, H5VL_object_t *file)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(dt);
- HDassert(dt->shared);
- HDassert(file);
+ assert(dt);
+ assert(dt->shared);
+ assert(file);
if ((dt->shared->type == H5T_VLEN) && dt->shared->u.vlen.file != file)
dt->shared->u.vlen.file = file;
@@ -6259,9 +6259,9 @@ H5T_own_vol_obj(H5T_t *dt, H5VL_object_t *vol_obj)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dt);
- HDassert(dt->shared);
- HDassert(vol_obj);
+ assert(dt);
+ assert(dt->shared);
+ assert(vol_obj);
/* Currently no support for owning multiple VOL objects, free the previous
* owned object. Currently this is only used for holding open VOL objects
diff --git a/src/H5TS.c b/src/H5TS.c
index ebc2d42..2f34480 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -159,9 +159,9 @@ H5TS__key_destructor(void *key_val)
{
FUNC_ENTER_PACKAGE_NAMECHECK_ONLY
- /* Use HDfree here instead of H5MM_xfree(), to avoid calling the H5CS routines */
+ /* Use free here instead of H5MM_xfree(), to avoid calling the H5CS routines */
if (key_val != NULL)
- HDfree(key_val);
+ free(key_val);
FUNC_LEAVE_NOAPI_VOID_NAMECHECK_ONLY
} /* end H5TS__key_destructor() */
@@ -270,7 +270,7 @@ H5TS_thread_id(void)
/* If a prototype ID record was established, copy it to the heap. */
if (tid == &proto_tid)
- if ((tid = HDmalloc(sizeof(*tid))) != NULL)
+ if ((tid = malloc(sizeof(*tid))) != NULL)
*tid = proto_tid;
if (tid == NULL)
@@ -716,17 +716,17 @@ H5TS_cancel_count_inc(void)
* First time thread calls library - create new counter and associate
* with key.
*
- * Don't use H5MM calls here since the destructor has to use HDfree in
+ * Don't use H5MM calls here since the destructor has to use free in
* order to avoid codestack calls.
*/
- cancel_counter = (H5TS_cancel_t *)HDcalloc(1, sizeof(H5TS_cancel_t));
+ cancel_counter = (H5TS_cancel_t *)calloc(1, sizeof(H5TS_cancel_t));
if (NULL == cancel_counter)
HGOTO_DONE(FAIL);
/* Set the thread's cancellation counter with the new object */
ret_value = pthread_setspecific(H5TS_cancel_key_s, (void *)cancel_counter);
if (ret_value) {
- HDfree(cancel_counter);
+ free(cancel_counter);
HGOTO_DONE(FAIL);
} /* end if */
} /* end if */
diff --git a/src/H5Tarray.c b/src/H5Tarray.c
index d3d4c8d..e52a461 100644
--- a/src/H5Tarray.c
+++ b/src/H5Tarray.c
@@ -143,9 +143,9 @@ H5T__array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */])
FUNC_ENTER_PACKAGE
- HDassert(base);
- HDassert(ndims <= H5S_MAX_RANK);
- HDassert(dim);
+ assert(base);
+ assert(ndims <= H5S_MAX_RANK);
+ assert(dim);
/* Build new type */
if (NULL == (ret_value = H5T__alloc()))
@@ -233,8 +233,8 @@ H5T__get_array_ndims(const H5T_t *dt)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(dt->shared->type == H5T_ARRAY);
+ assert(dt);
+ assert(dt->shared->type == H5T_ARRAY);
/* Retrieve the number of dimensions */
FUNC_LEAVE_NOAPI((int)dt->shared->u.array.ndims)
@@ -296,8 +296,8 @@ H5T__get_array_dims(const H5T_t *dt, hsize_t dims[])
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(dt->shared->type == H5T_ARRAY);
+ assert(dt);
+ assert(dt->shared->type == H5T_ARRAY);
/* Retrieve the sizes of the dimensions */
if (dims)
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index c663145..032ecb8 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -174,8 +174,8 @@ H5T__bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(buf);
- HDassert(size);
+ assert(buf);
+ assert(size);
if (shift_dist) {
size_t abs_shift_dist = (size_t)ABS(shift_dist);
@@ -240,7 +240,7 @@ H5T__bit_get_d(uint8_t *buf, size_t offset, size_t size)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(8 * sizeof(val) >= size);
+ assert(8 * sizeof(val) >= size);
H5T__bit_copy((uint8_t *)&val, (size_t)0, buf, offset, size);
switch (H5T_native_order_g) {
@@ -261,7 +261,7 @@ H5T__bit_get_d(uint8_t *buf, size_t offset, size_t size)
case H5T_ORDER_MIXED:
default:
/* This function can't return errors */
- HDassert(0 && "unknown byte order");
+ assert(0 && "unknown byte order");
}
/* Set return value */
@@ -286,7 +286,7 @@ H5T__bit_set_d(uint8_t *buf, size_t offset, size_t size, uint64_t val)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(8 * sizeof(val) >= size);
+ assert(8 * sizeof(val) >= size);
switch (H5T_native_order_g) {
case H5T_ORDER_LE:
@@ -394,7 +394,7 @@ H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t directi
FUNC_ENTER_PACKAGE_NOERR
/* Some functions call this with value=TRUE */
- HDassert(TRUE == 1);
+ assert(TRUE == 1);
switch (direction) {
case H5T_BIT_LSB:
@@ -464,7 +464,7 @@ H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t directi
break;
default:
- HDassert(0 && "Unknown bit search direction");
+ assert(0 && "Unknown bit search direction");
} /* end switch */
done:
@@ -491,7 +491,7 @@ H5T__bit_inc(uint8_t *buf, size_t start, size_t size)
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
FUNC_ENTER_PACKAGE_NOERR
- HDassert(buf);
+ assert(buf);
start %= 8;
@@ -556,8 +556,8 @@ H5T__bit_dec(uint8_t *buf, size_t start, size_t size)
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
FUNC_ENTER_PACKAGE_NOERR
- HDassert(buf);
- HDassert(size);
+ assert(buf);
+ assert(size);
/* The first partial byte */
if ((size + start - 1) / 8 > idx) {
@@ -631,8 +631,8 @@ H5T__bit_neg(uint8_t *buf, size_t start, size_t size)
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
FUNC_ENTER_PACKAGE_NOERR
- HDassert(buf);
- HDassert(size);
+ assert(buf);
+ assert(size);
/* The first partial byte */
tmp[0] = (uint8_t)~buf[idx];
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 76d4083..04fa3d4 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -249,11 +249,11 @@ H5T__commit_named(const H5G_loc_t *loc, const char *name, H5T_t *dt, hid_t lcpl_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(dt);
- HDassert(lcpl_id != H5P_DEFAULT);
- HDassert(tcpl_id != H5P_DEFAULT);
+ assert(loc);
+ assert(name && *name);
+ assert(dt);
+ assert(lcpl_id != H5P_DEFAULT);
+ assert(tcpl_id != H5P_DEFAULT);
/* Record the type's state so that we can revert to it if linking fails */
old_state = dt->shared->state;
@@ -270,7 +270,7 @@ H5T__commit_named(const H5G_loc_t *loc, const char *name, H5T_t *dt, hid_t lcpl_
/* Create the new named datatype and link it to its parent group */
if (H5L_link_object(loc, name, &ocrt_info, lcpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create and link to named datatype")
- HDassert(ocrt_info.new_obj);
+ assert(ocrt_info.new_obj);
done:
/* If the datatype was committed but something failed after that, we need
@@ -402,9 +402,9 @@ H5T__commit_anon(H5F_t *file, H5T_t *type, hid_t tcpl_id)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(file);
- HDassert(type);
- HDassert(tcpl_id != H5P_DEFAULT);
+ assert(file);
+ assert(type);
+ assert(tcpl_id != H5P_DEFAULT);
/* Commit the type */
if (H5T__commit(file, type, tcpl_id) < 0)
@@ -448,9 +448,9 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id)
FUNC_ENTER_PACKAGE
- HDassert(file);
- HDassert(type);
- HDassert(tcpl_id != H5P_DEFAULT);
+ assert(file);
+ assert(type);
+ assert(tcpl_id != H5P_DEFAULT);
/* Check if we are allowed to write to this file */
if (0 == (H5F_INTENT(file) & H5F_ACC_RDWR))
@@ -489,7 +489,7 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id)
/* Calculate message size information, for creating object header */
dtype_size = H5O_msg_size_f(file, tcpl_id, H5O_DTYPE_ID, type, (size_t)0);
- HDassert(dtype_size);
+ assert(dtype_size);
/*
* Create the object header and open it for write access. Insert the data
@@ -600,8 +600,8 @@ H5T_link(const H5T_t *type, int adjust)
FUNC_ENTER_NOAPI((-1))
- HDassert(type);
- HDassert(type->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
+ assert(type);
+ assert(type->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
/* Adjust the link count on the named datatype */
if ((ret_value = H5O_link(&type->oloc, adjust)) < 0)
@@ -937,7 +937,7 @@ H5T__get_create_plist(const H5T_t *type)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(type);
+ assert(type);
/* Copy the default datatype creation property list */
if (NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATATYPE_CREATE_ID_g)))
@@ -992,8 +992,8 @@ H5T__open_name(const H5G_loc_t *loc, const char *name)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(loc);
- HDassert(name);
+ assert(loc);
+ assert(name);
/* Set up datatype location to fill in */
type_loc.oloc = &oloc;
@@ -1053,7 +1053,7 @@ H5T_open(const H5G_loc_t *loc)
FUNC_ENTER_NOAPI(NULL)
- HDassert(loc);
+ assert(loc);
/* Check if datatype was already open */
if (NULL == (shared_fo = (H5T_shared_t *)H5FO_opened(loc->oloc->file, loc->oloc->addr))) {
@@ -1172,7 +1172,7 @@ H5T__open_oid(const H5G_loc_t *loc)
FUNC_ENTER_PACKAGE_TAG(loc->oloc->addr)
- HDassert(loc);
+ assert(loc);
/* Open named datatype object in file */
if (H5O_open(loc->oloc) < 0)
@@ -1224,7 +1224,7 @@ H5T_update_shared(H5T_t *dt)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(dt);
+ assert(dt);
/* Set the shared location fields from the named datatype info */
H5O_UPDATE_SHARED(&(dt->sh_loc), H5O_SHARE_TYPE_COMMITTED, dt->oloc.file, H5O_DTYPE_ID, 0, dt->oloc.addr)
@@ -1358,7 +1358,7 @@ H5T_save_refresh_state(hid_t tid, H5O_shared_t *cached_H5O_shared)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cached_H5O_shared);
+ assert(cached_H5O_shared);
if (NULL == (dt = (H5T_t *)H5I_object_verify(tid, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not a datatype ID")
@@ -1398,7 +1398,7 @@ H5T_restore_refresh_state(hid_t tid, H5O_shared_t *cached_H5O_shared)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cached_H5O_shared);
+ assert(cached_H5O_shared);
if (NULL == (dt = (H5T_t *)H5I_object_verify(tid, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid not a datatype ID")
@@ -1435,7 +1435,7 @@ H5T_already_vol_managed(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(dt);
+ assert(dt);
FUNC_LEAVE_NOAPI(dt->vol_obj != NULL)
} /* end H5T_already_vol_managed() */
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c
index 8ba3d69..8999515 100644
--- a/src/H5Tcompound.c
+++ b/src/H5Tcompound.c
@@ -130,8 +130,8 @@ H5T_get_member_offset(const H5T_t *dt, unsigned membno)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(dt);
- HDassert(membno < dt->shared->u.compnd.nmembs);
+ assert(dt);
+ assert(membno < dt->shared->u.compnd.nmembs);
FUNC_LEAVE_NOAPI(dt->shared->u.compnd.memb[membno].offset)
} /* end H5T_get_member_offset() */
@@ -248,8 +248,8 @@ H5T_get_member_type(const H5T_t *dt, unsigned membno)
FUNC_ENTER_NOAPI(NULL)
/* Sanity checks */
- HDassert(dt);
- HDassert(membno < dt->shared->u.compnd.nmembs);
+ assert(dt);
+ assert(membno < dt->shared->u.compnd.nmembs);
/* Copy datatype */
if (NULL == (ret_value = H5T_copy(dt->shared->u.compnd.memb[membno].type, H5T_COPY_TRANSIENT)))
@@ -284,8 +284,8 @@ H5T__reopen_member_type(const H5T_t *dt, unsigned membno)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dt);
- HDassert(membno < dt->shared->u.compnd.nmembs);
+ assert(dt);
+ assert(membno < dt->shared->u.compnd.nmembs);
/* Copy datatype, possibly re-opening it */
if (NULL == (ret_value = H5T_copy_reopen(dt->shared->u.compnd.memb[membno].type)))
@@ -313,8 +313,8 @@ H5T__get_member_size(const H5T_t *dt, unsigned membno)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(membno < dt->shared->u.compnd.nmembs);
+ assert(dt);
+ assert(membno < dt->shared->u.compnd.nmembs);
FUNC_LEAVE_NOAPI(dt->shared->u.compnd.memb[membno].type->shared->size)
} /* end H5T__get_member_size() */
@@ -433,10 +433,10 @@ H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(parent && H5T_COMPOUND == parent->shared->type);
- HDassert(H5T_STATE_TRANSIENT == parent->shared->state);
- HDassert(member);
- HDassert(name && *name);
+ assert(parent && H5T_COMPOUND == parent->shared->type);
+ assert(H5T_STATE_TRANSIENT == parent->shared->state);
+ assert(member);
+ assert(name && *name);
/* Does NAME already exist in PARENT? */
for (i = 0; i < parent->shared->u.compnd.nmembs; i++)
@@ -480,7 +480,7 @@ H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
/* It should not be possible to get this far if the type is already packed
* - the new member would overlap something */
- HDassert(!(parent->shared->u.compnd.packed));
+ assert(!(parent->shared->u.compnd.packed));
/* Determine if the compound datatype becomes packed */
H5T__update_packed(parent);
@@ -522,7 +522,7 @@ H5T__pack(const H5T_t *dt)
FUNC_ENTER_PACKAGE
- HDassert(dt);
+ assert(dt);
if (H5T_detect_class(dt, H5T_COMPOUND, FALSE) > 0) {
/* If datatype has been packed, skip packing it and indicate success */
@@ -597,7 +597,7 @@ H5T__is_packed(const H5T_t *dt)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
+ assert(dt);
/* Go up the chain as far as possible */
while (dt->shared->parent)
@@ -632,8 +632,8 @@ H5T__update_packed(const H5T_t *dt)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(dt->shared->type == H5T_COMPOUND);
+ assert(dt);
+ assert(dt->shared->type == H5T_COMPOUND);
/* First check if all space is used in the "top level" type */
if (dt->shared->size == dt->shared->u.compnd.memb_size) {
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 8118eb0..840b055 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -745,8 +745,8 @@
case H5T_CONV_CONV: \
/* Initialize source & destination strides */ \
if (buf_stride) { \
- HDassert(buf_stride >= sizeof(ST)); \
- HDassert(buf_stride >= sizeof(DT)); \
+ assert(buf_stride >= sizeof(ST)); \
+ assert(buf_stride >= sizeof(DT)); \
s_stride = d_stride = (ssize_t)buf_stride; \
} \
else { \
@@ -870,13 +870,13 @@ done:
#define H5T_CONV_SET_PREC_Y \
/* Get source & destination precisions into a variable */ \
tclass = st->shared->type; \
- HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
+ assert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
if (tclass == H5T_INTEGER) \
sprec = st->shared->u.atomic.prec; \
else \
sprec = 1 + st->shared->u.atomic.u.f.msize; \
tclass = dt->shared->type; \
- HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
+ assert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
if (tclass == H5T_INTEGER) \
dprec = dt->shared->u.atomic.prec; \
else \
@@ -1002,12 +1002,12 @@ done:
#define CI_PRINT_STATS(STYPE, DTYPE) \
{ \
if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \
- HDfprintf(H5DEBUG(T), " %zu src elements aligned on %zu-byte boundaries\n", \
- ((H5T_conv_hw_t *)cdata->priv)->s_aligned, H5T_NATIVE_##STYPE##_ALIGN_g); \
+ fprintf(H5DEBUG(T), " %zu src elements aligned on %zu-byte boundaries\n", \
+ ((H5T_conv_hw_t *)cdata->priv)->s_aligned, H5T_NATIVE_##STYPE##_ALIGN_g); \
} \
if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \
- HDfprintf(H5DEBUG(T), " %zu dst elements aligned on %zu-byte boundaries\n", \
- ((H5T_conv_hw_t *)cdata->priv)->d_aligned, H5T_NATIVE_##DTYPE##_ALIGN_g); \
+ fprintf(H5DEBUG(T), " %zu dst elements aligned on %zu-byte boundaries\n", \
+ ((H5T_conv_hw_t *)cdata->priv)->d_aligned, H5T_NATIVE_##DTYPE##_ALIGN_g); \
} \
}
@@ -1773,11 +1773,11 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
if (d == dbuf)
- HDassert((dp >= sp && dp < sp + src->shared->size) ||
- (sp >= dp && sp < dp + dst->shared->size));
+ assert((dp >= sp && dp < sp + src->shared->size) ||
+ (sp >= dp && sp < dp + dst->shared->size));
else
- HDassert((dp < sp && dp + dst->shared->size <= sp) ||
- (sp < dp && sp + src->shared->size <= dp));
+ assert((dp < sp && dp + dst->shared->size <= sp) ||
+ (sp < dp && sp + src->shared->size <= dp));
#endif
/*
@@ -1938,9 +1938,9 @@ H5T__conv_struct_free(H5T_conv_struct_t *priv)
int H5_ATTR_NDEBUG_UNUSED status;
status = H5I_dec_ref(src_memb_id[i]);
- HDassert(status >= 0);
+ assert(status >= 0);
status = H5I_dec_ref(dst_memb_id[src2dst[i]]);
- HDassert(status >= 0);
+ assert(status >= 0);
} /* end if */
H5MM_xfree(src2dst);
@@ -2055,12 +2055,12 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
type = H5T_copy(src->shared->u.compnd.memb[i].type, H5T_COPY_ALL);
tid = H5I_register(H5I_DATATYPE, type, FALSE);
- HDassert(tid >= 0);
+ assert(tid >= 0);
priv->src_memb_id[i] = tid;
type = H5T_copy(dst->shared->u.compnd.memb[src2dst[i]].type, H5T_COPY_ALL);
tid = H5I_register(H5I_DATATYPE, type, FALSE);
- HDassert(tid >= 0);
+ assert(tid >= 0);
priv->dst_memb_id[src2dst[i]] = tid;
} /* end if */
} /* end for */
@@ -2182,8 +2182,8 @@ H5T__conv_struct_subset(const H5T_cdata_t *cdata)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(cdata);
- HDassert(cdata->priv);
+ assert(cdata);
+ assert(cdata->priv);
priv = (H5T_conv_struct_t *)(cdata->priv);
@@ -2271,8 +2271,8 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
*/
if (NULL == (src = (H5T_t *)H5I_object(src_id)) || NULL == (dst = (H5T_t *)H5I_object(dst_id)))
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype")
- HDassert(priv);
- HDassert(bkg && cdata->need_bkg);
+ assert(priv);
+ assert(bkg && cdata->need_bkg);
if (cdata->recalc && H5T__conv_struct_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data")
@@ -2367,7 +2367,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
offset -= dst_memb->size;
HDmemmove(xbkg + dst_memb->offset, xbuf + offset, dst_memb->size);
} /* end for */
- HDassert(0 == offset);
+ assert(0 == offset);
/*
* Update pointers
@@ -2543,9 +2543,9 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
if (cdata->recalc && H5T__conv_struct_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data")
priv = (H5T_conv_struct_t *)(cdata->priv);
- HDassert(priv);
+ assert(priv);
src2dst = priv->src2dst;
- HDassert(bkg && cdata->need_bkg);
+ assert(bkg && cdata->need_bkg);
/*
* Insure that members are sorted.
@@ -2769,7 +2769,7 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
}
} /* end for */
- HDassert(domain[1] >= domain[0]);
+ assert(domain[1] >= domain[0]);
length = (unsigned)(domain[1] - domain[0]) + 1;
if (src->shared->u.enumer.nmembs < 2 ||
(double)length / src->shared->u.enumer.nmembs < (double)(1.2F)) {
@@ -2789,8 +2789,8 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
n = *(
(int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
n -= priv->base;
- HDassert(n >= 0 && (unsigned)n < priv->length);
- HDassert(map[n] < 0);
+ assert(n >= 0 && (unsigned)n < priv->length);
+ assert(map[n] < 0);
map[n] = priv->src2dst[i];
} /* end for */
@@ -2869,9 +2869,8 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
case H5T_CONV_FREE:
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- HDfprintf(H5DEBUG(T), " Using %s mapping function%s\n",
- priv->length ? "O(1)" : "O(log N)",
- priv->length ? "" : ", where N is the number of enum members");
+ fprintf(H5DEBUG(T), " Using %s mapping function%s\n", priv->length ? "O(1)" : "O(log N)",
+ priv->length ? "" : ", where N is the number of enum members");
}
#endif
if (priv) {
@@ -2948,7 +2947,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
cb_struct.user_data);
if (except_ret == H5T_CONV_UNHANDLED)
- HDmemset(d, 0xff, dst->shared->size);
+ memset(d, 0xff, dst->shared->size);
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception")
@@ -2968,8 +2967,8 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
while (lt < rt) {
md = (lt + rt) / 2;
- cmp = HDmemcmp(s, (uint8_t *)src->shared->u.enumer.value + (md * src->shared->size),
- src->shared->size);
+ cmp = memcmp(s, (uint8_t *)src->shared->u.enumer.value + (md * src->shared->size),
+ src->shared->size);
if (cmp < 0)
rt = md;
else if (cmp > 0)
@@ -2985,13 +2984,13 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
cb_struct.user_data);
if (except_ret == H5T_CONV_UNHANDLED)
- HDmemset(d, 0xff, dst->shared->size);
+ memset(d, 0xff, dst->shared->size);
else if (except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL,
"can't handle conversion exception")
} /* end if */
else {
- HDassert(priv->src2dst[md] >= 0);
+ assert(priv->src2dst[md] >= 0);
H5MM_memcpy(d,
(uint8_t *)dst->shared->u.enumer.value +
((unsigned)priv->src2dst[md] * dst->shared->size),
@@ -3189,8 +3188,8 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
/* Initialize source & destination strides */
if (buf_stride) {
- HDassert(buf_stride >= src->shared->size);
- HDassert(buf_stride >= dst->shared->size);
+ assert(buf_stride >= src->shared->size);
+ assert(buf_stride >= dst->shared->size);
H5_CHECK_OVERFLOW(buf_stride, size_t, ssize_t);
s_stride = d_stride = (ssize_t)buf_stride;
} /* end if */
@@ -3272,9 +3271,9 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
/* Check if we need to go backwards through the buffer */
if (d_stride > s_stride) {
/* Sanity check */
- HDassert(s_stride > 0);
- HDassert(d_stride > 0);
- HDassert(b_stride >= 0);
+ assert(s_stride > 0);
+ assert(d_stride > 0);
+ assert(b_stride >= 0);
/* Compute the number of "safe" destination elements at */
/* the end of the buffer (Those which don't overlap with */
@@ -3356,7 +3355,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
if (NULL == (conv_buf = H5FL_BLK_REALLOC(vlen_seq, conv_buf, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion")
- HDmemset(conv_buf, 0, conv_buf_size);
+ memset(conv_buf, 0, conv_buf_size);
} /* end else-if */
/* Read in VL sequence */
@@ -3374,14 +3373,14 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
if (NULL == (tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion")
- HDmemset(tmp_buf, 0, tmp_buf_size);
+ memset(tmp_buf, 0, tmp_buf_size);
} /* end if */
/* If we are writing and there is a nested VL type, read
* the sequence into the background buffer */
if (nested) {
/* Sanity check */
- HDassert(write_to_file);
+ assert(write_to_file);
/* Get length of background element sequence */
if ((*(dst->shared->u.vlen.cls->getlen))(dst->shared->u.vlen.file, b,
@@ -3396,7 +3395,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
(tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion")
- HDmemset(tmp_buf, 0, tmp_buf_size);
+ memset(tmp_buf, 0, tmp_buf_size);
} /* end if */
/* Read in background VL sequence */
@@ -3408,8 +3407,8 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
/* If the sequence gets shorter, pad out the original sequence with zeros */
if (bg_seq_len < seq_len)
- HDmemset((uint8_t *)tmp_buf + dst_base_size * bg_seq_len, 0,
- (seq_len - bg_seq_len) * dst_base_size);
+ memset((uint8_t *)tmp_buf + dst_base_size * bg_seq_len, 0,
+ (seq_len - bg_seq_len) * dst_base_size);
} /* end if */
/* Convert VL sequence */
@@ -3431,7 +3430,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
size_t u;
/* Sanity check */
- HDassert(write_to_file);
+ assert(write_to_file);
tmp = (uint8_t *)tmp_buf + seq_len * dst_base_size;
for (u = seq_len; u < bg_seq_len; u++, tmp += dst_base_size) {
@@ -3523,8 +3522,8 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s
*/
if (NULL == (src = (H5T_t *)H5I_object(src_id)) || NULL == (dst = (H5T_t *)H5I_object(dst_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
- HDassert(H5T_ARRAY == src->shared->type);
- HDassert(H5T_ARRAY == dst->shared->type);
+ assert(H5T_ARRAY == src->shared->type);
+ assert(H5T_ARRAY == dst->shared->type);
/* Check the number and sizes of the dimensions */
if (src->shared->u.array.ndims != dst->shared->u.array.ndims)
@@ -3696,12 +3695,12 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (NULL == (src = (H5T_t *)H5I_object(src_id)) || NULL == (dst = (H5T_t *)H5I_object(dst_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
- HDassert(src->shared->u.atomic.u.r.cls);
+ assert(src->shared->u.atomic.u.r.cls);
/* Initialize source & destination strides */
if (buf_stride) {
- HDassert(buf_stride >= src->shared->size);
- HDassert(buf_stride >= dst->shared->size);
+ assert(buf_stride >= src->shared->size);
+ assert(buf_stride >= dst->shared->size);
H5_CHECK_OVERFLOW(buf_stride, size_t, ssize_t);
s_stride = d_stride = (ssize_t)buf_stride;
} /* end if */
@@ -3726,9 +3725,9 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/* Check if we need to go backwards through the buffer */
if (d_stride > s_stride) {
/* Sanity check */
- HDassert(s_stride > 0);
- HDassert(d_stride > 0);
- HDassert(b_stride >= 0);
+ assert(s_stride > 0);
+ assert(d_stride > 0);
+ assert(b_stride >= 0);
/* Compute the number of "safe" destination elements at */
/* the end of the buffer (Those which don't overlap with */
@@ -3793,7 +3792,7 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (NULL == (conv_buf = H5FL_BLK_REALLOC(ref_seq, conv_buf, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion")
- HDmemset(conv_buf, 0, conv_buf_size);
+ memset(conv_buf, 0, conv_buf_size);
} /* end if */
if (dst_copy && (src->shared->u.atomic.u.r.loc == H5T_LOC_DISK))
@@ -3964,12 +3963,12 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
if (d == dbuf) {
- HDassert((dp >= sp && dp < sp + src->shared->size) ||
- (sp >= dp && sp < dp + dst->shared->size));
+ assert((dp >= sp && dp < sp + src->shared->size) ||
+ (sp >= dp && sp < dp + dst->shared->size));
}
else {
- HDassert((dp < sp && dp + dst->shared->size <= sp) ||
- (sp < dp && sp + src->shared->size <= dp));
+ assert((dp < sp && dp + dst->shared->size <= sp) ||
+ (sp < dp && sp + src->shared->size <= dp));
}
#endif
@@ -4231,14 +4230,14 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
* Set padding areas in destination.
*/
if (dst->shared->u.atomic.offset > 0) {
- HDassert(H5T_PAD_ZERO == dst->shared->u.atomic.lsb_pad ||
- H5T_PAD_ONE == dst->shared->u.atomic.lsb_pad);
+ assert(H5T_PAD_ZERO == dst->shared->u.atomic.lsb_pad ||
+ H5T_PAD_ONE == dst->shared->u.atomic.lsb_pad);
H5T__bit_set(d, (size_t)0, dst->shared->u.atomic.offset,
(hbool_t)(H5T_PAD_ONE == dst->shared->u.atomic.lsb_pad));
}
if (dst->shared->u.atomic.offset + dst->shared->u.atomic.prec != 8 * dst->shared->size) {
- HDassert(H5T_PAD_ZERO == dst->shared->u.atomic.msb_pad ||
- H5T_PAD_ONE == dst->shared->u.atomic.msb_pad);
+ assert(H5T_PAD_ZERO == dst->shared->u.atomic.msb_pad ||
+ H5T_PAD_ONE == dst->shared->u.atomic.msb_pad);
H5T__bit_set(d, dst->shared->u.atomic.offset + dst->shared->u.atomic.prec,
8 * dst->shared->size -
(dst->shared->u.atomic.offset + dst->shared->u.atomic.prec),
@@ -4428,12 +4427,12 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
if (d == dbuf) {
- HDassert((dp >= sp && dp < sp + src_p->shared->size) ||
- (sp >= dp && sp < dp + dst_p->shared->size));
+ assert((dp >= sp && dp < sp + src_p->shared->size) ||
+ (sp >= dp && sp < dp + dst_p->shared->size));
}
else {
- HDassert((dp < sp && dp + dst_p->shared->size <= sp) ||
- (sp < dp && sp + src_p->shared->size <= dp));
+ assert((dp < sp && dp + dst_p->shared->size <= sp) ||
+ (sp < dp && sp + src_p->shared->size <= dp));
}
#endif
@@ -4452,7 +4451,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
else if (H5T_ORDER_VAX == src.order) {
tsize = src_p->shared->size;
- HDassert(0 == tsize % 2);
+ assert(0 == tsize % 2);
for (i = 0; i < tsize; i += 4) {
tmp1 = s[i];
@@ -4633,7 +4632,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
* the source exponent bias.
*/
if (0 == expo || H5T_NORM_NONE == src.u.f.norm) {
- HDassert(bitno >= 0);
+ assert(bitno >= 0);
expo -= (int64_t)((src.u.f.ebias - 1) + (src.u.f.msize - (size_t)bitno));
}
else if (H5T_NORM_IMPLIED == src.u.f.norm) {
@@ -4713,7 +4712,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
*/
if (msize > 0 && mrsh <= dst.u.f.msize && mrsh + msize > dst.u.f.msize) {
bitno = (ssize_t)(mrsh + msize - dst.u.f.msize);
- HDassert(bitno >= 0 && (size_t)bitno <= msize);
+ assert(bitno >= 0 && (size_t)bitno <= msize);
/* If the 1st bit being cut off is set and source isn't denormalized.*/
if (H5T__bit_get_d(s, (mpos + (size_t)bitno) - 1, (size_t)1) && !denormalized) {
/* Don't do rounding if exponent is 111...110 and mantissa is 111...11.
@@ -4807,11 +4806,11 @@ padding:
* Set external padding areas
*/
if (dst.offset > 0) {
- HDassert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
+ assert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
H5T__bit_set(d, (size_t)0, dst.offset, (hbool_t)(H5T_PAD_ONE == dst.lsb_pad));
}
if (dst.offset + dst.prec != 8 * dst_p->shared->size) {
- HDassert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
+ assert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
H5T__bit_set(d, dst.offset + dst.prec, 8 * dst_p->shared->size - (dst.offset + dst.prec),
(hbool_t)(H5T_PAD_ONE == dst.msb_pad));
}
@@ -4830,7 +4829,7 @@ padding:
}
else if (H5T_ORDER_VAX == dst.order && reverse) {
tsize = dst_p->shared->size;
- HDassert(0 == tsize % 2);
+ assert(0 == tsize % 2);
for (i = 0; i < tsize; i += 4) {
tmp1 = d[i];
@@ -4995,15 +4994,15 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
if (src->shared->size == dst->shared->size || buf_stride) {
- HDassert(s == d);
+ assert(s == d);
}
else if (d == dbuf) {
- HDassert((dp >= sp && dp < sp + src->shared->size) ||
- (sp >= dp && sp < dp + dst->shared->size));
+ assert((dp >= sp && dp < sp + src->shared->size) ||
+ (sp >= dp && sp < dp + dst->shared->size));
}
else {
- HDassert((dp < sp && dp + dst->shared->size <= sp) ||
- (sp < dp && sp + src->shared->size <= dp));
+ assert((dp < sp && dp + dst->shared->size <= sp) ||
+ (sp < dp && sp + src->shared->size <= dp));
}
#endif
@@ -8528,12 +8527,12 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
if (d == dbuf) {
- HDassert((dp >= sp && dp < sp + src_p->shared->size) ||
- (sp >= dp && sp < dp + dst_p->shared->size));
+ assert((dp >= sp && dp < sp + src_p->shared->size) ||
+ (sp >= dp && sp < dp + dst_p->shared->size));
}
else {
- HDassert((dp < sp && dp + dst_p->shared->size <= sp) ||
- (sp < dp && sp + src_p->shared->size <= dp));
+ assert((dp < sp && dp + dst_p->shared->size <= sp) ||
+ (sp < dp && sp + src_p->shared->size <= dp));
}
#endif
/*
@@ -8551,7 +8550,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
}
else if (H5T_ORDER_VAX == src.order) {
tsize = src_p->shared->size;
- HDassert(0 == tsize % 2);
+ assert(0 == tsize % 2);
for (i = 0; i < tsize; i += 4) {
tmp1 = s[i];
@@ -8961,11 +8960,11 @@ padding:
* Set padding areas in destination.
*/
if (dst.offset > 0) {
- HDassert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
+ assert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
H5T__bit_set(d, (size_t)0, dst.offset, (hbool_t)(H5T_PAD_ONE == dst.lsb_pad));
}
if (dst.offset + dst.prec != 8 * dst_p->shared->size) {
- HDassert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
+ assert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
H5T__bit_set(d, dst.offset + dst.prec, 8 * dst_p->shared->size - (dst.offset + dst.prec),
(hbool_t)(H5T_PAD_ONE == dst.msb_pad));
}
@@ -8999,7 +8998,7 @@ next:
dp += direction * (ssize_t)dst_p->shared->size;
}
- HDmemset(int_buf, 0, buf_size);
+ memset(int_buf, 0, buf_size);
}
break;
@@ -9161,12 +9160,12 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
#ifndef NDEBUG
/* I don't quite trust the overlap calculations yet --rpm */
if (d == dbuf) {
- HDassert((dp >= sp && dp < sp + src_p->shared->size) ||
- (sp >= dp && sp < dp + dst_p->shared->size));
+ assert((dp >= sp && dp < sp + src_p->shared->size) ||
+ (sp >= dp && sp < dp + dst_p->shared->size));
}
else {
- HDassert((dp < sp && dp + dst_p->shared->size <= sp) ||
- (sp < dp && sp + src_p->shared->size <= dp));
+ assert((dp < sp && dp + dst_p->shared->size <= sp) ||
+ (sp < dp && sp + src_p->shared->size <= dp));
}
#endif
@@ -9355,7 +9354,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/*make destination infinity by setting exponent to maximal number and
*mantissa to zero.*/
expo = expo_max;
- HDmemset(int_buf, 0, buf_size);
+ memset(int_buf, 0, buf_size);
}
}
@@ -9373,11 +9372,11 @@ padding:
* Set padding areas in destination.
*/
if (dst.offset > 0) {
- HDassert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
+ assert(H5T_PAD_ZERO == dst.lsb_pad || H5T_PAD_ONE == dst.lsb_pad);
H5T__bit_set(d, (size_t)0, dst.offset, (hbool_t)(H5T_PAD_ONE == dst.lsb_pad));
}
if (dst.offset + dst.prec != 8 * dst_p->shared->size) {
- HDassert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
+ assert(H5T_PAD_ZERO == dst.msb_pad || H5T_PAD_ONE == dst.msb_pad);
H5T__bit_set(d, dst.offset + dst.prec, 8 * dst_p->shared->size - (dst.offset + dst.prec),
(hbool_t)(H5T_PAD_ONE == dst.msb_pad));
}
@@ -9396,7 +9395,7 @@ padding:
}
else if (H5T_ORDER_VAX == dst.order && reverse) {
tsize = dst_p->shared->size;
- HDassert(0 == tsize % 2);
+ assert(0 == tsize % 2);
for (i = 0; i < tsize; i += 4) {
tmp1 = d[i];
@@ -9425,7 +9424,7 @@ padding:
dp += direction * (ssize_t)dst_p->shared->size;
}
- HDmemset(int_buf, 0, buf_size);
+ memset(int_buf, 0, buf_size);
}
break;
@@ -9466,8 +9465,8 @@ H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(s);
- HDassert(size);
+ assert(s);
+ assert(size);
if (H5T_ORDER_VAX == order) {
for (i = 0; i < size; i += 2) {
@@ -9509,9 +9508,9 @@ H5T_reclaim(hid_t type_id, H5S_t *space, void *buf)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(H5I_DATATYPE == H5I_get_type(type_id));
- HDassert(space);
- HDassert(buf);
+ assert(H5I_DATATYPE == H5I_get_type(type_id));
+ assert(space);
+ assert(buf);
if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype")
@@ -9549,15 +9548,15 @@ H5T_reclaim_cb(void *elem, const H5T_t *dt, unsigned H5_ATTR_UNUSED ndim, const
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(elem);
- HDassert(dt);
+ assert(elem);
+ assert(dt);
if (dt->shared->type == H5T_REFERENCE) {
if (H5T__ref_reclaim(elem, dt) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't reclaim ref elements")
}
else {
- HDassert(op_data);
+ assert(op_data);
/* Allow vlen reclaim to recurse into that routine */
if (H5T__vlen_reclaim(elem, dt, (H5T_vlen_alloc_info_t *)op_data) < 0)
diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c
index 8b63878..4f09192 100644
--- a/src/H5Tdbg.c
+++ b/src/H5Tdbg.c
@@ -99,11 +99,11 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED *path, int H5_ATTR_UNUSED *nprint /*i
H5_timer_get_time_string(path->stats.times.elapsed)};
if (nprint && 0 == (*nprint)++) {
- HDfprintf(H5DEBUG(T), "H5T: type conversion statistics:\n");
- HDfprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n", "Conversion", "Elmts", "Calls",
- "User", "System", "Elapsed", "Bandwidth");
- HDfprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n", "----------", "-----", "-----",
- "----", "------", "-------", "---------");
+ fprintf(H5DEBUG(T), "H5T: type conversion statistics:\n");
+ fprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n", "Conversion", "Elmts", "Calls",
+ "User", "System", "Elapsed", "Bandwidth");
+ fprintf(H5DEBUG(T), " %-16s %10s %10s %8s %8s %8s %10s\n", "----------", "-----", "-----",
+ "----", "------", "-------", "---------");
} /* end if */
if (path->src && path->dst)
@@ -116,12 +116,12 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED *path, int H5_ATTR_UNUSED *nprint /*i
nbytes = 0;
nbytes *= path->stats.nelmts;
H5_bandwidth(bandwidth, sizeof(bandwidth), (double)nbytes, path->stats.times.elapsed);
- HDfprintf(H5DEBUG(T), " %-16s %10" PRIdHSIZE " %10u %8s %8s %8s %10s\n", path->name,
- path->stats.nelmts, path->stats.ncalls, timestrs.user, timestrs.system, timestrs.elapsed,
- bandwidth);
- HDfree(timestrs.user);
- HDfree(timestrs.system);
- HDfree(timestrs.elapsed);
+ fprintf(H5DEBUG(T), " %-16s %10" PRIdHSIZE " %10u %8s %8s %8s %10s\n", path->name,
+ path->stats.nelmts, path->stats.ncalls, timestrs.user, timestrs.system, timestrs.elapsed,
+ bandwidth);
+ free(timestrs.user);
+ free(timestrs.system);
+ free(timestrs.elapsed);
}
#endif
@@ -148,8 +148,8 @@ H5T_debug(const H5T_t *dt, FILE *stream)
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
- HDassert(dt);
- HDassert(stream);
+ assert(dt);
+ assert(stream);
switch (dt->shared->type) {
case H5T_NO_CLASS:
@@ -224,10 +224,10 @@ H5T_debug(const H5T_t *dt, FILE *stream)
s2 = "[named,open]";
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
- HDfprintf(stream, "%s%s {nbytes=%lu", s1, s2, (unsigned long)(dt->shared->size));
+ fprintf(stream, "%s%s {nbytes=%lu", s1, s2, (unsigned long)(dt->shared->size));
if (H5T_IS_ATOMIC(dt->shared)) {
uint64_t tmp;
@@ -259,12 +259,12 @@ H5T_debug(const H5T_t *dt, FILE *stream)
break;
} /* end switch */
- HDfprintf(stream, ", %s", s1);
+ fprintf(stream, ", %s", s1);
if (dt->shared->u.atomic.offset)
- HDfprintf(stream, ", offset=%lu", (unsigned long)(dt->shared->u.atomic.offset));
+ fprintf(stream, ", offset=%lu", (unsigned long)(dt->shared->u.atomic.offset));
if (dt->shared->u.atomic.prec != 8 * dt->shared->size)
- HDfprintf(stream, ", prec=%lu", (unsigned long)(dt->shared->u.atomic.prec));
+ fprintf(stream, ", prec=%lu", (unsigned long)(dt->shared->u.atomic.prec));
switch (dt->shared->type) {
case H5T_NO_CLASS:
@@ -292,7 +292,7 @@ H5T_debug(const H5T_t *dt, FILE *stream)
} /* end switch */
if (s1)
- HDfprintf(stream, ", %s", s1);
+ fprintf(stream, ", %s", s1);
break;
case H5T_FLOAT:
@@ -318,20 +318,20 @@ H5T_debug(const H5T_t *dt, FILE *stream)
break;
} /* end switch */
- HDfprintf(stream, ", sign=%lu+1", (unsigned long)(dt->shared->u.atomic.u.f.sign));
- HDfprintf(stream, ", mant=%lu+%lu (%s)", (unsigned long)(dt->shared->u.atomic.u.f.mpos),
- (unsigned long)(dt->shared->u.atomic.u.f.msize), s1);
- HDfprintf(stream, ", exp=%lu+%lu", (unsigned long)(dt->shared->u.atomic.u.f.epos),
- (unsigned long)(dt->shared->u.atomic.u.f.esize));
+ fprintf(stream, ", sign=%lu+1", (unsigned long)(dt->shared->u.atomic.u.f.sign));
+ fprintf(stream, ", mant=%lu+%lu (%s)", (unsigned long)(dt->shared->u.atomic.u.f.mpos),
+ (unsigned long)(dt->shared->u.atomic.u.f.msize), s1);
+ fprintf(stream, ", exp=%lu+%lu", (unsigned long)(dt->shared->u.atomic.u.f.epos),
+ (unsigned long)(dt->shared->u.atomic.u.f.esize));
tmp = dt->shared->u.atomic.u.f.ebias >> 32;
if (tmp) {
size_t hi = (size_t)tmp;
size_t lo = (size_t)(dt->shared->u.atomic.u.f.ebias & 0xffffffff);
- HDfprintf(stream, " bias=0x%08lx%08lx", (unsigned long)hi, (unsigned long)lo);
+ fprintf(stream, " bias=0x%08lx%08lx", (unsigned long)hi, (unsigned long)lo);
}
else {
size_t lo = (size_t)(dt->shared->u.atomic.u.f.ebias & 0xffffffff);
- HDfprintf(stream, " bias=0x%08lx", (unsigned long)lo);
+ fprintf(stream, " bias=0x%08lx", (unsigned long)lo);
}
break;
@@ -353,12 +353,12 @@ H5T_debug(const H5T_t *dt, FILE *stream)
else if (H5T_COMPOUND == dt->shared->type) {
/* Compound data type */
for (i = 0; i < dt->shared->u.compnd.nmembs; i++) {
- HDfprintf(stream, "\n\"%s\" @%lu", dt->shared->u.compnd.memb[i].name,
- (unsigned long)(dt->shared->u.compnd.memb[i].offset));
- HDfprintf(stream, " ");
+ fprintf(stream, "\n\"%s\" @%lu", dt->shared->u.compnd.memb[i].name,
+ (unsigned long)(dt->shared->u.compnd.memb[i].offset));
+ fprintf(stream, " ");
H5T_debug(dt->shared->u.compnd.memb[i].type, stream);
} /* end for */
- HDfprintf(stream, "\n");
+ fprintf(stream, "\n");
}
else if (H5T_VLEN == dt->shared->type) {
switch (dt->shared->u.vlen.loc) {
@@ -367,54 +367,53 @@ H5T_debug(const H5T_t *dt, FILE *stream)
break;
case H5T_LOC_MEMORY:
- HDfprintf(stream, ", loc=memory");
+ fprintf(stream, ", loc=memory");
break;
case H5T_LOC_DISK:
- HDfprintf(stream, ", loc=disk");
+ fprintf(stream, ", loc=disk");
break;
case H5T_LOC_MAXLOC:
default:
- HDfprintf(stream, ", loc=UNKNOWN");
+ fprintf(stream, ", loc=UNKNOWN");
break;
} /* end switch */
if (H5T_IS_VL_STRING(dt->shared))
/* Variable length string datatype */
- HDfprintf(stream, ", variable-length");
+ fprintf(stream, ", variable-length");
else {
/* Variable length sequence datatype */
- HDfprintf(stream, " VLEN ");
+ fprintf(stream, " VLEN ");
H5T_debug(dt->shared->parent, stream);
- HDfprintf(stream, "\n");
+ fprintf(stream, "\n");
} /* end else */
}
else if (H5T_ENUM == dt->shared->type) {
size_t base_size;
/* Enumeration data type */
- HDfprintf(stream, " ");
+ fprintf(stream, " ");
H5T_debug(dt->shared->parent, stream);
base_size = dt->shared->parent->shared->size;
for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
size_t k;
- HDfprintf(stream, "\n\"%s\" = 0x", dt->shared->u.enumer.name[i]);
+ fprintf(stream, "\n\"%s\" = 0x", dt->shared->u.enumer.name[i]);
for (k = 0; k < base_size; k++)
- HDfprintf(stream, "%02" PRIx8,
- *((uint8_t *)dt->shared->u.enumer.value + (i * base_size) + k));
+ fprintf(stream, "%02" PRIx8, *((uint8_t *)dt->shared->u.enumer.value + (i * base_size) + k));
} /* end for */
- HDfprintf(stream, "\n");
+ fprintf(stream, "\n");
}
else if (H5T_OPAQUE == dt->shared->type) {
- HDfprintf(stream, ", tag=\"%s\"", dt->shared->u.opaque.tag);
+ fprintf(stream, ", tag=\"%s\"", dt->shared->u.opaque.tag);
}
else {
/* Unknown */
- HDfprintf(stream, "unknown class %d\n", (int)(dt->shared->type));
+ fprintf(stream, "unknown class %d\n", (int)(dt->shared->type));
}
- HDfprintf(stream, "}");
+ fprintf(stream, "}");
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Tenum.c b/src/H5Tenum.c
index bf9b671..c837ae0 100644
--- a/src/H5Tenum.c
+++ b/src/H5Tenum.c
@@ -92,14 +92,14 @@ H5T__enum_create(const H5T_t *parent)
FUNC_ENTER_PACKAGE
- HDassert(parent);
+ assert(parent);
/* Build new type */
if (NULL == (ret_value = H5T__alloc()))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
ret_value->shared->type = H5T_ENUM;
ret_value->shared->parent = H5T_copy(parent, H5T_COPY_ALL);
- HDassert(ret_value->shared->parent);
+ assert(ret_value->shared->parent);
ret_value->shared->size = ret_value->shared->parent->shared->size;
done:
@@ -177,16 +177,15 @@ H5T__enum_insert(const H5T_t *dt, const char *name, const void *value)
FUNC_ENTER_PACKAGE
- HDassert(dt);
- HDassert(name && *name);
- HDassert(value);
+ assert(dt);
+ assert(name && *name);
+ assert(value);
/* The name and value had better not already exist */
for (i = 0; i < dt->shared->u.enumer.nmembs; i++) {
if (!HDstrcmp(dt->shared->u.enumer.name[i], name))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "name redefinition")
- if (!HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (i * dt->shared->size), value,
- dt->shared->size))
+ if (!memcmp((uint8_t *)dt->shared->u.enumer.value + (i * dt->shared->size), value, dt->shared->size))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "value redefinition")
}
@@ -276,8 +275,8 @@ H5T__get_member_value(const H5T_t *dt, unsigned membno, void *value /*out*/)
{
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(value);
+ assert(dt);
+ assert(value);
H5MM_memcpy(value, (uint8_t *)dt->shared->u.enumer.value + (membno * dt->shared->size), dt->shared->size);
@@ -365,9 +364,9 @@ H5T__enum_nameof(const H5T_t *dt, const void *value, char *name /*out*/, size_t
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dt && H5T_ENUM == dt->shared->type);
- HDassert(value);
- HDassert(name || 0 == size);
+ assert(dt && H5T_ENUM == dt->shared->type);
+ assert(value);
+ assert(name || 0 == size);
if (name && size > 0)
*name = '\0';
@@ -387,8 +386,8 @@ H5T__enum_nameof(const H5T_t *dt, const void *value, char *name /*out*/, size_t
rt = copied_dt->shared->u.enumer.nmembs;
while (lt < rt) {
md = (lt + rt) / 2;
- cmp = HDmemcmp(value, (uint8_t *)copied_dt->shared->u.enumer.value + (md * copied_dt->shared->size),
- copied_dt->shared->size);
+ cmp = memcmp(value, (uint8_t *)copied_dt->shared->u.enumer.value + (md * copied_dt->shared->size),
+ copied_dt->shared->size);
if (cmp < 0)
rt = md;
else if (cmp > 0)
@@ -495,9 +494,9 @@ H5T__enum_valueof(const H5T_t *dt, const char *name, void *value /*out*/)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dt && H5T_ENUM == dt->shared->type);
- HDassert(name && *name);
- HDassert(value);
+ assert(dt && H5T_ENUM == dt->shared->type);
+ assert(name && *name);
+ assert(value);
/* Sanity check */
if (dt->shared->u.enumer.nmembs == 0)
diff --git a/src/H5Tfields.c b/src/H5Tfields.c
index 9317ab9..c9ed237 100644
--- a/src/H5Tfields.c
+++ b/src/H5Tfields.c
@@ -85,7 +85,7 @@ H5T_get_nmembers(const H5T_t *dt)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dt);
+ assert(dt);
if (H5T_COMPOUND == dt->shared->type)
ret_value = (int)dt->shared->u.compnd.nmembs;
@@ -161,7 +161,7 @@ H5T__get_member_name(H5T_t const *dt, unsigned membno)
FUNC_ENTER_PACKAGE
- HDassert(dt);
+ assert(dt);
switch (dt->shared->type) {
case H5T_COMPOUND:
@@ -222,7 +222,7 @@ H5Tget_member_index(hid_t type_id, const char *name)
H5TRACE2("Is", "i*s", type_id, name);
/* Check arguments */
- HDassert(name);
+ assert(name);
if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
@@ -287,8 +287,8 @@ H5T__sort_value(const H5T_t *dt, int *map)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(dt);
- HDassert(H5T_COMPOUND == dt->shared->type || H5T_ENUM == dt->shared->type);
+ assert(dt);
+ assert(H5T_COMPOUND == dt->shared->type || H5T_ENUM == dt->shared->type);
/* Use a bubble sort because we can short circuit */
if (H5T_COMPOUND == dt->shared->type) {
@@ -314,7 +314,7 @@ H5T__sort_value(const H5T_t *dt, int *map)
#ifndef NDEBUG
/* I never trust a sort :-) -RPM */
for (i = 0; i < (nmembs - 1); i++)
- HDassert(dt->shared->u.compnd.memb[i].offset < dt->shared->u.compnd.memb[i + 1].offset);
+ assert(dt->shared->u.compnd.memb[i].offset < dt->shared->u.compnd.memb[i + 1].offset);
#endif
} /* end if */
}
@@ -323,11 +323,11 @@ H5T__sort_value(const H5T_t *dt, int *map)
dt->shared->u.enumer.sorted = H5T_SORT_VALUE;
nmembs = dt->shared->u.enumer.nmembs;
size = dt->shared->size;
- HDassert(size <= sizeof(tbuf));
+ assert(size <= sizeof(tbuf));
for (i = (nmembs - 1), swapped = TRUE; i > 0 && swapped; --i) {
for (j = 0, swapped = FALSE; j < i; j++) {
- if (HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (j * size),
- (uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size) > 0) {
+ if (memcmp((uint8_t *)dt->shared->u.enumer.value + (j * size),
+ (uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size) > 0) {
/* Swap names */
char *tmp = dt->shared->u.enumer.name[j];
dt->shared->u.enumer.name[j] = dt->shared->u.enumer.name[j + 1];
@@ -354,8 +354,8 @@ H5T__sort_value(const H5T_t *dt, int *map)
#ifndef NDEBUG
/* I never trust a sort :-) -RPM */
for (i = 0; i < (nmembs - 1); i++)
- HDassert(HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (i * size),
- (uint8_t *)dt->shared->u.enumer.value + ((i + 1) * size), size) < 0);
+ assert(memcmp((uint8_t *)dt->shared->u.enumer.value + (i * size),
+ (uint8_t *)dt->shared->u.enumer.value + ((i + 1) * size), size) < 0);
#endif
} /* end if */
} /* end else */
@@ -390,8 +390,8 @@ H5T__sort_name(const H5T_t *dt, int *map)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(dt);
- HDassert(H5T_COMPOUND == dt->shared->type || H5T_ENUM == dt->shared->type);
+ assert(dt);
+ assert(H5T_COMPOUND == dt->shared->type || H5T_ENUM == dt->shared->type);
/* Use a bubble sort because we can short circuit */
if (H5T_COMPOUND == dt->shared->type) {
@@ -417,8 +417,8 @@ H5T__sort_name(const H5T_t *dt, int *map)
#ifndef NDEBUG
/* I never trust a sort :-) -RPM */
for (i = 0; i < nmembs - 1; i++) {
- HDassert(HDstrcmp(dt->shared->u.compnd.memb[i].name, dt->shared->u.compnd.memb[i + 1].name) <
- 0);
+ assert(HDstrcmp(dt->shared->u.compnd.memb[i].name, dt->shared->u.compnd.memb[i + 1].name) <
+ 0);
}
#endif
}
@@ -428,7 +428,7 @@ H5T__sort_name(const H5T_t *dt, int *map)
dt->shared->u.enumer.sorted = H5T_SORT_NAME;
nmembs = dt->shared->u.enumer.nmembs;
size = dt->shared->size;
- HDassert(size <= sizeof(tbuf));
+ assert(size <= sizeof(tbuf));
for (i = nmembs - 1, swapped = TRUE; i > 0 && swapped; --i) {
for (j = 0, swapped = FALSE; j < i; j++) {
if (HDstrcmp(dt->shared->u.enumer.name[j], dt->shared->u.enumer.name[j + 1]) > 0) {
@@ -457,7 +457,7 @@ H5T__sort_name(const H5T_t *dt, int *map)
#ifndef NDEBUG
/* I never trust a sort :-) -RPM */
for (i = 0; i < nmembs - 1; i++)
- HDassert(HDstrcmp(dt->shared->u.enumer.name[i], dt->shared->u.enumer.name[i + 1]) < 0);
+ assert(HDstrcmp(dt->shared->u.enumer.name[i], dt->shared->u.enumer.name[i + 1]) < 0);
#endif
}
}
diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c
index 9bf7da3..02b158b 100644
--- a/src/H5Tfixed.c
+++ b/src/H5Tfixed.c
@@ -77,7 +77,7 @@ H5T_get_sign(H5T_t const *dt)
FUNC_ENTER_NOAPI(H5T_SGN_ERROR)
- HDassert(dt);
+ assert(dt);
/* Defer to parent */
while (dt->shared->parent)
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 5fe4998..71ff1ee 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -141,7 +141,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali
FUNC_ENTER_PACKAGE
- HDassert(dtype);
+ assert(dtype);
if (H5T_NO_CLASS == (h5_class = H5T_get_class(dtype, FALSE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid class")
@@ -668,7 +668,7 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction,
} /* end switch */
/* Create new native type */
- HDassert(tid >= 0);
+ assert(tid >= 0);
if (NULL == (dt = (H5T_t *)H5I_object(tid)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
@@ -724,7 +724,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
FUNC_ENTER_PACKAGE
- HDassert(size > 0);
+ assert(size > 0);
if (direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) {
if (size <= sizeof(float)) {
@@ -782,7 +782,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
} /* end switch */
/* Create new native type */
- HDassert(tid >= 0);
+ assert(tid >= 0);
if (NULL == (dt = (H5T_t *)H5I_object(tid)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
if ((ret_value = H5T_copy(dt, H5T_COPY_TRANSIENT)) == NULL)
@@ -883,7 +883,7 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction, size_t *struct_
}
/* Create new native type */
- HDassert(tid >= 0);
+ assert(tid >= 0);
if (NULL == (dt = (H5T_t *)H5I_object(tid)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
diff --git a/src/H5Toffset.c b/src/H5Toffset.c
index 99f3aa0..a99aedb 100644
--- a/src/H5Toffset.c
+++ b/src/H5Toffset.c
@@ -232,12 +232,12 @@ H5T__set_offset(const H5T_t *dt, size_t offset)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dt);
- HDassert(H5T_STRING != dt->shared->type || 0 == offset);
- HDassert(H5T_REFERENCE != dt->shared->type);
- HDassert(H5T_OPAQUE != dt->shared->type);
- HDassert(H5T_COMPOUND != dt->shared->type);
- HDassert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
+ assert(dt);
+ assert(H5T_STRING != dt->shared->type || 0 == offset);
+ assert(H5T_REFERENCE != dt->shared->type);
+ assert(H5T_OPAQUE != dt->shared->type);
+ assert(H5T_COMPOUND != dt->shared->type);
+ assert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
if (dt->shared->parent) {
if (H5T__set_offset(dt->shared->parent, offset) < 0)
diff --git a/src/H5Toh.c b/src/H5Toh.c
index a1891a6..50c0236 100644
--- a/src/H5Toh.c
+++ b/src/H5Toh.c
@@ -93,7 +93,7 @@ H5O__dtype_isa(const H5O_t *oh)
FUNC_ENTER_PACKAGE
- HDassert(oh);
+ assert(oh);
if ((ret_value = H5O_msg_exists_oh(oh, H5O_DTYPE_ID)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to read object header")
@@ -123,7 +123,7 @@ H5O__dtype_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type)
FUNC_ENTER_PACKAGE
- HDassert(obj_loc);
+ assert(obj_loc);
*opened_type = H5I_DATATYPE;
@@ -163,9 +163,9 @@ H5O__dtype_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(crt_info);
- HDassert(obj_loc);
+ assert(f);
+ assert(crt_info);
+ assert(obj_loc);
/* Commit the type to the file */
if (H5T__commit(f, crt_info->dt, crt_info->tcpl_id) < 0)
diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c
index 4505ea3..b26168c 100644
--- a/src/H5Tprecis.c
+++ b/src/H5Tprecis.c
@@ -193,12 +193,12 @@ H5T__set_precision(const H5T_t *dt, size_t prec)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dt);
- HDassert(prec > 0);
- HDassert(H5T_OPAQUE != dt->shared->type);
- HDassert(H5T_COMPOUND != dt->shared->type);
- HDassert(H5T_STRING != dt->shared->type);
- HDassert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
+ assert(dt);
+ assert(prec > 0);
+ assert(H5T_OPAQUE != dt->shared->type);
+ assert(H5T_COMPOUND != dt->shared->type);
+ assert(H5T_STRING != dt->shared->type);
+ assert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
if (dt->shared->parent) {
if (H5T__set_precision(dt->shared->parent, prec) < 0)
diff --git a/src/H5Tref.c b/src/H5Tref.c
index f96d181..0f59715 100644
--- a/src/H5Tref.c
+++ b/src/H5Tref.c
@@ -45,10 +45,10 @@
#ifdef H5T_REF_DEBUG
#define H5T_REF_LOG_DEBUG(...) \
do { \
- HDfprintf(stdout, " # %s(): ", __func__); \
- HDfprintf(stdout, __VA_ARGS__); \
- HDfprintf(stdout, "\n"); \
- HDfflush(stdout); \
+ fprintf(stdout, " # %s(): ", __func__); \
+ fprintf(stdout, __VA_ARGS__); \
+ fprintf(stdout, "\n"); \
+ fflush(stdout); \
} while (0)
#else
#define H5T_REF_LOG_DEBUG(...) \
@@ -163,9 +163,9 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("loc=%d", (int)loc);
- HDassert(dt);
+ assert(dt);
/* f is NULL when loc == H5T_LOC_MEMORY */
- HDassert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
+ assert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
/* Only change the location if it's different */
if (loc == dt->shared->u.atomic.u.r.loc && file == dt->shared->u.atomic.u.r.file)
@@ -219,7 +219,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
break;
case H5T_LOC_DISK: /* Disk based reference datatype */
- HDassert(file);
+ assert(file);
/* Mark this type as being stored on disk */
dt->shared->u.atomic.u.r.loc = H5T_LOC_DISK;
@@ -244,7 +244,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
"can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -272,7 +272,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
"can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -302,7 +302,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get container info")
/* Retrieve min encode size (when references have no vlen part) */
- HDmemset(&fixed_ref, 0, sizeof(fixed_ref));
+ memset(&fixed_ref, 0, sizeof(fixed_ref));
fixed_ref.type = (int8_t)H5R_OBJECT2;
fixed_ref.token_size = (uint8_t)cont_info.token_size;
if (H5R__encode(NULL, &fixed_ref, NULL, &ref_encode_size, 0) < 0)
@@ -366,10 +366,10 @@ H5T__ref_mem_isnull(const H5VL_object_t H5_ATTR_UNUSED *src_file, const void *sr
H5T_REF_LOG_DEBUG("");
/* Check parameters */
- HDassert(src_buf);
- HDassert(isnull);
+ assert(src_buf);
+ assert(isnull);
- *isnull = (0 == HDmemcmp(src_buf, zeros, H5T_REF_MEM_SIZE)) ? TRUE : FALSE;
+ *isnull = (0 == memcmp(src_buf, zeros, H5T_REF_MEM_SIZE)) ? TRUE : FALSE;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__ref_mem_isnull() */
@@ -391,7 +391,7 @@ H5T__ref_mem_setnull(H5VL_object_t H5_ATTR_UNUSED *dst_file, void *dst_buf, H5_A
FUNC_ENTER_PACKAGE_NOERR
H5T_REF_LOG_DEBUG("");
- HDmemset(dst_buf, 0, H5T_REF_MEM_SIZE);
+ memset(dst_buf, 0, H5T_REF_MEM_SIZE);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__ref_mem_setnull() */
@@ -420,8 +420,8 @@ H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf
H5T_REF_LOG_DEBUG("");
/* Sanity check */
- HDassert(src_buf);
- HDassert(src_size == H5T_REF_MEM_SIZE);
+ assert(src_buf);
+ assert(src_size == H5T_REF_MEM_SIZE);
if (NULL != dst_file) {
hbool_t files_equal = TRUE; /* Whether src & dst references are in same file */
@@ -540,10 +540,10 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, s
H5T_REF_LOG_DEBUG("");
/* Sanity check */
- HDassert(src_buf);
- HDassert(src_size == H5T_REF_MEM_SIZE);
- HDassert(dst_buf);
- HDassert(dst_size);
+ assert(src_buf);
+ assert(src_size == H5T_REF_MEM_SIZE);
+ assert(dst_buf);
+ assert(dst_size);
/* Memory-to-memory conversion to support vlen conversion */
if (NULL == dst_file) {
@@ -651,10 +651,10 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
H5T_REF_LOG_DEBUG("");
/* Sanity check */
- HDassert(src_buf);
- HDassert(src_size);
- HDassert(dst_buf);
- HDassert(dst_size == H5T_REF_MEM_SIZE);
+ assert(src_buf);
+ assert(src_size);
+ assert(dst_buf);
+ assert(dst_size == H5T_REF_MEM_SIZE);
HDcompile_assert(sizeof(*dst_ref) == sizeof(tmp_ref));
/* Memory-to-memory conversion to support vlen conversion */
@@ -672,7 +672,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -681,7 +681,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object")
/* Make sure reference buffer is correctly initialized */
- HDmemset(&tmp_ref, 0, sizeof(tmp_ref));
+ memset(&tmp_ref, 0, sizeof(tmp_ref));
switch (src_type) {
case H5R_OBJECT1: {
@@ -719,7 +719,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
case H5R_BADTYPE:
case H5R_MAXTYPE:
default:
- HDassert("unknown reference type" && 0);
+ assert("unknown reference type" && 0);
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
@@ -736,7 +736,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
} /* end if */
/* Set output info */
- HDmemcpy(dst_ref, &tmp_ref, sizeof(tmp_ref));
+ memcpy(dst_ref, &tmp_ref, sizeof(tmp_ref));
done:
if ((file_id != H5I_INVALID_HID) && (H5I_dec_ref(file_id) < 0))
@@ -772,9 +772,9 @@ H5T__ref_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbool_t
H5T_REF_LOG_DEBUG("");
/* Check parameters */
- HDassert(src_file);
- HDassert(src_buf);
- HDassert(isnull);
+ assert(src_file);
+ assert(src_buf);
+ assert(isnull);
/* Try to check encoded reference type */
ref_type = (H5R_type_t)*p++;
@@ -822,8 +822,8 @@ H5T__ref_disk_setnull(H5VL_object_t *dst_file, void *dst_buf, void *bg_buf)
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(dst_file);
- HDassert(dst_buf);
+ assert(dst_file);
+ assert(dst_buf);
/* TODO Should get rid of bg stuff */
if (p_bg) {
@@ -839,7 +839,7 @@ H5T__ref_disk_setnull(H5VL_object_t *dst_file, void *dst_buf, void *bg_buf)
} /* end if */
/* Copy header manually so that it does not get encoded into the blob */
- HDmemset(q, 0, H5R_ENCODE_HEADER_SIZE);
+ memset(q, 0, H5R_ENCODE_HEADER_SIZE);
q += H5R_ENCODE_HEADER_SIZE;
/* Set the size */
@@ -877,7 +877,7 @@ H5T__ref_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_bu
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(src_buf);
+ assert(src_buf);
/* Set reference type */
ref_type = (H5R_type_t)*p++;
@@ -926,10 +926,10 @@ H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(src_file);
- HDassert(src_buf);
- HDassert(dst_buf);
- HDassert(dst_size);
+ assert(src_file);
+ assert(src_buf);
+ assert(dst_buf);
+ assert(dst_size);
/* Copy header manually */
H5MM_memcpy(q, p, H5R_ENCODE_HEADER_SIZE);
@@ -939,7 +939,7 @@ H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_
/* Skip the size */
p += sizeof(uint32_t);
- HDassert(src_size > (H5R_ENCODE_HEADER_SIZE + sizeof(uint32_t)));
+ assert(src_size > (H5R_ENCODE_HEADER_SIZE + sizeof(uint32_t)));
/* Retrieve blob */
if (H5VL_blob_get(src_file, p, q, blob_size, NULL) < 0)
@@ -971,10 +971,10 @@ H5T__ref_disk_write(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf,
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(src_buf);
- HDassert(src_size);
- HDassert(dst_file);
- HDassert(dst_buf);
+ assert(src_buf);
+ assert(src_size);
+ assert(dst_file);
+ assert(dst_buf);
/* TODO Should get rid of bg stuff */
if (p_bg) {
@@ -985,7 +985,7 @@ H5T__ref_disk_write(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf,
#ifndef NDEBUG
size_t p_buf_size_left = dst_size;
- HDassert(p_buf_size_left > (sizeof(uint32_t) + H5R_ENCODE_HEADER_SIZE));
+ assert(p_buf_size_left > (sizeof(uint32_t) + H5R_ENCODE_HEADER_SIZE));
#endif
/* Set up VOL callback arguments */
@@ -1041,9 +1041,9 @@ H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbo
H5T_REF_LOG_DEBUG("");
/* Check parameters */
- HDassert(src_file);
- HDassert(src_buf);
- HDassert(isnull);
+ assert(src_file);
+ assert(src_buf);
+ assert(isnull);
#ifndef NDEBUG
{
@@ -1054,7 +1054,7 @@ H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbo
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -1092,8 +1092,8 @@ H5T__ref_obj_disk_getsize(H5VL_object_t *src_file, const void H5_ATTR_UNUSED *sr
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(src_file);
- HDassert(src_buf);
+ assert(src_file);
+ assert(src_buf);
#ifndef NDEBUG
{
@@ -1104,7 +1104,7 @@ H5T__ref_obj_disk_getsize(H5VL_object_t *src_file, const void H5_ATTR_UNUSED *sr
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -1112,7 +1112,7 @@ H5T__ref_obj_disk_getsize(H5VL_object_t *src_file, const void H5_ATTR_UNUSED *sr
if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid VOL object")
- HDassert(src_size == H5T_REF_OBJ_DISK_SIZE(src_f));
+ assert(src_size == H5T_REF_OBJ_DISK_SIZE(src_f));
ret_value = H5T_REF_OBJ_DISK_SIZE(src_f);
@@ -1139,9 +1139,9 @@ H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(src_file);
- HDassert(src_buf);
- HDassert(dst_buf);
+ assert(src_file);
+ assert(src_buf);
+ assert(dst_buf);
#ifndef NDEBUG
{
@@ -1152,7 +1152,7 @@ H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -1160,8 +1160,8 @@ H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_
if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object")
- HDassert(src_size == H5T_REF_OBJ_DISK_SIZE(src_f));
- HDassert(dst_size == H5F_SIZEOF_ADDR(src_f));
+ assert(src_size == H5T_REF_OBJ_DISK_SIZE(src_f));
+ assert(dst_size == H5F_SIZEOF_ADDR(src_f));
/* Get object address */
if (H5R__decode_token_obj_compat((const unsigned char *)src_buf, &src_size, (H5O_token_t *)dst_buf,
@@ -1193,9 +1193,9 @@ H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf,
H5T_REF_LOG_DEBUG("");
/* Check parameters */
- HDassert(src_file);
- HDassert(src_buf);
- HDassert(isnull);
+ assert(src_file);
+ assert(src_buf);
+ assert(isnull);
#ifndef NDEBUG
{
@@ -1206,7 +1206,7 @@ H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf,
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -1247,7 +1247,7 @@ H5T__ref_dsetreg_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void
#endif
H5T_REF_LOG_DEBUG("");
- HDassert(src_buf);
+ assert(src_buf);
#ifndef NDEBUG
{
@@ -1259,13 +1259,13 @@ H5T__ref_dsetreg_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
/* Retrieve file from VOL object */
if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid VOL object")
- HDassert(src_size == H5T_REF_DSETREG_DISK_SIZE(src_f));
+ assert(src_size == H5T_REF_DSETREG_DISK_SIZE(src_f));
}
#endif /* NDEBUG */
@@ -1296,10 +1296,10 @@ H5T__ref_dsetreg_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t
FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
- HDassert(src_file);
- HDassert(src_buf);
- HDassert(dst_buf);
- HDassert(dst_size == sizeof(struct H5Tref_dsetreg));
+ assert(src_file);
+ assert(src_buf);
+ assert(dst_buf);
+ assert(dst_size == sizeof(struct H5Tref_dsetreg));
#ifndef NDEBUG
{
@@ -1310,7 +1310,7 @@ H5T__ref_dsetreg_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
/* Must use native VOL connector for this operation */
- HDassert(is_native);
+ assert(is_native);
}
#endif /* NDEBUG */
@@ -1318,7 +1318,7 @@ H5T__ref_dsetreg_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t
if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object")
- HDassert(src_size == H5T_REF_DSETREG_DISK_SIZE(src_f));
+ assert(src_size == H5T_REF_DSETREG_DISK_SIZE(src_f));
/* Retrieve object address and space */
if (H5R__decode_token_region_compat(src_f, (const unsigned char *)src_buf, &src_size, &dst_reg->token,
@@ -1347,8 +1347,8 @@ H5T__ref_reclaim(void *elem, const H5T_t *dt)
H5T_REF_LOG_DEBUG("");
/* Sanity checks */
- HDassert(elem);
- HDassert(dt && (dt->shared->type == H5T_REFERENCE));
+ assert(elem);
+ assert(dt && (dt->shared->type == H5T_REFERENCE));
if (dt->shared->u.atomic.u.r.opaque && H5R__destroy((H5R_ref_priv_t *)elem) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTFREE, FAIL, "cannot free reference")
diff --git a/src/H5Tvisit.c b/src/H5Tvisit.c
index f5ee19a..f5d1ec7 100644
--- a/src/H5Tvisit.c
+++ b/src/H5Tvisit.c
@@ -91,8 +91,8 @@ H5T__visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dt);
- HDassert(op);
+ assert(dt);
+ assert(op);
/* Check for complex datatype */
is_complex = H5T_IS_COMPLEX(dt->shared->type);
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 0fcf8c9..c1d6072 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -191,7 +191,7 @@ H5T__vlen_create(const H5T_t *base)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(base);
+ assert(base);
/* Build new type */
if (NULL == (dt = H5T__alloc()))
@@ -251,14 +251,14 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
FUNC_ENTER_PACKAGE
/* check parameters */
- HDassert(dt);
- HDassert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
+ assert(dt);
+ assert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
/* Only change the location if it's different */
if (loc != dt->shared->u.vlen.loc || file != dt->shared->u.vlen.file) {
switch (loc) {
case H5T_LOC_MEMORY: /* Memory based VL datatype */
- HDassert(NULL == file);
+ assert(NULL == file);
/* Mark this type as being stored in memory */
dt->shared->u.vlen.loc = H5T_LOC_MEMORY;
@@ -278,7 +278,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
dt->shared->u.vlen.cls = &H5T_vlen_mem_str_g;
} /* end else-if */
else
- HDassert(0 && "Invalid VL type");
+ assert(0 && "Invalid VL type");
/* Release owned file */
if (dt->shared->owned_vol_obj) {
@@ -296,7 +296,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
H5VL_file_cont_info_t cont_info = {H5VL_CONTAINER_INFO_VERSION, 0, 0, 0};
H5VL_file_get_args_t vol_cb_args; /* Arguments to VOL callback */
- HDassert(file);
+ assert(file);
/* Mark this type as being stored on disk */
dt->shared->u.vlen.loc = H5T_LOC_DISK;
@@ -373,13 +373,13 @@ H5T__vlen_mem_seq_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, si
FUNC_ENTER_PACKAGE_NOERR
/* Check parameter */
- HDassert(_vl);
- HDassert(len);
+ assert(_vl);
+ assert(len);
/* Copy to ensure correct alignment. memcpy is best here because
* it optimizes to fast code.
*/
- HDmemcpy(&vl, _vl, sizeof(hvl_t));
+ memcpy(&vl, _vl, sizeof(hvl_t));
*len = vl.len;
@@ -406,9 +406,9 @@ H5T__vlen_mem_seq_getptr(void *_vl)
FUNC_ENTER_PACKAGE_NOERR
/* check parameters, return result */
- HDassert(_vl);
+ assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&vl, _vl, sizeof(hvl_t));
+ memcpy(&vl, _vl, sizeof(hvl_t));
FUNC_LEAVE_NOAPI(vl.p)
} /* end H5T__vlen_mem_seq_getptr() */
@@ -433,10 +433,10 @@ H5T__vlen_mem_seq_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, hb
FUNC_ENTER_PACKAGE_NOERR
/* Check parameters */
- HDassert(_vl);
+ assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&vl, _vl, sizeof(hvl_t));
+ memcpy(&vl, _vl, sizeof(hvl_t));
*isnull = ((vl.len == 0 || vl.p == NULL) ? TRUE : FALSE);
@@ -463,7 +463,7 @@ H5T__vlen_mem_seq_setnull(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void H5
FUNC_ENTER_PACKAGE_NOERR
/* check parameters */
- HDassert(_vl);
+ assert(_vl);
/* Set the "nil" hvl_t */
vl.len = 0;
@@ -495,11 +495,11 @@ H5T__vlen_mem_seq_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf,
FUNC_ENTER_PACKAGE_NOERR
/* check parameters, copy data */
- HDassert(buf);
- HDassert(_vl);
+ assert(buf);
+ assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&vl, _vl, sizeof(hvl_t));
- HDassert(vl.p);
+ memcpy(&vl, _vl, sizeof(hvl_t));
+ assert(vl.p);
H5MM_memcpy(buf, vl.p, len);
@@ -528,8 +528,8 @@ H5T__vlen_mem_seq_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc
FUNC_ENTER_PACKAGE
/* check parameters */
- HDassert(_vl);
- HDassert(buf);
+ assert(_vl);
+ assert(buf);
if (seq_len) {
size_t len = seq_len * base_size; /* Sequence size */
@@ -541,7 +541,7 @@ H5T__vlen_mem_seq_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc
"application memory allocation routine failed for VL data")
} /* end if */
else /* Default to system malloc */
- if (NULL == (vl.p = HDmalloc(len)))
+ if (NULL == (vl.p = malloc(len)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed for VL data")
/* Copy the data into the newly allocated buffer */
@@ -580,10 +580,10 @@ H5T__vlen_mem_str_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, si
FUNC_ENTER_PACKAGE_NOERR
/* check parameters */
- HDassert(_vl);
+ assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&s, _vl, sizeof(char *));
+ memcpy(&s, _vl, sizeof(char *));
*len = HDstrlen(s);
@@ -610,9 +610,9 @@ H5T__vlen_mem_str_getptr(void *_vl)
FUNC_ENTER_PACKAGE_NOERR
/* check parameters */
- HDassert(_vl);
+ assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&s, _vl, sizeof(char *));
+ memcpy(&s, _vl, sizeof(char *));
FUNC_LEAVE_NOAPI(s)
} /* end H5T__vlen_mem_str_getptr() */
@@ -637,7 +637,7 @@ H5T__vlen_mem_str_isnull(const H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, hb
FUNC_ENTER_PACKAGE_NOERR
/* Copy to ensure correct alignment. */
- HDmemcpy(&s, _vl, sizeof(char *));
+ memcpy(&s, _vl, sizeof(char *));
*isnull = (s == NULL ? TRUE : FALSE);
@@ -690,10 +690,10 @@ H5T__vlen_mem_str_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf,
if (len > 0) {
/* check parameters */
- HDassert(buf);
- HDassert(_vl);
+ assert(buf);
+ assert(_vl);
/* Copy to ensure correct alignment. */
- HDmemcpy(&s, _vl, sizeof(char *));
+ memcpy(&s, _vl, sizeof(char *));
H5MM_memcpy(buf, s, len);
} /* end if */
@@ -724,7 +724,7 @@ H5T__vlen_mem_str_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc
FUNC_ENTER_PACKAGE
/* check parameters */
- HDassert(buf);
+ assert(buf);
/* Use the user's memory allocation routine if one is defined */
if (vl_alloc_info->alloc_func != NULL) {
@@ -734,7 +734,7 @@ H5T__vlen_mem_str_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc
"application memory allocation routine failed for VL data")
} /* end if */
else /* Default to system malloc */
- if (NULL == (t = (char *)HDmalloc((seq_len + 1) * base_size)))
+ if (NULL == (t = (char *)malloc((seq_len + 1) * base_size)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed for VL data")
/* 'write' the string into the buffer, with memcpy() */
@@ -769,8 +769,8 @@ H5T__vlen_disk_getlen(H5VL_object_t H5_ATTR_UNUSED *file, const void *_vl, size_
FUNC_ENTER_PACKAGE_NOERR
/* Check parameters */
- HDassert(vl);
- HDassert(seq_len);
+ assert(vl);
+ assert(seq_len);
/* Get length of sequence (different from blob size) */
UINT32DECODE(vl, *seq_len);
@@ -800,9 +800,9 @@ H5T__vlen_disk_isnull(const H5VL_object_t *file, void *_vl, hbool_t *isnull)
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(file);
- HDassert(vl);
- HDassert(isnull);
+ assert(file);
+ assert(vl);
+ assert(isnull);
/* Skip the sequence's length */
vl += 4;
@@ -841,8 +841,8 @@ H5T__vlen_disk_setnull(H5VL_object_t *file, void *_vl, void *bg)
FUNC_ENTER_PACKAGE
/* check parameters */
- HDassert(file);
- HDassert(vl);
+ assert(file);
+ assert(vl);
/* Free heap object for old data */
if (bg != NULL)
@@ -885,9 +885,9 @@ H5T__vlen_disk_read(H5VL_object_t *file, void *_vl, void *buf, size_t len)
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(file);
- HDassert(vl);
- HDassert(buf);
+ assert(file);
+ assert(vl);
+ assert(buf);
/* Skip the length of the sequence */
vl += 4;
@@ -923,9 +923,9 @@ H5T__vlen_disk_write(H5VL_object_t *file, const H5T_vlen_alloc_info_t H5_ATTR_UN
FUNC_ENTER_PACKAGE
/* check parameters */
- HDassert(vl);
- HDassert(seq_len == 0 || buf);
- HDassert(file);
+ assert(vl);
+ assert(seq_len == 0 || buf);
+ assert(file);
/* Free heap object for old data, if non-NULL */
if (bg != NULL)
@@ -964,7 +964,7 @@ H5T__vlen_disk_delete(H5VL_object_t *file, void *_vl)
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(file);
+ assert(file);
/* Free heap object for old data */
if (vl != NULL) {
@@ -1012,9 +1012,9 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(elem);
- HDassert(dt);
- HDassert(alloc_info);
+ assert(elem);
+ assert(dt);
+ assert(alloc_info);
free_func = alloc_info->free_func;
free_info = alloc_info->free_info;
@@ -1074,7 +1074,7 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info
if (free_func != NULL)
(*free_func)(vl->p, free_info);
else
- HDfree(vl->p);
+ free(vl->p);
} /* end if */
}
else if (dt->shared->u.vlen.type == H5T_VLEN_STRING) {
@@ -1082,10 +1082,10 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info
if (free_func != NULL)
(*free_func)(*(char **)elem, free_info);
else
- HDfree(*(char **)elem);
+ free(*(char **)elem);
}
else {
- HDassert(0 && "Invalid VL type");
+ assert(0 && "Invalid VL type");
} /* end else */
break;
@@ -1135,8 +1135,8 @@ H5T_vlen_reclaim_elmt(void *elem, H5T_t *dt)
H5T_vlen_alloc_info_t vl_alloc_info; /* VL allocation info */
herr_t ret_value = SUCCEED; /* return value */
- HDassert(dt);
- HDassert(elem);
+ assert(dt);
+ assert(elem);
FUNC_ENTER_NOAPI(FAIL)
diff --git a/src/H5UC.c b/src/H5UC.c
index 22e35e5..60a4456 100644
--- a/src/H5UC.c
+++ b/src/H5UC.c
@@ -58,8 +58,8 @@ H5UC_create(void *o, H5UC_free_func_t free_func)
FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
- HDassert(o);
- HDassert(free_func);
+ assert(o);
+ assert(free_func);
/* Allocate ref-counted string structure */
if (NULL == (ret_value = H5FL_MALLOC(H5UC_t)))
@@ -101,10 +101,10 @@ H5UC_decr(H5UC_t *rc)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(rc);
- HDassert(rc->o);
- HDassert(rc->n > 0);
- HDassert(rc->free_func);
+ assert(rc);
+ assert(rc->o);
+ assert(rc->n > 0);
+ assert(rc->free_func);
/* Decrement reference count */
rc->n--;
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c
index 8191d29..d5bdb50 100644
--- a/src/H5VLcallback.c
+++ b/src/H5VLcallback.c
@@ -392,7 +392,7 @@ H5VL_copy_connector_info(const H5VL_class_t *connector, void **dst_info, const v
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(connector);
+ assert(connector);
/* Check for actual source info */
if (src_info) {
@@ -469,8 +469,8 @@ H5VL_cmp_connector_info(const H5VL_class_t *connector, int *cmp_value, const voi
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(connector);
- HDassert(cmp_value);
+ assert(connector);
+ assert(cmp_value);
/* Take care of cases where one or both pointers is NULL */
if (info1 == NULL && info2 != NULL) {
@@ -495,8 +495,8 @@ H5VL_cmp_connector_info(const H5VL_class_t *connector, int *cmp_value, const voi
HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare connector info")
} /* end if */
else {
- HDassert(connector->info_cls.size > 0);
- *cmp_value = HDmemcmp(info1, info2, connector->info_cls.size);
+ assert(connector->info_cls.size > 0);
+ *cmp_value = memcmp(info1, info2, connector->info_cls.size);
} /* end else */
done:
@@ -558,7 +558,7 @@ H5VL_free_connector_info(hid_t connector_id, const void *info)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(connector_id > 0);
+ assert(connector_id > 0);
/* Check args and get class pointer */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
@@ -726,14 +726,14 @@ H5VL_get_wrap_ctx(const H5VL_class_t *connector, void *obj, void **wrap_ctx)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(connector);
- HDassert(obj);
- HDassert(wrap_ctx);
+ assert(connector);
+ assert(obj);
+ assert(wrap_ctx);
/* Allow the connector to copy or do it ourselves */
if (connector->wrap_cls.get_wrap_ctx) {
/* Sanity check */
- HDassert(connector->wrap_cls.free_wrap_ctx);
+ assert(connector->wrap_cls.free_wrap_ctx);
/* Invoke connector's callback */
if ((connector->wrap_cls.get_wrap_ctx)(obj, wrap_ctx) < 0)
@@ -795,8 +795,8 @@ H5VL_wrap_object(const H5VL_class_t *connector, void *wrap_ctx, void *obj, H5I_t
FUNC_ENTER_NOAPI(NULL)
/* Sanity checks */
- HDassert(connector);
- HDassert(obj);
+ assert(connector);
+ assert(obj);
/* Only wrap object if there's a wrap context */
if (wrap_ctx) {
@@ -862,8 +862,8 @@ H5VL_unwrap_object(const H5VL_class_t *connector, void *obj)
FUNC_ENTER_NOAPI(NULL)
/* Sanity checks */
- HDassert(connector);
- HDassert(obj);
+ assert(connector);
+ assert(obj);
/* Only unwrap object if there's an unwrap callback */
if (connector->wrap_cls.wrap_object) {
@@ -929,7 +929,7 @@ H5VL_free_wrap_ctx(const H5VL_class_t *connector, void *wrap_ctx)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(connector);
+ assert(connector);
/* Only free wrap context, if it's non-NULL */
if (wrap_ctx) {
@@ -1769,7 +1769,7 @@ H5VL_attr_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Call the corresponding internal VOL routine */
if (H5VL__attr_close(vol_obj->data, vol_obj->connector->cls, dxpl_id, req) < 0)
@@ -2075,8 +2075,8 @@ H5VL_dataset_read_direct(size_t count, void *obj[], H5VL_t *connector, hid_t mem
FUNC_ENTER_NOAPI(FAIL)
- HDassert(obj);
- HDassert(connector);
+ assert(obj);
+ assert(connector);
/* Set wrapper info in API context */
tmp_vol_obj.data = obj[0];
@@ -2121,8 +2121,8 @@ H5VL_dataset_read(size_t count, const H5VL_object_t *vol_obj[], hid_t mem_type_i
FUNC_ENTER_NOAPI(FAIL)
- HDassert(vol_obj);
- HDassert(vol_obj[0]);
+ assert(vol_obj);
+ assert(vol_obj[0]);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj[0]) < 0)
@@ -2265,8 +2265,8 @@ H5VL_dataset_write_direct(size_t count, void *obj[], H5VL_t *connector, hid_t me
FUNC_ENTER_NOAPI(FAIL)
- HDassert(obj);
- HDassert(connector);
+ assert(obj);
+ assert(connector);
/* Set wrapper info in API context */
tmp_vol_obj.data = obj[0];
@@ -2311,8 +2311,8 @@ H5VL_dataset_write(size_t count, const H5VL_object_t *vol_obj[], hid_t mem_type_
FUNC_ENTER_NOAPI(FAIL)
- HDassert(vol_obj);
- HDassert(vol_obj[0]);
+ assert(vol_obj);
+ assert(vol_obj[0]);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj[0]) < 0)
@@ -2759,8 +2759,8 @@ H5VL__dataset_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **re
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
+ assert(obj);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->dataset_cls.close)
@@ -2793,10 +2793,10 @@ H5VL_dataset_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(vol_obj->data);
- HDassert(vol_obj->connector);
- HDassert(vol_obj->connector->cls);
+ assert(vol_obj);
+ assert(vol_obj->data);
+ assert(vol_obj->connector);
+ assert(vol_obj->connector->cls);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -3341,7 +3341,7 @@ H5VL_datatype_optional_op(H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hi
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set up vol_obj_ptr */
*vol_obj_ptr = vol_obj;
@@ -3712,11 +3712,11 @@ H5VL__file_open_find_connector_cb(H5PL_type_t plugin_type, const void *plugin_in
FUNC_ENTER_PACKAGE
- HDassert(udata);
- HDassert(udata->filename);
- HDassert(udata->connector_prop);
- HDassert(cls);
- HDassert(plugin_type == H5PL_TYPE_VOL);
+ assert(udata);
+ assert(udata->filename);
+ assert(udata->connector_prop);
+ assert(cls);
+ assert(plugin_type == H5PL_TYPE_VOL);
/* Silence compiler */
(void)plugin_type;
@@ -4066,7 +4066,7 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args
if (args->op_type == H5VL_FILE_IS_ACCESSIBLE)
fapl_id = args->args.is_accessible.fapl_id;
else {
- HDassert(args->op_type == H5VL_FILE_DELETE);
+ assert(args->op_type == H5VL_FILE_DELETE);
fapl_id = args->args.del.fapl_id;
}
@@ -4083,7 +4083,7 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args
/* Set wrapper info in API context, for all other operations */
else {
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
if (H5VL_set_vol_wrapper(vol_obj) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
@@ -4298,8 +4298,8 @@ H5VL__file_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
+ assert(obj);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->file_cls.close)
@@ -4943,8 +4943,8 @@ H5VL__group_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req)
herr_t ret_value = SUCCEED; /* Return value */
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
+ assert(obj);
+ assert(cls);
FUNC_ENTER_PACKAGE
@@ -6319,10 +6319,10 @@ H5VL__introspect_get_conn_cls(void *obj, const H5VL_class_t *cls, H5VL_get_conn_
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
- HDassert(lvl >= H5VL_GET_CONN_LVL_CURR && lvl <= H5VL_GET_CONN_LVL_TERM);
- HDassert(conn_cls);
+ assert(obj);
+ assert(cls);
+ assert(lvl >= H5VL_GET_CONN_LVL_CURR && lvl <= H5VL_GET_CONN_LVL_TERM);
+ assert(conn_cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->introspect_cls.get_conn_cls)
@@ -6431,8 +6431,8 @@ H5VL_introspect_get_cap_flags(const void *info, const H5VL_class_t *cls, uint64_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(cls);
- HDassert(cap_flags);
+ assert(cls);
+ assert(cap_flags);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->introspect_cls.get_cap_flags)
@@ -6600,9 +6600,9 @@ H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, H5VL_re
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(req);
- HDassert(cls);
- HDassert(status);
+ assert(req);
+ assert(cls);
+ assert(status);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->request_cls.wait)
@@ -6635,7 +6635,7 @@ H5VL_request_wait(const H5VL_object_t *vol_obj, uint64_t timeout, H5VL_request_s
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -6704,8 +6704,8 @@ H5VL__request_notify(void *req, const H5VL_class_t *cls, H5VL_request_notify_t c
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(req);
- HDassert(cls);
+ assert(req);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->request_cls.notify)
@@ -6739,7 +6739,7 @@ H5VL_request_notify(const H5VL_object_t *vol_obj, H5VL_request_notify_t cb, void
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -6808,8 +6808,8 @@ H5VL__request_cancel(void *req, const H5VL_class_t *cls, H5VL_request_status_t *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(req);
- HDassert(cls);
+ assert(req);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->request_cls.cancel)
@@ -6842,7 +6842,7 @@ H5VL_request_cancel(const H5VL_object_t *vol_obj, H5VL_request_status_t *status)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -6910,8 +6910,8 @@ H5VL__request_specific(void *req, const H5VL_class_t *cls, H5VL_request_specific
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(req);
- HDassert(cls);
+ assert(req);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->request_cls.specific)
@@ -6945,7 +6945,7 @@ H5VL_request_specific(const H5VL_object_t *vol_obj, H5VL_request_specific_args_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -7015,8 +7015,8 @@ H5VL__request_optional(void *req, const H5VL_class_t *cls, H5VL_optional_args_t
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(req);
- HDassert(cls);
+ assert(req);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->request_cls.optional)
@@ -7050,7 +7050,7 @@ H5VL_request_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -7157,8 +7157,8 @@ H5VL__request_free(void *req, const H5VL_class_t *cls)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(req);
- HDassert(cls);
+ assert(req);
+ assert(cls);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->request_cls.free)
@@ -7191,7 +7191,7 @@ H5VL_request_free(const H5VL_object_t *vol_obj)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Set wrapper info in API context */
if (H5VL_set_vol_wrapper(vol_obj) < 0)
@@ -7258,10 +7258,10 @@ H5VL__blob_put(void *obj, const H5VL_class_t *cls, const void *buf, size_t size,
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
- HDassert(size == 0 || buf);
- HDassert(blob_id);
+ assert(obj);
+ assert(cls);
+ assert(size == 0 || buf);
+ assert(blob_id);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->blob_cls.put)
@@ -7295,9 +7295,9 @@ H5VL_blob_put(const H5VL_object_t *vol_obj, const void *buf, size_t size, void *
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(size == 0 || buf);
- HDassert(blob_id);
+ assert(vol_obj);
+ assert(size == 0 || buf);
+ assert(blob_id);
/* Call the corresponding VOL callback */
if (H5VL__blob_put(vol_obj->data, vol_obj->connector->cls, buf, size, blob_id, ctx) < 0)
@@ -7356,10 +7356,10 @@ H5VL__blob_get(void *obj, const H5VL_class_t *cls, const void *blob_id, void *bu
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
- HDassert(blob_id);
- HDassert(buf);
+ assert(obj);
+ assert(cls);
+ assert(blob_id);
+ assert(buf);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->blob_cls.get)
@@ -7390,9 +7390,9 @@ H5VL_blob_get(const H5VL_object_t *vol_obj, const void *blob_id, void *buf, size
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(blob_id);
- HDassert(buf);
+ assert(vol_obj);
+ assert(blob_id);
+ assert(buf);
/* Call the corresponding VOL callback */
if (H5VL__blob_get(vol_obj->data, vol_obj->connector->cls, blob_id, buf, size, ctx) < 0)
@@ -7454,9 +7454,9 @@ H5VL__blob_specific(void *obj, const H5VL_class_t *cls, void *blob_id, H5VL_blob
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
- HDassert(blob_id);
+ assert(obj);
+ assert(cls);
+ assert(blob_id);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->blob_cls.specific)
@@ -7488,8 +7488,8 @@ H5VL_blob_specific(const H5VL_object_t *vol_obj, void *blob_id, H5VL_blob_specif
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(blob_id);
+ assert(vol_obj);
+ assert(blob_id);
/* Call the corresponding internal VOL routine */
if (H5VL__blob_specific(vol_obj->data, vol_obj->connector->cls, blob_id, args) < 0)
@@ -7551,9 +7551,9 @@ H5VL__blob_optional(void *obj, const H5VL_class_t *cls, void *blob_id, H5VL_opti
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(obj);
- HDassert(cls);
- HDassert(blob_id);
+ assert(obj);
+ assert(cls);
+ assert(blob_id);
/* Check if the corresponding VOL callback exists */
if (NULL == cls->blob_cls.optional)
@@ -7585,8 +7585,8 @@ H5VL_blob_optional(const H5VL_object_t *vol_obj, void *blob_id, H5VL_optional_ar
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(blob_id);
+ assert(vol_obj);
+ assert(blob_id);
/* Call the corresponding internal VOL routine */
if (H5VL__blob_optional(vol_obj->data, vol_obj->connector->cls, blob_id, args) < 0)
@@ -7650,9 +7650,9 @@ H5VL__token_cmp(void *obj, const H5VL_class_t *cls, const H5O_token_t *token1, c
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(obj);
- HDassert(cls);
- HDassert(cmp_value);
+ assert(obj);
+ assert(cls);
+ assert(cmp_value);
/* Take care of cases where one or both pointers is NULL */
if (token1 == NULL && token2 != NULL)
@@ -7671,7 +7671,7 @@ H5VL__token_cmp(void *obj, const H5VL_class_t *cls, const H5O_token_t *token1, c
HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare object tokens")
} /* end if */
else
- *cmp_value = HDmemcmp(token1, token2, sizeof(H5O_token_t));
+ *cmp_value = memcmp(token1, token2, sizeof(H5O_token_t));
} /* end else */
done:
@@ -7700,8 +7700,8 @@ H5VL_token_cmp(const H5VL_object_t *vol_obj, const H5O_token_t *token1, const H5
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(cmp_value);
+ assert(vol_obj);
+ assert(cmp_value);
/* Call the corresponding internal VOL routine */
if (H5VL__token_cmp(vol_obj->data, vol_obj->connector->cls, token1, token2, cmp_value) < 0)
@@ -7771,10 +7771,10 @@ H5VL__token_to_str(void *obj, H5I_type_t obj_type, const H5VL_class_t *cls, cons
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(obj);
- HDassert(cls);
- HDassert(token);
- HDassert(token_str);
+ assert(obj);
+ assert(cls);
+ assert(token);
+ assert(token_str);
/* Use the class's token serialization routine on the token if there is a
* callback, otherwise just set the token_str to NULL.
@@ -7809,9 +7809,9 @@ H5VL_token_to_str(const H5VL_object_t *vol_obj, H5I_type_t obj_type, const H5O_t
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(token);
- HDassert(token_str);
+ assert(vol_obj);
+ assert(token);
+ assert(token_str);
/* Call the corresponding internal VOL routine */
if (H5VL__token_to_str(vol_obj->data, obj_type, vol_obj->connector->cls, token, token_str) < 0)
@@ -7878,10 +7878,10 @@ H5VL__token_from_str(void *obj, H5I_type_t obj_type, const H5VL_class_t *cls, co
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(obj);
- HDassert(cls);
- HDassert(token_str);
- HDassert(token);
+ assert(obj);
+ assert(cls);
+ assert(token_str);
+ assert(token);
/* Use the class's token deserialization routine on the token if there is a
* callback, otherwise just set the token to H5_TOKEN_UNDEF.
@@ -7916,9 +7916,9 @@ H5VL_token_from_str(const H5VL_object_t *vol_obj, H5I_type_t obj_type, const cha
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(vol_obj);
- HDassert(token);
- HDassert(token_str);
+ assert(vol_obj);
+ assert(token);
+ assert(token_str);
/* Call the corresponding internal VOL routine */
if (H5VL__token_from_str(vol_obj->data, obj_type, vol_obj->connector->cls, token_str, token) < 0)
diff --git a/src/H5VLdyn_ops.c b/src/H5VLdyn_ops.c
index d3d4fda..3f6a3d7 100644
--- a/src/H5VLdyn_ops.c
+++ b/src/H5VLdyn_ops.c
@@ -195,8 +195,8 @@ H5VL__register_opt_operation(H5VL_subclass_t subcls, const char *op_name, int *o
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(op_val);
- HDassert(op_name && *op_name);
+ assert(op_val);
+ assert(op_name && *op_name);
/* Check for duplicate operation */
if (H5VL_opt_ops_g[subcls]) {
@@ -270,8 +270,8 @@ H5VL__find_opt_operation(H5VL_subclass_t subcls, const char *op_name, int *op_va
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(op_val);
- HDassert(op_name && *op_name);
+ assert(op_val);
+ assert(op_name && *op_name);
/* Check for dynamic operations in the VOL subclass */
if (H5VL_opt_ops_g[subcls]) {
@@ -309,7 +309,7 @@ H5VL__unregister_opt_operation(H5VL_subclass_t subcls, const char *op_name)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(op_name && *op_name);
+ assert(op_name && *op_name);
/* Check for dynamic operations in the VOL subclass */
if (H5VL_opt_ops_g[subcls]) {
diff --git a/src/H5VLint.c b/src/H5VLint.c
index e1d7005..b6e4e4a 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -205,8 +205,8 @@ H5VL_init_phase2(void)
/* clang-format on */
/* Sanity check default VOL connector */
- HDassert(H5VL_def_conn_s.connector_id == (-1));
- HDassert(H5VL_def_conn_s.connector_info == NULL);
+ assert(H5VL_def_conn_s.connector_id == (-1));
+ assert(H5VL_def_conn_s.connector_info == NULL);
/* Set up the default VOL connector in the default FAPL */
if (H5VL__set_def_conn() < 0)
@@ -283,7 +283,7 @@ H5VL__free_cls(H5VL_class_t *cls, void H5_ATTR_UNUSED **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(cls);
+ assert(cls);
/* Shut down the VOL connector */
if (cls->terminate && cls->terminate() < 0)
@@ -327,7 +327,7 @@ H5VL__get_connector_cb(void *obj, hid_t id, void *_op_data)
} /* end if */
} /* end if */
else {
- HDassert(H5VL_GET_CONNECTOR_BY_VALUE == op_data->key.kind);
+ assert(H5VL_GET_CONNECTOR_BY_VALUE == op_data->key.kind);
if (cls->value == op_data->key.u.value) {
op_data->found_id = id;
ret_value = H5_ITER_STOP;
@@ -501,7 +501,7 @@ H5VL__wrap_obj(void *obj, H5I_type_t obj_type)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(obj);
+ assert(obj);
/* Retrieve the VOL object wrapping context */
if (H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0)
@@ -544,8 +544,8 @@ H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(object);
- HDassert(vol_connector);
+ assert(object);
+ assert(vol_connector);
/* Make sure type number is valid */
if (type != H5I_ATTR && type != H5I_DATASET && type != H5I_DATATYPE && type != H5I_FILE &&
@@ -693,8 +693,8 @@ H5VL_register(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t app_
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Check arguments */
- HDassert(object);
- HDassert(vol_connector);
+ assert(object);
+ assert(vol_connector);
/* Set up VOL object for the passed-in data */
/* (Does not wrap object, since it's from a VOL callback) */
@@ -737,8 +737,8 @@ H5VL_register_using_existing_id(H5I_type_t type, void *object, H5VL_t *vol_conne
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(object);
- HDassert(vol_connector);
+ assert(object);
+ assert(vol_connector);
/* Set up VOL object for the passed-in data */
/* (Wraps object, since it's a library object) */
@@ -865,8 +865,8 @@ H5VL_create_object(void *object, H5VL_t *vol_connector)
FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
- HDassert(object);
- HDassert(vol_connector);
+ assert(object);
+ assert(vol_connector);
/* Set up VOL object for the passed-in data */
/* (Does not wrap object, since it's from a VOL callback) */
@@ -958,7 +958,7 @@ H5VL_conn_inc_rc(H5VL_t *connector)
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
- HDassert(connector);
+ assert(connector);
/* Increment refcount for connector */
connector->nrefs++;
@@ -988,7 +988,7 @@ H5VL_conn_dec_rc(H5VL_t *connector)
FUNC_ENTER_NOAPI(-1)
/* Check arguments */
- HDassert(connector);
+ assert(connector);
/* Decrement refcount for connector */
connector->nrefs--;
@@ -1025,7 +1025,7 @@ H5VL_object_inc_rc(H5VL_object_t *vol_obj)
FUNC_ENTER_NOAPI_NOERR_NOFS
/* Check arguments */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Increment refcount for object and return */
FUNC_LEAVE_NOAPI(++vol_obj->rc)
@@ -1049,7 +1049,7 @@ H5VL_free_object(H5VL_object_t *vol_obj)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(vol_obj);
+ assert(vol_obj);
if (--vol_obj->rc == 0) {
/* Decrement refcount on connector */
@@ -1087,8 +1087,8 @@ H5VL_object_is_native(const H5VL_object_t *obj, hbool_t *is_native)
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(obj);
- HDassert(is_native);
+ assert(obj);
+ assert(is_native);
/* Retrieve the terminal connector class for the object */
cls = NULL;
@@ -1133,9 +1133,9 @@ H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2,
FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
- HDassert(vol_obj1);
- HDassert(vol_obj2);
- HDassert(same_file);
+ assert(vol_obj1);
+ assert(vol_obj2);
+ assert(same_file);
/* Retrieve the terminal connectors for each object */
cls1 = NULL;
@@ -1200,7 +1200,7 @@ H5VL__register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
FUNC_ENTER_PACKAGE
/* Check arguments */
- HDassert(cls);
+ assert(cls);
/* Copy the class structure so the caller can reuse or free it */
if (NULL == (saved = H5FL_MALLOC(H5VL_class_t)))
@@ -1989,8 +1989,8 @@ H5VL_cmp_connector_cls(int *cmp_value, const H5VL_class_t *cls1, const H5VL_clas
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cls1);
- HDassert(cls2);
+ assert(cls1);
+ assert(cls2);
/* If the pointers are the same the classes are the same */
if (cls1 == cls2) {
@@ -2007,7 +2007,7 @@ H5VL_cmp_connector_cls(int *cmp_value, const H5VL_class_t *cls1, const H5VL_clas
*cmp_value = 1;
HGOTO_DONE(SUCCEED)
} /* end if */
- HDassert(cls1->value == cls2->value);
+ assert(cls1->value == cls2->value);
/* Compare connector names */
if (cls1->name == NULL && cls2->name != NULL) {
@@ -2030,7 +2030,7 @@ H5VL_cmp_connector_cls(int *cmp_value, const H5VL_class_t *cls1, const H5VL_clas
*cmp_value = 1;
HGOTO_DONE(SUCCEED)
} /* end if */
- HDassert(cls1->version == cls2->version);
+ assert(cls1->version == cls2->version);
/* Compare connector info */
if (cls1->info_cls.size < cls2->info_cls.size) {
@@ -2041,7 +2041,7 @@ H5VL_cmp_connector_cls(int *cmp_value, const H5VL_class_t *cls1, const H5VL_clas
*cmp_value = 1;
HGOTO_DONE(SUCCEED)
} /* end if */
- HDassert(cls1->info_cls.size == cls2->info_cls.size);
+ assert(cls1->info_cls.size == cls2->info_cls.size);
/* Set comparison value to 'equal' */
*cmp_value = 0;
@@ -2071,7 +2071,7 @@ H5VL_retrieve_lib_state(void **state)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(state);
+ assert(state);
/* Retrieve the API context state */
if (H5CX_retrieve_state((H5CX_state_t **)state) < 0)
@@ -2134,7 +2134,7 @@ H5VL_restore_lib_state(const void *state)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(state);
+ assert(state);
/* Restore the API context state */
if (H5CX_restore_state((const H5CX_state_t *)state) < 0)
@@ -2202,7 +2202,7 @@ H5VL_free_lib_state(void *state)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(state);
+ assert(state);
/* Free the API context state */
if (H5CX_free_state((H5CX_state_t *)state) < 0)
@@ -2232,10 +2232,10 @@ H5VL__free_vol_wrapper(H5VL_wrap_ctx_t *vol_wrap_ctx)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(vol_wrap_ctx);
- HDassert(0 == vol_wrap_ctx->rc);
- HDassert(vol_wrap_ctx->connector);
- HDassert(vol_wrap_ctx->connector->cls);
+ assert(vol_wrap_ctx);
+ assert(0 == vol_wrap_ctx->rc);
+ assert(vol_wrap_ctx->connector);
+ assert(vol_wrap_ctx->connector->cls);
/* If there is a VOL connector object wrapping context, release it */
if (vol_wrap_ctx->obj_wrap_ctx)
@@ -2273,7 +2273,7 @@ H5VL_set_vol_wrapper(const H5VL_object_t *vol_obj)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Retrieve the VOL object wrap context */
if (H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0)
@@ -2284,13 +2284,13 @@ H5VL_set_vol_wrapper(const H5VL_object_t *vol_obj)
void *obj_wrap_ctx = NULL; /* VOL connector's wrapping context */
/* Sanity checks */
- HDassert(vol_obj->data);
- HDassert(vol_obj->connector);
+ assert(vol_obj->data);
+ assert(vol_obj->connector);
/* Check if the connector can create a wrap context */
if (vol_obj->connector->cls->wrap_cls.get_wrap_ctx) {
/* Sanity check */
- HDassert(vol_obj->connector->cls->wrap_cls.free_wrap_ctx);
+ assert(vol_obj->connector->cls->wrap_cls.free_wrap_ctx);
/* Get the wrap context from the connector */
if ((vol_obj->connector->cls->wrap_cls.get_wrap_ctx)(vol_obj->data, &obj_wrap_ctx) < 0)
@@ -2463,7 +2463,7 @@ H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref)
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
/* Sanity check */
- HDassert(obj);
+ assert(obj);
/* Retrieve the VOL object wrapping context */
if (H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0)
@@ -2517,9 +2517,9 @@ H5VL_check_plugin_load(const H5VL_class_t *cls, const H5PL_key_t *key, hbool_t *
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cls);
- HDassert(key);
- HDassert(success);
+ assert(cls);
+ assert(key);
+ assert(success);
/* Which kind of key are we looking for? */
if (key->vol.kind == H5VL_GET_CONNECTOR_BY_NAME) {
@@ -2529,7 +2529,7 @@ H5VL_check_plugin_load(const H5VL_class_t *cls, const H5PL_key_t *key, hbool_t *
} /* end if */
else {
/* Sanity check */
- HDassert(key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE);
+ assert(key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE);
/* Check if plugin value matches VOL connector class value */
if (cls->value == key->vol.u.value)
@@ -2558,7 +2558,7 @@ H5VL__is_default_conn(hid_t fapl_id, hid_t connector_id, hbool_t *is_default)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(is_default);
+ assert(is_default);
/* Determine if the default VOL connector will be used, based on non-default
* values in the FAPL, connector ID, or the HDF5_VOL_CONNECTOR environment
@@ -2587,7 +2587,7 @@ H5VL_setup_args(hid_t loc_id, H5I_type_t id_type, H5VL_object_t **vol_obj)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
+ assert(vol_obj);
/* Get attribute pointer */
if (NULL == (*vol_obj = (H5VL_object_t *)H5I_object_verify(loc_id, id_type)))
@@ -2618,8 +2618,8 @@ H5VL_setup_loc_args(hid_t loc_id, H5VL_object_t **vol_obj, H5VL_loc_params_t *lo
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Get the location object */
if (NULL == (*vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id)))
@@ -2655,10 +2655,10 @@ H5VL_setup_acc_args(hid_t loc_id, const H5P_libclass_t *libclass, hbool_t is_col
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(libclass);
- HDassert(acspl_id);
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(libclass);
+ assert(acspl_id);
+ assert(vol_obj);
+ assert(loc_params);
/* Verify access property list and set up collective metadata if appropriate */
if (H5CX_set_apl(acspl_id, libclass, loc_id, is_collective) < 0)
@@ -2693,8 +2693,8 @@ H5VL_setup_self_args(hid_t loc_id, H5VL_object_t **vol_obj, H5VL_loc_params_t *l
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Get the location object */
if (NULL == (*vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id)))
@@ -2726,8 +2726,8 @@ H5VL_setup_name_args(hid_t loc_id, const char *name, hbool_t is_collective, hid_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Check args */
if (!name)
@@ -2772,8 +2772,8 @@ H5VL_setup_idx_args(hid_t loc_id, const char *name, H5_index_t idx_type, H5_iter
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Check args */
if (!name)
@@ -2824,8 +2824,8 @@ H5VL_setup_token_args(hid_t loc_id, H5O_token_t *obj_token, H5VL_object_t **vol_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(vol_obj);
- HDassert(loc_params);
+ assert(vol_obj);
+ assert(loc_params);
/* Get the location object */
if (NULL == (*vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id)))
@@ -2861,7 +2861,7 @@ H5VL_get_cap_flags(const H5VL_connector_prop_t *connector_prop, uint64_t *cap_fl
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(connector_prop);
+ assert(connector_prop);
/* Copy the connector ID & info, if there is one */
if (connector_prop->connector_id > 0) {
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index b667808..679edb6 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -250,7 +250,7 @@ H5VL__native_introspect_get_conn_cls(void H5_ATTR_UNUSED *obj, H5VL_get_conn_lvl
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(conn_cls);
+ assert(conn_cls);
/* Retrieve the native VOL connector class */
*conn_cls = &H5VL_native_cls_g;
@@ -276,7 +276,7 @@ H5VL__native_introspect_get_cap_flags(const void H5_ATTR_UNUSED *info, uint64_t
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(cap_flags);
+ assert(cap_flags);
/* Set the flags from the connector's field */
*cap_flags = H5VL_native_cls_g.cap_flags;
@@ -305,7 +305,7 @@ H5VL_native_get_file_addr_len(hid_t loc_id, size_t *addr_len)
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(addr_len);
+ assert(addr_len);
/* Get object type */
if ((vol_obj_type = H5I_get_type(loc_id)) < 0)
@@ -343,8 +343,8 @@ H5VL__native_get_file_addr_len(void *obj, H5I_type_t obj_type, size_t *addr_len)
FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
- HDassert(obj);
- HDassert(addr_len);
+ assert(obj);
+ assert(addr_len);
/* Retrieve file from the VOL object */
if (H5VL_native_get_file_struct(obj, obj_type, &file) < 0)
@@ -402,7 +402,7 @@ H5VLnative_addr_to_token(hid_t loc_id, haddr_t addr, H5O_token_t *token)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL,
"can't determine if VOL object is native connector object")
- HDassert(is_native_vol_obj && "not a native VOL connector object");
+ assert(is_native_vol_obj && "not a native VOL connector object");
}
#endif
@@ -433,15 +433,15 @@ H5VL_native_addr_to_token(void *obj, H5I_type_t obj_type, haddr_t addr, H5O_toke
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(obj);
- HDassert(token);
+ assert(obj);
+ assert(token);
/* Get the length of an haddr_t in the file */
if (H5VL__native_get_file_addr_len(obj, obj_type, &addr_len) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "couldn't get length of haddr_t from VOL object")
/* Ensure that token is initialized */
- HDmemset(token, 0, sizeof(H5O_token_t));
+ memset(token, 0, sizeof(H5O_token_t));
/* Encode token */
p = (uint8_t *)token;
@@ -496,7 +496,7 @@ H5VLnative_token_to_addr(hid_t loc_id, H5O_token_t token, haddr_t *addr)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL,
"can't determine if VOL object is native connector object")
- HDassert(is_native_vol_obj && "not a native VOL connector object");
+ assert(is_native_vol_obj && "not a native VOL connector object");
}
#endif
@@ -527,8 +527,8 @@ H5VL_native_token_to_addr(void *obj, H5I_type_t obj_type, H5O_token_t token, had
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(obj);
- HDassert(addr);
+ assert(obj);
+ assert(addr);
/* Get the length of an haddr_t in the file */
if (H5VL__native_get_file_addr_len(obj, obj_type, &addr_len) < 0)
diff --git a/src/H5VLnative_blob.c b/src/H5VLnative_blob.c
index 606bdeb..b70f09d 100644
--- a/src/H5VLnative_blob.c
+++ b/src/H5VLnative_blob.c
@@ -70,9 +70,9 @@ H5VL__native_blob_put(void *obj, const void *buf, size_t size, void *blob_id, vo
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(f);
- HDassert(size == 0 || buf);
- HDassert(id);
+ assert(f);
+ assert(size == 0 || buf);
+ assert(id);
/* Write the VL information to disk (allocates space also) */
if (H5HG_insert(f, size, buf, &hobjid) < 0)
@@ -110,9 +110,9 @@ H5VL__native_blob_get(void *obj, const void *blob_id, void *buf, size_t size, vo
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(id);
- HDassert(buf);
+ assert(f);
+ assert(id);
+ assert(buf);
/* Get the heap information */
H5F_addr_decode(f, &id, &hobjid.addr);
@@ -153,8 +153,8 @@ H5VL__native_blob_specific(void *obj, void *blob_id, H5VL_blob_specific_args_t *
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(f);
- HDassert(blob_id);
+ assert(f);
+ assert(blob_id);
switch (args->op_type) {
case H5VL_BLOB_ISNULL: {
diff --git a/src/H5VLnative_dataset.c b/src/H5VLnative_dataset.c
index 9bd711b..a4e7d77 100644
--- a/src/H5VLnative_dataset.c
+++ b/src/H5VLnative_dataset.c
@@ -89,7 +89,7 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dinfo);
+ assert(dinfo);
/* Get shared file */
f_sh = H5F_SHARED(((H5D_t *)obj[0])->oloc.file);
@@ -98,7 +98,7 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi
for (i = 0; i < count; i++) {
/* Set up dset */
dinfo[i].dset = (H5D_t *)obj[i];
- HDassert(dinfo[i].dset);
+ assert(dinfo[i].dset);
/* Check dataset's file pointer is valid */
if (NULL == dinfo[i].dset->oloc.file)
@@ -205,7 +205,7 @@ H5VL__native_dataset_io_cleanup(size_t count, hid_t mem_space_id[], hid_t file_s
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dinfo);
+ assert(dinfo);
/* Iterate over datasets */
for (i = 0; i < count; i++) {
@@ -561,7 +561,7 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dset);
+ assert(dset);
/* Set DXPL for operation */
H5CX_set_dxpl(dxpl_id);
@@ -634,8 +634,8 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_
H5VL_native_dataset_get_num_chunks_t *gnc_args = &opt_args->get_num_chunks;
const H5S_t *space = NULL;
- HDassert(dset->shared);
- HDassert(dset->shared->space);
+ assert(dset->shared);
+ assert(dset->shared->space);
/* When default dataspace is given, use the dataset's dataspace */
if (gnc_args->space_id == H5S_ALL)
@@ -660,8 +660,8 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_
H5VL_native_dataset_get_chunk_info_by_idx_t *gcibi_args = &opt_args->get_chunk_info_by_idx;
const H5S_t *space;
- HDassert(dset->shared);
- HDassert(dset->shared->space);
+ assert(dset->shared);
+ assert(dset->shared->space);
/* When default dataspace is given, use the dataset's dataspace */
if (gcibi_args->space_id == H5S_ALL)
@@ -686,7 +686,7 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_
case H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_COORD: {
H5VL_native_dataset_get_chunk_info_by_coord_t *gcibc_args = &opt_args->get_chunk_info_by_coord;
- HDassert(dset->shared);
+ assert(dset->shared);
/* Make sure the dataset is chunked */
if (H5D_CHUNKED != dset->shared->layout.type)
@@ -770,7 +770,7 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_
/* H5Dchunk_iter */
case H5VL_NATIVE_DATASET_CHUNK_ITER: {
/* Sanity check */
- HDassert(dset->shared);
+ assert(dset->shared);
/* Make sure the dataset is chunked */
if (H5D_CHUNKED != dset->shared->layout.type)
diff --git a/src/H5VLnative_file.c b/src/H5VLnative_file.c
index f2f0ea7..ba6d16d 100644
--- a/src/H5VLnative_file.c
+++ b/src/H5VLnative_file.c
@@ -753,7 +753,7 @@ H5VL__native_file_close(void *file, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_U
FUNC_ENTER_PACKAGE
/* This routine should only be called when a file ID's ref count drops to zero */
- HDassert(f->shared == NULL || H5F_ID_EXISTS(f));
+ assert(f->shared == NULL || H5F_ID_EXISTS(f));
if (f->shared == NULL)
f = H5FL_FREE(H5F_t, f);
diff --git a/src/H5VLnative_group.c b/src/H5VLnative_group.c
index 0cc22f8..163e03f 100644
--- a/src/H5VLnative_group.c
+++ b/src/H5VLnative_group.c
@@ -90,7 +90,7 @@ H5VL__native_group_create(void *obj, const H5VL_loc_params_t *loc_params, const
/* Set up group creation info */
gcrt_info.gcpl_id = gcpl_id;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
- HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
+ memset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
/* Create the new group & get its ID */
if (NULL == (grp = H5G__create(loc.oloc->file, &gcrt_info)))
diff --git a/src/H5VLnative_introspect.c b/src/H5VLnative_introspect.c
index 0cc6ee4..e322395 100644
--- a/src/H5VLnative_introspect.c
+++ b/src/H5VLnative_introspect.c
@@ -75,7 +75,7 @@ H5VL__native_introspect_opt_query(void H5_ATTR_UNUSED *obj, H5VL_subclass_t subc
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(flags);
+ assert(flags);
/* The native VOL connector supports all optional operations */
*flags = H5VL_OPT_QUERY_SUPPORTED;
diff --git a/src/H5VLnative_token.c b/src/H5VLnative_token.c
index b5bd7b8..78d0350 100644
--- a/src/H5VLnative_token.c
+++ b/src/H5VLnative_token.c
@@ -70,10 +70,10 @@ H5VL__native_token_cmp(void H5_ATTR_UNUSED *obj, const H5O_token_t *token1, cons
FUNC_ENTER_PACKAGE_NOERR
/* Check parameters */
- HDassert(token1);
- HDassert(token2);
+ assert(token1);
+ assert(token2);
- *cmp_value = HDmemcmp(token1, token2, sizeof(H5O_token_t));
+ *cmp_value = memcmp(token1, token2, sizeof(H5O_token_t));
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL__native_token_cmp() */
@@ -98,8 +98,8 @@ H5VL__native_token_to_str(void *obj, H5I_type_t obj_type, const H5O_token_t *tok
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(obj);
- HDassert(token);
+ assert(obj);
+ assert(token);
if (H5VL_native_token_to_addr(obj, obj_type, *token, &addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't convert object token to address")
@@ -137,7 +137,7 @@ H5VL__native_str_to_token(void *obj, H5I_type_t obj_type, const char *token_str,
FUNC_ENTER_PACKAGE
/* Check parameters */
- HDassert(token_str);
+ assert(token_str);
HDsscanf(token_str, "%" PRIuHADDR, &addr);
diff --git a/src/H5VM.c b/src/H5VM.c
index f67917d..2ffb506 100644
--- a/src/H5VM.c
+++ b/src/H5VM.c
@@ -63,7 +63,7 @@ H5VM__stride_optimize1(unsigned *np /*in,out*/, hsize_t *elmt_size /*in,out*/, c
/* This has to be true because if we optimize the dimensionality down to
* zero we still must make one reference.
*/
- HDassert(1 == H5VM_vector_reduce_product(0, NULL));
+ assert(1 == H5VM_vector_reduce_product(0, NULL));
/* Combine adjacent memory accesses */
while (*np && stride1[*np - 1] > 0 && (hsize_t)(stride1[*np - 1]) == *elmt_size) {
@@ -102,8 +102,8 @@ H5VM__stride_optimize2(unsigned *np /*in,out*/, hsize_t *elmt_size /*in,out*/, c
/* This has to be true because if we optimize the dimensionality down to
* zero we still must make one reference.
*/
- HDassert(1 == H5VM_vector_reduce_product(0, NULL));
- HDassert(*elmt_size > 0);
+ assert(1 == H5VM_vector_reduce_product(0, NULL));
+ assert(*elmt_size > 0);
/* Combine adjacent memory accesses */
@@ -228,48 +228,48 @@ H5VM_hyper_stride(unsigned n, const hsize_t *size, const hsize_t *total_size, co
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(n <= H5VM_HYPER_NDIMS);
- HDassert(size);
- HDassert(total_size);
- HDassert(stride);
+ assert(n <= H5VM_HYPER_NDIMS);
+ assert(size);
+ assert(total_size);
+ assert(stride);
/* init */
- HDassert(n > 0);
+ assert(n > 0);
stride[n - 1] = 1;
skip = offset ? offset[n - 1] : 0;
switch (n) {
case 2: /* 1-D dataset */
- HDassert(total_size[1] >= size[1]);
+ assert(total_size[1] >= size[1]);
stride[0] = total_size[1] - size[1]; /*overflow checked*/
acc = total_size[1];
skip += acc * (offset ? offset[0] : 0);
break;
case 3: /* 2-D dataset */
- HDassert(total_size[2] >= size[2]);
+ assert(total_size[2] >= size[2]);
stride[1] = total_size[2] - size[2]; /*overflow checked*/
acc = total_size[2];
skip += acc * (offset ? (hsize_t)offset[1] : 0);
- HDassert(total_size[1] >= size[1]);
+ assert(total_size[1] >= size[1]);
stride[0] = acc * (total_size[1] - size[1]); /*overflow checked*/
acc *= total_size[1];
skip += acc * (offset ? (hsize_t)offset[0] : 0);
break;
case 4: /* 3-D dataset */
- HDassert(total_size[3] >= size[3]);
+ assert(total_size[3] >= size[3]);
stride[2] = total_size[3] - size[3]; /*overflow checked*/
acc = total_size[3];
skip += acc * (offset ? (hsize_t)offset[2] : 0);
- HDassert(total_size[2] >= size[2]);
+ assert(total_size[2] >= size[2]);
stride[1] = acc * (total_size[2] - size[2]); /*overflow checked*/
acc *= total_size[2];
skip += acc * (offset ? (hsize_t)offset[1] : 0);
- HDassert(total_size[1] >= size[1]);
+ assert(total_size[1] >= size[1]);
stride[0] = acc * (total_size[1] - size[1]); /*overflow checked*/
acc *= total_size[1];
skip += acc * (offset ? (hsize_t)offset[0] : 0);
@@ -278,7 +278,7 @@ H5VM_hyper_stride(unsigned n, const hsize_t *size, const hsize_t *total_size, co
default:
/* others */
for (i = (int)(n - 2), acc = 1; i >= 0; --i) {
- HDassert(total_size[i + 1] >= size[i + 1]);
+ assert(total_size[i + 1] >= size[i + 1]);
stride[i] = acc * (total_size[i + 1] - size[i + 1]); /*overflow checked*/
acc *= total_size[i + 1];
skip += acc * (offset ? (hsize_t)offset[i] : 0);
@@ -377,14 +377,14 @@ H5VM_hyper_fill(unsigned n, const hsize_t *_size, const hsize_t *total_size, con
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(n > 0 && n <= H5VM_HYPER_NDIMS);
- HDassert(_size);
- HDassert(total_size);
- HDassert(dst);
+ assert(n > 0 && n <= H5VM_HYPER_NDIMS);
+ assert(_size);
+ assert(total_size);
+ assert(dst);
#ifndef NDEBUG
for (u = 0; u < n; u++) {
- HDassert(_size[u] > 0);
- HDassert(total_size[u] > 0);
+ assert(_size[u] > 0);
+ assert(total_size[u] > 0);
}
#endif
@@ -449,17 +449,17 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(n > 0 && n <= H5VM_HYPER_NDIMS);
- HDassert(_size);
- HDassert(dst_size);
- HDassert(src_size);
- HDassert(dst);
- HDassert(src);
+ assert(n > 0 && n <= H5VM_HYPER_NDIMS);
+ assert(_size);
+ assert(dst_size);
+ assert(src_size);
+ assert(dst);
+ assert(src);
#ifndef NDEBUG
for (u = 0; u < n; u++) {
- HDassert(_size[u] > 0);
- HDassert(dst_size[u] > 0);
- HDassert(src_size[u] > 0);
+ assert(_size[u] > 0);
+ assert(dst_size[u] > 0);
+ assert(src_size[u] > 0);
}
#endif
@@ -478,7 +478,7 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
int ii; /*counter */
/* init */
- HDassert(n > 0);
+ assert(n > 0);
dst_stride[n - 1] = 1;
src_stride[n - 1] = 1;
dst_start = dst_offset ? dst_offset[n - 1] : 0;
@@ -487,8 +487,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
/* Unroll loop for common cases */
switch (n) {
case 2:
- HDassert(dst_size[1] >= size[1]);
- HDassert(src_size[1] >= size[1]);
+ assert(dst_size[1] >= size[1]);
+ assert(src_size[1] >= size[1]);
dst_stride[0] = dst_size[1] - size[1]; /*overflow checked*/
src_stride[0] = src_size[1] - size[1]; /*overflow checked*/
dst_acc = dst_size[1];
@@ -498,8 +498,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
break;
case 3:
- HDassert(dst_size[2] >= size[2]);
- HDassert(src_size[2] >= size[2]);
+ assert(dst_size[2] >= size[2]);
+ assert(src_size[2] >= size[2]);
dst_stride[1] = dst_size[2] - size[2]; /*overflow checked*/
src_stride[1] = src_size[2] - size[2]; /*overflow checked*/
dst_acc = dst_size[2];
@@ -507,8 +507,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
dst_start += dst_acc * (dst_offset ? dst_offset[1] : 0);
src_start += src_acc * (src_offset ? src_offset[1] : 0);
- HDassert(dst_size[1] >= size[1]);
- HDassert(src_size[1] >= size[1]);
+ assert(dst_size[1] >= size[1]);
+ assert(src_size[1] >= size[1]);
dst_stride[0] = dst_acc * (dst_size[1] - size[1]); /*overflow checked*/
src_stride[0] = src_acc * (src_size[1] - size[1]); /*overflow checked*/
dst_acc *= dst_size[1];
@@ -518,8 +518,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
break;
case 4:
- HDassert(dst_size[3] >= size[3]);
- HDassert(src_size[3] >= size[3]);
+ assert(dst_size[3] >= size[3]);
+ assert(src_size[3] >= size[3]);
dst_stride[2] = dst_size[3] - size[3]; /*overflow checked*/
src_stride[2] = src_size[3] - size[3]; /*overflow checked*/
dst_acc = dst_size[3];
@@ -527,8 +527,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
dst_start += dst_acc * (dst_offset ? dst_offset[2] : 0);
src_start += src_acc * (src_offset ? src_offset[2] : 0);
- HDassert(dst_size[2] >= size[2]);
- HDassert(src_size[2] >= size[2]);
+ assert(dst_size[2] >= size[2]);
+ assert(src_size[2] >= size[2]);
dst_stride[1] = dst_acc * (dst_size[2] - size[2]); /*overflow checked*/
src_stride[1] = src_acc * (src_size[2] - size[2]); /*overflow checked*/
dst_acc *= dst_size[2];
@@ -536,8 +536,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
dst_start += dst_acc * (dst_offset ? dst_offset[1] : 0);
src_start += src_acc * (src_offset ? src_offset[1] : 0);
- HDassert(dst_size[1] >= size[1]);
- HDassert(src_size[1] >= size[1]);
+ assert(dst_size[1] >= size[1]);
+ assert(src_size[1] >= size[1]);
dst_stride[0] = dst_acc * (dst_size[1] - size[1]); /*overflow checked*/
src_stride[0] = src_acc * (src_size[1] - size[1]); /*overflow checked*/
dst_acc *= dst_size[1];
@@ -549,8 +549,8 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
default:
/* others */
for (ii = (int)(n - 2), dst_acc = 1, src_acc = 1; ii >= 0; --ii) {
- HDassert(dst_size[ii + 1] >= size[ii + 1]);
- HDassert(src_size[ii + 1] >= size[ii + 1]);
+ assert(dst_size[ii + 1] >= size[ii + 1]);
+ assert(src_size[ii + 1] >= size[ii + 1]);
dst_stride[ii] = dst_acc * (dst_size[ii + 1] - size[ii + 1]); /*overflow checked*/
src_stride[ii] = src_acc * (src_size[ii + 1] - size[ii + 1]); /*overflow checked*/
dst_acc *= dst_size[ii + 1];
@@ -599,14 +599,14 @@ H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(elmt_size < SIZE_MAX);
+ assert(elmt_size < SIZE_MAX);
H5VM_vector_cpy(n, idx, size);
nelmts = H5VM_vector_reduce_product(n, size);
for (i = 0; i < nelmts; i++) {
/* Copy an element */
H5_CHECK_OVERFLOW(elmt_size, hsize_t, size_t);
- HDmemset(dst, (int)fill_value, (size_t)elmt_size); /*lint !e671 The elmt_size will be OK */
+ memset(dst, (int)fill_value, (size_t)elmt_size); /*lint !e671 The elmt_size will be OK */
/* Decrement indices and advance pointer */
for (j = (int)(n - 1), carry = TRUE; j >= 0 && carry; --j) {
@@ -615,7 +615,7 @@ H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
if (--idx[j])
carry = FALSE;
else {
- HDassert(size);
+ assert(size);
idx[j] = size[j];
} /* end else */
}
@@ -657,7 +657,7 @@ H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(elmt_size < SIZE_MAX);
+ assert(elmt_size < SIZE_MAX);
if (n) {
H5VM_vector_cpy(n, idx, size);
@@ -676,7 +676,7 @@ H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
if (--idx[j])
carry = FALSE;
else {
- HDassert(size);
+ assert(size);
idx[j] = size[j];
}
}
@@ -723,7 +723,7 @@ H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *size, const hss
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(elmt_size < SIZE_MAX);
+ assert(elmt_size < SIZE_MAX);
if (n) {
H5VM_vector_cpy(n, idx, size);
@@ -742,7 +742,7 @@ H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *size, const hss
if (--idx[j])
carry = FALSE;
else {
- HDassert(size);
+ assert(size);
idx[j] = size[j];
}
}
@@ -780,10 +780,10 @@ H5VM_array_fill(void *_dst, const void *src, size_t size, size_t count)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(dst);
- HDassert(src);
- HDassert(size < SIZE_MAX && size > 0);
- HDassert(count < SIZE_MAX && count > 0);
+ assert(dst);
+ assert(src);
+ assert(size < SIZE_MAX && size > 0);
+ assert(count < SIZE_MAX && count > 0);
H5MM_memcpy(dst, src, size); /* copy first item */
@@ -831,9 +831,9 @@ H5VM_array_down(unsigned n, const hsize_t *total_size, hsize_t *down)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(n <= H5VM_HYPER_NDIMS);
- HDassert(total_size);
- HDassert(down);
+ assert(n <= H5VM_HYPER_NDIMS);
+ assert(total_size);
+ assert(down);
/* Build the sizes of each dimension in the array
* (From fastest to slowest)
@@ -871,9 +871,9 @@ H5VM_array_offset_pre(unsigned n, const hsize_t *acc, const hsize_t *offset)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(n <= H5VM_HYPER_NDIMS);
- HDassert(acc);
- HDassert(offset);
+ assert(n <= H5VM_HYPER_NDIMS);
+ assert(acc);
+ assert(offset);
/* Compute offset in array */
for (u = 0, ret_value = 0; u < n; u++)
@@ -907,9 +907,9 @@ H5VM_array_offset(unsigned n, const hsize_t *total_size, const hsize_t *offset)
FUNC_ENTER_NOAPI_NOERR
- HDassert(n <= H5VM_HYPER_NDIMS);
- HDassert(total_size);
- HDassert(offset);
+ assert(n <= H5VM_HYPER_NDIMS);
+ assert(total_size);
+ assert(offset);
/* Build the sizes of each dimension in the array */
H5VM_array_down(n, total_size, acc_arr);
@@ -946,8 +946,8 @@ H5VM_array_calc_pre(hsize_t offset, unsigned n, const hsize_t *down, hsize_t *co
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(n <= H5VM_HYPER_NDIMS);
- HDassert(coords);
+ assert(n <= H5VM_HYPER_NDIMS);
+ assert(coords);
/* Compute the coordinates from the offset */
for (u = 0; u < n; u++) {
@@ -985,9 +985,9 @@ H5VM_array_calc(hsize_t offset, unsigned n, const hsize_t *total_size, hsize_t *
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(n <= H5VM_HYPER_NDIMS);
- HDassert(total_size);
- HDassert(coords);
+ assert(n <= H5VM_HYPER_NDIMS);
+ assert(total_size);
+ assert(coords);
/* Build the sizes of each dimension in the array */
H5VM_array_down(n, total_size, idx);
@@ -1049,10 +1049,10 @@ H5VM_chunk_index(unsigned ndims, const hsize_t *coord, const uint32_t *chunk, co
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(ndims <= H5VM_HYPER_NDIMS);
- HDassert(coord);
- HDassert(chunk);
- HDassert(down_nchunks);
+ assert(ndims <= H5VM_HYPER_NDIMS);
+ assert(coord);
+ assert(chunk);
+ assert(down_nchunks);
/* Defer to H5VM_chunk_index_scaled */
chunk_idx = H5VM_chunk_index_scaled(ndims, coord, chunk, down_nchunks, scaled_coord);
@@ -1080,10 +1080,10 @@ H5VM_chunk_scaled(unsigned ndims, const hsize_t *coord, const uint32_t *chunk, h
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(ndims <= H5VM_HYPER_NDIMS);
- HDassert(coord);
- HDassert(chunk);
- HDassert(scaled);
+ assert(ndims <= H5VM_HYPER_NDIMS);
+ assert(coord);
+ assert(chunk);
+ assert(scaled);
/* Compute the scaled coordinates for actual coordinates */
/* (Note that the 'scaled' array is an 'OUT' parameter) */
@@ -1146,11 +1146,11 @@ H5VM_chunk_index_scaled(unsigned ndims, const hsize_t *coord, const uint32_t *ch
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(ndims <= H5VM_HYPER_NDIMS);
- HDassert(coord);
- HDassert(chunk);
- HDassert(down_nchunks);
- HDassert(scaled);
+ assert(ndims <= H5VM_HYPER_NDIMS);
+ assert(coord);
+ assert(chunk);
+ assert(down_nchunks);
+ assert(scaled);
/* Compute the scaled coordinates for actual coordinates */
/* (Note that the 'scaled' array is an 'OUT' parameter) */
@@ -1202,15 +1202,15 @@ H5VM_opvv(size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[], hsize
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dst_curr_seq);
- HDassert(*dst_curr_seq < dst_max_nseq);
- HDassert(dst_len_arr);
- HDassert(dst_off_arr);
- HDassert(src_curr_seq);
- HDassert(*src_curr_seq < src_max_nseq);
- HDassert(src_len_arr);
- HDassert(src_off_arr);
- HDassert(op);
+ assert(dst_curr_seq);
+ assert(*dst_curr_seq < dst_max_nseq);
+ assert(dst_len_arr);
+ assert(dst_off_arr);
+ assert(src_curr_seq);
+ assert(*src_curr_seq < src_max_nseq);
+ assert(src_len_arr);
+ assert(src_off_arr);
+ assert(op);
/* Set initial offset & length pointers */
dst_len_ptr = dst_len_arr + *dst_curr_seq;
@@ -1408,16 +1408,16 @@ H5VM_memcpyvv(void *_dst, size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(_dst);
- HDassert(dst_curr_seq);
- HDassert(*dst_curr_seq < dst_max_nseq);
- HDassert(dst_len_arr);
- HDassert(dst_off_arr);
- HDassert(_src);
- HDassert(src_curr_seq);
- HDassert(*src_curr_seq < src_max_nseq);
- HDassert(src_len_arr);
- HDassert(src_off_arr);
+ assert(_dst);
+ assert(dst_curr_seq);
+ assert(*dst_curr_seq < dst_max_nseq);
+ assert(dst_len_arr);
+ assert(dst_off_arr);
+ assert(_src);
+ assert(src_curr_seq);
+ assert(*src_curr_seq < src_max_nseq);
+ assert(src_len_arr);
+ assert(src_off_arr);
/* Set initial offset & length pointers */
dst_len_ptr = dst_len_arr + *dst_curr_seq;
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h
index 49bb53d..4567a78 100644
--- a/src/H5VMprivate.h
+++ b/src/H5VMprivate.h
@@ -36,7 +36,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
/* Other functions */
#define H5VM_vector_cpy(N, DST, SRC) \
{ \
- HDassert(sizeof(*(DST)) == sizeof(*(SRC))); \
+ assert(sizeof(*(DST)) == sizeof(*(SRC))); \
if (SRC) \
H5MM_memcpy(DST, SRC, (N) * sizeof(*(DST))); \
else \
@@ -51,7 +51,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
#define H5VM_swizzle_coords(TYPE, COORDS, UNLIM_DIM) \
{ \
/* COORDS must be an array of type TYPE */ \
- HDassert(sizeof(COORDS[0]) == sizeof(TYPE)); \
+ assert(sizeof(COORDS[0]) == sizeof(TYPE)); \
\
/* Nothing to do when unlimited dimension is at position 0 */ \
if (0 != (UNLIM_DIM)) { \
@@ -69,7 +69,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
#define H5VM_unswizzle_coords(TYPE, COORDS, UNLIM_DIM) \
{ \
/* COORDS must be an array of type TYPE */ \
- HDassert(sizeof(COORDS[0]) == sizeof(TYPE)); \
+ assert(sizeof(COORDS[0]) == sizeof(TYPE)); \
\
/* Nothing to do when unlimited dimension is at position 0 */ \
if (0 != (UNLIM_DIM)) { \
@@ -402,7 +402,7 @@ static inline H5_ATTR_PURE unsigned
H5VM_log2_of2(uint32_t n)
{
#ifndef NDEBUG
- HDassert(POWER_OF_TWO(n));
+ assert(POWER_OF_TWO(n));
#endif /* NDEBUG */
return (MultiplyDeBruijnBitPosition[(n * (uint32_t)0x077CB531UL) >> 27]);
} /* H5VM_log2_of2() */
diff --git a/src/H5WB.c b/src/H5WB.c
index 2f89807..fe35236 100644
--- a/src/H5WB.c
+++ b/src/H5WB.c
@@ -102,8 +102,8 @@ H5WB_wrap(void *buf, size_t buf_size)
/*
* Check arguments.
*/
- HDassert(buf);
- HDassert(buf_size);
+ assert(buf);
+ assert(buf_size);
/* Create wrapped buffer info */
if (NULL == (wb = H5FL_MALLOC(H5WB_t)))
@@ -153,13 +153,13 @@ H5WB_actual(H5WB_t *wb, size_t need)
/*
* Check arguments.
*/
- HDassert(wb);
- HDassert(wb->wrapped_buf);
+ assert(wb);
+ assert(wb->wrapped_buf);
/* Check for previously allocated buffer */
if (wb->actual_buf && wb->actual_buf != wb->wrapped_buf) {
/* Sanity check */
- HDassert(wb->actual_size > wb->wrapped_size);
+ assert(wb->actual_size > wb->wrapped_size);
/* Check if we can re-use existing buffer */
if (need <= wb->alloc_size)
@@ -219,15 +219,15 @@ H5WB_actual_clear(H5WB_t *wb, size_t need)
/*
* Check arguments.
*/
- HDassert(wb);
- HDassert(wb->wrapped_buf);
+ assert(wb);
+ assert(wb->wrapped_buf);
/* Get a pointer to an actual buffer */
if (NULL == (ret_value = H5WB_actual(wb, need)))
HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, NULL, "memory allocation failed")
/* Clear the buffer */
- HDmemset(ret_value, 0, need);
+ memset(ret_value, 0, need);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -253,13 +253,13 @@ H5WB_unwrap(H5WB_t *wb)
/*
* Check arguments.
*/
- HDassert(wb);
- HDassert(wb->wrapped_buf);
+ assert(wb);
+ assert(wb->wrapped_buf);
/* Release any extra buffers allocated */
if (wb->actual_buf && wb->actual_buf != wb->wrapped_buf) {
/* Sanity check */
- HDassert(wb->actual_size > wb->wrapped_size);
+ assert(wb->actual_size > wb->wrapped_size);
wb->actual_buf = H5FL_BLK_FREE(extra_buf, wb->actual_buf);
} /* end if */
diff --git a/src/H5Z.c b/src/H5Z.c
index 8631b04..344ba80 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -154,12 +154,12 @@ H5Z_term_package(void)
if (0 == nprint++) {
/* Print column headers */
- HDfprintf(H5DEBUG(Z), "H5Z: filter statistics "
- "accumulated over life of library:\n");
- HDfprintf(H5DEBUG(Z), " %-16s %10s %10s %8s %8s %8s %10s\n", "Filter", "Total",
- "Errors", "User", "System", "Elapsed", "Bandwidth");
- HDfprintf(H5DEBUG(Z), " %-16s %10s %10s %8s %8s %8s %10s\n", "------", "-----",
- "------", "----", "------", "-------", "---------");
+ fprintf(H5DEBUG(Z), "H5Z: filter statistics "
+ "accumulated over life of library:\n");
+ fprintf(H5DEBUG(Z), " %-16s %10s %10s %8s %8s %8s %10s\n", "Filter", "Total", "Errors",
+ "User", "System", "Elapsed", "Bandwidth");
+ fprintf(H5DEBUG(Z), " %-16s %10s %10s %8s %8s %8s %10s\n", "------", "-----", "------",
+ "----", "------", "-------", "---------");
} /* end if */
/* Truncate the comment to fit in the field */
@@ -175,14 +175,14 @@ H5Z_term_package(void)
H5Z_stat_table_g[i].stats[dir].times.elapsed);
/* Print the statistics */
- HDfprintf(H5DEBUG(Z), " %s%-15s %10" PRIdHSIZE " %10" PRIdHSIZE " %8s %8s %8s %10s\n",
- (dir ? "<" : ">"), comment, H5Z_stat_table_g[i].stats[dir].total,
- H5Z_stat_table_g[i].stats[dir].errors, timestrs.user, timestrs.system,
- timestrs.elapsed, bandwidth);
+ fprintf(H5DEBUG(Z), " %s%-15s %10" PRIdHSIZE " %10" PRIdHSIZE " %8s %8s %8s %10s\n",
+ (dir ? "<" : ">"), comment, H5Z_stat_table_g[i].stats[dir].total,
+ H5Z_stat_table_g[i].stats[dir].errors, timestrs.user, timestrs.system,
+ timestrs.elapsed, bandwidth);
next:
- HDfree(timestrs.user);
- HDfree(timestrs.system);
- HDfree(timestrs.elapsed);
+ free(timestrs.user);
+ free(timestrs.system);
+ free(timestrs.elapsed);
} /* end for */
} /* end for */
} /* end if */
@@ -294,8 +294,8 @@ H5Z_register(const H5Z_class2_t *cls)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(cls);
- HDassert(cls->id >= 0 && cls->id <= H5Z_FILTER_MAX);
+ assert(cls);
+ assert(cls->id >= 0 && cls->id <= H5Z_FILTER_MAX);
/* Is the filter already registered? */
for (i = 0; i < H5Z_table_used_g; i++)
@@ -325,7 +325,7 @@ H5Z_register(const H5Z_class2_t *cls)
i = H5Z_table_used_g++;
H5MM_memcpy(H5Z_table_g + i, cls, sizeof(H5Z_class2_t));
#ifdef H5Z_DEBUG
- HDmemset(H5Z_stat_table_g + i, 0, sizeof(H5Z_stats_t));
+ memset(H5Z_stat_table_g + i, 0, sizeof(H5Z_stats_t));
#endif /* H5Z_DEBUG */
} /* end if */
/* Filter already registered */
@@ -388,7 +388,7 @@ H5Z__unregister(H5Z_filter_t filter_id)
FUNC_ENTER_PACKAGE
- HDassert(filter_id >= 0 && filter_id <= H5Z_FILTER_MAX);
+ assert(filter_id >= 0 && filter_id <= H5Z_FILTER_MAX);
/* Is the filter already registered? */
for (filter_index = 0; filter_index < H5Z_table_used_g; filter_index++)
@@ -495,7 +495,7 @@ H5Z__check_unregister_group_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void
FUNC_ENTER_PACKAGE
- HDassert(obj_ptr);
+ assert(obj_ptr);
/* Get the group creation property */
if ((ocpl_id = H5G_get_create_plist((H5G_t *)obj_ptr)) < 0)
@@ -545,7 +545,7 @@ H5Z__check_unregister_dset_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *
FUNC_ENTER_PACKAGE
- HDassert(obj_ptr);
+ assert(obj_ptr);
/* Get the dataset creation property */
if ((ocpl_id = H5D_get_create_plist((H5D_t *)obj_ptr)) < 0)
@@ -593,8 +593,8 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARA
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(obj_ptr);
- HDassert(key);
+ assert(obj_ptr);
+ assert(key);
/* Do a global flush if the file is opened for write */
if (H5F_ACC_RDWR & H5F_INTENT(f)) {
@@ -717,7 +717,7 @@ H5Z__prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id, hi
FUNC_ENTER_PACKAGE
- HDassert(pline->nused > 0);
+ assert(pline->nused > 0);
/* Iterate over filters */
for (u = 0; u < pline->nused; u++) {
@@ -765,7 +765,7 @@ H5Z__prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id, hi
break;
default:
- HDassert("invalid prelude type" && 0);
+ assert("invalid prelude type" && 0);
} /* end switch */
} /* end else */
} /* end for */
@@ -797,8 +797,8 @@ H5Z__prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_typ
FUNC_ENTER_PACKAGE
- HDassert(H5I_GENPROP_LST == H5I_get_type(dcpl_id));
- HDassert(H5I_DATATYPE == H5I_get_type(type_id));
+ assert(H5I_GENPROP_LST == H5I_get_type(dcpl_id));
+ assert(H5I_DATATYPE == H5I_get_type(type_id));
/* Check if the property list is non-default */
if (dcpl_id != H5P_DATASET_CREATE_DEFAULT) {
@@ -937,7 +937,7 @@ H5Z_can_apply_direct(const H5O_pline_t *pline)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(pline->nused > 0);
+ assert(pline->nused > 0);
/* Make "can apply" callbacks for filters in pipeline */
if (H5Z__prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_CAN_APPLY) < 0)
@@ -969,7 +969,7 @@ H5Z_set_local_direct(const H5O_pline_t *pline)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(pline->nused > 0);
+ assert(pline->nused > 0);
/* Make "set local" callbacks for filters in pipeline */
if (H5Z__prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_SET_LOCAL) < 0)
@@ -1061,10 +1061,10 @@ H5Z_modify(const H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, size_t
FUNC_ENTER_NOAPI(FAIL)
- HDassert(pline);
- HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX);
- HDassert(0 == (flags & ~((unsigned)H5Z_FLAG_DEFMASK)));
- HDassert(0 == cd_nelmts || cd_values);
+ assert(pline);
+ assert(filter >= 0 && filter <= H5Z_FILTER_MAX);
+ assert(0 == (flags & ~((unsigned)H5Z_FLAG_DEFMASK)));
+ assert(0 == cd_nelmts || cd_values);
/* Locate the filter in the pipeline */
for (idx = 0; idx < pline->nused; idx++)
@@ -1125,10 +1125,10 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, size_t cd_ne
FUNC_ENTER_NOAPI(FAIL)
- HDassert(pline);
- HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX);
- HDassert(0 == (flags & ~((unsigned)H5Z_FLAG_DEFMASK)));
- HDassert(0 == cd_nelmts || cd_values);
+ assert(pline);
+ assert(filter >= 0 && filter <= H5Z_FILTER_MAX);
+ assert(0 == (flags & ~((unsigned)H5Z_FLAG_DEFMASK)));
+ assert(0 == cd_nelmts || cd_values);
/*
* Check filter limit. We do it here for early warnings although we may
@@ -1304,12 +1304,12 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, unsigned *filter_mask /*i
FUNC_ENTER_NOAPI(FAIL)
- HDassert(0 == (flags & ~((unsigned)H5Z_FLAG_INVMASK)));
- HDassert(filter_mask);
- HDassert(nbytes && *nbytes > 0);
- HDassert(buf_size && *buf_size > 0);
- HDassert(buf && *buf);
- HDassert(!pline || pline->nused < H5Z_MAX_NFILTERS);
+ assert(0 == (flags & ~((unsigned)H5Z_FLAG_INVMASK)));
+ assert(filter_mask);
+ assert(nbytes && *nbytes > 0);
+ assert(buf_size && *buf_size > 0);
+ assert(buf && *buf);
+ assert(!pline || pline->nused < H5Z_MAX_NFILTERS);
#ifdef H5Z_DEBUG
H5_timer_init(&timer);
@@ -1474,8 +1474,8 @@ H5Z_filter_info(const H5O_pline_t *pline, H5Z_filter_t filter)
FUNC_ENTER_NOAPI(NULL)
- HDassert(pline);
- HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX);
+ assert(pline);
+ assert(filter >= 0 && filter <= H5Z_FILTER_MAX);
/* Locate the filter in the pipeline */
for (idx = 0; idx < pline->nused; idx++)
@@ -1512,8 +1512,8 @@ H5Z_filter_in_pline(const H5O_pline_t *pline, H5Z_filter_t filter)
FUNC_ENTER_NOAPI_NOERR
- HDassert(pline);
- HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX);
+ assert(pline);
+ assert(filter >= 0 && filter <= H5Z_FILTER_MAX);
/* Locate the filter in the pipeline */
for (idx = 0; idx < pline->nused; idx++)
@@ -1546,7 +1546,7 @@ H5Z_all_filters_avail(const H5O_pline_t *pline)
FUNC_ENTER_NOAPI_NOERR
/* Check args */
- HDassert(pline);
+ assert(pline);
/* Iterate through all the filters in pipeline */
for (i = 0; i < pline->nused; i++) {
@@ -1582,8 +1582,8 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(pline);
- HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX);
+ assert(pline);
+ assert(filter >= 0 && filter <= H5Z_FILTER_MAX);
/* if the pipeline has no filters, just return */
if (pline->nused == 0)
@@ -1612,11 +1612,11 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter)
/* Free information for deleted filter */
if (pline->filter[idx].name && pline->filter[idx].name != pline->filter[idx]._name)
- HDassert((HDstrlen(pline->filter[idx].name) + 1) > H5Z_COMMON_NAME_LEN);
+ assert((HDstrlen(pline->filter[idx].name) + 1) > H5Z_COMMON_NAME_LEN);
if (pline->filter[idx].name != pline->filter[idx]._name)
pline->filter[idx].name = (char *)H5MM_xfree(pline->filter[idx].name);
if (pline->filter[idx].cd_values && pline->filter[idx].cd_values != pline->filter[idx]._cd_values)
- HDassert(pline->filter[idx].cd_nelmts > H5Z_COMMON_CD_VALUES);
+ assert(pline->filter[idx].cd_nelmts > H5Z_COMMON_CD_VALUES);
if (pline->filter[idx].cd_values != pline->filter[idx]._cd_values)
pline->filter[idx].cd_values = (unsigned *)H5MM_xfree(pline->filter[idx].cd_values);
@@ -1636,7 +1636,7 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter)
pline->nused--;
/* Reset information for previous last filter in pipeline */
- HDmemset(&pline->filter[pline->nused], 0, sizeof(H5Z_filter_info_t));
+ memset(&pline->filter[pline->nused], 0, sizeof(H5Z_filter_info_t));
} /* end else */
done:
diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c
index b446073..feac56a 100644
--- a/src/H5Zdeflate.c
+++ b/src/H5Zdeflate.c
@@ -74,9 +74,9 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[]
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(*buf_size > 0);
- HDassert(buf);
- HDassert(*buf);
+ assert(*buf_size > 0);
+ assert(buf);
+ assert(*buf);
/* Check arguments */
if (cd_nelmts != 1 || cd_values[0] > 9)
@@ -92,7 +92,7 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[]
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for deflate uncompression")
/* Set the uncompression parameters */
- HDmemset(&z_strm, 0, sizeof(z_strm));
+ memset(&z_strm, 0, sizeof(z_strm));
z_strm.next_in = (Bytef *)*buf;
H5_CHECKED_ASSIGN(z_strm.avail_in, unsigned, nbytes, size_t);
z_strm.next_out = (Bytef *)outbuf;
diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c
index bdf3759..19f24c4 100644
--- a/src/H5Zfletcher32.c
+++ b/src/H5Zfletcher32.c
@@ -68,7 +68,7 @@ H5Z__filter_fletcher32(unsigned flags, size_t H5_ATTR_UNUSED cd_nelmts,
FUNC_ENTER_PACKAGE
- HDassert(sizeof(uint32_t) >= 4);
+ assert(sizeof(uint32_t) >= 4);
if (flags & H5Z_FLAG_REVERSE) { /* Read */
/* Do checksum if it's enabled for read; otherwise skip it
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index 2088ddf..c0efcc6 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -866,7 +866,7 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
/* Get total number of elements in the chunk */
if ((npoints = H5S_GET_EXTENT_NPOINTS(ds)) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get number of points in the dataspace")
- HDassert(npoints);
+ assert(npoints);
/* Initialize index for cd_values array starting from the third entry */
cd_values_index = 2;
@@ -915,7 +915,7 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
} /* end switch */
/* Check if calculation of parameters matches with setting of parameters */
- HDassert(cd_values_actual_nparms == cd_values_index);
+ assert(cd_values_actual_nparms == cd_values_index);
/* Finally set the first two entries of cd_values[] */
H5_CHECK_OVERFLOW(cd_values_actual_nparms, size_t, unsigned);
@@ -986,7 +986,7 @@ H5Z__filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s
} /* end if */
/* output; compress */
else {
- HDassert(nbytes == d_nelmts * cd_values[4]);
+ assert(nbytes == d_nelmts * cd_values[4]);
size_out = nbytes;
@@ -1128,7 +1128,7 @@ H5Z__nbit_decompress_one_atomic(unsigned char *data, size_t data_offset, unsigne
}
else { /* big endian */
/* Sanity check */
- HDassert(p->order == H5Z_NBIT_ORDER_BE);
+ assert(p->order == H5Z_NBIT_ORDER_BE);
/* calculate begin_i and end_i */
begin_i = ((unsigned)datatype_len - p->precision - p->offset) / 8;
@@ -1203,7 +1203,7 @@ H5Z__nbit_decompress_one_array(unsigned char *data, size_t data_offset, unsigned
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
done:
@@ -1268,7 +1268,7 @@ H5Z__nbit_decompress_one_compound(unsigned char *data, size_t data_offset, unsig
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
}
@@ -1291,7 +1291,7 @@ H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buff
FUNC_ENTER_PACKAGE
/* may not have to initialize to zeros */
- HDmemset(data, 0, d_nelmts * (size_t)parms[4]);
+ memset(data, 0, d_nelmts * (size_t)parms[4]);
/* initialization before the loop */
j = 0;
@@ -1335,7 +1335,7 @@ H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buff
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
done:
@@ -1435,7 +1435,7 @@ H5Z__nbit_compress_one_atomic(unsigned char *data, size_t data_offset, unsigned
}
else { /* big endian */
/* Sanity check */
- HDassert(p->order == H5Z_NBIT_ORDER_BE);
+ assert(p->order == H5Z_NBIT_ORDER_BE);
/* calculate begin_i and end_i */
begin_i = ((unsigned)datatype_len - p->precision - p->offset) / 8;
@@ -1499,7 +1499,7 @@ H5Z__nbit_compress_one_array(unsigned char *data, size_t data_offset, unsigned c
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
}
@@ -1542,7 +1542,7 @@ H5Z__nbit_compress_one_compound(unsigned char *data, size_t data_offset, unsigne
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
} /* end switch */
}
}
@@ -1561,7 +1561,7 @@ H5Z__nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer
unsigned parms_index; /* index in array parms used by compression/decompression functions */
/* must initialize buffer to be zeros */
- HDmemset(buffer, 0, *buffer_size);
+ memset(buffer, 0, *buffer_size);
/* initialization before the loop */
buf_len = sizeof(unsigned char) * 8;
@@ -1598,7 +1598,7 @@ H5Z__nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer
break;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(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/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 6613ec2..57f807d 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -164,7 +164,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
} while (_size_rem); \
} /* end if */ \
else { \
- HDassert(H5T_native_order_g == H5T_ORDER_BE); \
+ assert(H5T_native_order_g == H5T_ORDER_BE); \
\
/* Copy 4 bytes at a time to each cd value, but start at the end \
* (highest address) of fill_val */ \
@@ -183,7 +183,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
_fv_p -= _size_rem; \
} /* end while */ \
\
- HDassert(_fv_p == (char *)&(fill_val)); \
+ assert(_fv_p == (char *)&(fill_val)); \
if (_size_rem) { \
/* Amount left to copy is smaller than a cd_value, initialize \
* _cd_value as it will not be fully overwritten and copy to the end \
@@ -291,7 +291,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
} while (_size_rem); \
} /* end if */ \
else { \
- HDassert(H5T_native_order_g == H5T_ORDER_BE); \
+ assert(H5T_native_order_g == H5T_ORDER_BE); \
\
/* Copy 4 bytes at a time to each cd value, but start at the end \
* (highest address) of fill_val */ \
@@ -310,7 +310,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
_fv_p -= _size_rem; \
} /* end while */ \
\
- HDassert(_fv_p == (char *)&(fill_val)); \
+ assert(_fv_p == (char *)&(fill_val)); \
if (_size_rem) { \
/* Amount left to copy is smaller than a cd_value, initialize \
* _cd_value as it will not be fully overwritten and copy to the end \
@@ -586,7 +586,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
if (H5T_native_order_g == H5T_ORDER_LE) \
H5MM_memcpy(minval, &min, sizeof(type)); \
else { \
- HDassert(H5T_native_order_g == H5T_ORDER_BE); \
+ assert(H5T_native_order_g == H5T_ORDER_BE); \
H5MM_memcpy(((char *)minval) + (sizeof(long long) - sizeof(type)), &min, sizeof(type)); \
} /* end else */ \
else \
@@ -670,7 +670,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
if (H5T_native_order_g == H5T_ORDER_LE) \
H5MM_memcpy(&min, &minval, sizeof(type)); \
else { \
- HDassert(H5T_native_order_g == H5T_ORDER_BE); \
+ assert(H5T_native_order_g == H5T_ORDER_BE); \
H5MM_memcpy(&min, ((char *)&minval) + (sizeof(long long) - sizeof(type)), sizeof(type)); \
} /* end else */ \
else \
@@ -957,7 +957,7 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Initialize the parameters to a known state */
- HDmemset(cd_values, 0, sizeof(cd_values));
+ memset(cd_values, 0, sizeof(cd_values));
/* Get the filter's current parameters */
if (H5P_get_filter_by_id(dcpl_plist, H5Z_FILTER_SCALEOFFSET, &flags, &cd_nelmts, cd_values, (size_t)0,
@@ -1238,7 +1238,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
minval |= minval_mask;
}
- HDassert(minbits <= p.size * 8);
+ assert(minbits <= p.size * 8);
p.minbits = minbits;
/* calculate size of output buffer after decompression */
@@ -1296,7 +1296,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
}
/* output; compress */
else {
- HDassert(nbytes == d_nelmts * p.size);
+ assert(nbytes == d_nelmts * p.size);
/* before preprocess, convert to memory endianness order if needed */
if (need_convert)
@@ -1317,7 +1317,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "pre-compression failed")
}
- HDassert(minbits <= p.size * 8);
+ assert(minbits <= p.size * 8);
/* calculate buffer size after compression
* minbits and minval are stored in the front of the compressed buffer
@@ -1347,7 +1347,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
/* (Looks like an error in the original determination of how many
* bytes would be needed for parameters. - QAK, 2010/08/19)
*/
- HDmemset(outbuf + 13, 0, (size_t)8);
+ memset(outbuf + 13, 0, (size_t)8);
/* special case: minbits equal to full precision */
if (minbits == p.size * 8) {
@@ -1652,7 +1652,7 @@ H5Z__scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
unsigned dtype_len;
int k;
- HDassert(p.minbits > 0);
+ assert(p.minbits > 0);
dtype_len = p.size * 8;
@@ -1664,7 +1664,7 @@ H5Z__scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
p, dtype_len);
}
else { /* big endian */
- HDassert(p.mem_order == H5Z_SCALEOFFSET_ORDER_BE);
+ assert(p.mem_order == H5Z_SCALEOFFSET_ORDER_BE);
begin_i = (dtype_len - p.minbits) / 8;
@@ -1736,7 +1736,7 @@ H5Z__scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset, un
unsigned dtype_len;
int k;
- HDassert(p.minbits > 0);
+ assert(p.minbits > 0);
dtype_len = p.size * 8;
@@ -1748,7 +1748,7 @@ H5Z__scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset, un
dtype_len);
}
else { /* big endian */
- HDassert(p.mem_order == H5Z_SCALEOFFSET_ORDER_BE);
+ assert(p.mem_order == H5Z_SCALEOFFSET_ORDER_BE);
begin_i = (dtype_len - p.minbits) / 8;
for (k = (int)begin_i; k <= (int)(p.size - 1); k++)
diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c
index 4537110..99b33cc 100644
--- a/src/H5Zshuffle.c
+++ b/src/H5Zshuffle.c
@@ -171,7 +171,7 @@ 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!");
+ assert(0 && "This Should never be executed!");
break;
case 0:
do {
@@ -242,7 +242,7 @@ 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!");
+ assert(0 && "This Should never be executed!");
break;
case 0:
do {
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index b03ca38..6ebb528 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -181,7 +181,7 @@ H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
/* Set "local" parameter for this dataset's "pixels-per-scanline" */
/* (Use the chunk's fastest changing dimension size) */
- HDassert(ndims > 0);
+ assert(ndims > 0);
scanline = dims[ndims - 1];
/* Adjust scanline if it is smaller than number of pixels per block or
@@ -271,13 +271,13 @@ H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s
/* Sanity check to make certain that we haven't drifted out of date with
* the mask options from the szlib.h header */
- HDassert(H5_SZIP_ALLOW_K13_OPTION_MASK == SZ_ALLOW_K13_OPTION_MASK);
- HDassert(H5_SZIP_CHIP_OPTION_MASK == SZ_CHIP_OPTION_MASK);
- HDassert(H5_SZIP_EC_OPTION_MASK == SZ_EC_OPTION_MASK);
- HDassert(H5_SZIP_LSB_OPTION_MASK == SZ_LSB_OPTION_MASK);
- HDassert(H5_SZIP_MSB_OPTION_MASK == SZ_MSB_OPTION_MASK);
- HDassert(H5_SZIP_NN_OPTION_MASK == SZ_NN_OPTION_MASK);
- HDassert(H5_SZIP_RAW_OPTION_MASK == SZ_RAW_OPTION_MASK);
+ assert(H5_SZIP_ALLOW_K13_OPTION_MASK == SZ_ALLOW_K13_OPTION_MASK);
+ assert(H5_SZIP_CHIP_OPTION_MASK == SZ_CHIP_OPTION_MASK);
+ assert(H5_SZIP_EC_OPTION_MASK == SZ_EC_OPTION_MASK);
+ assert(H5_SZIP_LSB_OPTION_MASK == SZ_LSB_OPTION_MASK);
+ assert(H5_SZIP_MSB_OPTION_MASK == SZ_MSB_OPTION_MASK);
+ assert(H5_SZIP_NN_OPTION_MASK == SZ_NN_OPTION_MASK);
+ assert(H5_SZIP_RAW_OPTION_MASK == SZ_RAW_OPTION_MASK);
/* Check arguments */
if (cd_nelmts != 4)
@@ -307,7 +307,7 @@ H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s
size_out = nalloc;
if (SZ_BufftoBuffDecompress(outbuf, &size_out, newbuf, nbytes - 4, &sz_param) != SZ_OK)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "szip_filter: decompression failed")
- HDassert(size_out == nalloc);
+ assert(size_out == nalloc);
/* Free the input buffer */
H5MM_xfree(*buf);
@@ -334,7 +334,7 @@ H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s
size_out = nbytes;
if (SZ_OK != SZ_BufftoBuffCompress(dst, &size_out, *buf, nbytes, &sz_param))
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "overflow")
- HDassert(size_out <= nbytes);
+ assert(size_out <= nbytes);
/* Free the input buffer */
H5MM_xfree(*buf);
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 39f9e9d..1ca156d 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -345,7 +345,7 @@ H5Z__unget_token(H5Z_token *current)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(current);
+ assert(current);
current->tok_type = current->tok_last_type;
current->tok_begin = current->tok_last_begin;
@@ -380,7 +380,7 @@ H5Z__get_token(H5Z_token *current)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(current);
+ assert(current);
/* Save the last position for possible ungets */
current->tok_last_type = current->tok_type;
@@ -952,7 +952,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size
FUNC_ENTER_NOAPI(FAIL)
- HDassert(data_xform_prop);
+ assert(data_xform_prop);
tree = data_xform_prop->parse_root;
@@ -1070,10 +1070,10 @@ H5Z__xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(tree);
+ assert(tree);
- HDmemset(&resl, 0, sizeof(H5Z_result));
- HDmemset(&resr, 0, sizeof(H5Z_result));
+ memset(&resl, 0, sizeof(H5Z_result));
+ memset(&resr, 0, sizeof(H5Z_result));
if (tree->type == H5Z_XFORM_INTEGER) {
res->type = H5Z_XFORM_INTEGER;
@@ -1163,7 +1163,7 @@ H5Z__xform_find_type(const H5T_t *type)
FUNC_ENTER_PACKAGE
- HDassert(type);
+ assert(type);
/* Check for SHORT type */
if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_SHORT)) && 0 == H5T_cmp(type, tmp, FALSE))
@@ -1234,7 +1234,7 @@ H5Z__xform_copy_tree(H5Z_node *tree, H5Z_datval_ptrs *dat_val_pointers, H5Z_datv
FUNC_ENTER_PACKAGE
- HDassert(tree);
+ assert(tree);
if (tree->type == H5Z_XFORM_INTEGER) {
if ((ret_value = (H5Z_node *)H5MM_malloc(sizeof(H5Z_node))) == NULL)
@@ -1303,7 +1303,7 @@ H5Z__op_is_numbs(H5Z_node *_tree)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(_tree);
+ assert(_tree);
if (((_tree->lchild->type == H5Z_XFORM_INTEGER) || (_tree->lchild->type == H5Z_XFORM_FLOAT)) &&
((_tree->rchild->type == H5Z_XFORM_INTEGER) || (_tree->rchild->type == H5Z_XFORM_FLOAT)))
@@ -1334,7 +1334,7 @@ H5Z__op_is_numbs2(H5Z_node *_tree)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(_tree);
+ assert(_tree);
if ((!_tree->lchild &&
((_tree->rchild->type == H5Z_XFORM_INTEGER) || (_tree->rchild->type == H5Z_XFORM_FLOAT))) ||
@@ -1457,7 +1457,7 @@ H5Z_xform_create(const char *expr)
FUNC_ENTER_NOAPI(NULL)
- HDassert(expr);
+ assert(expr);
/* Allocate space for the data transform information */
if (NULL == (data_xform_prop = (H5Z_data_xform_t *)H5MM_calloc(sizeof(H5Z_data_xform_t))))
@@ -1723,7 +1723,7 @@ H5Z_xform_extract_xform_str(const H5Z_data_xform_t *data_xform_prop)
/* There should be no way that this can be NULL since the function
* that calls this one checks to make sure it isn't before
* passing them */
- HDassert(data_xform_prop);
+ assert(data_xform_prop);
FUNC_LEAVE_NOAPI(data_xform_prop->xform_exp)
} /* H5Z_xform_extract_xform_str() */
diff --git a/src/H5checksum.c b/src/H5checksum.c
index cb1f754..a8f304c 100644
--- a/src/H5checksum.c
+++ b/src/H5checksum.c
@@ -106,8 +106,8 @@ H5_checksum_fletcher32(const void *_data, size_t _len)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(_data);
- HDassert(_len > 0);
+ assert(_data);
+ assert(_len > 0);
/* Compute checksum for pairs of bytes */
/* (the magic "360" value is the largest number of sums that can be
@@ -231,8 +231,8 @@ H5_checksum_crc(const void *_data, size_t len)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(_data);
- HDassert(len > 0);
+ assert(_data);
+ assert(len > 0);
FUNC_LEAVE_NOAPI(H5__checksum_crc_update((uint32_t)0xffffffffL, (const uint8_t *)_data, len) ^
0xffffffffL)
@@ -384,8 +384,8 @@ H5_checksum_lookup3(const void *key, size_t length, uint32_t initval)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(key);
- HDassert(length > 0);
+ assert(key);
+ assert(length > 0);
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
@@ -462,7 +462,7 @@ H5_checksum_lookup3(const void *key, size_t length, uint32_t initval)
case 0:
goto done;
default:
- HDassert(0 && "This Should never be executed!");
+ assert(0 && "This Should never be executed!");
}
H5_lookup3_final(a, b, c);
@@ -491,8 +491,8 @@ H5_checksum_metadata(const void *data, size_t len, uint32_t initval)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(data);
- HDassert(len > 0);
+ assert(data);
+ assert(len > 0);
/* Choose the appropriate checksum routine */
/* (use Bob Jenkin's "lookup3" algorithm for all buffer sizes) */
@@ -523,7 +523,7 @@ H5_hash_string(const char *str)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(str);
+ assert(str);
while ((c = *str++))
hash = ((hash << 5) + hash) + (uint32_t)c; /* hash * 33 + c */
diff --git a/src/H5dbg.c b/src/H5dbg.c
index 08ebbb0..ed517ad 100644
--- a/src/H5dbg.c
+++ b/src/H5dbg.c
@@ -78,33 +78,33 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf, const uint8_t *mark
/*
* Check arguments.
*/
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(buf);
- HDassert(marker);
- HDassert(buf_size > 0);
+ assert(stream);
+ assert(indent >= 0);
+ assert(buf);
+ assert(marker);
+ assert(buf_size > 0);
/*
* Print the buffer in a VMS-style octal dump.
*/
- HDfprintf(stream, "%*sData follows (`__' indicates free region)...\n", indent, "");
+ fprintf(stream, "%*sData follows (`__' indicates free region)...\n", indent, "");
for (u = 0; u < buf_size; u += 16) {
uint8_t c;
- HDfprintf(stream, "%*s %8zu: ", indent, "", u + buf_offset);
+ fprintf(stream, "%*s %8zu: ", indent, "", u + buf_offset);
/* Print the hex values */
for (v = 0; v < 16; v++) {
if (u + v < buf_size) {
if (marker[u + v])
- HDfprintf(stream, "__ ");
+ fprintf(stream, "__ ");
else {
c = buf[buf_offset + u + v];
- HDfprintf(stream, "%02x ", c);
+ fprintf(stream, "%02x ", c);
} /* end else */
} /* end if */
else
- HDfprintf(stream, " ");
+ fprintf(stream, " ");
if (7 == v)
HDfputc(' ', stream);
diff --git a/src/H5detect.c b/src/H5detect.c
index daf7708..6135c03 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -41,7 +41,7 @@ static const char *FileHeader = "\n\
*/
#undef NDEBUG
#include "H5private.h"
-/* Do NOT use HDfprintf in this file as it is not linked with the library,
+/* Do NOT use fprintf in this file as it is not linked with the library,
* which contains the H5system.c file in which the function is defined.
*/
#include "H5Tpublic.h"
@@ -132,12 +132,12 @@ precision(detected_t *d)
int _i, _j, _last = (-1); \
const char *_mesg; \
\
- HDmemset(&INFO, 0, sizeof(INFO)); \
+ memset(&INFO, 0, sizeof(INFO)); \
INFO.varname = #VAR; \
INFO.size = sizeof(TYPE); \
\
/* Initialize padding mask */ \
- HDmemset(_pad_mask, 0, sizeof(_pad_mask)); \
+ memset(_pad_mask, 0, sizeof(_pad_mask)); \
\
/* Padding bits. Set a variable to 4.0, then flip each bit and see if \
* the modified variable is equal ("==") to the original. Build a \
@@ -147,11 +147,11 @@ precision(detected_t *d)
* and interfere with detection of the various properties below unless we \
* know to ignore them. */ \
_v1 = (TYPE)4.0L; \
- HDmemcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
+ memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
for (_i = 0; _i < (int)sizeof(TYPE); _i++) \
for (_byte_mask = (unsigned char)1; _byte_mask; _byte_mask = (unsigned char)(_byte_mask << 1)) { \
_buf1[_i] ^= _byte_mask; \
- HDmemcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \
+ memcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \
H5_GCC_CLANG_DIAG_OFF("float-equal") \
if (_v1 != _v2) \
_pad_mask[_i] |= _byte_mask; \
@@ -164,8 +164,8 @@ precision(detected_t *d)
_v3 = _v1; \
_v1 += _v2; \
_v2 /= (TYPE)256.0L; \
- HDmemcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
- HDmemcpy(_buf3, (const void *)&_v3, sizeof(TYPE)); \
+ memcpy(_buf1, (const void *)&_v1, sizeof(TYPE)); \
+ memcpy(_buf3, (const void *)&_v3, sizeof(TYPE)); \
_j = byte_cmp(sizeof(TYPE), _buf3, _buf1, _pad_mask); \
if (_j >= 0) { \
INFO.perm[_i] = _j; \
@@ -366,9 +366,9 @@ H5T__init_native(void)\n\
dt->shared->u.atomic.prec = %d;\n\
dt->shared->u.atomic.lsb_pad = H5T_PAD_ZERO;\n\
dt->shared->u.atomic.msb_pad = H5T_PAD_ZERO;\n",
- d[i].offset, /*offset */
- d[i].precision); /*precision */
- /*HDassert((d[i].perm[0]>0)==(byte_order>0));*/ /* Double-check that byte-order doesn't change */
+ d[i].offset, /*offset */
+ d[i].precision); /*precision */
+ /*assert((d[i].perm[0]>0)==(byte_order>0));*/ /* Double-check that byte-order doesn't change */
/* The part unique to floating point types */
fprintf(rawoutstream, "\
@@ -547,7 +547,7 @@ bit_cmp(unsigned int nbytes, int *perm, void *_a, void *_b, const unsigned char
unsigned char aa, bb;
for (i = 0; i < nbytes; i++) {
- HDassert(perm[i] < (int)nbytes);
+ assert(perm[i] < (int)nbytes);
if ((aa = (unsigned char)(a[perm[i]] & pad_mask[perm[i]])) !=
(bb = (unsigned char)(b[perm[i]] & pad_mask[perm[i]]))) {
unsigned int j;
@@ -613,7 +613,7 @@ fix_order(int n, int last, int *perm, const char **mesg)
* It could have some other endianness and fall into this
* case - JKM & QAK)
*/
- HDassert(0 == n % 2);
+ assert(0 == n % 2);
if (mesg)
*mesg = "VAX";
for (i = 0; i < n; i += 2) {
@@ -624,7 +624,7 @@ fix_order(int n, int last, int *perm, const char **mesg)
}
else {
fprintf(stderr, "Failed to detect byte order of %d-byte floating point.\n", n);
- HDexit(1);
+ exit(1);
}
}
@@ -914,7 +914,7 @@ main(int argc, char *argv[])
/* First check if filename is string "NULL" */
if (fname != NULL) {
/* binary output */
- if ((f = HDfopen(fname, "w")) != NULL)
+ if ((f = fopen(fname, "w")) != NULL)
rawoutstream = f;
}
if (!rawoutstream)
diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c
index 88a6d7d..c76d492 100644
--- a/src/H5make_libsettings.c
+++ b/src/H5make_libsettings.c
@@ -32,7 +32,7 @@ static const char *FileHeader = "\n\
#include "H5private.h"
-/* Do NOT use HDfprintf in this file as it is not linked with the library,
+/* Do NOT use fprintf in this file as it is not linked with the library,
* which contains the H5system.c file in which the function is defined.
*/
@@ -59,32 +59,32 @@ insert_libhdf5_settings(FILE *flibinfo)
int inchar;
int bol = 0; /* indicates the beginning of a new line */
- if (NULL == (fsettings = HDfopen(LIBSETTINGSFNAME, "r"))) {
+ if (NULL == (fsettings = fopen(LIBSETTINGSFNAME, "r"))) {
HDperror(LIBSETTINGSFNAME);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Turn off warnings for large arrays. If the library info string is
* a problem, people can build without the embedded library info.
*/
- HDfprintf(flibinfo, "#include \"H5private.h\"\n");
- HDfprintf(flibinfo, "H5_GCC_DIAG_OFF(\"larger-than=\")\n\n");
- HDfprintf(flibinfo, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n\n");
+ fprintf(flibinfo, "#include \"H5private.h\"\n");
+ fprintf(flibinfo, "H5_GCC_DIAG_OFF(\"larger-than=\")\n\n");
+ fprintf(flibinfo, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n\n");
/* Print variable definition and the string. Do not use const or some
* platforms (AIX?) will have issues.
*/
- HDfprintf(flibinfo, "char H5libhdf5_settings[]=\n");
+ fprintf(flibinfo, "char H5libhdf5_settings[]=\n");
bol++;
while (EOF != (inchar = HDgetc(fsettings))) {
if (bol) {
/* Start a new line */
- HDfprintf(flibinfo, "\t\"");
+ fprintf(flibinfo, "\t\"");
bol = 0;
}
if (inchar == '\n') {
/* end of a line */
- HDfprintf(flibinfo, "\\n\"\n");
+ fprintf(flibinfo, "\\n\"\n");
bol++;
}
else
@@ -95,26 +95,26 @@ insert_libhdf5_settings(FILE *flibinfo)
/* wrap up */
if (!bol)
/* EOF found without a new line */
- HDfprintf(flibinfo, "\\n\"\n");
- HDfprintf(flibinfo, ";\n\n");
+ fprintf(flibinfo, "\\n\"\n");
+ fprintf(flibinfo, ";\n\n");
}
else {
- HDfprintf(stderr, "Read errors encountered with %s\n", LIBSETTINGSFNAME);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Read errors encountered with %s\n", LIBSETTINGSFNAME);
+ exit(EXIT_FAILURE);
}
if (0 != HDfclose(fsettings)) {
HDperror(LIBSETTINGSFNAME);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* Re-enable warnings for large arrays */
- HDfprintf(rawoutstream, "H5_GCC_DIAG_ON(\"larger-than=\")\n");
- HDfprintf(rawoutstream, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n");
+ fprintf(rawoutstream, "H5_GCC_DIAG_ON(\"larger-than=\")\n");
+ fprintf(rawoutstream, "H5_CLANG_DIAG_OFF(\"overlength-strings\")\n");
#else
/* Print variable definition and an empty string. Do not use const or some
* platforms (AIX?) will have issues.
*/
- HDfprintf(flibinfo, "char H5libhdf5_settings[]=\"\";\n");
+ fprintf(flibinfo, "char H5libhdf5_settings[]=\"\";\n");
#endif
} /* insert_libhdf5_settings() */
@@ -202,42 +202,42 @@ information about the library build configuration\n";
/*
* The file header: warning, copyright notice, build information.
*/
- HDfprintf(rawoutstream, "/* Generated automatically by H5make_libsettings -- do not edit */\n\n\n");
+ fprintf(rawoutstream, "/* Generated automatically by H5make_libsettings -- do not edit */\n\n\n");
HDfputs(FileHeader, rawoutstream); /*the copyright notice--see top of this file */
- HDfprintf(rawoutstream, " *\n * Created:\t\t%s %2d, %4d\n", month_name[tm->tm_mon], tm->tm_mday,
- 1900 + tm->tm_year);
+ fprintf(rawoutstream, " *\n * Created:\t\t%s %2d, %4d\n", month_name[tm->tm_mon], tm->tm_mday,
+ 1900 + tm->tm_year);
if (pwd || real_name[0] || host_name[0]) {
- HDfprintf(rawoutstream, " *\t\t\t");
+ fprintf(rawoutstream, " *\t\t\t");
if (real_name[0])
- HDfprintf(rawoutstream, "%s <", real_name);
+ fprintf(rawoutstream, "%s <", real_name);
#ifdef H5_HAVE_GETPWUID
if (pwd)
HDfputs(pwd->pw_name, rawoutstream);
#endif
if (host_name[0])
- HDfprintf(rawoutstream, "@%s", host_name);
+ fprintf(rawoutstream, "@%s", host_name);
if (real_name[0])
- HDfprintf(rawoutstream, ">");
+ fprintf(rawoutstream, ">");
HDfputc('\n', rawoutstream);
}
- HDfprintf(rawoutstream, " *\n * Purpose:\t\t");
+ fprintf(rawoutstream, " *\n * Purpose:\t\t");
for (s = purpose; *s; s++) {
HDfputc(*s, rawoutstream);
if ('\n' == *s && s[1])
- HDfprintf(rawoutstream, " *\t\t\t");
+ fprintf(rawoutstream, " *\t\t\t");
}
- HDfprintf(rawoutstream, " *\n");
- HDfprintf(rawoutstream, " *\tDO NOT MAKE MODIFICATIONS TO THIS FILE!\n");
- HDfprintf(rawoutstream, " *\tIt was generated by code in `H5make_libsettings.c'.\n");
+ fprintf(rawoutstream, " *\n");
+ fprintf(rawoutstream, " *\tDO NOT MAKE MODIFICATIONS TO THIS FILE!\n");
+ fprintf(rawoutstream, " *\tIt was generated by code in `H5make_libsettings.c'.\n");
- HDfprintf(rawoutstream, " *\n *");
+ fprintf(rawoutstream, " *\n *");
for (i = 0; i < 73; i++)
HDfputc('-', rawoutstream);
- HDfprintf(rawoutstream, "\n */\n\n");
+ fprintf(rawoutstream, "\n */\n\n");
}
/*-------------------------------------------------------------------------
@@ -276,7 +276,7 @@ main(int argc, char *argv[])
/* First check if filename is string "NULL" */
if (fname != NULL) {
/* binary output */
- if ((f = HDfopen(fname, "w")) != NULL)
+ if ((f = fopen(fname, "w")) != NULL)
rawoutstream = f;
}
if (!rawoutstream)
@@ -291,10 +291,10 @@ main(int argc, char *argv[])
if (rawoutstream && rawoutstream != stdout) {
if (HDfclose(rawoutstream))
- HDfprintf(stderr, "closing rawoutstream");
+ fprintf(stderr, "closing rawoutstream");
else
rawoutstream = NULL;
}
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
diff --git a/src/H5mpi.c b/src/H5mpi.c
index f847508..11b0b7b 100644
--- a/src/H5mpi.c
+++ b/src/H5mpi.c
@@ -395,9 +395,9 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result)
same = TRUE;
/* Memset the buffers to zero */
- HDmemset(key, 0, MPI_MAX_INFO_KEY);
- HDmemset(value1, 0, MPI_MAX_INFO_VAL);
- HDmemset(value2, 0, MPI_MAX_INFO_VAL);
+ memset(key, 0, MPI_MAX_INFO_KEY);
+ memset(value1, 0, MPI_MAX_INFO_VAL);
+ memset(value2, 0, MPI_MAX_INFO_VAL);
/* Get the nth key */
if (MPI_SUCCESS != (mpi_code = MPI_Info_get_nthkey(info1, i, key)))
@@ -410,7 +410,7 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result)
HMPI_GOTO_ERROR(FAIL, "MPI_Info_get failed", mpi_code)
/* Compare values and flags */
- if (!flag1 || !flag2 || HDmemcmp(value1, value2, MPI_MAX_INFO_VAL)) {
+ if (!flag1 || !flag2 || memcmp(value1, value2, MPI_MAX_INFO_VAL)) {
same = FALSE;
break;
}
@@ -639,9 +639,9 @@ H5_mpio_gatherv_alloc(void *send_buf, int send_count, MPI_Datatype send_type, co
FUNC_ENTER_NOAPI(FAIL)
- HDassert(send_buf || send_count == 0);
+ assert(send_buf || send_count == 0);
if (allgather || (mpi_rank == root))
- HDassert(out_buf && out_buf_num_entries);
+ assert(out_buf && out_buf_num_entries);
/* Retrieve the extent of the MPI Datatype being used */
#if H5_CHECK_MPI_VERSION(3, 0)
@@ -725,9 +725,9 @@ H5_mpio_gatherv_alloc_simple(void *send_buf, int send_count, MPI_Datatype send_t
FUNC_ENTER_NOAPI(FAIL)
- HDassert(send_buf || send_count == 0);
+ assert(send_buf || send_count == 0);
if (allgather || (mpi_rank == root))
- HDassert(out_buf && out_buf_num_entries);
+ assert(out_buf && out_buf_num_entries);
/*
* Allocate array to store the receive counts of each rank, as well as
@@ -809,7 +809,7 @@ H5_mpio_get_file_sync_required(MPI_File fh, hbool_t *file_sync_required)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file_sync_required);
+ assert(file_sync_required);
*file_sync_required = FALSE;
diff --git a/src/H5system.c b/src/H5system.c
index 8991f6a..36b3ab5 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -75,18 +75,18 @@ HDvasprintf(char **bufp, const char *fmt, va_list _ap)
char *buf; /* buffer to receive formatted string */
size_t bufsz; /* size of buffer to allocate */
- for (bufsz = 32; (buf = HDmalloc(bufsz)) != NULL;) {
+ for (bufsz = 32; (buf = malloc(bufsz)) != NULL;) {
int ret;
va_list ap;
- HDva_copy(ap, _ap);
+ va_copy(ap, _ap);
ret = HDvsnprintf(buf, bufsz, fmt, ap);
va_end(ap);
if (ret >= 0 && (size_t)ret < bufsz) {
*bufp = buf;
return ret;
}
- HDfree(buf);
+ free(buf);
if (ret < 0)
return ret;
bufsz = (size_t)ret + 1;
@@ -227,7 +227,7 @@ H5_make_time(struct tm *tm)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(tm);
+ assert(tm);
/* Initialize timezone information */
if (!H5_ntzset) {
@@ -398,7 +398,7 @@ H5_get_win32_times(H5_timevals_t *tvs /*in,out*/)
static hbool_t is_initialized = FALSE;
BOOL err;
- HDassert(tvs);
+ assert(tvs);
if (!is_initialized) {
/* NOTE: This is just a pseudo handle and does not need to be closed. */
@@ -569,9 +569,9 @@ Wopen_utf8(const char *path, int oflag, ...)
if (oflag & O_CREAT) {
va_list vl;
- HDva_start(vl, oflag);
- pmode = HDva_arg(vl, int);
- HDva_end(vl);
+ va_start(vl, oflag);
+ pmode = va_arg(vl, int);
+ va_end(vl);
}
/* Open the file */
@@ -650,8 +650,8 @@ H5_build_extpath(const char *name, char **extpath /*out*/)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
- HDassert(name);
- HDassert(extpath);
+ assert(name);
+ assert(extpath);
/* Clear external path pointer to begin with */
*extpath = NULL;
@@ -705,10 +705,10 @@ H5_build_extpath(const char *name, char **extpath /*out*/)
size_t cwdlen;
size_t path_len;
- HDassert(cwdpath);
+ assert(cwdpath);
cwdlen = HDstrlen(cwdpath);
- HDassert(cwdlen);
- HDassert(new_name);
+ assert(cwdlen);
+ assert(new_name);
path_len = cwdlen + HDstrlen(new_name) + 2;
if (NULL == (full_path = (char *)H5MM_malloc(path_len)))
HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed")
@@ -725,7 +725,7 @@ H5_build_extpath(const char *name, char **extpath /*out*/)
char *ptr = NULL;
H5_GET_LAST_DELIMITER(full_path, ptr)
- HDassert(ptr);
+ assert(ptr);
*++ptr = '\0';
*extpath = full_path;
} /* end if */
@@ -762,7 +762,7 @@ H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/)
FUNC_ENTER_NOAPI_NOINIT
- HDassert(path2);
+ assert(path2);
if (path1)
path1_len = HDstrlen(path1);
@@ -1085,7 +1085,7 @@ H5_dirname(const char *path, char **dirname)
else {
/* Pathname of form "dir/filename" */
len = sep - path;
- HDassert(len >= 0);
+ assert(len >= 0);
out = H5MM_strndup(path, (size_t)len);
}
@@ -1187,7 +1187,7 @@ H5_basename(const char *path, char **basename)
c_ptr--;
len = sep - c_ptr;
- HDassert(len >= 0);
+ assert(len >= 0);
out = H5MM_strndup(c_ptr, (size_t)len);
}
@@ -1273,7 +1273,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
}
else if (l_opts[i].has_arg == require_arg) {
if (H5_opterr)
- HDfprintf(stderr, "%s: option required for \"--%s\" flag\n", argv[0], arg);
+ fprintf(stderr, "%s: option required for \"--%s\" flag\n", argv[0], arg);
optchar = '?';
}
@@ -1282,7 +1282,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
else {
if (H5_optarg) {
if (H5_opterr)
- HDfprintf(stderr, "%s: no option required for \"%s\" flag\n", argv[0], arg);
+ fprintf(stderr, "%s: no option required for \"%s\" flag\n", argv[0], arg);
optchar = '?';
}
@@ -1294,7 +1294,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
if (l_opts[i].name == NULL) {
/* exhausted all of the l_opts we have and still didn't match */
if (H5_opterr)
- HDfprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], arg);
+ fprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], arg);
optchar = '?';
}
@@ -1302,7 +1302,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
H5_optind++;
sp = 1;
- HDfree(arg);
+ free(arg);
}
else {
char *cp; /* pointer into current token */
@@ -1312,7 +1312,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
if (optchar == ':' || (cp = HDstrchr(opts, optchar)) == 0) {
if (H5_opterr)
- HDfprintf(stderr, "%s: unknown option \"%c\"\n", argv[0], optchar);
+ fprintf(stderr, "%s: unknown option \"%c\"\n", argv[0], optchar);
/* if no chars left in this token, move to next token */
if (argv[H5_optind][++sp] == '\0') {
@@ -1330,7 +1330,7 @@ H5_get_option(int argc, const char *const *argv, const char *opts, const struct
}
else if (++H5_optind >= argc) {
if (H5_opterr)
- HDfprintf(stderr, "%s: value expected for option \"%c\"\n", argv[0], optchar);
+ fprintf(stderr, "%s: value expected for option \"%c\"\n", argv[0], optchar);
optchar = '?';
}
@@ -1389,8 +1389,8 @@ char *
H5_strcasestr(const char *haystack, const char *needle)
{
/* Check arguments. */
- HDassert(haystack);
- HDassert(needle);
+ assert(haystack);
+ assert(needle);
/* begin once from each character of haystack, until needle is found */
do {
diff --git a/src/H5timer.c b/src/H5timer.c
index 7065814..c264097 100644
--- a/src/H5timer.c
+++ b/src/H5timer.c
@@ -275,7 +275,7 @@ static herr_t
H5__timer_get_timevals(H5_timevals_t *times /*in,out*/)
{
/* Sanity check */
- HDassert(times);
+ assert(times);
/* Windows call handles both system/user and elapsed times */
#ifdef H5_HAVE_WIN32_API
@@ -375,10 +375,10 @@ herr_t
H5_timer_init(H5_timer_t *timer /*in,out*/)
{
/* Sanity check */
- HDassert(timer);
+ assert(timer);
/* Initialize everything */
- HDmemset(timer, 0, sizeof(H5_timer_t));
+ memset(timer, 0, sizeof(H5_timer_t));
return 0;
} /* end H5_timer_init() */
@@ -400,7 +400,7 @@ herr_t
H5_timer_start(H5_timer_t *timer /*in,out*/)
{
/* Sanity check */
- HDassert(timer);
+ assert(timer);
/* Start the timer
* This sets the "initial" times to the system-defined start times.
@@ -430,7 +430,7 @@ herr_t
H5_timer_stop(H5_timer_t *timer /*in,out*/)
{
/* Sanity check */
- HDassert(timer);
+ assert(timer);
/* Stop the timer */
if (H5__timer_get_timevals(&(timer->final_interval)) < 0)
@@ -481,7 +481,7 @@ herr_t
H5_timer_get_times(H5_timer_t timer, H5_timevals_t *times /*in,out*/)
{
/* Sanity check */
- HDassert(times);
+ assert(times);
if (timer.is_running) {
H5_timevals_t now;
@@ -536,7 +536,7 @@ herr_t
H5_timer_get_total_times(H5_timer_t timer, H5_timevals_t *times /*in,out*/)
{
/* Sanity check */
- HDassert(times);
+ assert(times);
if (timer.is_running) {
H5_timevals_t now;
@@ -617,7 +617,7 @@ H5_timer_get_time_string(double seconds)
} /* end if */
/* Allocate */
- if (NULL == (s = (char *)HDcalloc(H5TIMER_TIME_STRING_LEN, sizeof(char))))
+ if (NULL == (s = (char *)calloc(H5TIMER_TIME_STRING_LEN, sizeof(char))))
return NULL;
/* Do we need a format string? Some people might like a certain
diff --git a/src/H5trace.c b/src/H5trace.c
index 71b66a8..4f91b6b 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -259,13 +259,13 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
if ('a' == type[1]) {
asize_idx = (int)HDstrtol(type + 2, &rest, 10);
- HDassert(0 <= asize_idx && asize_idx < (int)NELMTS(asize));
- HDassert(']' == *rest);
+ assert(0 <= asize_idx && asize_idx < (int)NELMTS(asize));
+ assert(']' == *rest);
type = rest + 1;
}
else {
rest = (char *)HDstrchr(type, ']');
- HDassert(rest);
+ assert(rest);
type = rest + 1;
asize_idx = -1;
}
@@ -278,7 +278,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
* don't print the argument or the following `=' (this is used for
* return values).
*/
- argname = HDva_arg(ap, char *);
+ argname = va_arg(ap, char *);
if (argname)
H5RS_asprintf_cat(rs, "%s%s=", argno ? ", " : "", argname);
else
@@ -286,7 +286,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
/* A pointer/array */
if (ptr) {
- vp = HDva_arg(ap, void *);
+ vp = va_arg(ap, void *);
if (vp) {
switch (type[0]) {
case 'h': /* hsize_t */
@@ -441,7 +441,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[0]) {
case 'a': /* haddr_t */
{
- haddr_t addr = HDva_arg(ap, haddr_t);
+ haddr_t addr = va_arg(ap, haddr_t);
if (H5F_addr_defined(addr))
H5RS_asprintf_cat(rs, "%" PRIuHADDR, addr);
@@ -454,7 +454,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'i': /* H5A_info_t */
{
- H5A_info_t ainfo = HDva_arg(ap, H5A_info_t);
+ H5A_info_t ainfo = va_arg(ap, H5A_info_t);
H5RS_acat(rs, "{");
H5_trace_args_bool(rs, ainfo.corder_valid);
@@ -467,7 +467,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifndef H5_NO_DEPRECATED_SYMBOLS
case 'o': /* H5A_operator1_t */
{
- H5A_operator1_t aop1 = (H5A_operator1_t)HDva_arg(ap, H5A_operator1_t);
+ H5A_operator1_t aop1 = (H5A_operator1_t)va_arg(ap, H5A_operator1_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)aop1);
} /* end block */
@@ -476,7 +476,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'O': /* H5A_operator2_t */
{
- H5A_operator2_t aop2 = (H5A_operator2_t)HDva_arg(ap, H5A_operator2_t);
+ H5A_operator2_t aop2 = (H5A_operator2_t)va_arg(ap, H5A_operator2_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)aop2);
} /* end block */
@@ -490,8 +490,8 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'b': /* hbool_t */
{
- /* Can't pass hbool_t to HDva_arg() */
- hbool_t bool_var = (hbool_t)HDva_arg(ap, int);
+ /* Can't pass hbool_t to va_arg() */
+ hbool_t bool_var = (hbool_t)va_arg(ap, int);
H5_trace_args_bool(rs, bool_var);
} /* end block */
@@ -501,7 +501,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'c': /* H5AC_cache_config_t */
{
- H5AC_cache_config_t cc = HDva_arg(ap, H5AC_cache_config_t);
+ H5AC_cache_config_t cc = va_arg(ap, H5AC_cache_config_t);
H5RS_asprintf_cat(rs, "{%d, ", cc.version);
H5_trace_args_bool(rs, cc.rpt_fcn_enabled);
@@ -586,7 +586,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'C': /* H5AC_cache_image_config_t */
{
- H5AC_cache_image_config_t cic = HDva_arg(ap, H5AC_cache_image_config_t);
+ H5AC_cache_image_config_t cic = va_arg(ap, H5AC_cache_image_config_t);
H5RS_asprintf_cat(rs, "{%d, ", cic.version);
H5_trace_args_bool(rs, cic.generate_image);
@@ -605,7 +605,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'd': /* double */
{
- double dbl = HDva_arg(ap, double);
+ double dbl = va_arg(ap, double);
H5RS_asprintf_cat(rs, "%g", dbl);
} /* end block */
@@ -615,7 +615,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'a': /* H5D_alloc_time_t */
{
- H5D_alloc_time_t alloc_time = (H5D_alloc_time_t)HDva_arg(ap, int);
+ H5D_alloc_time_t alloc_time = (H5D_alloc_time_t)va_arg(ap, int);
switch (alloc_time) {
case H5D_ALLOC_TIME_ERROR:
@@ -647,7 +647,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'A': /* H5D_append_cb_t */
{
- H5D_append_cb_t dapp = (H5D_append_cb_t)HDva_arg(ap, H5D_append_cb_t);
+ H5D_append_cb_t dapp = (H5D_append_cb_t)va_arg(ap, H5D_append_cb_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)dapp);
} /* end block */
@@ -655,7 +655,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'c': /* H5FD_mpio_collective_opt_t */
{
- H5FD_mpio_collective_opt_t opt = (H5FD_mpio_collective_opt_t)HDva_arg(ap, int);
+ H5FD_mpio_collective_opt_t opt = (H5FD_mpio_collective_opt_t)va_arg(ap, int);
switch (opt) {
case H5FD_MPIO_COLLECTIVE_IO:
@@ -676,7 +676,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'C': /* H5D_selection_io_mode_t */
{
H5D_selection_io_mode_t selection_io_mode =
- (H5D_selection_io_mode_t)HDva_arg(ap, int);
+ (H5D_selection_io_mode_t)va_arg(ap, int);
switch (selection_io_mode) {
case H5D_SELECTION_IO_MODE_DEFAULT:
@@ -700,7 +700,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'f': /* H5D_fill_time_t */
{
- H5D_fill_time_t fill_time = (H5D_fill_time_t)HDva_arg(ap, int);
+ H5D_fill_time_t fill_time = (H5D_fill_time_t)va_arg(ap, int);
switch (fill_time) {
case H5D_FILL_TIME_ERROR:
@@ -728,7 +728,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'F': /* H5D_fill_value_t */
{
- H5D_fill_value_t fill_value = (H5D_fill_value_t)HDva_arg(ap, int);
+ H5D_fill_value_t fill_value = (H5D_fill_value_t)va_arg(ap, int);
switch (fill_value) {
case H5D_FILL_VALUE_ERROR:
@@ -756,7 +756,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'g': /* H5D_gather_func_t */
{
- H5D_gather_func_t gop = (H5D_gather_func_t)HDva_arg(ap, H5D_gather_func_t);
+ H5D_gather_func_t gop = (H5D_gather_func_t)va_arg(ap, H5D_gather_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)gop);
} /* end block */
@@ -764,7 +764,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'h': /* H5FD_mpio_chunk_opt_t */
{
- H5FD_mpio_chunk_opt_t opt = (H5FD_mpio_chunk_opt_t)HDva_arg(ap, int);
+ H5FD_mpio_chunk_opt_t opt = (H5FD_mpio_chunk_opt_t)va_arg(ap, int);
switch (opt) {
case H5FD_MPIO_CHUNK_DEFAULT:
@@ -789,7 +789,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'i': /* H5D_mpio_actual_io_mode_t */
{
H5D_mpio_actual_io_mode_t actual_io_mode =
- (H5D_mpio_actual_io_mode_t)HDva_arg(ap, int);
+ (H5D_mpio_actual_io_mode_t)va_arg(ap, int);
switch (actual_io_mode) {
case H5D_MPIO_NO_COLLECTIVE:
@@ -821,7 +821,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'I': /* H5FD_file_image_callbacks_t */
{
- H5FD_file_image_callbacks_t ficb = HDva_arg(ap, H5FD_file_image_callbacks_t);
+ H5FD_file_image_callbacks_t ficb = va_arg(ap, H5FD_file_image_callbacks_t);
H5RS_asprintf_cat(rs, "{%p, ", (void *)(uintptr_t)ficb.image_malloc);
H5RS_asprintf_cat(rs, "%p, ", (void *)(uintptr_t)ficb.image_memcpy);
@@ -835,7 +835,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'k': /* H5D_chunk_index_t */
{
- H5D_chunk_index_t idx = (H5D_chunk_index_t)HDva_arg(ap, int);
+ H5D_chunk_index_t idx = (H5D_chunk_index_t)va_arg(ap, int);
switch (idx) {
case H5D_CHUNK_IDX_BTREE:
@@ -875,7 +875,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'l': /* H5D_layout_t */
{
- H5D_layout_t layout = (H5D_layout_t)HDva_arg(ap, int);
+ H5D_layout_t layout = (H5D_layout_t)va_arg(ap, int);
switch (layout) {
case H5D_LAYOUT_ERROR:
@@ -912,7 +912,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'n': /* H5D_mpio_no_collective_cause_t */
{
H5D_mpio_no_collective_cause_t nocol_cause_mode =
- (H5D_mpio_no_collective_cause_t)HDva_arg(ap, int);
+ (H5D_mpio_no_collective_cause_t)va_arg(ap, int);
hbool_t flag_already_displayed = FALSE;
/* Check for all bit-flags which might be set */
@@ -960,7 +960,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* H5D_mpio_actual_chunk_opt_mode_t */
{
H5D_mpio_actual_chunk_opt_mode_t chunk_opt_mode =
- (H5D_mpio_actual_chunk_opt_mode_t)HDva_arg(ap, int);
+ (H5D_mpio_actual_chunk_opt_mode_t)va_arg(ap, int);
switch (chunk_opt_mode) {
case H5D_MPIO_NO_CHUNK_OPTIMIZATION:
@@ -984,7 +984,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'O': /* H5D_operator_t */
{
- H5D_operator_t dop = (H5D_operator_t)HDva_arg(ap, H5D_operator_t);
+ H5D_operator_t dop = (H5D_operator_t)va_arg(ap, H5D_operator_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)dop);
} /* end block */
@@ -992,7 +992,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5D_space_status_t */
{
- H5D_space_status_t space_status = (H5D_space_status_t)HDva_arg(ap, int);
+ H5D_space_status_t space_status = (H5D_space_status_t)va_arg(ap, int);
switch (space_status) {
case H5D_SPACE_STATUS_NOT_ALLOCATED:
@@ -1020,7 +1020,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'S': /* H5D_scatter_func_t */
{
- H5D_scatter_func_t sop = (H5D_scatter_func_t)HDva_arg(ap, H5D_scatter_func_t);
+ H5D_scatter_func_t sop = (H5D_scatter_func_t)va_arg(ap, H5D_scatter_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)sop);
} /* end block */
@@ -1028,7 +1028,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5FD_mpio_xfer_t */
{
- H5FD_mpio_xfer_t transfer = (H5FD_mpio_xfer_t)HDva_arg(ap, int);
+ H5FD_mpio_xfer_t transfer = (H5FD_mpio_xfer_t)va_arg(ap, int);
switch (transfer) {
case H5FD_MPIO_INDEPENDENT:
@@ -1048,7 +1048,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'v': /* H5D_vds_view_t */
{
- H5D_vds_view_t view = (H5D_vds_view_t)HDva_arg(ap, int);
+ H5D_vds_view_t view = (H5D_vds_view_t)va_arg(ap, int);
switch (view) {
case H5D_VDS_ERROR:
@@ -1072,8 +1072,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'V': /* H5FD_class_value_t */
{
- H5FD_class_value_t class_val =
- (H5FD_class_value_t)HDva_arg(ap, H5FD_class_value_t);
+ H5FD_class_value_t class_val = (H5FD_class_value_t)va_arg(ap, H5FD_class_value_t);
switch (class_val) {
case H5_VFD_INVALID:
@@ -1145,7 +1144,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'e': /* herr_t */
{
- herr_t status = HDva_arg(ap, herr_t);
+ herr_t status = va_arg(ap, herr_t);
if (status >= 0)
H5RS_acat(rs, "SUCCEED");
@@ -1159,7 +1158,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifndef H5_NO_DEPRECATED_SYMBOLS
case 'a': /* H5E_auto1_t */
{
- H5E_auto1_t eauto1 = (H5E_auto1_t)HDva_arg(ap, H5E_auto1_t);
+ H5E_auto1_t eauto1 = (H5E_auto1_t)va_arg(ap, H5E_auto1_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)eauto1);
} /* end block */
@@ -1168,7 +1167,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'A': /* H5E_auto2_t */
{
- H5E_auto2_t eauto2 = (H5E_auto2_t)HDva_arg(ap, H5E_auto2_t);
+ H5E_auto2_t eauto2 = (H5E_auto2_t)va_arg(ap, H5E_auto2_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)eauto2);
} /* end block */
@@ -1177,7 +1176,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'C': /* H5ES_event_complete_func_t */
{
H5ES_event_complete_func_t cfunc =
- (H5ES_event_complete_func_t)HDva_arg(ap, H5ES_event_complete_func_t);
+ (H5ES_event_complete_func_t)va_arg(ap, H5ES_event_complete_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)cfunc);
} /* end block */
@@ -1185,7 +1184,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'd': /* H5E_direction_t */
{
- H5E_direction_t direction = (H5E_direction_t)HDva_arg(ap, int);
+ H5E_direction_t direction = (H5E_direction_t)va_arg(ap, int);
switch (direction) {
case H5E_WALK_UPWARD:
@@ -1205,7 +1204,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'e': /* H5E_error_t */
{
- H5E_error2_t *error = HDva_arg(ap, H5E_error2_t *);
+ H5E_error2_t *error = va_arg(ap, H5E_error2_t *);
H5RS_asprintf_cat(rs, "%p", (void *)error);
} /* end block */
@@ -1214,7 +1213,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'I': /* H5ES_event_insert_func_t */
{
H5ES_event_insert_func_t ifunc =
- (H5ES_event_insert_func_t)HDva_arg(ap, H5ES_event_insert_func_t);
+ (H5ES_event_insert_func_t)va_arg(ap, H5ES_event_insert_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)ifunc);
} /* end block */
@@ -1222,7 +1221,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5ES_status_t */
{
- H5ES_status_t status = (H5ES_status_t)HDva_arg(ap, int);
+ H5ES_status_t status = (H5ES_status_t)va_arg(ap, int);
switch (status) {
case H5ES_STATUS_IN_PROGRESS:
@@ -1250,7 +1249,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5E_type_t */
{
- H5E_type_t etype = (H5E_type_t)HDva_arg(ap, int);
+ H5E_type_t etype = (H5E_type_t)va_arg(ap, int);
switch (etype) {
case H5E_MAJOR:
@@ -1278,7 +1277,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'C': /* H5FD_class_t */
{
- H5FD_class_t cls = HDva_arg(ap, H5FD_class_t);
+ H5FD_class_t cls = va_arg(ap, H5FD_class_t);
H5RS_asprintf_cat(rs, "{'%s', %" PRIuHADDR ", ", cls.name, cls.maxaddr);
H5_trace_args_close_degree(rs, cls.fc_degree);
@@ -1288,7 +1287,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'd': /* H5F_close_degree_t */
{
- H5F_close_degree_t degree = (H5F_close_degree_t)HDva_arg(ap, int);
+ H5F_close_degree_t degree = (H5F_close_degree_t)va_arg(ap, int);
H5_trace_args_close_degree(rs, degree);
} /* end block */
@@ -1296,7 +1295,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'f': /* H5F_fspace_strategy_t */
{
- H5F_fspace_strategy_t fs_strategy = (H5F_fspace_strategy_t)HDva_arg(ap, int);
+ H5F_fspace_strategy_t fs_strategy = (H5F_fspace_strategy_t)va_arg(ap, int);
switch (fs_strategy) {
case H5F_FSPACE_STRATEGY_FSM_AGGR:
@@ -1325,7 +1324,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'F': /* H5F_flush_cb_t */
{
- H5F_flush_cb_t fflsh = (H5F_flush_cb_t)HDva_arg(ap, H5F_flush_cb_t);
+ H5F_flush_cb_t fflsh = (H5F_flush_cb_t)va_arg(ap, H5F_flush_cb_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)fflsh);
} /* end block */
@@ -1333,7 +1332,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'I': /* H5F_info2_t */
{
- H5F_info2_t fi2 = HDva_arg(ap, H5F_info2_t);
+ H5F_info2_t fi2 = va_arg(ap, H5F_info2_t);
H5RS_asprintf_cat(rs, "{{%u, %" PRIuHSIZE ", %" PRIuHSIZE "}, ",
fi2.super.version, fi2.super.super_size,
@@ -1348,7 +1347,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'm': /* H5F_mem_t */
{
- H5F_mem_t mem_type = (H5F_mem_t)HDva_arg(ap, int);
+ H5F_mem_t mem_type = (H5F_mem_t)va_arg(ap, int);
switch (mem_type) {
case H5FD_MEM_NOLIST:
@@ -1393,7 +1392,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5F_scope_t */
{
- H5F_scope_t scope = (H5F_scope_t)HDva_arg(ap, int);
+ H5F_scope_t scope = (H5F_scope_t)va_arg(ap, int);
switch (scope) {
case H5F_SCOPE_LOCAL:
@@ -1413,7 +1412,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5F_file_space_type_t */
{
- H5F_file_space_type_t fspace_type = (H5F_file_space_type_t)HDva_arg(ap, int);
+ H5F_file_space_type_t fspace_type = (H5F_file_space_type_t)va_arg(ap, int);
switch (fspace_type) {
case H5F_FILE_SPACE_DEFAULT:
@@ -1446,7 +1445,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'v': /* H5F_libver_t */
{
- H5F_libver_t libver_vers = (H5F_libver_t)HDva_arg(ap, int);
+ H5F_libver_t libver_vers = (H5F_libver_t)va_arg(ap, int);
switch (libver_vers) {
case H5F_LIBVER_EARLIEST:
@@ -1490,7 +1489,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifndef H5_NO_DEPRECATED_SYMBOLS
case 'i': /* H5G_iterate_t */
{
- H5G_iterate_t git = (H5G_iterate_t)HDva_arg(ap, H5G_iterate_t);
+ H5G_iterate_t git = (H5G_iterate_t)va_arg(ap, H5G_iterate_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)git);
} /* end block */
@@ -1498,7 +1497,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* H5G_obj_t */
{
- H5G_obj_t obj_type = (H5G_obj_t)HDva_arg(ap, int);
+ H5G_obj_t obj_type = (H5G_obj_t)va_arg(ap, int);
switch (obj_type) {
case H5G_UNKNOWN:
@@ -1540,7 +1539,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5G_stat_t */
{
- H5G_stat_t *statbuf = HDva_arg(ap, H5G_stat_t *);
+ H5G_stat_t *statbuf = va_arg(ap, H5G_stat_t *);
H5RS_asprintf_cat(rs, "%p", (void *)statbuf);
} /* end block */
@@ -1555,7 +1554,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'h': /* hsize_t */
{
- hsize_t hsize = HDva_arg(ap, hsize_t);
+ hsize_t hsize = va_arg(ap, hsize_t);
if (H5S_UNLIMITED == hsize)
H5RS_acat(rs, "H5S_UNLIMITED");
@@ -1570,7 +1569,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'c': /* H5_atclose_func_t */
{
- H5_atclose_func_t cfunc = (H5_atclose_func_t)HDva_arg(ap, H5_atclose_func_t);
+ H5_atclose_func_t cfunc = (H5_atclose_func_t)va_arg(ap, H5_atclose_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)cfunc);
} /* end block */
@@ -1578,7 +1577,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* hssize_t */
{
- hssize_t hssize = HDva_arg(ap, hssize_t);
+ hssize_t hssize = va_arg(ap, hssize_t);
H5RS_asprintf_cat(rs, "%" PRIdHSIZE, hssize);
asize[argno] = (hssize_t)hssize;
@@ -1593,7 +1592,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'i': /* hid_t (and H5E_major_t / H5E_minor_t) */
{
- hid_t obj = HDva_arg(ap, hid_t);
+ hid_t obj = va_arg(ap, hid_t);
if (H5P_DEFAULT == obj)
H5RS_acat(rs, "H5P_DEFAULT");
@@ -1787,7 +1786,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'D': /* H5I_future_discard_func_t */
{
H5I_future_discard_func_t ifdisc =
- (H5I_future_discard_func_t)HDva_arg(ap, H5I_future_discard_func_t);
+ (H5I_future_discard_func_t)va_arg(ap, H5I_future_discard_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)ifdisc);
} /* end block */
@@ -1795,7 +1794,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'f': /* H5I_free_t */
{
- H5I_free_t ifree = (H5I_free_t)HDva_arg(ap, H5I_free_t);
+ H5I_free_t ifree = (H5I_free_t)va_arg(ap, H5I_free_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)ifree);
} /* end block */
@@ -1803,7 +1802,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'i': /* H5_index_t */
{
- H5_index_t idx_type = (H5_index_t)HDva_arg(ap, int);
+ H5_index_t idx_type = (H5_index_t)va_arg(ap, int);
switch (idx_type) {
case H5_INDEX_UNKNOWN:
@@ -1831,7 +1830,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'I': /* H5I_iterate_func_t */
{
- H5I_iterate_func_t iiter = (H5I_iterate_func_t)HDva_arg(ap, H5I_iterate_func_t);
+ H5I_iterate_func_t iiter = (H5I_iterate_func_t)va_arg(ap, H5I_iterate_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)iiter);
} /* end block */
@@ -1839,7 +1838,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* H5_iter_order_t */
{
- H5_iter_order_t order = (H5_iter_order_t)HDva_arg(ap, int);
+ H5_iter_order_t order = (H5_iter_order_t)va_arg(ap, int);
switch (order) {
case H5_ITER_UNKNOWN:
@@ -1872,7 +1871,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'R': /* H5I_future_realize_func_t */
{
H5I_future_realize_func_t ifreal =
- (H5I_future_realize_func_t)HDva_arg(ap, H5I_future_realize_func_t);
+ (H5I_future_realize_func_t)va_arg(ap, H5I_future_realize_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)ifreal);
} /* end block */
@@ -1880,7 +1879,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* int / int32_t */
{
- int is = HDva_arg(ap, int);
+ int is = va_arg(ap, int);
H5RS_asprintf_cat(rs, "%d", is);
asize[argno] = is;
@@ -1889,7 +1888,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'S': /* H5I_search_func_t */
{
- H5I_search_func_t isearch = (H5I_search_func_t)HDva_arg(ap, H5I_search_func_t);
+ H5I_search_func_t isearch = (H5I_search_func_t)va_arg(ap, H5I_search_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)isearch);
} /* end block */
@@ -1897,7 +1896,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5I_type_t */
{
- H5I_type_t id_type = (H5I_type_t)HDva_arg(ap, int);
+ H5I_type_t id_type = (H5I_type_t)va_arg(ap, int);
switch (id_type) {
case H5I_UNINIT:
@@ -1985,7 +1984,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'u': /* unsigned / uint32_t */
{
- unsigned iu = HDva_arg(ap, unsigned);
+ unsigned iu = va_arg(ap, unsigned);
H5RS_asprintf_cat(rs, "%u", iu);
asize[argno] = iu;
@@ -2000,7 +1999,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'k': /* H5O_token_t */
{
- H5O_token_t token = HDva_arg(ap, H5O_token_t);
+ H5O_token_t token = va_arg(ap, H5O_token_t);
int j;
for (j = 0; j < H5O_MAX_TOKEN_SIZE; j++)
@@ -2013,7 +2012,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifndef H5_NO_DEPRECATED_SYMBOLS
case 'i': /* H5L_iterate1_t */
{
- H5L_iterate1_t liter = (H5L_iterate1_t)HDva_arg(ap, H5L_iterate1_t);
+ H5L_iterate1_t liter = (H5L_iterate1_t)va_arg(ap, H5L_iterate1_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)liter);
} /* end block */
@@ -2022,7 +2021,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'I': /* H5L_iterate2_t */
{
- H5L_iterate2_t liter = (H5L_iterate2_t)HDva_arg(ap, H5L_iterate2_t);
+ H5L_iterate2_t liter = (H5L_iterate2_t)va_arg(ap, H5L_iterate2_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)liter);
} /* end block */
@@ -2030,7 +2029,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'l': /* H5L_type_t (or H5G_link_t) */
{
- H5L_type_t link_type = (H5L_type_t)HDva_arg(ap, int);
+ H5L_type_t link_type = (H5L_type_t)va_arg(ap, int);
switch (link_type) {
case H5L_TYPE_ERROR:
@@ -2062,8 +2061,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5L_elink_traverse_t */
{
- H5L_elink_traverse_t elt =
- (H5L_elink_traverse_t)HDva_arg(ap, H5L_elink_traverse_t);
+ H5L_elink_traverse_t elt = (H5L_elink_traverse_t)va_arg(ap, H5L_elink_traverse_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)elt);
} /* end block */
@@ -2079,7 +2077,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'a': /* H5MM_allocate_t */
{
- H5MM_allocate_t afunc = (H5MM_allocate_t)HDva_arg(ap, H5MM_allocate_t);
+ H5MM_allocate_t afunc = (H5MM_allocate_t)va_arg(ap, H5MM_allocate_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)afunc);
} /* end block */
@@ -2088,7 +2086,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifdef H5_HAVE_PARALLEL
case 'c': /* MPI_Comm */
{
- MPI_Comm comm = HDva_arg(ap, MPI_Comm);
+ MPI_Comm comm = va_arg(ap, MPI_Comm);
H5RS_asprintf_cat(rs, "%ld", (long)comm);
} /* end block */
@@ -2097,7 +2095,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'f': /* H5MM_free_t */
{
- H5MM_free_t ffunc = (H5MM_free_t)HDva_arg(ap, H5MM_free_t);
+ H5MM_free_t ffunc = (H5MM_free_t)va_arg(ap, H5MM_free_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)ffunc);
} /* end block */
@@ -2106,7 +2104,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifdef H5_HAVE_PARALLEL
case 'i': /* MPI_Info */
{
- MPI_Info info = HDva_arg(ap, MPI_Info);
+ MPI_Info info = va_arg(ap, MPI_Info);
H5RS_asprintf_cat(rs, "%ld", (long)info);
} /* end block */
@@ -2116,7 +2114,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifdef H5_HAVE_MAP_API
case 'I': /* H5M_iterate_t */
{
- H5M_iterate_t miter = (H5M_iterate_t)HDva_arg(ap, H5M_iterate_t);
+ H5M_iterate_t miter = (H5M_iterate_t)va_arg(ap, H5M_iterate_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)miter);
} /* end block */
@@ -2125,7 +2123,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5FD_mem_t */
{
- H5FD_mem_t mt = (H5FD_mem_t)HDva_arg(ap, int);
+ H5FD_mem_t mt = (H5FD_mem_t)va_arg(ap, int);
switch (mt) {
case H5FD_MEM_NOLIST:
@@ -2178,7 +2176,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* off_t */
{
- off_t offset = HDva_arg(ap, off_t);
+ off_t offset = va_arg(ap, off_t);
H5RS_asprintf_cat(rs, "%ld", (long)offset);
} /* end block */
@@ -2189,7 +2187,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
#ifndef H5_NO_DEPRECATED_SYMBOLS
case 'i': /* H5O_iterate1_t */
{
- H5O_iterate1_t oiter = (H5O_iterate1_t)HDva_arg(ap, H5O_iterate1_t);
+ H5O_iterate1_t oiter = (H5O_iterate1_t)va_arg(ap, H5O_iterate1_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)oiter);
} /* end block */
@@ -2198,7 +2196,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'I': /* H5O_iterate2_t */
{
- H5O_iterate2_t oiter2 = (H5O_iterate2_t)HDva_arg(ap, H5O_iterate2_t);
+ H5O_iterate2_t oiter2 = (H5O_iterate2_t)va_arg(ap, H5O_iterate2_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)oiter2);
} /* end block */
@@ -2207,7 +2205,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5O_mcdt_search_cb_t */
{
H5O_mcdt_search_cb_t osrch =
- (H5O_mcdt_search_cb_t)HDva_arg(ap, H5O_mcdt_search_cb_t);
+ (H5O_mcdt_search_cb_t)va_arg(ap, H5O_mcdt_search_cb_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)osrch);
} /* end block */
@@ -2215,7 +2213,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5O_type_t */
{
- H5O_type_t objtype = (H5O_type_t)HDva_arg(ap, int);
+ H5O_type_t objtype = (H5O_type_t)va_arg(ap, int);
switch (objtype) {
case H5O_TYPE_UNKNOWN:
@@ -2257,7 +2255,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'p': /* H5P_class_t */
{
- hid_t pclass_id = HDva_arg(ap, hid_t);
+ hid_t pclass_id = va_arg(ap, hid_t);
char *class_name = NULL;
H5P_genclass_t *pclass;
@@ -2278,7 +2276,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'c': /* H5P_cls_create_func_t */
{
H5P_cls_create_func_t pcls_crt =
- (H5P_cls_create_func_t)HDva_arg(ap, H5P_cls_create_func_t);
+ (H5P_cls_create_func_t)va_arg(ap, H5P_cls_create_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)pcls_crt);
} /* end block */
@@ -2287,7 +2285,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'C': /* H5P_prp_create_func_t */
{
H5P_prp_create_func_t prp_crt =
- (H5P_prp_create_func_t)HDva_arg(ap, H5P_prp_create_func_t);
+ (H5P_prp_create_func_t)va_arg(ap, H5P_prp_create_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_crt);
} /* end block */
@@ -2296,7 +2294,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'D': /* H5P_prp_delete_func_t */
{
H5P_prp_delete_func_t prp_del =
- (H5P_prp_delete_func_t)HDva_arg(ap, H5P_prp_delete_func_t);
+ (H5P_prp_delete_func_t)va_arg(ap, H5P_prp_delete_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_del);
} /* end block */
@@ -2304,7 +2302,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'G': /* H5P_prp_get_func_t */
{
- H5P_prp_get_func_t prp_get = (H5P_prp_get_func_t)HDva_arg(ap, H5P_prp_get_func_t);
+ H5P_prp_get_func_t prp_get = (H5P_prp_get_func_t)va_arg(ap, H5P_prp_get_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_get);
} /* end block */
@@ -2312,7 +2310,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'i': /* H5P_iterate_t */
{
- H5P_iterate_t piter = (H5P_iterate_t)HDva_arg(ap, H5P_iterate_t);
+ H5P_iterate_t piter = (H5P_iterate_t)va_arg(ap, H5P_iterate_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)piter);
} /* end block */
@@ -2321,7 +2319,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'l': /* H5P_cls_close_func_t */
{
H5P_cls_close_func_t pcls_cls =
- (H5P_cls_close_func_t)HDva_arg(ap, H5P_cls_close_func_t);
+ (H5P_cls_close_func_t)va_arg(ap, H5P_cls_close_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)pcls_cls);
} /* end block */
@@ -2330,7 +2328,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'L': /* H5P_prp_close_func_t */
{
H5P_prp_close_func_t prp_cls =
- (H5P_prp_close_func_t)HDva_arg(ap, H5P_prp_close_func_t);
+ (H5P_prp_close_func_t)va_arg(ap, H5P_prp_close_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_cls);
} /* end block */
@@ -2339,7 +2337,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'M': /* H5P_prp_compare_func_t */
{
H5P_prp_compare_func_t prp_cmp =
- (H5P_prp_compare_func_t)HDva_arg(ap, H5P_prp_compare_func_t);
+ (H5P_prp_compare_func_t)va_arg(ap, H5P_prp_compare_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_cmp);
} /* end block */
@@ -2348,7 +2346,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* H5P_cls_copy_func_t */
{
H5P_cls_copy_func_t pcls_cpy =
- (H5P_cls_copy_func_t)HDva_arg(ap, H5P_cls_copy_func_t);
+ (H5P_cls_copy_func_t)va_arg(ap, H5P_cls_copy_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)pcls_cpy);
} /* end block */
@@ -2357,7 +2355,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'O': /* H5P_prp_copy_func_t */
{
H5P_prp_copy_func_t prp_cpy =
- (H5P_prp_copy_func_t)HDva_arg(ap, H5P_prp_copy_func_t);
+ (H5P_prp_copy_func_t)va_arg(ap, H5P_prp_copy_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_cpy);
} /* end block */
@@ -2365,7 +2363,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'S': /* H5P_prp_set_func_t */
{
- H5P_prp_set_func_t prp_set = (H5P_prp_set_func_t)HDva_arg(ap, H5P_prp_set_func_t);
+ H5P_prp_set_func_t prp_set = (H5P_prp_set_func_t)va_arg(ap, H5P_prp_set_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)prp_set);
} /* end block */
@@ -2389,7 +2387,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* hobj_ref_t */
{
- hobj_ref_t ref = HDva_arg(ap, hobj_ref_t);
+ hobj_ref_t ref = va_arg(ap, hobj_ref_t);
H5RS_asprintf_cat(rs, "Reference Object=%" PRIuHADDR, ref);
} /* end block */
@@ -2405,7 +2403,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5R_type_t */
{
- H5R_type_t reftype = (H5R_type_t)HDva_arg(ap, int);
+ H5R_type_t reftype = (H5R_type_t)va_arg(ap, int);
switch (reftype) {
case H5R_BADTYPE:
@@ -2453,7 +2451,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'c': /* H5S_class_t */
{
- H5S_class_t cls = (H5S_class_t)HDva_arg(ap, int);
+ H5S_class_t cls = (H5S_class_t)va_arg(ap, int);
switch (cls) {
case H5S_NO_CLASS:
@@ -2481,7 +2479,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5S_seloper_t */
{
- H5S_seloper_t so = (H5S_seloper_t)HDva_arg(ap, int);
+ H5S_seloper_t so = (H5S_seloper_t)va_arg(ap, int);
switch (so) {
case H5S_SELECT_NOOP:
@@ -2533,7 +2531,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5S_sel_type */
{
- H5S_sel_type st = (H5S_sel_type)HDva_arg(ap, int);
+ H5S_sel_type st = (H5S_sel_type)va_arg(ap, int);
switch (st) {
case H5S_SEL_ERROR:
@@ -2575,7 +2573,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* htri_t */
{
- htri_t tri_var = HDva_arg(ap, htri_t);
+ htri_t tri_var = va_arg(ap, htri_t);
if (tri_var > 0)
H5RS_acat(rs, "TRUE");
@@ -2590,7 +2588,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'c': /* H5T_cset_t */
{
- H5T_cset_t cset = (H5T_cset_t)HDva_arg(ap, int);
+ H5T_cset_t cset = (H5T_cset_t)va_arg(ap, int);
H5_trace_args_cset(rs, cset);
} /* end block */
@@ -2598,7 +2596,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'C': /* H5T_conv_t */
{
- H5T_conv_t tconv = (H5T_conv_t)HDva_arg(ap, H5T_conv_t);
+ H5T_conv_t tconv = (H5T_conv_t)va_arg(ap, H5T_conv_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)tconv);
} /* end block */
@@ -2606,7 +2604,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'd': /* H5T_direction_t */
{
- H5T_direction_t direct = (H5T_direction_t)HDva_arg(ap, int);
+ H5T_direction_t direct = (H5T_direction_t)va_arg(ap, int);
switch (direct) {
case H5T_DIR_DEFAULT:
@@ -2630,7 +2628,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'e': /* H5T_pers_t */
{
- H5T_pers_t pers = (H5T_pers_t)HDva_arg(ap, int);
+ H5T_pers_t pers = (H5T_pers_t)va_arg(ap, int);
switch (pers) {
case H5T_PERS_DONTCARE:
@@ -2655,7 +2653,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'E': /* H5T_conv_except_func_t */
{
H5T_conv_except_func_t conv_ex =
- (H5T_conv_except_func_t)HDva_arg(ap, H5T_conv_except_func_t);
+ (H5T_conv_except_func_t)va_arg(ap, H5T_conv_except_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)conv_ex);
} /* end block */
@@ -2663,7 +2661,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'n': /* H5T_norm_t */
{
- H5T_norm_t norm = (H5T_norm_t)HDva_arg(ap, int);
+ H5T_norm_t norm = (H5T_norm_t)va_arg(ap, int);
switch (norm) {
case H5T_NORM_ERROR:
@@ -2691,7 +2689,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* H5T_order_t */
{
- H5T_order_t order = (H5T_order_t)HDva_arg(ap, int);
+ H5T_order_t order = (H5T_order_t)va_arg(ap, int);
switch (order) {
case H5T_ORDER_ERROR:
@@ -2727,7 +2725,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'p': /* H5T_pad_t */
{
- H5T_pad_t pad = (H5T_pad_t)HDva_arg(ap, int);
+ H5T_pad_t pad = (H5T_pad_t)va_arg(ap, int);
switch (pad) {
case H5T_PAD_ERROR:
@@ -2759,7 +2757,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5T_sign_t */
{
- H5T_sign_t sign = (H5T_sign_t)HDva_arg(ap, int);
+ H5T_sign_t sign = (H5T_sign_t)va_arg(ap, int);
switch (sign) {
case H5T_SGN_ERROR:
@@ -2787,7 +2785,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5T_class_t */
{
- H5T_class_t type_class = (H5T_class_t)HDva_arg(ap, int);
+ H5T_class_t type_class = (H5T_class_t)va_arg(ap, int);
switch (type_class) {
case H5T_NO_CLASS:
@@ -2851,7 +2849,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'z': /* H5T_str_t */
{
- H5T_str_t str = (H5T_str_t)HDva_arg(ap, int);
+ H5T_str_t str = (H5T_str_t)va_arg(ap, int);
switch (str) {
case H5T_STR_ERROR:
@@ -2903,7 +2901,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'l': /* unsigned long */
{
- unsigned long iul = HDva_arg(ap, unsigned long);
+ unsigned long iul = va_arg(ap, unsigned long);
H5RS_asprintf_cat(rs, "%lu", iul);
asize[argno] = (hssize_t)iul;
@@ -2912,7 +2910,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'L': /* unsigned long long / uint64_t */
{
- unsigned long long iull = HDva_arg(ap, unsigned long long);
+ unsigned long long iull = va_arg(ap, unsigned long long);
H5RS_asprintf_cat(rs, "%llu", iull);
asize[argno] = (hssize_t)iull;
@@ -2929,7 +2927,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'a': /* H5VL_attr_get_t */
{
- H5VL_attr_get_t get = (H5VL_attr_get_t)HDva_arg(ap, int);
+ H5VL_attr_get_t get = (H5VL_attr_get_t)va_arg(ap, int);
switch (get) {
case H5VL_ATTR_GET_SPACE:
@@ -2965,7 +2963,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'A': /* H5VL_blob_optional_t */
{
- H5VL_blob_optional_t optional = (H5VL_blob_optional_t)HDva_arg(ap, int);
+ H5VL_blob_optional_t optional = (H5VL_blob_optional_t)va_arg(ap, int);
H5RS_asprintf_cat(rs, "%ld", (long)optional);
} /* end block */
@@ -2973,7 +2971,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'b': /* H5VL_attr_specific_t */
{
- H5VL_attr_specific_t specific = (H5VL_attr_specific_t)HDva_arg(ap, int);
+ H5VL_attr_specific_t specific = (H5VL_attr_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_ATTR_DELETE:
@@ -3005,7 +3003,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'B': /* H5VL_blob_specific_t */
{
- H5VL_blob_specific_t specific = (H5VL_blob_specific_t)HDva_arg(ap, int);
+ H5VL_blob_specific_t specific = (H5VL_blob_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_BLOB_DELETE:
@@ -3029,7 +3027,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'c': /* H5VL_dataset_get_t */
{
- H5VL_dataset_get_t get = (H5VL_dataset_get_t)HDva_arg(ap, int);
+ H5VL_dataset_get_t get = (H5VL_dataset_get_t)va_arg(ap, int);
switch (get) {
case H5VL_DATASET_GET_SPACE:
@@ -3065,8 +3063,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'C': /* H5VL_class_value_t */
{
- H5VL_class_value_t class_val =
- (H5VL_class_value_t)HDva_arg(ap, H5VL_class_value_t);
+ H5VL_class_value_t class_val = (H5VL_class_value_t)va_arg(ap, H5VL_class_value_t);
if (H5_VOL_NATIVE == class_val)
H5RS_acat(rs, "H5_VOL_NATIVE");
@@ -3077,7 +3074,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'd': /* H5VL_dataset_specific_t */
{
- H5VL_dataset_specific_t specific = (H5VL_dataset_specific_t)HDva_arg(ap, int);
+ H5VL_dataset_specific_t specific = (H5VL_dataset_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_DATASET_SET_EXTENT:
@@ -3101,7 +3098,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'e': /* H5VL_datatype_get_t */
{
- H5VL_datatype_get_t get = (H5VL_datatype_get_t)HDva_arg(ap, int);
+ H5VL_datatype_get_t get = (H5VL_datatype_get_t)va_arg(ap, int);
switch (get) {
case H5VL_DATATYPE_GET_BINARY_SIZE:
@@ -3125,7 +3122,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'f': /* H5VL_datatype_specific_t */
{
- H5VL_datatype_specific_t specific = (H5VL_datatype_specific_t)HDva_arg(ap, int);
+ H5VL_datatype_specific_t specific = (H5VL_datatype_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_DATATYPE_FLUSH:
@@ -3145,7 +3142,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'g': /* H5VL_file_get_t */
{
- H5VL_file_get_t get = (H5VL_file_get_t)HDva_arg(ap, int);
+ H5VL_file_get_t get = (H5VL_file_get_t)va_arg(ap, int);
switch (get) {
case H5VL_FILE_GET_CONT_INFO:
@@ -3189,7 +3186,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'h': /* H5VL_file_specific_t */
{
- H5VL_file_specific_t specific = (H5VL_file_specific_t)HDva_arg(ap, int);
+ H5VL_file_specific_t specific = (H5VL_file_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_FILE_FLUSH:
@@ -3221,7 +3218,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'i': /* H5VL_group_get_t */
{
- H5VL_group_get_t get = (H5VL_group_get_t)HDva_arg(ap, int);
+ H5VL_group_get_t get = (H5VL_group_get_t)va_arg(ap, int);
switch (get) {
case H5VL_GROUP_GET_GCPL:
@@ -3241,7 +3238,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'j': /* H5VL_group_specific_t */
{
- H5VL_group_specific_t specific = (H5VL_group_specific_t)HDva_arg(ap, int);
+ H5VL_group_specific_t specific = (H5VL_group_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_GROUP_MOUNT:
@@ -3269,7 +3266,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'k': /* H5VL_link_create_t */
{
- H5VL_link_create_t create = (H5VL_link_create_t)HDva_arg(ap, int);
+ H5VL_link_create_t create = (H5VL_link_create_t)va_arg(ap, int);
switch (create) {
case H5VL_LINK_CREATE_HARD:
@@ -3293,7 +3290,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'l': /* H5VL_link_get_t */
{
- H5VL_link_get_t get = (H5VL_link_get_t)HDva_arg(ap, int);
+ H5VL_link_get_t get = (H5VL_link_get_t)va_arg(ap, int);
switch (get) {
case H5VL_LINK_GET_INFO:
@@ -3317,7 +3314,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'L': /* H5VL_get_conn_lvl_t */
{
- H5VL_get_conn_lvl_t get = (H5VL_get_conn_lvl_t)HDva_arg(ap, int);
+ H5VL_get_conn_lvl_t get = (H5VL_get_conn_lvl_t)va_arg(ap, int);
switch (get) {
case H5VL_GET_CONN_LVL_CURR:
@@ -3337,7 +3334,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'm': /* H5VL_link_specific_t */
{
- H5VL_link_specific_t specific = (H5VL_link_specific_t)HDva_arg(ap, int);
+ H5VL_link_specific_t specific = (H5VL_link_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_LINK_DELETE:
@@ -3361,7 +3358,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'n': /* H5VL_object_get_t */
{
- H5VL_object_get_t get = (H5VL_object_get_t)HDva_arg(ap, int);
+ H5VL_object_get_t get = (H5VL_object_get_t)va_arg(ap, int);
switch (get) {
case H5VL_OBJECT_GET_FILE:
@@ -3390,7 +3387,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'N': /* H5VL_request_notify_t */
{
H5VL_request_notify_t vlrnot =
- (H5VL_request_notify_t)HDva_arg(ap, H5VL_request_notify_t);
+ (H5VL_request_notify_t)va_arg(ap, H5VL_request_notify_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)vlrnot);
} /* end block */
@@ -3398,7 +3395,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'o': /* H5VL_object_specific_t */
{
- H5VL_object_specific_t specific = (H5VL_object_specific_t)HDva_arg(ap, int);
+ H5VL_object_specific_t specific = (H5VL_object_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_OBJECT_CHANGE_REF_COUNT:
@@ -3434,7 +3431,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'r': /* H5VL_request_specific_t */
{
- H5VL_request_specific_t specific = (H5VL_request_specific_t)HDva_arg(ap, int);
+ H5VL_request_specific_t specific = (H5VL_request_specific_t)va_arg(ap, int);
switch (specific) {
case H5VL_REQUEST_GET_ERR_STACK:
@@ -3454,7 +3451,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 's': /* H5VL_attr_optional_t */
{
- H5VL_attr_optional_t optional = (H5VL_attr_optional_t)HDva_arg(ap, int);
+ H5VL_attr_optional_t optional = (H5VL_attr_optional_t)va_arg(ap, int);
switch (optional) {
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -3472,7 +3469,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'S': /* H5VL_subclass_t */
{
- H5VL_subclass_t subclass = (H5VL_subclass_t)HDva_arg(ap, int);
+ H5VL_subclass_t subclass = (H5VL_subclass_t)va_arg(ap, int);
switch (subclass) {
case H5VL_SUBCLS_NONE:
@@ -3536,7 +3533,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 't': /* H5VL_dataset_optional_t */
{
- H5VL_dataset_optional_t optional = (H5VL_dataset_optional_t)HDva_arg(ap, int);
+ H5VL_dataset_optional_t optional = (H5VL_dataset_optional_t)va_arg(ap, int);
switch (optional) {
case H5VL_NATIVE_DATASET_FORMAT_CONVERT:
@@ -3588,7 +3585,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'u': /* H5VL_datatype_optional_t */
{
- H5VL_datatype_optional_t optional = (H5VL_datatype_optional_t)HDva_arg(ap, int);
+ H5VL_datatype_optional_t optional = (H5VL_datatype_optional_t)va_arg(ap, int);
H5RS_asprintf_cat(rs, "%ld", (long)optional);
} /* end block */
@@ -3596,7 +3593,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'v': /* H5VL_file_optional_t */
{
- H5VL_file_optional_t optional = (H5VL_file_optional_t)HDva_arg(ap, int);
+ H5VL_file_optional_t optional = (H5VL_file_optional_t)va_arg(ap, int);
switch (optional) {
case H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE:
@@ -3726,7 +3723,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'w': /* H5VL_group_optional_t */
{
- H5VL_group_optional_t optional = (H5VL_group_optional_t)HDva_arg(ap, int);
+ H5VL_group_optional_t optional = (H5VL_group_optional_t)va_arg(ap, int);
switch (optional) {
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -3748,7 +3745,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'x': /* H5VL_link_optional_t */
{
- H5VL_link_optional_t optional = (H5VL_link_optional_t)HDva_arg(ap, int);
+ H5VL_link_optional_t optional = (H5VL_link_optional_t)va_arg(ap, int);
H5RS_asprintf_cat(rs, "%ld", (long)optional);
} /* end block */
@@ -3756,7 +3753,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'y': /* H5VL_object_optional_t */
{
- H5VL_object_optional_t optional = (H5VL_object_optional_t)HDva_arg(ap, int);
+ H5VL_object_optional_t optional = (H5VL_object_optional_t)va_arg(ap, int);
switch (optional) {
case H5VL_NATIVE_OBJECT_GET_COMMENT:
@@ -3792,7 +3789,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'z': /* H5VL_request_optional_t */
{
- H5VL_request_optional_t optional = (H5VL_request_optional_t)HDva_arg(ap, int);
+ H5VL_request_optional_t optional = (H5VL_request_optional_t)va_arg(ap, int);
H5RS_asprintf_cat(rs, "%ld", (long)optional);
} /* end block */
@@ -3805,7 +3802,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
break;
case 'x': { /* void / va_list */
- vp = HDva_arg(ap, void *);
+ vp = va_arg(ap, void *);
if (vp)
H5RS_asprintf_cat(rs, "%p", vp);
@@ -3815,7 +3812,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
break;
case 'z': {
- size_t size = HDva_arg(ap, size_t);
+ size_t size = va_arg(ap, size_t);
H5RS_asprintf_cat(rs, "%zu", size);
asize[argno] = (hssize_t)size;
@@ -3826,7 +3823,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
switch (type[1]) {
case 'a': /* H5Z_SO_scale_type_t */
{
- H5Z_SO_scale_type_t scale_type = (H5Z_SO_scale_type_t)HDva_arg(ap, int);
+ H5Z_SO_scale_type_t scale_type = (H5Z_SO_scale_type_t)va_arg(ap, int);
switch (scale_type) {
case H5Z_SO_FLOAT_DSCALE:
@@ -3850,7 +3847,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'c': /* H5Z_class2_t */
{
- H5Z_class2_t *filter = HDva_arg(ap, H5Z_class2_t *);
+ H5Z_class2_t *filter = va_arg(ap, H5Z_class2_t *);
H5RS_asprintf_cat(rs, "%p", (void *)filter);
} /* end block */
@@ -3858,7 +3855,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'e': /* H5Z_EDC_t */
{
- H5Z_EDC_t edc = (H5Z_EDC_t)HDva_arg(ap, int);
+ H5Z_EDC_t edc = (H5Z_EDC_t)va_arg(ap, int);
if (H5Z_DISABLE_EDC == edc)
H5RS_acat(rs, "H5Z_DISABLE_EDC");
@@ -3871,7 +3868,7 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'f': /* H5Z_filter_t */
{
- H5Z_filter_t id = HDva_arg(ap, H5Z_filter_t);
+ H5Z_filter_t id = va_arg(ap, H5Z_filter_t);
if (H5Z_FILTER_NONE == id)
H5RS_acat(rs, "H5Z_FILTER_NONE");
@@ -3894,14 +3891,14 @@ H5_trace_args(H5RS_str_t *rs, const char *type, va_list ap)
case 'F': /* H5Z_filter_func_t */
{
- H5Z_filter_func_t ffunc = (H5Z_filter_func_t)HDva_arg(ap, H5Z_filter_func_t);
+ H5Z_filter_func_t ffunc = (H5Z_filter_func_t)va_arg(ap, H5Z_filter_func_t);
H5RS_asprintf_cat(rs, "%p", (void *)(uintptr_t)ffunc);
} /* end block */
break;
case 's': {
- ssize_t ssize = HDva_arg(ap, ssize_t);
+ ssize_t ssize = va_arg(ap, ssize_t);
H5RS_asprintf_cat(rs, "%zd", ssize);
asize[argno] = (hssize_t)ssize;
@@ -4034,7 +4031,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
* since the one for the function call, then we're continuing
* the same line. */
if (returning) {
- HDassert(current_depth > 0);
+ assert(current_depth > 0);
--current_depth;
if (current_depth < last_call_depth) {
/* We are at the beginning of a line */
@@ -4068,9 +4065,9 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
}
/* Format arguments into the refcounted string */
- HDva_start(ap, type);
+ va_start(ap, type);
H5_trace_args(rs, type, ap);
- HDva_end(ap);
+ va_end(ap);
/* Display event time for return */
if (returning && H5_debug_g.ttimes) {
@@ -4088,7 +4085,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
H5RS_acat(rs, ")");
}
HDfputs(H5RS_get_str(rs), out);
- HDfflush(out);
+ fflush(out);
H5RS_decr(rs);
if (H5_debug_g.ttimes)